NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access local variable in TS from LV.

Hi!,
I am using LabVIEW and TestStand to develop the application. I would like to access the values of the test stand variables and display that in the LabVIEW VI(test status). The LV VI(test status) is called by another LV VI using VI server. The test status.vi has to be running till the TestStand terminates. The VI server runs perfectly fine to launch the The test status.vi, but when it tries to get the variable value it returns error 1.
How to achive this? Please see the attached Vis.
TIA
Rachana
Download All
0 Kudos
Message 1 of 11
(4,055 Views)
Hi Rachana,

The Test_Status.vi VI has no connections on its connector pane. It need at least the Sequence Context to beable to obtain the TestStand Locals.

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 11
(4,055 Views)
Hi! Ray,
I am unable to find a property or method using which I could pass the Sequence context to Test_Status.vi by using VI server in the VI(Launch_Test_Status.vi) that calls Test_Status.vi.
How do I pass the sequence context to the Test_Status.vi?
I also need to keep updating the values of the variable which would be updated in teststand as & when the steps are executed. And that is the reason for using VI server to launch Test_status.vi in the begining and then close it when teststand runs cleanup.
TIA
Rachana
0 Kudos
Message 3 of 11
(4,055 Views)
Hi Rachana,

I have add the Invoke Node to the Launch_Test_Status.vi to pass the Sequence Context to the Test Status.vi. (I have changed the name of Test Status.vi to match the name string to VI for the pathname in the Launch_Test_Status.vi)

I have added the sequence context control to the connector pane of the Test Status.vi.

I had to remove a VI in the Launch_Test_Status.vi, to get rid of the broken arrow (see comment on diagram of vi).
I have tried VI's from a TestStand sequence and the Test Status.vi is picking up the value from the Locals.Cable_ID.

Now all you got to do is make it shut down the VI's correctly when the sequence finishes.

Regards
Ray Farmer.
(Note VI have been saved out using LabVIEW 7.0)
Regards
Ray Farmer
Download All
Message 4 of 11
(4,055 Views)
Thanks a lot Ray.
-Rachana
0 Kudos
Message 5 of 11
(4,055 Views)
Rachana wrote in message news:<50650000000500000030BA0100-1079395200000@exchange.ni.com>...
> Thanks a lot Ray.
> -Rachana

Hi! Ray,
I had another question. When I launch the test status VI using the VI
server and leave the VI running, it seems to loose its sequence
context as soon as the launch VI is closed. The test status returns
error code 1.
I then tried to call the Test Status VI at all the points where I am
calling the local variables so in this case it runs the Test Status VI
once and updated the FP values.
I was wondering if this is the correct way of architecturing my
application or should I be using Operator interface?
I even have to display the overall status of the test result in which
case I guess I would need to access the
UI messages.

TIA
- Rachana
0 Kudos
Message 6 of 11
(4,056 Views)
Hi Rachana,

Its probably as a result of the step completing that you are loosing the reference.

It does seem that what you are trying to do is best suited in the Operator Interface.

Regards
Ray farmer
Regards
Ray Farmer
Message 7 of 11
(4,056 Views)


@software enigineer wrote:
Rachana wrote in message news:<50650000000500000030BA0100-1079395200000@exchange.ni.com>...
> Thanks a lot Ray.
> -Rachana

Hi! Ray,
I had another question. When I launch the test status VI using the VI
server and leave the VI running, it seems to loose its sequence
context as soon as the launch VI is closed. The test status returns
error code 1.
I then tried to call the Test Status VI at all the points where I am
calling the local variables so in this case it runs the Test Status VI
once and updated the FP values.
I was wondering if this is the correct way of architecturing my
application or should I be using Operator interface?
I even have to display the overall status of the test result in which
case I guess I would need to access the
UI messages.

TIA
- Rachana



Hi Ray,
I'm grappling with a problem, and your solution is the ideal one. Although im in a quandry as to how can I link the sequence context refnum to the VI thats running/or the sequence file that is being executed.
Thanks in advance,
Anshul
0 Kudos
Message 8 of 11
(4,012 Views)
Thanks Ray for providing such valuable information for TestStand.

Your replies are always accurate and informative.

Wishing you a Happy New Year.

JLV
Message 9 of 11
(3,980 Views)
Hi JLV,

Thanks for the comments and Happy New Year to you.

Regards
Ray Farmer
Regards
Ray Farmer
Message 10 of 11
(3,975 Views)