Keysight 34950A User’s Guide 33
Pattern Matching 
Pattern matching can be used on input channels only. Pattern matching can be 
done with or without handshaking. When a pattern match occurs, the 34950A can 
set an interrupt line or system alarm. A pattern match can also be used to start or 
stop a buffered (memory) transfer. 
Pattern matching is done on a per bank basis and always starts at the first 
channel of a bank and works up to encompass the configured width of the 
channel. 
Patterns are set up and enabled using the CALCulate subsystem of SCPI 
commands. For example, the following commands set up a pattern match 
(#HF00F) and assert the interrupt line when the input pattern is equal to the 
match pattern. 
CONF:DIG:WIDT WORD, (@1101)
CALC:COMP:DATA #HF00F, (@1101)
CALC:COMP:TYPE EQUAL, (@1101)
SENS:DIG:INT:MODE COMP, (@1101)
SENS:DIG:INT:ENAB ON, (@1101)
CALC:COMP:STAT ON, (@1101)
Once the pattern matching state is turned on, the 34950A polls for the pattern 
#HF00F to appear on the data lines of channel 101. The interrupt line will be 
asserted when the pattern is matched. In the example above the last command, 
CALCulate:COMPare:STATe, also sets the mainframe alarm on a pattern match. 
You can use pattern matching to start or stop a buffered (memory) input transfer. 
When the desired pattern is found, the 34950A can be set to start or stop a 
capture. 
For example, the following commands establish a byte pattern match on channels 
101 and 201. When the pattern is found, 200 samples are captured. 
CONF:DIG:WIDTH BYTE,(@3101,3201) 
CALC:COMP:DATA:BYTE 140,(@3101,3201) 
CALC:COMP:STAT ON,(@3101,3201) 
DIG:MEM:SAMP:COUN 200,(@3101,3201)
DIG:MEM:COMP:ACT STAR,(@3101,3201)
DIG:MEM:ENAB ON,(@3101,3201)