NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand not passing VISA info to LabVIEW

Hi All,

 

I am encountering a problem passing a VISA resource name to LabVIEW (2014) from TestStand (2014) which I cannot for the life of me understand or solve.  Thus and so, I would be exceptionally grateful for any help.

 

I have two Thurlby Thandar LXI power supplies in a test rack, each with unique IP and socket addresses, of the form (TCPIP0::192.168.0.3::9221::SOCKET).  I have a LabVIEW project which contains a number of VIs, each related to the various functions of the PSUs, which are called from TestStand as appropriate.

 

I'm calling the LabVIEW 'Initialise.vi' in TestStand within a "ForEach" loop to individually extract the PSU's addresses from an array, open a session, then store the SessionNumber, but the resource name data doesn't seem to make it through to the VI's front panel VISA control.  I've checked, checked and re-cheked that the correct values are being pulled from the array, I've even tried putting the LabVIEW call in a sub-sequence, just so that I can verify the data is not being corrupted in any way, but all seems to be well.  It's as if the link between TestStand and LabVIEW is somehow broken.

 

To clarify the issue, on the very first run, the VISA information does get through, but subsequent runs retain this value, rather than overwriting it with the next value in the array.  Setting the Run Options of the LabVIEW Action step type to Load Dynamically then Unload after step executes overcome this issue, but cause problems when trying to control the PSU later on in the test sequence.

 

The most maddening thing is that this used to work up until a couple of weeks ago, but unfortunately I can't remember what, if any, changes I may have made.

 

I've reinstalled TestStand and LabVIEW, but it hasn't solved the problem.

 

I've made the VI re-entrant, but that doesn't make any difference (in truth it shouldn't, as although the VI is called numerous times, all calls are sequential rather than simultaneous, so re-entrancy shouldn't be an issue).

 

I've configured the PSUs in MAX and given them aliases and tried the addresses direct, but that makes no difference either.

 

I've also tried performing the same exercise of passing data to LabVIEW just using strings and that all works fine, it just seems to be an issue with VISA resource names.

 

I have a suspicion I've checked or un-checked a check-box somewhere in the bowels of TestStand that's causing all of this, but haven't a clue how to find it.

 

If anyone can shed some light on this why this issue is occurring, or could even just point me in the direction of some utility which could sniff dataflow between TestStand and LabVIEW, I would be very grateful.  

 

Many thanks in advance

0 Kudos
Message 1 of 8
(6,152 Views)

Personally, I use Action Engines to handle my instrument resources.  You can call the AE directly in TestStand.  What I typically do is have a string input for name and then do a quick lookup for the desired VISA Resource to then control the instrument.  This keeps all of the VISA stuff (including resource references) in LabVIEW.  Have never had a problem with doing it this way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(6,101 Views)

We have the same problem in Labview direct NI VISA.  with certain Pwr Supply vendor.

"TPCIP::IP-ADDR::9221::SOCKET"

Call me lets talk about this.


Howard Rhinehart
Labview systems design and programming consultant
Direct Tel 408-489-8451
Email: howardr49@gmail.com
Skype: Howard_NetPhone

0 Kudos
Message 3 of 8
(5,872 Views)
Please explain exactly what you are doing. Are you passing the resource through the connector pane? What is the TestStand data type? Have you set a breakpoint and probed the VI when you step into it? How about attaching the sequence and VI?

p.s. It's really not a good idea to post private information on a public forum unless you enjoy spam.
0 Kudos
Message 4 of 8
(5,860 Views)

Hi

 

We have been able to reproduce the problem at our company. I've attached an example.

The labview vi just converts the visa resourcename into a string, and teststand tests if the string matches the devicename, as it should.

If you choose the runtime adapter, everything is ok.

If you choose the development adapter, weird things happens.

The looping step, will always fail as usually only the first iteration passes.

 

At first the other to steps will pass, but if you edit the sequence, fx drag the steps around, and run it, the steps will fail in some sockets.

If you close and open the sequence again, these to steps pass in all sockets again.

 

Best regards

Magnus

0 Kudos
Message 5 of 8
(5,572 Views)

Thanks for pointing out this behavior.  Our R&D department has been investigating the issue, and they have determined the behavior is due to a LabVIEW issue introduced in 2014.  CAR 526044 has been filed to track the issue.

 

The suggested workaround is to create a new VI with a VISA resource name input and output. The purpose of this VI is so that you can pass in a device name and get back a VISA resource name, which can be stored in TestStand as a LabVIEWIOControl data type variable. You can then use this variable to pass the VISA session into other VIs in the sequence. The simple VI which we are creating can be dynamically loaded and unloaded, which should avoid the issue.

 

Myriam D.

Applications Engineer

Message 6 of 8
(5,394 Views)

Thank you for providing the work around. But still looking forward to the fix though 🙂

Anyway, I have tested your work around and it seems to work.

The result of one of the sockets is shown below. The first four steps are identical to the last four (including for loop). The first steps fail - as a result of the bug. Then "String to visa" takes a devicename as a string and converts it internally to a visa resource into the same array, and then the steps pass.

I've attached the example including the vi's used.

 

12-05-2015 09-29-42.png

0 Kudos
Message 7 of 8
(5,357 Views)

LV SP1 f3, seems to fix the issue.

http://digital.ni.com/public.nsf/allkb/C3A8FE195AB462B186257E2F005CF015

Thanks 🙂

0 Kudos
Message 8 of 8
(4,887 Views)