NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Locals (using ParallelModel) from LabVIEW

Hi
 
I'm trying to read Locals from a ParallelModel execution using LabVIEW.
 
I thought this might work:
ThisContext.Thread.GetSequenceContext(1).Locals."NameOfLocal", but it did't work
 
Any suggestions?
 
 
regards
Richard
0 Kudos
Message 1 of 4
(3,241 Views)

Hi,

If you are in the Step then all you need is Locals.NameOfLocal.

If you are trying to build up a String then "Locals." + "NameOfLocal".

 

This will work if you modify it to Locals.LookupString = "RunState.ThisContext.Thread.GetSequenceContext(1).Locals"+ "NameOfLocal"

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,235 Views)

Hi Ray

I'm not in the step.

I have a GUI that was opened in a different thread. From this GUI I want to read some locals from selected testsockets.

 

regards

Richard

0 Kudos
Message 3 of 4
(3,232 Views)

Hi,

You need to used the Execution reference for the TestSocket.

Get a reference to the Thread and use Thread.GetSequenceContext() to get a reference to the SequenceContext.

Get a PropertyObject from the SequenceContext using SequenceContext.AsPropertyObject() then you can use the GetVal or SetVal methods.

Hope this helps

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 4 of 4
(3,221 Views)