A-24 | Thermox Series 2000 WDG Insitu Analyzer
Sample Program
This section provides a sample Quick Basic program that reads and writes
to the serial port
DECLARE FUNCTION Checksum$ (M$)
‘Serial test routine’ Continuously sends a message and prints the string
returned
CLS
‘Open the communications port
OPEN “COM2: 9600,N,8,1 “ FOR RANDOM AS #1
‘String to be sent
T$ = “08”
‘Address of the analyzer
Address% = 0
‘Build the message
M$ = “>” + HEX$(Address%) + “F” + T$
M$ = M$ + Checksum$(M$)
‘Continue sending message until key pressed
‘ (Assumes that analyzer is connected)
WHILE (INKEY$ = “”)
PRINT #1, M$
LINE INPUT #1, A$
‘Show results
PRINT “Sent......”; M$
PRINT “Returned...”; A$
PRINT
WEND
CLOSE #1
STOP
FUNCTION Checksum$ (M$)
DIM Sum AS LONG
Sum = 0
‘Skip FOR i% = 2 TO LEN(M$)
Sum = Sum + ASC(MID$(M$, i%, 1))
NEXT i%
‘Get low byte of checksum
Checksum$ = HEX$(Sum MOD 256)
END FUNCTION<P255D>
Содержание Thermox WDG Insitu
Страница 12: ...xii Thermox Series 2000 WDG Insitu This page intentionally left blank...
Страница 20: ...1 8 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 24: ...2 4 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 28: ...3 4 Thermox Series 2000 WDG Insitu Analyzer Figure 3 2 Insitu senor mounting...
Страница 44: ...3 20 Thermox Series 2000 WDG Insitu Analyzer Figure 3 19 Sensor connections...
Страница 51: ...Installation and Start Up 3 27 Figure 3 23 Series 2000 2 Wire RS 485 communications connections...
Страница 53: ...Installation and Start Up 3 29 Figure 3 24 Series 2000 4 wire RS 485 communication connections...
Страница 114: ...6 16 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 128: ...7 14 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 154: ...A 26 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 158: ...B 4 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...
Страница 164: ...D 2 Thermox Series 2000 WDG Insitu Analyzer This page intentionally left blank...