[SENSe:]DIGital:MEMory:COMPare:ACTion

34980A

[SENSe:]DIGital:MEMory:COMPare:ACTion

Syntax

[SENSe:]DIGital:MEMory:COMPare:ACTion <mode>, (@<ch_list>)

[SENSe:]DIGital:MEMory:COMPare:ACTion? (@<ch_list>)

Description

This command starts or stops a buffered (memory) input operation when a pattern comparison is found on the 34950A Digital I/O Module. This command is used in conjunction with the CALCulate:COMPare commands to configure the pattern comparison parameters. 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

<mode>

Discrete

{CONTinue|STARt|STOP}

CONTinue (state of buffered read is not affected upon pattern match)

<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

  • Pattern comparisons are performed on a per-bank basis (i.e., the entire bank is reserved for the pattern comparison). For example, if you are using channels 101 and 102 for pattern comparison and then perform a static read of channel 103, the module will perform a pattern comparison on channels 101 and 102.

  • If a buffered input operation is already running, any extraneous "start" requests upon pattern match will be ignored. If a buffered input operation is already stopped, any extraneous "stop" requests upon pattern match will be ignored.

  • Pattern comparisons can be performed with or without handshaking (see CONFigure:DIGital:HANDshake command). If you are using handshaking, the specified digital pattern is evaluated with each handshaking operation. If you are not using handshaking, the specified digital pattern is evaluated continuously as soon as you enable the pattern comparison mode.

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

Return Format

The query command returns "CONT", "STAR", or "STOP" for each channel specified. Multiple responses are separated by commas.  

Examples

The following program segment sets the digital pattern for the module in slot 3 and then enables the pattern comparison mode. When the data read from the bank is equal to the comparison pattern, a buffered read is initiated. In this example, handshaking is not used.

CONF:DIG:WIDTH BYTE,(@3101,3201)  !Width = 8 bits
CALC:COMP:DATA:BYTE 140,(@3101,3201)  !Set comparison pattern (1000 1100)
CALC:COMP:STAT ON,(@3101,3201)  !Enable pattern comparison mode
DIG:MEM:SAMP:COUN 200,(@3101,3201)  !Sample count = 200
DIG:MEM:ENAB ON,(@3101,3201)  !Enable buffered reads
DIG:MEM:COMP:ACT STAR,(@3101,3201)
 !Start buffered read upon match

The following query returns the pattern comparison setting on channels 101 and 201 on the module in slot 3.

DIG:MEM:COMP:ACT? (@3101,3201)

Typical Response:  STAR,STAR

See Also

CALCulate:COMPare:DATA

CALCulate:COMPare:MASK

CALCulate:COMPare:STATe

CALCulate:COMPare:TYPE

CONFigure:DIGital

CONFigure:DIGital:HANDshake

CONFigure:DIGital:WIDTh

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

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

[SENSe:]DIGital:MEMory:ENABle

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

[SENSe:]DIGital:MEMory:STARt

[SENSe:]DIGital:MEMory:STOP