NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying TS execution percent on LabVIEW UI through UI message

Solved!
Go to solution

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?

 

0 Kudos
Message 1 of 3
(2,962 Views)

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

Message 2 of 3
(2,951 Views)
Solution
Accepted by topic author LV_user1

I am using custom user events now and now able to get progress percent on the UI.

0 Kudos
Message 3 of 3
(2,925 Views)