NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing Execution View to active Execution

Solved!
Go to solution

Hello everybody,

 

i'm struggling with the ExecutionViewManager of my Custom OI and it seems that i can't find a solution for this problem. Maybe it's just before my eyes, but searching for days now doesn't make it easier for me.

The Circumstance:

I am using the standard Batch Process model and custom Model Plugins. The main part of my OI is the ExecutionViewManager. In this Control only one execution ist visible at a time, this execution is being selected from the Executions.ListBar element. Now i want the ExecutionView to be automatically updated when the execution changes to another test socket. And here's the point im stuck.

I now have two ideas how to accomplish this:
Idea 1:
Searching for the appropriate Event/UIMsg which tells me whenever the active execution changes. I tried several, such as the ExecutionViewManager.ExecutionChanges event (which only fires when i select a different execution in the Executions.Listbar), but none of them really helped me out. Is there anything appropriate for me ?

 

Idea 2:

Implement a Custom UI Message in one of my ModelPlugins to fire at the correct step. The problem with this solution is i don't know where to implement it. For sure, i can fire it at the PreUUT Callback, but this is only for the beginning of the test. When i have Batch synchronization steps in my sequence the active execution changes several times in one test run. so where is the correct Callback to implement the UIMsg ?

I hope you understand my problem and appreciate your help!
Best regards,

SteviePi

0 Kudos
Message 1 of 9
(1,853 Views)

Hi StevieP,

 

The below code might help you. It runs at initialisation only. The OI itself is used with a Batch Model. The code also has a callback setup, that gets executed upon the "DisplayExecution" event. Where it takes the execution reference and passes it into the Execution View Manager, plus it sets the current page of the ListBar to 1.

 

So when a user hits the "Test UUTs" button, 4 threads become visible in the list bar (1 main and 3 for test sockets). Whenever the user clicks on one of those executions, the Execution view changes to reflect the selected socket. Hope that's what you need!

TS Switching Executions.png

Gubis_1-1616620955665.png

 

 

0 Kudos
Message 2 of 9
(1,799 Views)

Hello Gubis,

 

thank you very much for your answer!
Unfortunately that's not what i was looking for. At the moment my OI works like this, you can switch between the executions by selecting the one you want. But i would like the execution to be selected automatically when the sequence begins to test another socket.
For example: You have a test with 2 programming steps (which are parallel) and 2 teststeps in between, looking something like this:

 

  1. Testfirmware Programming UUT1&UUT2

  2. Enter Batch Synchronization

  3. Test UUT1

  4. Test UUT2

  5. Exit Batch Synchronization

  6. Releasefirmware Programming UUT1&UUT2

  7. Enter Batch Synchronization

  8. Test UUT1

  9. Test UUT2

  10. Exit Batch Synchronization

  11. End

When the sequence comes to Test UUT1, i want the ExecutionView to automatically change to TestSocket1 Execution, when Test UUT1 is finished and the sequence starts to Test UUT2, i want the ExecutionView to automatically change to TestSocket2 and so on. 

 

The reason i want to do this is because for the test user it often looks like the test is stuck because the active execution is not selected.

I hope you understand my struggle now.

 

Thanks again for your help!

Best regards,

SteviePi

0 Kudos
Message 3 of 9
(1,786 Views)

Hi StevieP,

 

Apologies, I completely misread your problem! I spent quite a bit of time searching for a way to programmatically select the correct listbar item, but there doesn't seem to be a way to do it.

 

The solution will be your second idea. I think you were just overthinking it.

 

Typically messages from TS are send via the ActiveX PostUIMessage/PostUIMessageEx calls. You can place these throughout your code, after you start a Serial Batch Synchronisation. I would advise you to only use it for lengthy bits of code that look like they are hanging, as you might not even see shorter ones or this might cause lag for larger sequences or other problems.

 

Have a look at the attached sequence file. I simply added a PostUIMessage call, which uses the event code "11036", I added that event code to my OI, which then calls the "Listbar update" case. That case then uses the "execution" reference that gets automatically passes in via the PostUIMessage call to update the current execution in the ExecutionViewMgr.

 

Gubis_0-1616663994689.png

 

Gubis_1-1616664014848.png

 

If you want to get the execution to change every time a "Batch Synchronisation" with "Enter Synchronisation Section" is called, you can use the "SequenceFilePostStep" in the attached sequence. It detects, whether the step is a batch synchronisation step and if it's the "Enter" operation in the precondition. Still utilises event code "11036". Obviously change it to whatever you like.

 

