NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Resource Name as a Station Global?

I would like to store a Visa Resource Name as a Station Global (i.e. GPIB::5). I want to do this so I can expose the address on a spreadsheet using the property loader and have the ability to change it after the application is compiled. I know the LabView input is expecting a container but I just can't seem to get it right when I create the global. I've tried to create a container with a string (GPIB::) and a number (5) and feed that to the Visa Name input but that results in an error. I can't make a selection for the Device Name and Session Number.
 What I have done in the past was write some code in my VI which concatenates a string to feed the resource name but I was hoping there would be a better way to do this using TestStand. Any ideas?
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 1 of 7
(4,611 Views)
The Device Name is going to be the same as the GPIB Resource, in this case "GPIB::5".  The Session number is a number that is used to refer to an internal session to that device.  It needs to be populated by TestStand when it is an output.  On the first VI that requires the VISA reference as an input, uncheck the Default value checkbox, clear the value for the container, and put your station global in the Device Name field.  Set the session number to 0.  If you wish to keep the session open between calls, make sure your VI passes a VISA reference as an output.  You can then save this reference as a Local variable of the type LabVIEWIOControl.  Then pass that variable into the VISA Reference input on future VIs.  That should work!

Allen P.
NI


Message Edited by AllenP on 01-31-2008 02:36 PM

Message Edited by AllenP on 01-31-2008 02:40 PM
Message 2 of 7
(4,602 Views)
Thanks for the quick response Alan. The problem I have is how to define/configure the Station Global to use for the Resource name input. Labview expects a container for this input. So I made a container in my globals with field of string "GPIB::5". The sequence editor thinks the syntax for this is correct but when I run the sequence I get a run time error. "Error, Parameter 'VISA Resource Name': Parameter 'VISA Resource Name.Device Name' is required and its value cannot be empty. [Error Code: -18003, Missing required argument. Connection is marked as required in VI.]
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 7
(4,596 Views)
Here's a screenshot of how I have it configured.
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 4 of 7
(4,593 Views)
Here is what you should have configured-

Make your Station Global just a string, not a container with a string in it.

Then in your VISA Reference, assign the DeviceName field to that variable.  Set the Session Number to 0.

0 Kudos
Message 5 of 7
(4,587 Views)
thanks for the help Allen. That worked. Smiley Very Happy I guess I never tried it that way because if you make a incorrect selection for the overall 'VISA resource name' input the Device Name and Session Number are greyed out. Guess I need to stop confusing myself.Smiley Wink
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 6 of 7
(4,581 Views)

Hello,

 

Thanx for the help. I didn't understand at first. But after some tries  I figure out what you ment.

 

Using only string, I'm able to maintain  this from a variable file.

 

Thanx agian

0 Kudos
Message 7 of 7
(4,134 Views)