National Instruments NI-VXI Network Card User Manual


 
Chapter 3 Software Overview
NI-VXI User Manual 3-8 © National Instruments Corporation
The
WSabort
function is the only exception to this restriction.
WSabort
is used to abort various Word Serial transfers in progress and
will usually be called from an interrupt service routine (although it is
not limited to interrupt service routines). The most common example of
calling this function from an interrupt service routine is with the
handling of Unrecognized Command events from a device. When an
Unrecognized Command event is received by the NI-VXI interrupt or
Signal interrupt handler,
WSabort
must be called to abort the current
Word Serial command transfer in progress that caused the generation
of the Unrecognized Command event.
Single-Tasking Operating System Support
The Word Serial Protocol functions have no asynchronous or multiple
call support for a non-multitasking operating system. Because the
Word Serial Protocol functions are polled I/O functions that do not
return to the caller until the entire operation is complete, only one call
can be pending for the application-level code. No Word Serial Protocol
functions, other than
WSabort
, can be called at interrupt service
routine time. If a Word Serial operation is underway and an interrupt
service routine invokes another Word Serial operation, the polling
mechanism may become inconsistent with the state of the Servant’s
communication registers. This could result in invalid data being
transferred, protocol errors occurring, or a timeout. The
WSabort
function is used to asynchronously abort Word Serial operations in
progress and can be used at interrupt service routine time.
Cooperative Multitasking Support
NI-VXI supports multiple processes under cooperative multitasking
operating systems. The behavior is the same as in single-tasking
operating systems, described above.
Multitasking Support (Preemptive Operating System)
The Word Serial Protocol functions have extensive mutual exclusion
support when running on a preemptive multitasking operating system.
A two-level mutual exclusion algorithm is used to allow read, write,
and trigger calls to be made at the same time. Command transfers will
automatically suspend read, write, or trigger calls in progress.