Age1439_interrupt_setup – Agilent Technologies VXI E1439 User Manual
Page 156

146
Agilent E1439 Programmer's Reference
Functions listed alphabetically
age1439_interrupt_setup
Sets both interrupt parameters. This description also includes information on the following
functions which query the interrupt parameters individually:
age1439_interrupt_mask_get gets the interrupt event mask
age1439_interrupt_priority_get gets the VME interrupt line
VXIplug&play Syntax
#include "age1439".h
ViStatus age1439_interrupt_setup(ViSession id, ViInt16 intrNum, ViInt16 priority, ViInt16
mask);
ViStatus age1439_interrupt_mask_get(ViSession id, ViInt16 intrNum, ViPInt16 maskPtr);
ViStatus age1439_interrupt_priority_get(ViSession id, ViInt16 intrNum, ViPInt16
priorityPtr);
Description
An Agilent E1439 has two independent interrupt generators, each capable of interrupting on one
of the seven VME interrupt lines when a status condition specified by a mask occurs.
age1439_interrupt_setup sets the interrupt mask, priority and which of the two interrupt
generators on the Agilent E1439 is to be used. The remaining age1439_interrupt_ functions
query the mask and priority individually.
Parameters
id
is the VXI instrument session pointer returned by the age1439_init function.
intrNum
is the number of the interrupt generator. The only values accepted are 0 and 1.
mask
specifies the mask of events on which to interrupt. VXIbus specifications only allow the 8 most
significant bits in the status register, bits 8 to 15, to be set as interrupts. Because of this, the
desired mask value must be right shifted 8 positions. In the E1439, bits 14 and 15 of the status
register cannot be used to generate interrupts, effectively leaving only 6 bits, 8 through 13, to
generate interrupts.
priority
specifies which of the seven VME interrupt lines to use. The only legal values are 0 through 7.
Specifying 0 turns the interrupt off, while 7 is the highest priority.
maskPtr priorityPtr contain the current value of the interrupt mask and priority parameters.
Comments
Interrupt masks are cleared during the interrupt acknowledge cycle. Therefore, the command
must be sent again or restored with
“age1439_interrupt_restore” on page 145
in order to generate
further interrupts.
Example
The program interrupt.exe described in the example programs provides an example of how to use
interrupts correctly.