[SENSe:]DIGital:MEMory:SAMPle:COUNt

34980A

[SENSe:]DIGital:MEMory:SAMPle:COUNt

Syntax

[SENSe:]DIGital:MEMory:SAMPle:COUNt {<count>|MIN|MAX|DEF|INFinity}, (@<ch_list>)

[SENSe:]DIGital:MEMory:SAMPle:COUNt? [{MIN|MAX},] (@<ch_list>)

Description

This command sets the number of samples to capture for buffered (memory) input operations on the 34950A Digital I/O Module. The specified sample count can be set at any time, but it will not take effect until the next time you enable memory (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

<count>

Numeric

Desired sample count between 1 and 65535 (for 8- and 16-bit widths) or 32767 (for 32-bit widths).

MIN = 1, MAX = 65535 (32767 for 32-bit widths), INF = continuous

0 (continuous)

<ch_list>

Numeric

The first channel on a bank in the form (@sccc).
Select from s101 or s201.

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

  • If you specify an infinite sample count (default, INFinity or "0"), the bank will continue to capture data until you perform a stop operation using the [SENSe:]DIGital:MEMory:STOP command. If memory overflows, the newest data will overwrite the first (oldest) data stored. The most recent data is always preserved.

  • After specifying the desired sample count, you can use the [SENSe:]DIGital:MEMory:STARt command to start the buffered input operation.

  • For buffered input transfers, the oldest data is stored at index zero (0). You can use the [SENSe:]DIGital:MEMory[:DATA]? command to perform a non-destructive read of the data stored in memory. Or, use the [SENSe:]DIGital:MEMory:CLEar command to clear the memory.

  • You can use the [SENSe:]DIGital:MEMory[:DATA]:POINts? command to read the number of samples currently stored in memory.

  • The selected sample count is stored in volatile memory and will be set to 0 (continuous) when power is turned off or after a Factory Reset (*RST command).

Return Format

The query command returns the sample count for each channel specified. Multiple responses are separated by commas. For a continuous count ("0" or INFinity), the query command returns "0".

Examples

The following program segment sets the sample count on channels 101 and 201 on the module in slot 3.  

CONF:DIG:WIDTH WORD,(@3101,3201)  !Width = 16 bits
DIG:MEM:SAMP:COUN 200,(@3101,3201)
 !Sample count = 200
DIG:MEM:ENAB ON,(@3101,3201)  !Enable buffered reads
DIG:MEM:STAR (@3101,3201)  !Start buffered reads

The following query returns the sample count on channels 101 and 201 on the module in slot 3.

DIG:MEM:SAMP:COUN? (@3101,3201)

Typical Response:  200,200

See Also

CONFigure:DIGital

CONFigure:DIGital:WIDTh

[SENSe:]DIGital:MEMory:CLEar

[SENSe:]DIGital:MEMory[:DATA]?

[SENSe:]DIGital:MEMory[:DATA]:ALL?

[SENSe:]DIGital:MEMory[:DATA]:POINts?

[SENSe:]DIGital:MEMory:ENABle

[SENSe:]DIGital:MEMory:MATCh[:DATA]?

[SENSe:]DIGital:MEMory:STARt

[SENSe:]DIGital:MEMory:STOP