VXI manual Data Gating, VT1433B Users Guide The Host Interface Library, 4-28

Models: VT1433B

1 203
Download 203 pages 12.71 Kb
Page 106
Image 106
4-28

VT1433B User's Guide

The Host Interface Library

Host Interrupt Handling

When the VT1433B asserts the VME interrupt line, SICL will cause the specified interrupt handler to get called. Typically the interrupt handler routine will read data from the module and then re-enable VT1433B interrupts with

e1432_reenable_interrupt. The call to e1432_reenable_interrupt must be done unless the host is not interested in any more interrupts.

Inside the interrupt handler, almost any VT1432A Host Interface library function can be called. This works because the Host Interface library disables interrupts around critical sections of code, ensuring that communication with the VT1433B module stays consistent. Things that are not valid in the handler are:

￿Calling e1432_delete_channel_group to delete a group that is simultaneously being used by non-interrupt-handler code.

￿Calling one of the read data functions (e1432_read_raw_data,

e1432_read_float32_data or e1432_read_float64_data), if the non-interrupt-handler code is also calling one of these functions.

￿Calling e1432_assign_channel_numbers to reset the list of channels that are available to the VT1432A library.

As is always the case with interrupt handlers, it is easy to introduce bugs into a program and generally difficult to track them down. Be careful when writing this function.

Data Gating

Sometimes monitoring data from some input channels and not others is desirable. The function e1432_set_enable enables or disables data from an input channel (or group of channels). If data is enabled, then the data can be read using

e1432_block_available and e1432_read_xxx_data. If data is disabled, data from the specified channel is not made available to the host computer.

This parameter can be changed while a measurement is running, to allow the host computer to look at only some of the data being collected by the VT1433B module. While data from a channel is disabled the input module continues to collect data but it is not made available to the host computer. The host can then switch from looking at some channels to looking at others during the measurement. In contrast, the function e1432_set_active completely enables or disables a channel and can’t be changed while a measurement is running.

For order tracking measurements this function can be used to switch between receiving order tracking data ordinary time data or both.

4-28

Page 106
Image 106
VXI manual Data Gating, VT1433B Users Guide The Host Interface Library, 4-28