NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Serial port Resource Name

In TestStand SetUP Tab, I have a VI findingserialport; either COM1 or 2; then I am using VISA to set the baud rate of either COM1 or 2. The VISA property node return a VISA Resource Name, I like to store the VISA Resource Name as a TestStand locals, or Station Global for used by the VIs in the Main Tab.
What TestStand Set property Value may I use? the Object does not work. Is it a numeral type?
0 Kudos
Message 1 of 3
(5,002 Views)
To be able to store VISA sessions in Teststand local variables you need to use the Refnum to Session vi. The output of this vi is an integer that you can directly store in a Teststand variable using the Set Propert Value (Numeric) function. To retrive the session in a different vi you need to do the opposite( use Get Property value (Numeric) and then the vi Session to Refnum).

There is an example on the Developer Zone that shows you how to do this:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DB6156A4E034080020E74861&p_node=DZ52195&p_source=external

Best Regards,

Alejandro del Castillo
Applications Engineer
National Instruments Co
0 Kudos
Message 2 of 3
(5,002 Views)
Hi Trout00,

What you can do is wire a string (without the need to cast) to the Visa Resource Name control and therefore you can then store your Visa Resource Name as a string variable in TestStand. You can then store 'COM1' or 'ASRL1::INSTR' or what every alias or resource string you are using in your TestStand environment.

Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
Message 3 of 3
(5,002 Views)