Instrument Control Toolbox | ![]() ![]() |
Specify the secondary address of the GPIB instrument
Description
For GPIB and VISA-GPIB objects, you configure SecondaryAddress
to be the GPIB secondary address associated with your instrument. You can initially specify the secondary address during object creation using the gpib
or visa
function. For VISA-GPIB-VXI objects, SecondaryAddress
is read-only, and the value is returned automatically by the VISA interface after the object is connected to the instrument with the fopen
function.
For GPIB objects, SecondaryAddress
can range from 96 to 126, or it can be 0 indicating that no secondary address is used. For VISA-GPIB objects, SecondaryAddress
can range from 0 to 30. If your instrument does not have a secondary address, then SecondaryAddress
is 0.
For GPIB and VISA-GPIB objects, the Name
property is automatically updated to reflect the SecondaryAddress
value. For VISA-GPIB objects, the RsrcName
property is automatically updated to reflect the SecondaryAddress
value.
You can configure SecondaryAddress
only when the GPIB or VISA-GPIB object is disconnected from the instrument. You disconnect a connected object with the fclose
function. A disconnected object has a Status
property value of closed
.
Characteristics
Usage |
GPIB, VISA-GPIB, VISA-GPIB-VXI |
Read only |
While open (GPIB, VISA-GPIB), always (VISA-GPIB-VXI) |
Data type |
Double |
Values
For GPIB objects, SecondaryAddress
can range from 96 to 126, or it can be 0. For VISA-GPIB objects, SecondaryAddress
can range from 0 to 30. The default value is 0
.
Example
This example creates a VISA-GPIB object associated with board 0, primary address 1, and secondary address 8, and then returns the secondary address.
Functions
Properties
![]() | RsrcName | Slot | ![]() |