[SENSe:]DIGital:MEMory[:DATA]?
Syntax
[SENSe:]DIGital:MEMory[:DATA]? <index>, <count>, (@<channel>)
Description
This command performs a non-destructive read of data stored in memory from a buffered input operation on the 34950A Digital I/O Module. The specified number of samples are read, starting at the specified index (the oldest data is stored at index "0"). This command is not valid while buffered operations are enabled (see [SENSe:]DIGital:MEMory:ENABle command).
The width of the first channel in each bank (i.e., channels 101 and 201) controls the width of the memory operations (64K x 8 Bits, 64K x 16 Bits, or 32K x 32 Bits). The first channel on the specified bank must be configured as an input prior to starting a buffered read (see CONFigure:DIGital command).
Used With:
34950A Digital I/O Module
Parameters
Name |
Type |
Range of Values |
Default Value |
<index> |
Numeric |
Desired starting index. Specify any value between 0 (oldest data) and the most-recently acquired data in memory. Note that since memory is zero-based, the valid range for <index> is as follows: BYTE: 0
through 65534 |
This is a required parameter |
<count> |
Numeric |
Desired number of samples to be read. |
This is a required parameter |
<channel> |
Numeric |
One channel in the form (@sccc). |
This is a required parameter |
Remarks
Depending on the width specified (see CONFigure:DIGital:WIDTh command), the channel numbering is modified as shown below. For example, if you specify the width as a 16-bit WORD, channels 101 and 102 are combined and addressed collectively as channel 101.
|
Bank 2 |
Bank 1 |
||||||
BYTE (8 Bits): |
Ch 204 |
Ch 203 |
Ch 202 |
Ch 201 |
Ch 104 |
Ch 103 |
Ch 102 |
Ch 101 |
WORD (16 Bits): |
Ch 203 |
Ch 201 |
Ch 103 |
Ch 101 |
||||
LWORd (32 Bits): |
Ch 201 |
Ch 101 |
The sum of the count and the index must be less than the number of captured sample points (see [SENSe:]DIGital:MEMory[:DATA]:POINts? command).
To read all data stored in memory from a buffered input operation, use the [SENSe:]DIGital:MEMory[:DATA]:ALL? command.
To clear the memory, use the [SENSe:]DIGital:MEMory:CLEar command.
When reading data from memory, you can specify the byte order (NORMal or SWAPped) using the FORMat:BORDer command.
Return Format
This command returns the specified number of samples. Use the [SENSe:]DIGital:MEMory[:DATA]:FORMat command to select a comma-separated ASCII ("LIST") format or a floating-point IEEE-488.2 Binary Block ("BLOCk") format.
Example
The following program segment enables a buffered read on channel 101 on the module in slot 3 and then reads the data from memory.
CONF:DIG:WIDTH
WORD,(@3101) !Width
= 16 bits
DIG:MEM:SAMP:COUN 20,(@3101) !Sample
count = 20
DIG:MEM:FORM LIST !Format
= ASCII list
DIG:MEM:ENAB ON,(@3101) !Enable
buffered read
DIG:MEM:STAR (@3101) !Start
buffered read
<Wait for sample count to be satisfied>
DIG:MEM:ENAB OFF,(@3101) !Disable
buffered read
DIG:MEM? 0,2,(@3101) !Read
2 samples from memory
Typical Response: 61440,65280
See Also
[SENSe:]DIGital:MEMory[:DATA]:ALL?
[SENSe:]DIGital:MEMory[:DATA]:FORMat
[SENSe:]DIGital:MEMory[:DATA]:POINts?