NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Progress Data to LabVIEW UI

Solved!
Go to solution

Hello Collegues,

 

I am currently working on a minimal LabVIEW GUI for TestStand. The idea is to completely hide TestStand and only showing the LabVIEW FrontPanel with native controls and indicators. This has been working out well so far: I am able to Execute SequenceFiles and Run Sequences. One part that is still missing however is the progress bar. Despite many threads and examples I have been struggling to get progress information from TestStand to LabVIEW. What is the approach here?

The first try was to count the total amount Steps and then compare this value to the executed steps. Since I have been unable to find the number of executed Steps I simply would have polled the ResultList and use the Size of the array to determine how many steps already have been executed. However I failed to get the correct Sequence context and recieved errors when trying to get the ResultList. How do I get the correct sequence context?

The second try was to use the UIMsg_ProgressPercent–(Value: 11) to get the progress information. But the event never fires? As far as I have read, this is an Event TestStand fires automatically or am a wrong in this assumption? If not, on what occation does the event fire? Since we have a respectable amout of Steps and Sequence(File)s it would be a real pain to manually insert steps wich post said Message.

What is your advice? Which path should I continue?

Thanks in advance
Tarik

0 Kudos
Message 1 of 5
(4,184 Views)
Solution
Accepted by topic author Tarik_Ilhan

This is a tricky one because you never know how deep your sequence call hierarchy could be.  Also, you won't know how long each step will take.  For instance 1 step could take 20 minutes and the rest of the test (all 100 steps) may only take 1 minute.  So basing it on steps doesn't make sense.  So it is totally impossible to know how much of the test is complete.  One thing you could do is save off execution times and average it out and then post a UI message based on a timestamp somehow.  This seems very hard to implement as well.

 

What I've done in the past is just assume that all the steps in my MainSequence (MainStep group) were my test steps.  Then in my setup I would post a custom UI message which would set the max scale on a progress bar on my UI.  Then in the SequenceFilePostStep I would just post a UI message that would increment my progress bar by 1 only if the step was from Main Step Group.  This seemed to be the easiest and most straight forward.

 

BTW- there are 2 types of events you can capture for UI messages.  There is User Message and UIMessageEvent.  The User Message will only capture those UI Messages with a value greater than the base (10000).  If you use the UIMessageEvent then you can intercept the other events (such as the progress one).  The caputre takes place before they are processed by the manager controls.  That way you can discard them if you want.  Or in your case just update a front panel control.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(4,169 Views)

Hi Jigg,

thanks for your reply. For our test architecture dynamically setting the maximum in the progress bar seems impossible. I think we have to set static Numbers. However, posting a UI Message in the PostStep Callback sounds good! Will this have a big impact on performence if I have lets say a thousand steps? Also: Is there a way to once define this callback for multiple sequence files? Because we have up to ten (or more?) Sequence files which are called during one Test and about 8 Tests.

Thanks
Tarik

0 Kudos
Message 3 of 5
(4,065 Views)

If you modify the process model and use ProcessModelPostStep then it will apply to the client and all of it's dependencies.

 

Otherwise you have to put it in all of the sequence files.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 5
(4,063 Views)

Allright I have to conseder that.

 

Thanks for your Help! 🙂

0 Kudos
Message 5 of 5
(4,057 Views)