Buffered I/O Operations
Agilent 34950A 64-Bit Digital I/O and Counter Module User’s Guide
17
Set the number of samples to collect.
The
SENSe:DIGital:MEMory:SAMPle:COUNt
command sets the number of samples to capture. If you set the number of
counts to infinite (0 = default), the bank will capture data until a STOP is
received. Older samples are overwritten if memory gets full. Allowed
sample counts depend upon the channel width as follows:
•
BYTE (8- bit) 1 to 65535
•
WORD (16- bit) 1 to 65535
•
LWORd (32- bit) 1 to 32767
Start the capture.
The
SENSe:DIGital:MEMory:STARt
command sets the
channel to begin the data capture. The capture begins when the handshake
occurs.
Check the status of the transfer.
You can use the
SENSe:DIGital:MEMory:DATA:POINts?
query to return the number of
samples currently in memory.
Retrieve the captured data.
Set the desired memory retrieval format using
the
SENSe:DIGital:DATA:FORMat
command. You can set the memory to be
read as either
LIST
or
BLOCk
. The
LIST
parameter (default) returns the
data as comma separated ASCII values.
BLOCk
returns the data in
IEEE- 488 block format.
Before you can read the data in memory, you must stop the memory
operations using the
SENSe:DIGital:MEMory:ENABle OFF
command.
Read all the captured data using the
SENSe:DIGital:MEMory:DATA:ALL?
query. This performs a non- destructive read of all data in the bank’s
memory.
To read specific captures, use the
SENSe:DIGital:MEMory:DATA?
form of
the command. This command takes
index
and
count
parameters to specify
which data to retrieve. The oldest data in memory has an
index
of ‘0’.
The
count
specifies the number of samples to read.
count
+
index
must
be less than the number of captured points.
Both these data reads are non- destructive to the bank memory.
To clear the memory for new data, send the
SENSe:DIGital:MEMory:CLEar
command.