beautypg.com

Pattern matching, Counter – Agilent Technologies L4400 User Manual

Page 228

background image

216

L4400 User’s Guide

8

L4450A 64-Bit Digital I/O with Memory and Counter

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 L4450A 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 L4450A 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 L4450A 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,(@1101,1201)

CALC:COMP:DATA:BYTE 140,(@1101,1201)

CALC:COMP:STAT ON,(@1101,1201)

DIG:MEM:SAMP:COUN 200,(@1101,1201)

DIG:MEM:COMP:ACT STAR,(@1101,1201)

DIG:MEM:ENAB ON,(@1101,1201)

Counter

The L4450A has two 10 MHz frequency counter/totalizer measurement
input channels. The counters can operate in two general modes: Totalizer
mode, and Initiated Measurement mode. In the totalizer mode, the counter
acts as a basic totalizer. In the initiated measurement mode, the counter
can make frequency, period, duty cycle, and pulse width measurements.