NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA resource Session Number

I am changing the serial port (COM3) while the program is running. In LV, I just pass the Device Name (COM4) of the port I want to change to but in TS it also requires the Session Number. What do I pass and does it make a difference? I am thinking that it should be a pass by reference.

From LV help: "The VISA session is maintained by the VISA resource name control and is not seen by the user."
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 1 of 7
(6,204 Views)
Hi,

Just pass the string with COM4 as the value.

regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 7
(6,200 Views)
Hi,

I have attached a small example. pop the VI's in the same directory as the sequence file

LV 6.1 abd TS3.0

Regards
Ray Farmer
Regards
Ray Farmer
Message 3 of 7
(6,200 Views)
Thanks, Your eample was useful. I did not know if I had to maintain the session number or not. Thanks for the explaniation.

Matt
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 7
(6,200 Views)

Hi

I have the same problem....trying to use the VI "Basic Serial Write and Read" with teststand. I cannot change the VISA resource paramater from the TestStand "Specify Module" window. When I viewed the examples Ray sent, the resource name was being set in the VI and not from TestStand so did not address my problem. TestStand rejects my attempt to write in the Visa Resource name or its components (device Name and Session number).

Any advice appreciated.

 

Mike V

0 Kudos
Message 5 of 7
(6,045 Views)

Mike,

The VISA resource name parameter is a cluster of two elements.  The parameter is a Type "LabVIEWIOControl".  You can either specify this as a variable of that type, or fill in the individual fields.  Uncheck the "Default Value" box, and expand the components of the control to specify a name for the control.  You will need to pass in the string value of the resource (such as "ASRL1::INSTR", or "COM1"), and use the number 0 as the Session Number.

Hope this helps!

Allen P.

NI

Message 6 of 7
(6,032 Views)

Allen

I hadn't tried putting 0 in the session number, but it worked.

Many thanks.

Mike

 

0 Kudos
Message 7 of 7
(6,017 Views)