Function
Performs setting of specifying information for address to use with Device ID.
Format
Ret = GpibSetAddrInfo ( Id, Talker, ListenerArray )
Parameter
Id [ short ]
Specifies DevID or EqpID.
Whichever it specifies, operation does not change.
Talker [ short ]
Specifies talker or cancels it.
0 to 30 |
The device is set to talker whose primary address is the value |
31 |
The active Talker is canceled (UNT) |
-1 |
Talker is not specified |
(When using secondary address, please use the current value between 96 and 126 (60H to 7EH) OR to higher bits of primary address)
ListenerArray [ short * ]
Specifies listener or cancels it with array.
0 to 30 |
The device is set to listener whose primary address is the value |
|
31 |
The active listener is canceled (UNL) |
It must be used at the first of array |
-1 |
Listener is not specified |
It must be used at last of array |
(When using secondary address, please use the current value between 96 and 126 (60H to 7EH) OR to higher bits of primary address)
Return Value
Ret [ Long ]
0 |
Normality completion |
10001 |
Invalid ID was specified |
10002 |
Driver can not be called |
12002 |
The value of Talker is outside the designated range |
12003 |
The element of ListenerArray is outside the designated range |
12013 |
Pointer to ListenerArray is NULL |
12043 |
There are more than 256 elements in ListenerArray |
Initial Value
Talker |
-1 |
Not specify talker |
ListenerArray[0] |
-1 |
Not specify listener |
Example
Sets device to talker whose primary address is 0 and sets device to listener whose primary address is 1.
C |
short Talker, ListenerArray[255]; Talker = 0; ListenerArray[0] = 1; ListenerArray[1] = -1; Ret = GpibSetAddrInfo ( Id, Talker, ListenerArray ); |
Sets device to talker whose primary address is 0 and secondary address is 96 (60H). Sets two devices to listeners ones primary address is 1 and ones primary address is 2, secondary address is 126 (7EH).
C |
short Talker, ListenerArray[255]; Talker = 0 + 0x6000; ListenerArray[0] = 1; ListenerArray[1] = 2 + 0x7e00; ListenerArray[2] = -1; Ret = GpibSetAddrInfo ( Id, Talker, ListenerArray ); |
Remark
The order for transmitting GPIB command is that performs talker specification after performing listener specification.
See Also