[SENSe:]DIGital:INTerrupt:MODE
Syntax
[SENSe:]DIGital:INTerrupt:MODE <mode>, (@<ch_list>)
[SENSe:]DIGital:INTerrupt:MODE? (@<ch_list>)
Description
This command selects the condition to be reported by the hardware INTR (interrupt) line on the 34950A Digital I/O Module (one INTR line per bank). When buffered memory input operations are enabled on the specified bank (see [SENSe:]DIGital:MEMory:ENABle command), you can use the INTR line to provide a hardware indication that either memory is full (default) or a valid pattern match has been detected. The INTR line will be asserted when the selected condition is true, and will be de-asserted as soon as the condition goes false.
Since interrupts are used for transfers involving the first channel on a bank only, this command must be directed to the first channel (i.e., channel 101 or 201 only), and extends to all channels involved in the channel width (see CONFigure:DIGital:WIDTh command). You can send this command at any time, but the setting applies only if buffered memory input operations are enabled and interrupts are enabled (see [SENSe:]DIGital:INTerrupt[:ENABle] command).
Used With:
34950A Digital I/O Module
Parameters
Name |
Type |
Range of Values |
Default Value |
<mode> |
Discrete |
{MFULl|COMPare} |
MFULl (memory full) |
<ch_list> |
Numeric |
The first channel on a bank in the form (@sccc).
|
This is a required parameter |
Remarks
If the INTR line is enabled and the mode is set to COMPare (pattern match), an interrupt will be generated when a pattern match is detected on the specified channels (see CALCulate:COMPare:DATA[:<width>] command). Note that the pattern comparison mode will generate hardware interrupts even if the pattern compare mode is disabled (see CALCulate:COMPare:STATe command).
The instrument disables interrupts after a Factory Reset (*RST command) and sets the INTR line to a high-impedance state. An Instrument Preset (SYSTem:PRESet command) or Card Reset (SYSTem:CPON command) does not change the setting.
Return Format
The query command returns "MFUL" or "COMP" for each channel specified. Multiple responses are separated by commas.
Examples
The following program segment configures the module in slot 3 for one 16-bit word and enables the buffered memory input mode with a sample count of 250 read operations. When memory becomes full, a hardware interrupt will be generated on the INTR line (Bank 1).
CONF:DIG:WIDTH
WORD,(@3101) !Width
= 16 bits
DIG:MEM:SAMP:COUNT 250,(@3101) !Sample
count is 250 read operations
DIG:MEM:ENAB ON,(@3101) !Enable
buffered memory mode
DIG:MEM:START (@3101) !Start
buffered read operation
DIG:INT:MODE MFUL,(@3101) !Select
"memory full" interrupt
DIG:INT:ENAB ON,(@3101) !Enable
interrupts (Bank 1)
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 hardware interrupt will be generated on the INTR line (Bank 2).
CONF:DIG:WIDTH WORD,(@3201) !Width
= 16 bits
DIG:MEM:ENAB ON,(@3201) !Enable
buffered memory mode
CALC:COMP:DATA:BYTE 140,(@3201) !Set
comparison pattern (1000 1100)
DIG:INT:MODE COMP,(@3201) !Interrupt
on pattern match
DIG:INT:ENAB ON,(@3201) !Enables
interrupts on channel 101
DIG:INT:MODE COMP,(@3201) !Select
"compare" interrupt
DIG:INT:ENAB ON,(@3201) !Enable
interrupts (Bank 2)
The following query returns the interrupt mode settings on channels 101 and 201 in slot 3.
DIG:INT:MODE? (@3101,3201)
Typical Response: MFUL,COMP
See Also
CALCulate:COMPare:DATA[:<width>]
[SENSe:]DIGital:INTerrupt[:ENABle]
[SENSe:]DIGital:INTerrupt:STATus?