Programming considerations, Interrupt service routine support – National Instruments NI-VXI User Manual

Page 45

Advertising
background image

Chapter 3 Software Overview

© National Instruments Corporation

3-7

NI-VXI User Manual

In addition to the four basic types of Word Serial transfers, there are
two special cases: the Word Serial Clear and Trigger commands. The
Word Serial Clear command must ignore the ERR* bit. One of the
functions of the Clear command is to clear a pending protocol error
condition. If the ERR* bit was polled during the transfer, the Clear
would not succeed. The Word Serial Trigger command requires polling
the DIR bit as well as the WR bit (similar to the buffer write) before
writing the Trigger to the Data Low register. The VXIbus specification
requires polling the DIR bit for the Word Serial Trigger to keep the
write and trigger model consistent with IEEE 488.2.

The Longword Serial and Extended Longword Serial Protocols are
similar to the Word Serial Protocol, but involve 32-bit and 48-bit
command transfers, respectively, instead of the 16-bit transfers of the
Word Serial Protocol. The VXIbus specification, however, provides no
common command usages for these protocols. The commands are
either VXI Reserved or User-Defined. The NI-VXI interface gives you
the ability to send any one of these commands.

Programming Considerations

The Commander Word Serial functions provide a flexible, easy-to-use
interface. Depending upon the hardware and software platforms
involved in your system, however, certain issues need to be taken into
account. In particular, the behavior of these functions will vary when
called from different processes depending on how your operating
system performs multitasking.

Interrupt Service Routine Support

If portability between operating systems is essential, the Word Serial
Protocol functions should not be called from an interrupt service
routine. Only for operating systems in which the user-installed handlers
are run at process level (most UNIX, OS/2, and Windows 95/NT
systems) is it possible to initiate Word Serial operations from a
user-installed handler. The Commander Word Serial functions require
operating system support provided only at the application (process)
level of execution. Calling these functions from the CPU interrupt level
will have undetermined results.

Advertising