Appendix D ChartScan Program Examples
ChartScan User’s Manual D-17

Configure for High-Speed, Single-Channel Burst Mode using BURST.BAS

BURST.BAS configures ChartScan for the High-Speed, Single-Channel (Burst) measuring mode, sets up an
acquisition, waits for its completion and uploads the data in ASCII, as well as posts it on the screen. This
program also stops in the event of a buffer overrun.
'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
S% = 0
WHILE (S% AND 4) = 0
PRINT #1, "SPOLL 07"
INPUT #2, S%
WEND
'Setup the ChartScan for burst mode and a sampling frequency of 20kHz.
PRINT #1, "OUTPUT 07;M#1X"
PRINT #1, "OUTPUT 07;F#20000.0X"
'Setup ChartScan to do a burst scan on channel 1
PRINT #1, "OUTPUT 07;C1,14x"
SLEEP 1
'Program for 8 blocks of 256 samples
PRINT #1, "OUTPUT 07;Y0,8,0X"
'Program a trigger start on @ and a stop on count
PRINT #1, "OUTPUT 07;T1,8,0,0X"
'Start the burst acquisition
PRINT #1, "OUTPUT 07;@X"
PRINT "Waiting for acquisition to complete.."
U% = 0
WHILE (U% AND 1) <> 1
PRINT #1, "OUTPUT 07;U0X"
PRINT #1, "ENTER 07"
INPUT #2, U%
WEND
PRINT "The Acquisition is now complete"