Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to change GPIB address programmatically?

Hello,
 
How can i change GPIB address programmatically? I use Intrument I/O Assistant to communicate with instrument.. I'm trying to make Numeric where user can change GPIB address easily..
0 Kudos
Message 1 of 5
(5,059 Views)
I'm not clear exactly where you want to change the GPIB address but I do have a couple suggestions:

- You can change the GPIB address of the GPIB controller by using the ibpad command.

- To change the GPIB address of the instrument with which you are communicating you simply send the appropriate GPIB addressing commands (UNL, UNT, MLA, MTA), or open a new device handle (ibdev) if you are using 488.1 commands.

- There is no defined way to change the GPIB address of an instrument while you are communicating to it. If you can modify the firmware it should be straightforward to do this. However, there doesn't seem to be a valid reason to do this.
Message 2 of 5
(5,029 Views)

I can't see what the "address changing" is meaning, but there may be two cases you mean - 1)change the instrument's address at the instrument side, and 2)change the target GPIB address that your app will communicate with.

case 1)
Unless the instrument supports the "address change" feature on the remote operation, you can't do it.  Some of recent SCPI based instruments may implement "SYSTem:COMMunicate:GPIB:ADDRess" or similar command to allow changing the GPIB address remotely, but a quite few instruments implement it.

case 2)
To change the target GPIB address that your app communicate with, without modifying your app code, you can use virtual GPIB DEVICE NAME or virtual VISA address.  If your GPIB access is through NI-488.2 API, you can use IBFIND() function to open the instrument (instead of IBDEV) with passing a virtual GPIB DEVICE NAME such as "MYDMM".  The device name can be configured on the System / Device Manager / GPIB node.  If your GPIB access is through NI-VISA API, you can use a virtual VISA address using "VISA Alias" such as mapping "MYDMM" to "GPIB0::1::INSTR" then pass the alias name to viOpen().  The alias name can be configured on the NI-MAX, at Tools | NI-VISA | VISA Options menu. 

Makoto

Message 3 of 5
(5,027 Views)

I have three silmilar instruments and i want to control them alternately..

0 Kudos
Message 4 of 5
(5,017 Views)

You may use Session in input on Instrument I/O assistant to change between your instruments???

0 Kudos
Message 5 of 5
(4,997 Views)