Appendix C Sample Programs
© National Instruments Corporation C-17 GPIB-1014 User Manual
|
| * * * * * * * * *
| * WRITE *
| * * * * * * * * *
|
| Summary:
| - Called to send device-dependent (data) messages
| when the GPIB-1014 is Controller-In-Charge
| (DSEND is called when the interface is Idle
| Controller)
|
| Assumptions on entry:
| - GPIB-1014 is CIC
| - One Listener is addressed and its address is placed
| in the variable ola
| - The data to be sent is placed in datbuf
| - The variable datct contains the number of bytes to
| send
|
| Actions:
| - Set up cmdbuf and cmdct and call CMD to address
| the GPIB-1014 as Talker, to address the Listener,
| and to unaddress all other devices
| - Go to standby and unassert ATN
| - Transfer the contents of datct to the d0 register
| - Load a0 register with the address of datbuf
| - Call DSEND to write the data
| - When the last byte has been sent, take control
| - Call CMD to unaddress all devices
|
| Status on return:
| - The GPIB-1014 is Active Controller
| - All GPIB devices are unaddressed
|