viGpibCommand
Syntax
viGpibCommand(ViSession vi, ViBuf buf, ViUInt32 count, ViPUInt32 retCount);
Description
Write GPIB command bytes on the bus. 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.
Parameters
Name |
Dir |
Type |
Description |
vi |
IN |
ViSession |
Unique logical identifier to a session. |
buf |
IN |
ViBuf |
Buffer containing valid GPIB commands. |
count |
IN |
ViUInt32 |
Number of bytes to be written. |
retCount |
OUT |
ViPUInt32 |
Number of bytes actually transferred. |
Special Value for retcnt Parameter |
|||
Value |
|
|
Action Description |
VI_NULL |
|
|
Do not return the number of bytes transferred. |
Return Values
Type ViStatus |
This is the function return status. It returns either a completion code or an error code as follows. |
Completion Code |
Description |
VI_SUCCESS |
Resource attribute retrieved successfully. |
Error Codes |
Description |
VI_ERROR_INV_SESSION |
The given session or object reference is invalid (both are the same value). |
VI_ERROR_INV_SETUP |
Unable to start write operation because setup is invalid (due to attributes being set to an inconsistent state). |
VI_ERROR_IO |
An unknown I/O error occurred during transfer. |
VI_ERROR_NCIC |
The interface associated with this session is not currently the controller in charge. |
VI_ERROR_NLISTENERS |
No listeners condition is detected (both NRFD and NDAC are deasserted). |
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. |
See Also
INTFC resource description