Function
Retrieves Equipment ID (EqpID) that specifies slave device based on primary address and secondary address of slave device.
The functions using EqpID can be performed after this function is performed.
Format
Ret = GpibSetEquipment ( DevId, EqpId, PrmAddr, ScdAddr, Delim)
Parameter
DevId [ short ]
Specifies DevID.
EqpId [ short * ]
Specifies EqpID.
PrmAddr [ short ]
Specifies primary address of slave device.
0 to 30 |
Primary address of slave device |
ScrAddr [ short ]
Specifies secondary address of slave device.
0 |
No specification |
96 to 126 |
Secondary address of slave device |
Delim [ short ]
Specifies the delimiter attached to last of data.
0 |
Not use |
1 |
CR+LF |
2 |
CR |
3 |
LF |
4 |
Reserved |
Return Value
Ret [ Long ]
0 |
Normality completion |
10001 |
Invalid ID was specified |
10002 |
Driver can not be called |
10453 |
The value of PrmAddr is outside the designated range |
10454 |
The value of ScrAddr is outside the designated range |
10455 |
The value of Delim is outside the designated range |
10462 |
Pointer to EqpId is NULL |
20492 |
Terminates by forcible termination key |
20494 |
TimeOut |
20495 |
No connected device (GPIB error) |
20497 |
Other master device exists |
Initial Value
None
Example
Retrieves EqpID of slave device whose setting state is: primary address: 1; secondary address: not use; delimiter: CR+LF.
C |
short EqpId, PrmAddr, ScrAddr, Delim; PrmAddr = 1; ScrAddr = 0; Delim = 1; Ret = GpibSetEquipment ( DevId, &EqpId, PrmAddr, ScrAddr, Delim); |
Remark
With this function, when GpibSendIFC is not being performed after initialization, IFC is outputted automatically.
Moreover, the specified slave apparatus is automatically changed to remote mode.
See Also