Read buffered data – Measurement Computing TempScan/1100 User Manual
Page 246

A-50 API Command Reference
889897
TempScan / MultiScan User’s Manual
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 Acquisition Buffer.
DESCRIPTION
The TempScan/1100 or MultiScan/1200 Acquisition Buffer is a FIFO (First-In First-Out) buffer. In other words, the
oldest scan data to be written into the buffer is the first scan data to be read from the buffer when a read operation
is performed. Then once the scan data is read from the buffer by the controller, that data is erased from the
buffer.
To retrieve the scan data after a Trigger has occurred, the unit provides multiple query functions. The Read
Buffered Data (
R
) command is used to retrieve data specifically from the Acquisition Buffer. You can use this
command to read anywhere from one scan to all the scan data currently residing in the buffer. This command
has the following valid options:
•
Read the oldest scan currently residing in the Acquisition Buffer (
R1
).
•
Read the oldest complete Trigger Block currently residing in the Acquisition Buffer (
R2
).
•
Read all the scan data currently residing in the Acquisition Buffer (
R3
).
The Read Buffer Data (
R
) command operates as follows: When a command is interpreted, 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 (
R
)
command may be issued.
For more information on the Acquisition Buffer, see section Acquisition Buffer in the chapter System Operation.
For information on formatting the query terminators for buffer data, see command Set Query Terminators (
Q
).
Note: If the appropriate amount of scan data is not in the Acquisition Buffer at the time these commands are
issued, a Command Conflict Error will result.
Note: For the MultiScan/1200 only, if the unit is in single-channel high-speed burst mode, then “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$