Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to multiple Tektronix Scopes TDS7154

I am using NI-VISA 2.6 on Solaris 2.x. I am attempting to connect to 2 Tektronix TDS7154 scopes with VXI-11. I have no problem connecting to 1 scope. When I attempt to connect a 2nd scope, the 1st connected scope drops its session. It seems that Tektronix has only allowed "gpib0" ("gpib0,1" works but seems to be the same as "gpib0" and "gpib", "gpib1" does not work) as a LAN Device Name. I have tried opening a DefaultRM for each device, then using viOpen with each DefaultRM. Having a separate DefaultRM seemed to have no affect. Below is an example of my code.


/* xxx.xxx.xxx.xxx is an IP address, each one is unique and on the same network */


status = viOpenDefaultRM(&defaultRM1);
if(status < VI_SUCCESS)

exit (EXIT_FAILURE);


status = viOpenDefaultRM(&defaultRM2);
if(status < VI_SUCCESS)
exit (EXIT_FAILURE);


status = viOpen(defaultRM1, "TCPIP::xxx.xxx.xxx.xxx::gpib0::INSTR", VI_NULL, VI_NULL, &instr1);
if(status < VI_SUCCESS)
{
/* Close Resorce Manager and exit */
}


status = viOpen(defaultRM2, "TCPIP::xxx.xxx.xxx.xxx::gpib0::INSTR", VI_NULL, VI_NULL, &instr2);
if(status < VI_SUCCESS)
{
/* Close Resorce Manager and exit */
}
/* At this point the initial connection to instr1 dies, but the new connection seems fine */


Any help would be great.


Thanks,
Ryan Lange
L-3 IS
0 Kudos
Message 1 of 5
(3,938 Views)
Hi Ryan,
I am not sure because I have never used that instrument, but typically when using resourse descriptors you have both a gpib board (thats gpib0 in most cases) and an instrument address (usually 1-31). As an example, to address my instrument here, I would have to use GPIB0::2::INSTR because my instrument address is 2 and my gpib card is 0.

I am not sure how this may be different with your instrument and/or the tcp/ip setup, but you may want to investigate that problem.

Also you should check the user manual for the instrument. I can only assume that tek would build in a way to change the address of the instrument.

Hope this helps out!
Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,938 Views)
As far as I can tell the gpib0 (LAN device name) is not needed and has no affect on the connection.

The problem seems to be when I connect to a second device with the initial device session open, the initial session is closed or dropped. The viOpen call successfully returns unique session ids.

This maybe an untested scenario between NI-VISA and Tek-VISA.

All comments welcome,
Ryan
0 Kudos
Message 3 of 5
(3,938 Views)
Hi Ryan,

You should take a look at NI-SPY to see if something unexpected is happening to the first session. NI-SPY should tell you exactly what the driver is doing. Another thing to try out would be to open one session using your program, then open the second using VISA interactive control. See if both work in that fashion (again using NI-SPY).

Let me know what you find out from NI-SPY!

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,938 Views)
Here is the answer I received after about 3 weeks of investigation.
----------------------------------------------------
Apparently there was a known problem in NI-VISA 2.6 that was fixed on Windows in version 2.6.1. A Solaris user will have to use NI-VISA 3.0 beta.

The VISA session model is the same on all platforms. This was just a bug in the NI-VISA TCP/IP Passport for VXI-11 devices. The bug existed on all platforms.

Uninstall your old version of VISA and install this one. There is one catch, however. Beta software is not supported by NI's tech support. However, when 3.0 comes out officially you can install that and it will be supported by AEs.
-----------------------------------------------------

There is no need for the gpib0
on a viOpen when using TCPIP connections, as the IP address is a unique identifier unless there are multiple devices at that IP address.

I hope this alleviates future headaches for others,
Ryan Lange
L-3 Integrated Systems
0 Kudos
Message 5 of 5
(3,938 Views)