
Documentation Number UD128A8D4602 Manual Chapter 5 51
B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104
B&B Electronics Ltd – Westlink Comm. Pk. – Oranmore, Galway, Ireland – Ph 353-91-792444 – Fax 353-91-792445
For i = LBound(SampleReadings, 2) to _
UBound(SampleReadings, 2)
‘ \ Note: The space underscore ( _) is line continuation char
‘\2isthe2
nd
array element for Lbound and Ubound
txtAD7Result = txtAD7Result & _
Str(SampleReadings(4, i)) & VBCRLF
‘ \ without error checking
Next I
For i = LBound(SampleReadings, 2) to _
UBound(SampleReadings, 2)
‘ \ obtain value for checking
TempVal = (SampleReadings(4, I)
If TempVal < 4096 Then
‘ \ less than error value, use it
txtAD7Result = txtAD7Result & _
Str(TempVal) & VBCRLF
Else
‘ \ replace with error “****” string
txtAD7Result = txtAD7Result & _
“****” & VBCRLF
Endif
To display the readings from all enabled channels in the first sample
interval since the last GetSample in a text box called txtResult:
Dim i as Long
Dim SampleReadings() as Long
SampleReadings = Device1.GetSamples(100)
txtResult = “”
For i = LBound(SampleReadings, 1) to _
UBound(SampleReadings, 1)
‘ \ add your error checking
txtResult = txtResult & _
Str(SampleReadings(i, 1)) & VBCRLF
Next I
---------------
Commenti su questo manuale