I can see myself using this in future projects!

0 Kudos
Message 4 of 9
(1,772 Views)

Did you try using the UIMsg_OpenWindows message with an execution specified in the activeXDataParam? If I'm following along and remembering correctly, it might do what you want without the need to add specific code to your UI.

 

Here is the help:

 

  • UIMsg_OpenWindows–(Value: 22) Post this message to the user interface to instruct it to open a file in a window. If the file or execution is already open, the application brings the file to the front. A file can be specified by a pathname in the stringDataParam parameter or by a PropertyObjectFile object in the activeXDataParam parameter. An execution can be specified by an Execution object in the activeXDataParam parameter. A list of files and/or executions can be specified by an array of references to PropertyObjectFile and Execution objects in the activeXDataParam parameter. For sequence files, the stringDataParam parameter can also contain a '|' separator followed by the name of a sequence to display. If you specify the sequence file in the activeXDataParam parameter, you can specify just the sequence name in the stringDataParam parameter. This constant does not support opening workspace files.
0 Kudos
Message 5 of 9
(1,755 Views)

Hi Gubis,

 

thanks again for your answer!

Yes now you understand my problem correctly, i will try to implement this in my code when i have access to the Testsystem next week. I thought of something similar, but i didn't have the exact idea and had concerns about the execution time when i add something after every step. But i think when i make it like you suggested, the step will not take long because it isn't executed every time.

I am just wondering that it seems to be this is a very specific issue. How are several parallel executions handled the "normal" way ? Do you tile them ? This would also be possible for me at the moment, but in the future we will get Multipanel PCBs with 10 Boards each, and then tiling the windows won't be very practical.

@James_Grey:
Thanks for your answer! Yes i thought of this UIMsg, but the problem i was facing is to determine when i have to post this UIMsg, because i couldn't find out when the execution changes to another socket for testing.

Best Regards

Stevie Pi

0 Kudos
Message 6 of 9
(1,742 Views)

Hi SteveP,

 

You could have a UI that runs for each of your UUTs and then display each of those UIs in a separate subpanel on your OI, if you are using LabVIEW. Or just have set of indicators on your OI equal to the number of UUTs and then figure out which set to update based on MyIndex.

 

You could also have each UUT displayed as a separate floating window. This way the operator could even drag the windows around so everything is arranged the way they like it and this solution could even span multiple monitors, however I haven't tried doing that for TestStand controls, so not sure, if it's possible...

 

For any of the above, you will need to greatly reduce the amount of information you are showing to the operator, as it won't fit your OI. You might find it easier to not user TestStand controls and just use a Multicolumn Listbox to display test step results.

 

Personally, I go for the manual switching through the list bar, if it's the Batch Model and subpanels, if it's the Parallel Model. For the Parallel Model, the main requirement usually is to see, if a UUT has failed, so that the operator can put on a new unit in it's place. This doesn't require a large OI at all.

 

 

0 Kudos
Message 7 of 9
(1,727 Views)

Hi Gubis,

 

thank you for your help. I now tried your solution but i can't really figure out how to use it for my problem. If i put the step in the sequence I'm executing it is fine and it works. But i want it somewhere in my process model so i don't have to add it to every new sequence. My intention was to put it in a Model Plugin sequence, but it seems that the "SequenceFilePostStep" and the "ProcessModelPostStep" do not affect the steps in my testing sequence if i add them to a Model plugin.

So again for clarification:
I have a custom OI wich uses the standard Batch Model and there are several custom Model plugins active. Now i have four different UUTs to test. When i now add the "SequenceFilePostStep" to each of these sequences it works fine. But it would be nice to add it to a Model plugin so the UUT-sequences don't have to be changed and it can't be forgotten in future sequences.

I hope you understand my struggle. Maybe i will try the overall log with the Listbox in the future, we have another testsystem which displays the result like that and it seems very good for a non-technical user.

Best regards,

Stefan

0 Kudos
Message 8 of 9
(1,695 Views)
Solution
Accepted by topic author StevieP

Hello all,

 

i finally found a solution for my problem!

 

I now use the UIMsg_ProgressPercent Event and it works fine for me. In the Event callback i just set the Execution that causes the Event as the Current execution.
The solution seems just so simple, but it was a long way to achieve this.

 

Thanks again for your help.

 

Best regards,

SteviePi

0 Kudos
Message 9 of 9
(1,461 Views)