CALCulate:COMPare:MASK <mask> [, (@<ch_list>)]
CALCulate:COMPare:MASK? [, (@<ch_list>)]
This command is used in conjunction with the CALCulate:COMPare:DATA command to set the digital mask data for
an 8-bit digital patterns comparisons on the selected channels.
Parameter Typical return
<mask> = An 8-bit digital patterns for comparison,
specified as an integer from 0 to 255.
Any integer from 0 to 255
To illustrate how the calculations are performed, see the example below which assumes that a decimal 146 was read from the digital input
channel. Since the calculations produce a non-zero result (decimal 16), an interrupt is not generated. Active bits are specified as 1's, and
"don't care" bits are specified as 0's.
MSB LSB
1001 0010 Data read from port (decimal 146)
1000 1100 CALC:COMP:DATA command (decimal 140)
0001 1110 X-OR result
1111 0000 CALC:COMP:MASK command (decimal 240)
0001 0000 AND result (decimal 16, no interrupt generated)
Note:
MSB = Most significant bit
LSB = Least significant bit
The query returns the mask as a decimal value (binary and hexadecimal values are converted to their decimal equivalents). The following
query returns the comparison patterns selected for the module in slot 3:
CALC:COMP:MASK? (@301)
Typical response: 240
– After specifying the desired digital patterns, use the CALCulate:COMPare:STATe command to enable
patterns comparisons on the selected channels.
– A Factory Reset (*RST command) clears the digital patterns and turns off the patterns comparison mode.
CALCulate:COMPare:STATe {OFF | ON} [, (@<ch_list>)]
CALCulate:COMPare:STATe? [, (@<ch_list>)]
Enables (On) or disables (Off) the patterns comparison mode on the selected channels. You can use the patterns
comparison feature to generate an alarm when a selected digital pattern is detected.
Parameter Typical return
{OFF | ON}
Default: OFF
0 (OFF) or 1 (ON)
Sets the comparison mode ON for the three selected channels: CALC:COMP:STAT 1,(@201,202,301)
– A Factory Reset (*RST command) clears the digital patterns and turns off the patterns comparison mode.
64
Keysight DAQ970A/DAQ973A Programming Guide
2 SCPI Programming