beautypg.com

Edge detected event detection – HP E1459A User Manual

Page 35

background image

34

Using the HP E1459A Module

Edge Detected Event Detection

The HP E1459A can respond to two types of events: Edge Events (either
negative edge, positive edge, or both) and Data Available. Figures 2-1 and
2-2 show the general flow of commands necessary to program the HP
E1459A to detect events. Figure 2-1 shows the flow for Edge Event
Detection, Figure 2-2 shows the flow for Data Available Event Detection.

Three general methods of identifying and servicing an HP E1459A detected
event are:

Polling the Port Summary Register

Polling the VXI Status Subsystem

SRQ Interrupt

When an Edge Event occurs, read the value of the port(s) with the

[SENSe:]EVENt:PORTn:NEDGe?

or

[SENSe:]EVENt:PORTn:PEDGe?

command. When a Data Available Event occurs, read the value of the port(s)
with the

MEASure:DIGital:DATAn

command.

Polling the Port

Summary Register

The first, and easiest method, is to repeatedly poll the Port Summary
Register using either the

SENSe:EVENt:PSUMmary:EDGE?

command (for

Edge Events) or the

SENSe:EVENt:PSUMmary:DAVailable?

command (for

Data Available Events) until an event occurs. Example 3 in this chapter
demonstrates this procedure.

Polling the Status

Subsystem

The second method is to set-up and repeatedly poll the Status Subsystem.
You can poll the port summary condition register with the

STATus:OPERation:PSUMmary:CONDition?

command to determine when

an event has occurred.

Alternately, set-up the port summary enable register to specify the type of
event(s) and port(s) to monitor; use the

STATus:OPERation:PSUMmary:ENABle<

mask>

command. Then enable

bit 9 in the Status Operation Enable register; use the

STATus:OPERation:ENABle

command. Repeatedly poll the module with

the *

STB?

command to determine when bit 7 becomes set.

SRQ Interrupt

The third method is to set-up the Status Subsystem and have the HP E1459A
Module interrupt (via SRQ) the system computer when an event occurs. In
general, you must set-up the port summary enable register to specify the type
of event(s) and port(s) to monitor; use the

STATus:OPERation:PSUMmary:ENABle<

mask>

command. Then, enable

bit 9 in the Status Operation Enable register; use the

STATus:OPERation:ENABle

command. Enable the OPR bit (bit 7) in the

Status Register with the

*SRE 128

command; this allows the Operation

Status register to generate the SRQ.

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com