Sample Programs Appendix C
GPIB-1014 User Manual C-12 © National Instruments Corporation
|
| * * * * * * *
| * READ *
| * * * * * * *
| Summary:
| - Called to read device-dependent (data) messages
| when the GPIB-1014 is Controller-In-Charge (RCV
| is called when the GPIB-1014 is Idle Controller)
|
| Assumptions on entry:
| - GPIB-1014 is Controller-In-Charge
| - The Talker address is placed in first location of
| cmdbuf
| - The variable cmdct is set to 1
| - The buffer datbuf is free to place incoming data
| - The number of bytes to read is placed in datct
|
| Actions:
| - Set up cmdbuf and cmdct and call CMD to address
| the Talker and unaddress all other devices
| - Program the GPIB-1014 to listen
| - Go to standby and unassert ATN
| - Transfer the contents of datct to the d0 register
| - Load the a0 register with the address of datbuf
| - Call RCV to receive the data
| - Call CMD to unaddress all devices
| - Program the GPIB-1014 to unlisten
|
| Status on return:
| - GPIB-1014 is Active Controller
| - Acceptor handshake is held off at NRFD
| - All GPIB devices are unaddressed
|