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
Summary of Contents for OMB-CHARTSCAN 1400
Page 1: ...August 2002 OMB CHARTSCAN 1400 Portable Data Recorder p n OMB 483 0901 Rev 3 1...
Page 6: ...iv ChartScan User s Manual...
Page 24: ...ChartScan User s Manual...
Page 32: ...2 8 General Information ChartScan User s Manual Notes...
Page 56: ...3 24 ChartScan User s Manual Notes...
Page 124: ...6 20 Calibration ChartScan User s Manual...
Page 126: ...A ii ChartScan User s Manual...
Page 136: ...API Commands Appendix A A 10 ChartScan User s Manual Notes...
Page 176: ...API Commands Appendix A A 50 ChartScan User s Manual...
Page 230: ...Appendix C Registers Data Formats Queries ChartScan User s Manual C 13...
Page 237: ...Registers Data Formats Queries Appendix C C 20 ChartScan User s Manual Notes...
Page 257: ...E 2 ChartScan User s Manual Notes...
Page 265: ...ASCII Code Summary Appendix F F 8 ChartScan User s Manual Notes...
Page 269: ...Abbreviations Appendix H H 2 ChartScan User s Manual Notes...
Page 271: ...ChartScan User s Manual...