11-21-2016 01:56 PM
Hi all,
I have an Teststand UI which launches the teststand and executes the certain sequence file.
I want to display the % execution of the sequence on the LabVIEW UI.
For that I am posting following UI message from the teststand:
RunState.Thread.PostUIMessageEx(UIMsg_ProgressPercent, FileGlobals.CurrentPercent, "", ThisContext, True) .
This message is called in SequenceFilePostStep callback and hence it is expected to be posted after each step.
When this UI message is posted, in the UserMessageEventCallback VI of LabVIEW I am trying to read the value of FileGlobals.CurrentPercent which will give the current execution % and I can display it on UI.
When this sequence is ran standalone(instead of launching from LabVIEW UI , if I run it directly from teststand) the callback sequence is executing after each step and I can see the processpercent incrementing based on number of steps .
However when this sequence start its execution through UI , I am not able to get this UI message executed in the CallBack VI of LabVIEW. As this UI message is not getting executed in the UI , the progress precent what I am getting on UI is always zero.
I am not sure where I am going wrong. Do I need to configure anything in TS UI to run the callback sequence when it is launched from TS UI?
Solved! Go to Solution.
11-21-2016 05:15 PM
Hey LV_user1,
I think you're using the wrong event callback in your LabVIEW UI. The UserMessage Event only fires for custom UI messages with user-defined message codes (codes with a value greater than 10,000). The UIMsg_ProgressPercent code is predefined by TestStand and its value is 11, so you need to create a callback for the UIMessageEvent Event instead.
Myriam
11-22-2016 12:41 PM
I am using custom user events now and now able to get progress percent on the UI.