NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing current file globals from the LV Operator Interface

My customer wants me to display certain FileGlobal values during the test.

 

I can access (and set if I need to) the DEFAULT File Globals, but I cannot seem to find the current values.

 

I tried the Execution context (and fed it the sequence file that was returned by the "display sequence file event callback" (which worked for the SET), but this doesn't work.

 

Any ideas?  Simple examples would be much appreciated.

0 Kudos
Message 1 of 7
(3,416 Views)

Just to be clear, I basically tried this (in LV, not C)

 

ExecutionViewMgr.Execution.GetFileGlobals(SequenceFile).GetValString

 

What I don't understand is that the Execution Reference returned is NULL.  I tried adding a callback for "Start Execution" to see if I got something else, but nope.

0 Kudos
Message 2 of 7
(3,415 Views)

OK- I found a good example that demonstrates using the PostUIMessage method in TS:
http://sine.ni.com/devzone/cda/epd/p/id/3879 

But this doesn't seem appropriate for what I want to do (display several values "live" to the operator).

 

Am I right? 

0 Kudos
Message 3 of 7
(3,411 Views)

Good Morning.

 

I would use UIMessages.  If you post UI Message from your sequence file with the ActiveX data as the 'SequenceContext' then you should be able to easily access the current Fileglobals.   FileGlobals is a property of the SequenceContext.

 

Now the bigger issue is when does your FileGlobal get updated? And how often?

 

To update it 'live' you would have to keep continously posting UIMessages to tell the Operator Interface to display the new value.  One possible option to put the UIMessage in a callback in your sequence file.  Maybe something like SequenceFilePostStep or SequenceFilePostResultListEntry, this would have it send the UIMessage EVERY time a step is executed.   Although, the downside of this would be that it may take extra resources depending on the amount of steps in your sequence.

 

There are probably other options that I need some time to explore.

 

Thanks,

PH

0 Kudos
Message 4 of 7
(3,404 Views)

This sounds good;  In this particular version I don't have that many updates; so I think I can insert the meessage onyy after the update is made.  Other sequences I have coded would require more updates to get a clean UI though,

 

Question about the SequenceContext; I would need to pass that through the UI message every time it's updated?  I can't just get a Ref at the start of the UUT and pull from the LV side?

0 Kudos
Message 5 of 7
(3,402 Views)

Hi again; I just sat down to implement this, and now I am not sure that I understand.

 

I am using PostUIMessageEx

numericDataParam: None

stringDataParam: None

activeXDataParam: ???

0 Kudos
Message 6 of 7
(3,399 Views)

ThisContext.

 

 

In the UIMessage would then need to convert the ActiveXData item back( to its SequenceContext)  using LV Variant to Data.

 

Thanks,

 

PH

0 Kudos
Message 7 of 7
(3,394 Views)