Omega Vehicle Security 1400 User Manual

Page of 273
ChartScan Program Examples                                                                                                                                       
        Appendix D
D-2
ChartScan User’s Manual
Reading HLL Status using HLL16.BAS
The following program is HLL16.BAS in the EXAMPLES directory.  It will configure 16 channels, collect
the HLL (high/low/last) data, and post it on the screen.
Although not necessary, it is good practice to reset the ChartScan at the beginning of your application by
sending it the “*R” command then waiting a few seconds.
PRINT #1, “OUTPUT 07;*RX”
SLEEP 4
To be certain that the reset was successful and the device is ready, serial poll the device until the proper
status is returned.
WHILE (S% AND 4) = 0
PRINT #1, “SPOLL 07"
INPUT #2, S%
WEND
The C command will be used to configure a range of channels from 1 to 16 as T-type thermocouples.
PRINT #1, “OUTPUT 07;C1-16,3X”
The next three lines tell you to hit a key to start the acquisition.  The program will not proceed until a key is
pressed.
PRINT “The ChartScan is collecting High/Low/Last for all 16 channels”
PRINT “Hit a key to start or stop retrieving HLL data..”
WHILE INKEY$ = “”: WEND
Until another key is pressed to exit the loop, the U4 command is issued and the high/low/last data is
collected.  The OUTPUT command sends U4 to the device, the ENTER command requests the data, then
QuickBASIC’s LINE INPUT gets the data from the IEEE 488 driver and places it in the variable U$.  The
FOR loop extracts the data for the individual channels from the string U$ and places them on the screen.
WHILE INKEY$ = “”
 PRINT #1, “OUTPUT 07;U4X”
 PRINT #1, “ENTER 07"
 LINE INPUT #2, U$
 FOR i = 1 TO 16
 PRINT “High, Low and Last readings of Channel”; i
 PRINT MID$(U$, (i * 66) - 65, 66)
 NEXT i
WEND
Time and date information is also available in the high/low/last data.
Reading HLL Data from T/C & Volts Cards using  HLL32.BAS
The following program is HLL32.BAS in the EXAMPLES directory.   It will configure 16 Temperature
and 16 volts channels then collect the high/low/last data and post it on the screen.
Although not necessary, it is good practice to reset the ChartScan at the beginning of your application by
sending it the “*R” command and then waiting a few seconds.
PRINT #1, “OUTPUT 07;*RX”
SLEEP 4
To be certain that the reset was successful and the device is ready, serial poll the device until the proper
status is returned.
WHILE (S% AND 4) = 0
PRINT #1, “SPOLL 07"
INPUT #2, S%
WEND
The C command will be used twice to configure a range of channels from 1 to 16 as T-type thermocouples
and a range of channels from 17 to 32 as +/- 10 volt inputs.
PRINT #1, “OUTPUT 07;C1-16,3X”
PRINT #1, “OUTPUT 07;C17-32,14X”
The next three lines tell you to hit a key to start the acquisition.   The program will not proceed until a key is
pressed.
PRINT “The ChartScan is collecting High/Low/Last for all 32 channels..”
PRINT “Hit a key to start or stop collecting HLL data..”
WHILE INKEY$ = “”: WEND