Wssettmo (timo, actualtimo), Wstrg (la), Wswrt (la, buf, count, modevalue, retcount) – National Instruments NI-VXI User Manual

Page 51: Wssettmo -13 wstrg -13 wswrt -13

Advertising
background image

Chapter 3 Software Overview

© National Instruments Corporation

3-13

NI-VXI User Manual

Normally, you would use the

WScmd

function to send Word Serial

queries with the response automatically read (specified with respflag).
In cases when you need to inspect the Word Serial transfer at a lower
level, however, you can break up the query sending and query response
retrieval by using the

WScmd

function to send the query as a command

and using the

WSresp

function to retrieve the response. During the

interim period between sending the

WScmd

and

WSresp

functions, you

can check register values and other hardware conditions.

WSresp

polls

the RR bit before reading the response from the Data Low register.
After reading the response, it polls the Response register until the
WR bit is asserted.

WSsetTmo (timo, actualtimo)

WSsetTmo

sets the timeout period for all of the Commander Word

Serial Protocol functions. It sets the timeout value in milliseconds to
the nearest resolution of the host CPU. When a timeout occurs during a
Commander Word Serial Protocol function, the function terminates
with a corresponding error code.

WStrg (la)

WStrg

sends the Word Serial Trigger command to a message-based

Servant. Before sending the Trigger command (by writing to the Data
Low register),

WStrg

polls both Response register bits—Data In Ready

(DIR) and Write Ready (WR)—until asserted. You cannot use the

WScmd

function to send the Word Serial Trigger command (

WScmd

polls only for WR before sending the command).

WStrg

polls the

WR bit until asserted again after sending the Trigger command to
guarantee that no protocol errors occurred during the transfer.

WSwrt (la, buf, count, modevalue, retcount)

This function is the buffer write function.

WSwrt

writes a specified

number of bytes from a memory buffer to a message-based Servant
using the VXIbus Byte Transfer Protocol. The process involves
sending a series of Byte Available (BAV) Word Serial commands with
a single byte in the lower 8 bits of the command. Before sending the
BAV command,

WSwrt

polls both Response register bits—Data In

Ready (DIR) and Write Ready (WR)—until asserted. The modevalue
parameter in the call specifies whether to send BAV only or BAV with
END for the last byte of the transfer.

Advertising