Appendix A API Commands
ChartScan User’s Manual A-51
R - Read Buffered Data
TYPE Buffer
EXECUTION Immediate
SYNTAX Rtype Read scan data from the acquisition buffer where type is the type of data
request being made. Valid options for type are: 1 - Read the oldest scan
currently residing in the acquisition buffer, 2 - Read the oldest complete
trigger block currently residing in the acquisition buffer, and 3 - Read all the
scan data that currently resides in the acquisition buffer.
R? Query the contents of the data buffer.
DESCRIPTION
The Read Buffered Data (R) command may only be used to extract data from the acquisition buffer which has
been collected as a result of an acquisition that has been previously configured. For more information regarding
the configuration of acquisitions, refer to the Set Trigger Configuration (T) command.
Since the unit’s buffer is organized as a FIFO (first in, first out), the Read Buffer Data command will always read
the oldest data available in the buffer first. As the controller requests buffer scan data, t he unit supplies the
oldest available scan. After the scan is supplied, that scan is no longer available. As s can data is read from the
acquisition buffer, the data is removed from the buffer and, thereafter, may not be referenced or read.
This command operates as follows: When a Read Buffer Data (R) command is interpret ed, the requested scan
data, if it exists, is moved, one scan at a time, from the Acquisition Buffer to the output queue where it will wait in
state until you remove it. Once the data is removed from the output queue, the next Read Buffered Data
command may be issued.
Note: If the appropriate amount of scan data is not in the acquisition buffer at the time t hese commands are
issued, a conflict error will result.
The Scan Available bit in the Status Byte (STB) register may be queried or Serial Polled to determine if there i s
any buffer scan data available. For a more complete description of how much data is available in the acquis ition
buffer at any particular time, the Buffer Status String (U6) command may be iss ued.
The Set Query Terminators (Q) command determines the format for the terminators f or acquisition buffer data.
For more information regarding the acquisition buffer terminators, refer to the Set Query Terminat ors (Q)
command.
Note: In High-speed, single-channel (burst mode), “scan” means one block of 256 samples.
EXAMPLE
S% = 0 ‘ Wait for a scan
While (S% and 8) = 0
PRINT#1 “SPOLL07"
INPUT#2, S%
WEND
PRINT#1,"OUTPUT07;R1X" ‘ Get the scan
PRINT#1,"ENTER07"
LINE INPUT#2, A$