NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Access Sequence Context from LabVIEW UI

Solved!
Go to solution

I am trying to figure out how to pass the sequence context into the Advanced LabVIEW User Interface. I need to check the values of some station global variables before a sequence file is opened.

 

I was looking for a way to send a UImessage from frontendcallbacks.seq that contains the sequence context, but I couldn't make it work. What is the best way to access the sequence context from the UI?

0 Kudos
Message 1 of 12
(7,310 Views)
Solution
Accepted by TobyD

HI,

 

In your UI, use the Engine.Globals to get a reference to the StationGobals then you can use the PropertyObject.GetVal and SetVal to read or write to the required StationGlobals.

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 12
(7,309 Views)
Great! Thanks Ray.
0 Kudos
Message 3 of 12
(7,297 Views)

Is it only possible to access the station globals?  How could you get access to SequenceContext object so you could get or set FileGlobals or Locals?

0 Kudos
Message 4 of 12
(6,786 Views)

You can get the SequenceContext from your ExecutionViewMgr object using ExecutionViewMgr.SequenceContext

 

 

Regards
Ray Farmer
Message 5 of 12
(6,781 Views)

gives me error code -2147352567 Property Node (arg 1) in OI.vi

 

It seems I don't understand how to use the execution view manager correctly.  I'm starting the execution from the TS UI Application manager and then calling the properties and methods from the Execution view manager.  Is there something else I'm missing here?Capture.PNG

0 Kudos
Message 6 of 12
(6,758 Views)

So after digging a little deeper I see that SequenceContext Property can only be accessed if the execution is paused.  I'm breaking the execution from Engine.NewExecution with the breakAtFirstStep option set to TRUE.  Does the ExecutionViewManager not recognize the execution as being paused when it's is done through the engine class?  And/Or is breaking the execution not the same as pausing the execution?  I don't see any methods for pausing the execution

0 Kudos
Message 7 of 12
(6,757 Views)

I forgot to include that I did set the execution property of the ExecutionViewMgr to the NewExecution Object created from the Engine object first but still generating an error when trying to access the SequenceContext

0 Kudos
Message 8 of 12
(6,756 Views)

illustrate what else I've tried

Capture1.PNG

0 Kudos
Message 9 of 12
(6,753 Views)

Trouble is when does Locals.ConnectionRef actually exist, Does it exist in the Sequence 'Single Pass' or one or the Callback sequence or in one of your sequences in the Client SequenceFile.

 

You will probably better to post your local or FileGlobal via a CustomUser UIMessage for the UI to pickup.

 

Regards
Ray Farmer
0 Kudos
Message 10 of 12
(6,743 Views)