Appendix A API Command Reference
NetScan Users Manual A-41
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 acquisit i on buf f er which has
been collected as a result of an acquisition that has been previously configured. For m ore i nf orm ation regarding
the configuration of acquisitions, refer to the Set Trigger Configuration (T) com m and.
Since the units buffer is organized as a FIFO (first in, first out), the Read Buffer Data com m and will always read
the oldest data available in the buffer first. As the controller requests buf f e r s can data, the unit supplies the
oldest available scan. After the scan is supplied, that scan is no l onger avai l abl e. As scan data is read from the
acquisition buffer, the data is removed from the buffer and, thereafter, m ay not be referenced or read.
This command operates as follows: When a Read Buffer Data (R) comm and is interpreted, the requested scan
data, if it exists, is moved, one scan at a time, from the Acquisition Buffer to t he out put queue where it will wait in
state until you remove it. Once the data is removed from the output queue, the next Read Buf fered Data
command may be issued.
Note: If the appropriate amount of scan data is not in the acquisition buffer at the time these 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 det erm ine if there is
any buffer scan data available. For a more complete description of how much data is avai l able in the acquisition
buffer at any particular time, the Buffer Status String (U6) com m and may be issued.
The Set Query Terminators (Q) command determines the format for the t erm inators for acquisition buffer data.
For more information regarding the acquisition buffer terminators, refer to t he Set Query Terminators (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 U1X"
INPUT#1, A$
S%=VAL(A$)
WEND
PRINT#1,"R1X"
Get the scan
LINE INPUT#1, A$