Function
Performs serial poll to slave device set in EqpID.
Format
Ret = GpibSPoll ( EqpId, Stb, Srq )
Parameter
EqpId [ short ]
Specifies EqpID.
Stb [ short * ]
Retrieves status byte.
0 to 255 |
Status byte |
Srq [ short * ]
Retrieves whether SRQ line is enabled.
0 |
SRQ disabled |
Except 0 |
SRQ enabled |
Return Value
Ret [ Long ]
0 |
Normality completion |
10001 |
Invalid ID was specified |
10002 |
Driver can not be called |
12112 |
Pointer to Stb is NULL |
12113 |
Pointer to Srq is NULL |
12120 |
Device ID is specified |
22123 |
When device is used as master (controller), functions for slave (non-controller) are executed |
22142 |
Terminates by forcible termination key |
22144 |
TimeOut |
22145 |
No connected device (GPIB error) |
22147 |
Being used in other process |
Initial Value
None
Example
Performs serial poll to slave device specified in EqpID, and outputs result on normal completion.
C |
short Stb, Srq; Ret = GpibSPoll ( EqpId, &Stb, &Srq ); if ( Ret == 0 ) { Printf ( "%ld\n", Stb ); Printf ( "%ld\n", Srq ); } |
Remark
Please use GpibSPollAll function to perform serial poll to plural slave devices one time.
See Also