National Instruments Printer Accessories 320030-01 Manual Do Utilizador

Página de 246
Programming Considerations
Chapter 5
GPIB-1014 User Manual
5-4
© National Instruments Corporation
Sending Remote Multiline Messages (Commands)
The GPIB-1014 sends commands as Active Controller simply by writing to the Command/Data
Out Register (CDOR) in response to the CO status bit in ISR2.  DMA transfers are not supported
when the TLC is GPIB Active Controller, and should not be attempted.
The TLC recognizes any commands applicable to itself, such as its own talk or listen address.
Thus, to make the TLC a Listener, write its listen address to the CDOR.
Going from Active to Standby Controller
If the TLC is GPIB Active Controller, the Controller Standby State (CSBS) is entered upon
reception of the Go To Standby auxiliary command.  The ATN line is unasserted as soon as the
TLC enters CSBS.  Even though the TLC GPIB Controller state machine is in standby, the CIC
bit in the ADSR is still set.  Do not issue the Go To Standby auxiliary command unless the CO
bit in ISR2 is set.
There are three cases to consider when going to standby.
Case 1:
The TLC becomes the GPIB Talker when ATN is unasserted.  To do this, wait for CO
to be set, send the TLC GPIB Talk Address (MTA), wait for CO to be set again, and
then issue the Go To Standby auxiliary command.
Case 2:
The TLC becomes a GPIB Listener when ATN is unasserted.  To do this, wait for CO
to be set, issue the TLC GPIB Listen Address (MLA), wait for CO to be set again, and
then issue the Go To Standby auxiliary command.
Case 3:
The TLC is neither GPIB Talker nor Listener.  In this case, issue the Listen In
Continuous Mode auxiliary command before going to standby.  Once this mode is
enabled, the TLC participates in the GPIB handshake without setting the DI (Data In)
bit (or holding off the handshake at DAC until the DIR is read), and it can then take
control synchronously when necessary.
Going from Standby to Active Controller
The manner in which the TLC resumes GPIB Active Control depends on how it went to standby.
Consider the following three cases:
Case 1:
The TLC, as a Talker, takes control upon receipt of the Take Control Asynchronously
auxiliary command.  Do not issue the Take Control Asynchronously auxiliary
command until there are no more bytes to send and the DO bit is set.
Caution:
Some instruments are very sensitive to assertions of ATN at what they
may consider the "wrong time," and can lose data, abort operations being
performed, or, in some severe cases, become completely nonresponsive.
Consult your instrument's manual carefully to make sure any such
situations can be avoided.