03-24-2021 02:40 AM
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.
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:
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 ?
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!
Solved! Go to Solution.
03-24-2021 04:26 PM
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!
03-25-2021 01:05 AM - edited 03-25-2021 01:30 AM
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:
Testfirmware Programming UUT1&UUT2
Enter Batch Synchronization
Exit Batch Synchronization
Releasefirmware Programming UUT1&UUT2
Enter Batch Synchronization
Exit Batch Synchronization
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!
03-25-2021 05:02 AM
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.
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!
03-25-2021 05:28 PM
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:
03-26-2021 02:50 AM
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.
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.
03-28-2021 06:04 PM
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.
04-01-2021 09:46 AM
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.
10-13-2021 02:46 AM
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.