NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to bring active execution window to front

Solved!
Go to solution

I need to show the currently executing step of a sequential batch process. With 11 sockets, tiled display does not show much of any of the sockets. What I would like to do instead is have the execution window of the socket that is executing brought to the front so the operator can see what steps are passing and failing during a test. Can anyone tell me how to do this? Thanks.

0 Kudos
Message 1 of 4
(2,678 Views)
Solution
Accepted by topic author Hamilton_Woods

Are you using the Sequence Editor or a custom interface? You could probably do this with the UIMsg_OpenWindows. UI Message:


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.

Put this in an expression and whatever execution sends it should be brought to the front:

RunState.Engine.PostUIMessage(RunState.Execution,RunState.Thread,UIMsg_OpenWindows,0,"",RunState.Execution,True)

 

Hope this helps!

Trent

https://www.linkedin.com/in/trentweaver
Message 2 of 4
(2,644 Views)

WireWeaver, thanks for the info. I am in the middle of development, so I could use the Sequence Editor or a UI. My preference would be to use the Sequence Editor just because I am not yet well versed in TestStand. I had wondered if I could use RunState.TestSockets.MyIndex inside a UI to make the execution window for the "active" UUT be the top window.

 

I guess if it were easy, anyone could do it 🙂

0 Kudos
Message 3 of 4
(2,638 Views)

WireWeaver,

 

I was able to add the statement:

 

RunState.Engine.PostUIMessage(RunState.Execution,RunState.Thread,UIMsg_OpenWindows,0,"",RunState.Execution,True)

 

to the TestStand sequence and run the Simple TestStand UI. During execution, the execution window for the 'active' UUT came to the top when the sequence started working on that UUT just like I knew what I was doing!

 

Thanks, Trent.

Message 4 of 4
(2,626 Views)