EasyManuals Logo

Ametek Thermox Series 2000 WDG-IVC User Manual

Ametek Thermox Series 2000 WDG-IVC
193 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #179 background imageLoading...
Page #179 background image
A-24 | Thermox Series 2000 WDG-IV /I VC / IVCM
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>

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Ametek Thermox Series 2000 WDG-IVC and is the answer not in the manual?

Ametek Thermox Series 2000 WDG-IVC Specifications

General IconGeneral
BrandAmetek
ModelThermox Series 2000 WDG-IVC
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals