ChartScan Program Examples
Appendix D
D-4
ChartScan User’s Manual
The
T
command sets up the trigger parameters for the acquisition. In this example, the start event is an ‘
@
’
character sent by the controller, and the stop event is also an ‘
@
’ character. The auto-rearm flag is set to
0
(off), so that the ChartScan will not re-arm itself for another acquisition after this acquisition is complete.
The synchronization flag is also off, so the ChartScan will not re-synchronize itself to the trigger point when
the start event begins. When the ChartScan encounters the
X
command, it will be armed and start the
collection of the pre-trigger data.
PRINT #1, “OUTPUT 07;T1,1,0,0X”
The next four lines, prompt you to hit a key to trigger the ChartScan. When a key is hit, the ‘
@
’ character is
sent, which is the system’s start event.
PRINT “The ChartScan is collecting pre-triggered data and is
ready for a trigger..”
PRINT “Press a key to trigger the start of Acquisition..”
WHILE INKEY$ = “”: WEND
PRINT #1, “OUTPUT 07;@X”
While in the post-trigger state, our application will first check for a scan to be available by serial polling the
device and comparing the response with an 8. If a scan is available, the
R1
command tells the ChartScan to
send the oldest scan to the controller.
ENTER
requests the response data from the device. QuickBASIC’s
INPUT
command places the retrieved data into the variable
READINGS$
.
Note that the program can go to other “foreground” tasks while ChartScan is acquiring data, and only
occasionally query the unit and collect its data. This is possible since the acquisition is slow, and
ChartScan’s buffer can be relatively large.
‘Upload data as it becomes available
PRINT “The program is currently collecting data as it becomes available..”
PRINT “Hit a key to stop Acquisition ..”
i = 0
WHILE INKEY$ = ‘’
i = i + 1
S% = 0
WHILE ((s% and 8) <>8)
‘Is scan available?
PRINT #1, “SPOLL 07"
INPUT #2, S%
WEND
PRINT #1, “OUTPUT 07;R1X”
‘Ask for one scan
PRINT#1, “ENTER 07"
INPUT#2, READING$
LOCATE7, 1: PRINT “The scan”; i; “was::”; READING$
WEND
After a key has been pressed, the program proceeds to the next block where the ‘
@
’ character is issued
again, ending the post-trigger state and entering the post-stop state.
PRINT #1, “OUTPUT 07;@X”
Now the collection of the post-stop data begins by querying for new scans and requesting the data. The
program is done when the acquisition is complete.
i=0
WHILE INKEY$=""
i=i+1
s%=0
WHILE ((S% AND 8) <> 8)
PRINT #1, “SPOLL07"
INPUT #2, S%
WEND
PRINT #1, “OUTPUT07;R1X”
PRINT #1, ENTER 07"
INPUT #2, READING$
LOCATE 7, 1:PRINT “The scan ”;i:was:’; READING$
PRINT #1, “OUTPUT07;UOX:
PRINT #1, :ENTER07"
OUTPUT #2, U%
if U%=1 then END
WEND
Содержание OMB-CHARTSCAN 1400
Страница 1: ...August 2002 OMB CHARTSCAN 1400 Portable Data Recorder p n OMB 483 0901 Rev 3 1...
Страница 6: ...iv ChartScan User s Manual...
Страница 24: ...ChartScan User s Manual...
Страница 32: ...2 8 General Information ChartScan User s Manual Notes...
Страница 56: ...3 24 ChartScan User s Manual Notes...
Страница 117: ...ChartScan User s Manual Calibration 6 13 1 Connect an applicable calibration harness to each card Refer to figure below...
Страница 124: ...6 20 Calibration ChartScan User s Manual...
Страница 126: ...A ii ChartScan User s Manual...
Страница 136: ...API Commands Appendix A A 10 ChartScan User s Manual Notes...
Страница 176: ...API Commands Appendix A A 50 ChartScan User s Manual...
Страница 230: ...Appendix C Registers Data Formats Queries ChartScan User s Manual C 13...
Страница 237: ...Registers Data Formats Queries Appendix C C 20 ChartScan User s Manual Notes...
Страница 257: ...E 2 ChartScan User s Manual Notes...
Страница 265: ...ASCII Code Summary Appendix F F 8 ChartScan User s Manual Notes...
Страница 269: ...Abbreviations Appendix H H 2 ChartScan User s Manual Notes...
Страница 271: ...ChartScan User s Manual...