LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need an example of using UIMessageEvent Labview and TS.

I've been reading about this in the 'UsingLabviewWithTestStand.pdf manual. Chapter 6.
Creating custom user interfaces with Labview. I've been working with the Simple OI for Labview.
 
The manual doesn't provide enough information for me to understand what to do next?
 
Can someone provide a working example of an Operator Interface that can handle the process model events generated with the Call Thread.PostUIMessageEx() steps? Say I want to add a custom event that sends a string to be displayed in a text box, such as an operator instruction. How do I do that?
 
I just can't seem to get the link between the two.
 
0 Kudos
Message 1 of 7
(3,343 Views)
Hi checkers,

Take a look at the following example from our website. I think it will help.

Let us know if you still can't quite get things working.

Thanks!

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=04A24417FF0933A2E0440003BA7CCD71&p_node=DZ52218&p_source=External
Dan Weiland
0 Kudos
Message 2 of 7
(3,327 Views)

I looked at several of the examples on the web site, but they are all using PostUIMessage in the sequence. The TS 3.5 help file says that that is an obsolete call and the I should use PostUIMessageEx.

The example that you are pointing me to doesn't seem to do anything at all. I run it with the suggested sequence (uimessage.seq) but there is no obvious result. Nothing in the report window. All I see in the execution window is that the Action, Call Thread PostUIMEssage is 'Done'. It is supposed to be counting; but where does it put the count value?

After someone answers the above questions, I have more...

I am using TestStand 3.5 and LabView 8.01

I am looking for an  Event driven example with PostUIMessageEx that works?

How do you populate the ActiveX parameter?
What kind of data is it looking for?
How do you read that parameter in the Event handler?
Can I display the string variable in a Text Indicator?

So far I have modified the Simple OI and added the UIMessage event handler to pick up the string variable. But it doesn't pick it up, as far as I can tell. I tried to put a breakpoint in the VI to take a look at it, but that is evidently a bad idea because it hangs the Labview runtime enginer or server and I have to kill the application.

So there are a multitude of questions about writing this kind of coded (Event handlers) that I can't seem to get answered in any of the documentation.

If there were an up-to date TS 3.5, LV8.0 example that really worked, then maybe ...

 

0 Kudos
Message 3 of 7
(3,314 Views)
But the way, thanks for the fast response. I often forget to show my appreciation.
0 Kudos
Message 4 of 7
(3,313 Views)
Ask and ye shall receive...

Give this a shot. It basically just asks the User for a String, then (using PostUIMessageEx) displays that string on a small indicator on the front panel.

Let me know if you have any questions or run into problems.

Thanks!
Dan Weiland
0 Kudos
Message 5 of 7
(3,302 Views)

Ok, I see how that works.

So, if I want to have 10 controls of various types, like LEDs, Text Controls/Indicators, Numeric Controls/Indicators ...

then all I need to do is expand your approach. That is a lot of wires going into the Configure Event Callbacks VI. Would you then suggest that I build an array of these items and pass in the array?

 

0 Kudos
Message 6 of 7
(3,298 Views)
Hi checkers,

There are plenty of ways you could go about it. The "cleanest" way I can think of off hand is to package all the different Control references into an array, (an array of references), then add that to the cluster being passed into the Callbacks subVI. You'll need to go to the front panel of the Callbacks subVI and add an array of control references to the input cluster so that they match.

I'm sure there are plenty of other ways to do it as well. But that way seems to make sense to me.

Have a good one checkers!
Dan Weiland
0 Kudos
Message 7 of 7
(3,286 Views)