LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi server not triggering event structure

Group,

I have a Producer-Consumer remote application running.  It is set up so that when the stop button is pressed it triggers an event in the Producer loop that the Consumer loop then handles.  Pretty standard stuff.  This works correctly when I am on the remote computer and press the stop button.

 

I an trying to develop an application that will mimic the front panel of the remote application (because I will not always have access to the remote applications front panel as I am going to try and hide it inside a service).  So, I can get the status of all of the indicators and I can even "press" the stop button from my "viewing" application through VI server.  The problem is that when I remotely "Press" the Stop button, I can see it depress, but the producer loop doesn't get triggered.  It is like it doesn't even see the Stop button being pressed!

 

Thanks

Todd

0 Kudos
Message 1 of 5
(3,331 Views)

Yup.  You misunderstand how events work.  In this case you're only setting the value, not triggering an event (this is like the difference between the Value and the Value (Signaling) property).  You'll need to find some other way to trigger the event case.  You might be able to do this with a user event stored in a functional global variable that you could also call through VI server.

0 Kudos
Message 2 of 5
(3,322 Views)

Yes, Thank you for that.  Very good distinction. It would be nice if the Invoke node would have a Value Signaling for the ControlValue.Set but I only have Value.  I guess that I will create a User Event to handle the Stop button changing value.

 

Thanks Todd

0 Kudos
Message 3 of 5
(3,307 Views)

I just posted a topic with a library for handling remote user events via VI Server. You might want to check it out.

 

http://forums.ni.com/t5/LabVIEW/Remote-User-Events-Library-using-VI-Server/td-p/1312791

Jarrod S.
National Instruments
0 Kudos
Message 4 of 5
(3,275 Views)

I know this is an old topic, but just in case someone will ever need a solution for this issue I will post my solution here. 
As nathand mentioned, we need to change the value with the Value (Signaling) property. To do so, you can open a reference to a VI as normally and then from this reference open a reference to a Front Panel via Property Node. From the Front Panel reference, you are able to get a reference to all Controls the same way. Once you got the reference to an exact Control element, you can finally call a Value (Signaling) event from a property node. This will trigger the event case. 
Note that if you want to change the value of for example the stop button you need to make sure that the button has a mechanical action set to switch, otherwise with latch it won't work.

Solution Using Control Reference.png

 


0 Kudos
Message 5 of 5
(1,872 Views)