05-04-2012 07:19 AM
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.
05-04-2012 07:35 AM
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.
05-04-2012 07:45 AM
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?
05-04-2012 08:42 AM
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
05-04-2012 09:16 AM
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?
05-04-2012 10:27 AM
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: ???
05-04-2012 01:20 PM
ThisContext.
In the UIMessage would then need to convert the ActiveXData item back( to its SequenceContext) using LV Variant to Data.
Thanks,
PH