Chapter 3 Software Overview
NI-VXI User Manual
3-6
© National Instruments Corporation
•
Buffer writes
•
Buffer reads
The Word Serial Protocol is a 16-bit transfer protocol between a
Commander and its Servants. The Commander polls specific bits in the
Servant’s VXI Response register to determine when it can write a
command, when it can read a response from the Data Low register, and
when a Word Serial protocol error occurs.
Before a Commander can send a Word Serial command to a Servant, it
must first poll the Write Ready (WR) bit until it is asserted (set to 1).
The Commander can then write the command to the servant’s Data
Low register. If the Commander is sending a query, it first sends the
query in the same manner as sending a command, but then continues
by polling the Read Ready (RR) bit until it is asserted. It then reads the
response from the servant’s Data Low register.
A buffer write involves sending a series of Byte Available (BAV) Word
Serial commands to the Servant, with the additional constraint that the
Data In Ready (DIR) bit as well as the WR bit be asserted before
sending the Byte Available. The lower 8 bits (bits 0 to 7) of the 16-bit
command contain a single byte of data (bit 8 is the END bit).
Therefore, one Byte Available is sent for each data byte in the buffer
written.
A buffer read involves sending a series of Byte Request (BREQ) Word
Serial queries to the Servant, with the additional constraint that the
Data Out Ready (DOR) bit as well as the WR bit must be asserted
before sending the Byte Request. The lower 8 bits (bits 0 to 7) of the
16-bit response contain a single byte of data (bit 8 is the END bit).
Therefore, one Byte Request is sent for each data byte in the buffer
read.
In addition to the WR, RR, DIR, and DOR bits that get polled during
various Word Serial transfers, the functions also check the ERR* bit.
The ERR* bit indicates when a Word Serial Protocol error occurs. The
Word Serial Protocol errors are Unsupported Command, Multiple
Query Error (MQE), DIR Violation, DOR Violation, RR Violation, or
WR Violation. After the Servant asserts the ERR* bit, the application
can determine the actual error that occurred by sending a Read
Protocol Error query to the Servant. The NI-VXI Word Serial
functions query the Servant automatically and return the appropriate
error codes to the caller, at which time the Servant deasserts the
ERR* bit.