ChartScan Program Examples
Appendix D
D-14
ChartScan User’s Manual
Using the
U6
query, the controller gets the trigger block string, which, among other things, supplies the
block complete flag, indicating the state of the present trigger block. The block is marked complete when
the last post-stop scan is recorded into the buffer.
PRINT “Waiting for completion of Block ”; i; “..”
DO
PRINT #1, “OUTPUT 07;U6X”
PRINT #1, “ENTER 07"
LINE INPUT #2, U$
UA$ = MID$(U$, 86, 2)
LOOP UNTIL UA$= “1"
PRINT “The ChartScan is done with Block”; i; “and has re-armed itself”
Using the
U$
string which still contains the trigger block status string, the number of scans available in the
buffer is calculated. The
R2
command is then used to retrieve the data in the ChartScan’s internal buffer.
‘Query the ChartScan for the # of scans available in the Buffer
UAT$ = MID$(U$, 9, 7)
PRINT UAT$
PRINT “The ChartScan collected a total of ”; VAL(UAT$); “ scans”
UA$ = MID$(U$, 18, 7)
PRINT UA$
PRINT “Pre-Triggered scans :”; VAL(UA$)
UA$ = MID$(U$, 47, 8)
PRINT “Post-Triggered scans :”; VAL(UA$)
UAS$ = MID$(U$, 77, 8)
PRINT “Post-stop-Triggered scans :”; VAL(UAS$) - VAL(UA$)
‘Upload Block
PRINT “Uploading trigger block”; i
PRINT #1, “OUTPUT 07;R2X”
FOR c = 1 TO VAL(UAT$)
PRINT #1, “ENTER 07"
LINE INPUT #2, SCAN$
NEXT c
PRINT “Block ”; i; “ is read.”
NEXT i
After all 5 trigger blocks have been collected, the unit is disarmed by sending the
T
command.
PRINT #1, “OUTPUT 07;T0,0,0,0X”
Configure for 12 Channels with Continuous Binary Upload using
CONTIN_D.BAS
This program configures the ChartScan for 12 Channels and allows the system to continuously upload
binary data to disk when the buffer is 75% full.
'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"
OPEN "Chrtscan.DAT" FOR OUTPUT AS #3
'output data file Dimensions
s! = 4096
'number of bytes to be transferred at a time
DataBuffer$ = SPACE$(s!)
DIM DataBuffer$(s!)
DEF FNPEEKW (addr) = PEEK(addr) + 256 * PEEK(addr + 1)
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...