Write GPIB command bytes on the bus.
ViStatus viGpibCommand (ViSession vi, ViBuf buf, ViUInt32 count, ViPUInt32 retCount)
viGpibCommand&(ByVal vi&, ByVal buf$, ByVal count&, retCount&)
GPIB INTFC
Name | Direction | Description |
---|---|---|
vi |
IN |
Unique logical identifier to a session. |
buf |
IN |
Buffer containing valid GPIB commands. |
count |
IN |
Number of bytes to be written. |
retCount |
OUT |
Number of bytes actually transferred. |
Completion Codes | Description |
---|---|
VI_SUCCESS |
Operation completed successfully. |
Error Codes | Description |
---|---|
VI_ERROR_INV_OBJECT |
The given session reference is invalid. |
VI_ERROR_NSUP_OPER |
The given vi does not support this operation. |
VI_ERROR_RSRC_LOCKED |
Specified operation could not be performed because the resource identified by vi has been locked for this kind of access. |
VI_ERROR_TMO |
Timeout expired before operation completed. |
VI_ERROR_INV_SETUP |
Unable to start write operation because setup is invalid (due to attributes being set to an inconsistent state). |
VI_ERROR_NCIC |
The interface associated with the given vi is not currently the controller in charge. |
VI_ERROR_NLISTENERS |
No Listeners condition is detected (both NRFD and NDAC are deasserted). |
VI_ERROR_IO |
An unknown I/O error occurred during transfer. |
This operation attempts to write count number of bytes of GPIB commands to the interface bus specified by vi. This operation is valid only on GPIB INTFC (interface) sessions. This operation returns only when the transfer terminates.
If you pass VI_NULL as the retCount parameter to the viGpibCommand() operation, the number of bytes transferred will not be returned. This may be useful if it is important to know only whether the operation succeeded or failed. The command bytes contained in buf should be valid IEEE 488-defined Multiline Interface Messages.
Related Topics