![Campbell CS125 Скачать руководство пользователя страница 72](http://html1.mh-extra.com/html/campbell/cs125/cs125_instruction-manual_3803392072.webp)
CS125 Present Weather Sensor
C-8
Dim CS125CommandString As String * 100
Dim i As Long
Dim CheckVal As Long
' Create a string containing the values going out to the CS125
TempStringFunc = "SETNC:0:"
For i = 1 To 21
TempStringFunc = TempStri CS125CArray(i) + " "
Next
' Create a check sum of the values going out
CheckVal = CheckSum (TempStringFunc,1,0) ' Use the CCITT CRC16 checksum
' Create final string going out to CS125 including start characters and end
characters
CS125CommandString = CHR(2) + TempStri ":" + FormatLong (CheckVal,"%04X") +
":" + CHR(3) + CHR(13) + CHR(10)
'CS125CommandString = CHR(2) + TempStri CHR(3) + CHR(13) + CHR(10) ' Use this
line if no checksum is desired
Return(CS125CommandString)
EndFunction
'-------------------------------------------------------
'Main Program
BeginProg
' Open port to the visibility sensor using Com1
SerialOpen (Com1,115200,3,0,10000)
' Note: Change the following array variable to suit your own application
' load example/dummy values into the array
' Loading the array is not strictly necessary, but is done as a fail safe in
' case the GET command does not return data
CS125CArray(1) = 0 ' Set ID to 0
CS125CArray(2) = 0 ' Disable alarm 1
CS125CArray(3) = 1 ' Set alarm 1 to if greater than
CS125CArray(4) = 10000 ' Set alarm 1 trigger distance to 10000
CS125CArray(5) = 0 ' Disable alarm 2
CS125CArray(6) = 0 ' Set alarm 2 to if less than
CS125CArray(7) = 10000 ' Set alarm 2 trigger distance to 10000
CS125CArray(8) = 0 ' Set serial baud rate to 115200bps
CS125CArray(9) = 0 ' Read only so dummy value added here, but not needed
CS125CArray(10) = "M" ' Set unit type to metres (use upper case)
CS125CArray(11) = 60 ' Set output period to 60 seconds
CS125CArray(12) = 1 ' Polling mode
CS125CArray(13) = 2 ' Set FULL output message format
CS125CArray(14) = 0 ' Set RS232 serial mode
CS125CArray(15) = 1 ' Set averaging over one minute
CS125CArray(16) = 1 ' Set sample timing to one second
CS125CArray(17) = 0 ' Set dew heaters to automatic
CS125CArray(18) = 0 ' Set hood heaters to automatic
CS125CArray(19) = 0 ' Don't use dirty window compensation
CS125CArray(20) = 1 ' Use CRC checking on incoming command line data
CS125CArray(21) = 7.0 ' Set Low voltage battery shutdown to a very low value so it
doesn't trigger
StatusDewHeater=False
Scan (10,Sec,0,0)
Содержание CS125
Страница 2: ......
Страница 6: ......
Страница 10: ...vi...
Страница 60: ......
Страница 62: ...CS125 Present Weather Sensor A 2...
Страница 64: ...CS125 Present Weather Sensor B 2...
Страница 75: ......