02-04-2010 04:41 AM
Hello,
I have built a simple operator interface taking the refernce from pre exsit OI from NI. Now I want to add a progress bar showing the status of the no. of steps completed. looking at the previous examples i got an idea that using the sequence context property I can acesss no of steps in a step group and previous step index to know the current excuting step. Since the simple OI is event driven, How should I implement the logic to display the progress bar.
Regards
Prav
02-04-2010 06:13 AM
Prav,
your approach has one serious flaw:
If you use flow control in your sequence in order to skip steps or repeat steps (loop), you will display wrong numbers.
There are two possible ways to solve your question:
- Work with UI Messages and send "ProgressPercent" messages after each step which indicates a new part of your test. See the Full-featured UI status bar as an example how this could be configured in the UI. Still, you have to read how to send UI Messages from your sequence....
- You configure custom UI Messages in order to update a custom control on your UI.
Other solutions are possible, but i don't recommend them.
hope this helps,
Norbert
02-04-2010 09:17 AM
02-04-2010 09:50 AM
What I do is update the step count and write a UI message in a SequenceFilePostStep callback.
Getting the actual number of steps is the tricky part as Norbert mentioned. I have a lot of steps that loop so I cheated a bit. In development, I recorded the actual number of steps performed and saved that info into a station global. There is some variation from test to test but with a couple of thousand steps, it's not very noticeable on the progress bar. After the last test, I just make the progress 100%