Appendix D
ChartScan Program Examples
ChartScan User’s Manual
D-11
Collecting Binary-Formatted HLL Data using
BIN_HLL.BAS
The following program,
BIN_HLL.BAS
, in the EXAMPLES directory will set up the ChartScan to collect
High/Low/Last channel readings in a binary format rather than the default ASCII format. This is inherently
faster than ASCII format, but the data must be deciphered after it is collected to yield temperature values.
This program configures the channels, uploads HLL data in High speed binary mode, decodes this data and
displays 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.
'Establish communication with the DRIVER488
OPEN "\DEV\IEEEOUT" FOR OUTPUT AS #1
IOCTL #1, "BREAK"
PRINT #1, "RESET"
OPEN "\DEV\IEEEIN" FOR INPUT AS #2
PRINT #1, "TIMEOUT 5"
PRINT #1, "ERROR ON"
PRINT #1, "FILL ERROR"
PRINT #1, "TERM IN LF EOI"
'Program the ChartScan to power on with Factory default
PRINT #1, "CLEAR 07"
PRINT #1, "OUTPUT 07;*S1X"
'Reset ChartScan and make sure it is ready
CLS : PRINT "The ChartScan is resetting.."
PRINT #1, "OUTPUT 07;*RX"
SLEEP 3
WHILE (S% AND 4) = 0
PRINT #1, "SPOLL 07"
INPUT #2, S%
WEND
'Setup the ChartScan for line cycle integration mode
PRINT #1, "OUTPUT 07;M#0X"
PRINT #1, "OUTPUT 07;W#32X"
'Setup ChartScan for 16 channels TC type J and 16 Volts channels
PRINT #1, "OUTPUT 07;C1-16,1X"
PRINT #1, "OUTPUT 07;C17-32,14X"
'Program the ChartScan for binary format
PRINT #1, "OUTPUT 07;F0,1X"
'Start an acquisition with 1 pretrigger scan to enable the ChartScan
'to start scanning
PRINT #1, "OUTPUT 07;Y1,0,0X"
PRINT #1, "OUTPUT 07;T1,1,0,0X"
'Pause for key press
PRINT "The ChartScan is collecting High/Low/Last for all 32 channels.."
PRINT "Hit a key to start or stop reading HLL data.."
WHILE INKEY$ = "": WEND
CONST CHANNELS% = 32, BYTES = CHANNELS% * 20
DIM READS AS STRING * BYTES
S% = VARSEG(READS)
O% = VARPTR(READS)
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...