Appendix D
ChartScan Program Examples
ChartScan User’s Manual
D-3
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
the 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. Since format of the volts data is subtly different than that of the temperature data, two different
FOR
loops must be used to extract the channels data.
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) ‘Extract temp. data
NEXT i
FOR i = 1 TO 16
PRINT “High, Low and Last readings of Channel”; i + 16
PRINT MID$(U$, (32 * 66) + (i * 78) - 77, 78)
‘Extract volts data
NEXT i
WEND
Acquiring Pre- & Post-Trigger Data at Different Rates using
SLOW_ACQ.BAS
The following program is
SLOW_ACQ.BAS
in the EXAMPLES directory. It will configure 32
temperature channels and then collect data as soon as it becomes available and post it on 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.
CLS : PRINT “The ChartScan is resetting..”
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 Type J thermocouples
and a range of channels from 17 to 32 as Type K thermocouples.
PRINT #1, “OUTPUT 07;C1-16,1X”
PRINT #1, “OUTPUT 07;C17-32,2X”
The
Y
command is used to configure the number of scans to take while in the different acquisition states. In
this example, 30 scans are taken while in the pre-trigger state, 1 while in the post-trigger state, and 200
while in the post-stop state. The post-trigger count is only valid when the stop event, set by the
T
command
is set to Counted. This application does not use Counted, so this parameter is ignored.
PRINT #1, “OUTPUT 07;Y30,1,200X”
The
I
command sets the time between scans in hours-minutes-seconds format. The ChartScan can have
two separate scan intervals, one that is used in the post-trigger state, and one that is used in all other states.
This example sets up the post-trigger scan interval to 0.3 seconds (3.33 Hz), and the pre-trigger and post-
stop scan intervals to 1 second (1 Hz).
PRINT #1, “OUTPUT 07;I00:00:01.0,00:00:0.3X”
Содержание 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...