Function
Performs setting of specifying information for address to use with Device ID.
Format
Ret = GpibSetAddrInfo ( Id, Talker, ListenerArray )
Parameter
Id [ VB.NET: Short ][ C, C++: short ][ C#: short ]
Specifies DevID or EqpID.
Whichever it specifies, operation does not change.
Talker [ VB.NET: Short ][ C, C++: short ][ C#: 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 [ VB.NET: Short() ][ C, C++: short * ][ C#: 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) |
"NUL" will be attached on the first array automatically when you call GpigSendData() function. Therefore, you don't have to use this. Please be used this at the first of array if you want to indicate "NUL" clearly. |
-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 [ VB.NET: Integer ][ C, C++: long ][ C#: int ]
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 |
Remarks
The order for transmitting GPIB command is that performs talker specification after performing listener specification.
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 ); |
See Also
GpibSendData | GpibRecData | GpibGetAddrInfo