NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How best to display UIMessage text using the ActiveX controls in LV?

Hi
 
I'm using UIMessages to pass information from TS and I'm not sure how to best display it in the OI (without using a popup).  I'm playing with the Full OI in LV right now.  It seems that the SequenceView control may work but there are no "insert text" or equivalent methods. 
 
The reason to do this is to be able to see sequence step results (via the UIMessages) from PARALLEL iterations of the test sequence.  I don't want to have to the Executions tab to switch between different parallel test sockets. 
 
Any advice on both issues would be appreciated - Adam
0 Kudos
Message 1 of 13
(4,646 Views)

Hi Adam,

 

You could use a standard LabVIEW string indicator to display the Status information that can be passed with the UI Message as a string. When the RunState.Thread.PostUIMessageEx method is invoked, the UserMessage event of the Application Manager is fired. You can add an event to the Register Event Callback node in the Full OI - Configure Event Callbacks subVI to create a callback VI for the UserMessage event. This event can be added just by dragging the bottom of the node to display another event.

 

In the Full OI - Configure Event Callbacks subVI, wire the Application Manager reference to the event source (UserMessage) input in the Register Event Callback node's new event. A reference to the string indicator can be passed from the Full OI – Top Level VI into the Full OI - Configure Event Callbacks VI as a User Parameter where it can then be passed again as a User Parameter to the UserMessage event. Then, right-click on the VI Ref input and select Create a Callback VI.

 

Your callback VI will be something like the attached VI. Custom UIMessage event codes start at 10,000. The case structure in the Callback VI can have cases added for other custom UIMessages. As it is, the VI uses event code 10,000 and will work fine if the stringDataParam is the Step.Result.Status for the step last executed.

 

Hope this helps,

 

Eric M

Message 2 of 13
(4,630 Views)
Hi Eric,
 
Thanks
 
0 Kudos
Message 3 of 13
(4,605 Views)
Hi Eric,
 
Thanks for
 
0 Kudos
Message 4 of 13
(4,615 Views)
Hi Eric,
 
Thanks for the
 
0 Kudos
Message 5 of 13
(4,605 Views)
??  Ok, I'll try this again! 
 
Thanks alot for the help.  That was exactly what I was looking for at the time. 
Is there any way to prevent the String Box from loosing previous UIMessage reports?  IOW, make each report show up on the line below the previous report, not overwriting it?
 
I guess now I have two options:
1)  adding a UIMessage step after each important step in the Test Sequence and writing all this information to the String Box
2)  altering the way TS sends status information about each step (by default) to the LV OI and/or changing how the OI responds to the built-in events. 
 
The goal is to make an OI that displays "simultaneously" the execution information on several test sockets operating in parallel mode.  I've been told that the "file execution viewer" cannot be repeated on the OI front panel to display the executions of parallel test sockets (?).
Along these lines, would it be easier to change how TS sends execution information or alter the OI to change the way exection information is displayed?
 
As you can tell, I'm getting ready to customize an OI and I'm fishing for ideas or approaches.
 
Thanks again - Adam
0 Kudos
Message 6 of 13
(4,417 Views)

Adam,

 

First of all, I am not sure that it is impossible to have multiple execution views on the OI front panel to display the executions of parallel test sockets. I do know that it would be very difficult relative to most OI customization. I also know that to have multiple execution viewers, you need to have one ExecutionView Manager control per viewer.

Eric

More to come....

0 Kudos
Message 7 of 13
(4,585 Views)

Back to the other line of thought:

 

Instead of the string control, you could use something like a ListBox or even an array. These controls are designed to display multiple pieces of information. For example, the items in the listbox can be updated programmatically. much like the string control was earlier. In this case an array of strings is written to the control. After reading the array, the new string could be appended to the array and then the new array could be written to the control.

 

Now, as to having TestStand configured to pass this status information, I recommend using an Engine Callback (see chapter 10 of the TestStand Reference Manual). Specifically, you could add the ProcessModelPostStep callback to your parallel process model. This callback is a sequence that will be executed after every step in your test sequence.

 

In this callback, you could have the one ActiveX step that invokes the RunState.Thread.PostUIMessageEx method. You can pass

 

*** Parameters.Step.Result.Status ***

 

as the stringDataParam with this method. I was wrong in my previous post, Step.Result.Status won’t pass the right step’s status.

 

This way, the ListBox will be populated with a list of every step’s status.

 

Regards,

 

Eric M

Message 8 of 13
(4,586 Views)

PS. If you haven’t looked at Chapter 9 of the Reference Manual, I recommend you do. It covers Customizing Operator Interfaces. It covers both the nitty gritty details as well as some topics with a broader view.

 

Eric

0 Kudos
Message 9 of 13
(4,585 Views)

Hey Eric,

Thanks a million for the pointers.  I found an example that does what you suggested with the PostStep callback. Very Helpful.   http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=C42F09BEA4C15AD2E034080020E74861&p_...

This would be a great solution; however, there are some steps in the main sequence that I don't want status reports from.  It looks like I'll have to insert an activeX step after each important step unless I can find out how to selectively execute the ProcessModelPostStep callback. 

Adam

0 Kudos
Message 10 of 13
(4,564 Views)