Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
01-06-2011 02:06 PM
Hello,
I have a control that is going to be updated programaticaly every once in a while, and when that happens I would like to trigger an event. I though the way to do this was writing to the "value (signaling)" property node. But, I'm noticing that this is causing my Event to occur all the time. Why is this? What's the correct way to do this?
Thanks!
01-06-2011 02:12 PM
The Value(signalling) property will certainly fire the Value Change Event. You are changing the value all of the time and therefore firing the event each iteration.
01-06-2011 02:30 PM
well.... when I don't update the value into value (signaling) to me it seems like I'm not changing the value, but I guess every iteration of the while loop, just having the value (signaling) property node present, constitutes a changed value (even if you never change the value).... which is the same as polling...
01-06-2011 02:32 PM
Add a boolean, and make a Value Change event for it. Inside this event, place your Value(Signalling) property node, so it only fires when you push the boolean. Now play around and see if it makes sense.
01-06-2011 05:04 PM
@Fibo wrote:
well.... when I don't update the value into value (signaling) to me it seems like I'm not changing the value, but I guess every iteration of the while loop, just having the value (signaling) property node present, constitutes a changed value (even if you never change the value).... which is the same as polling...
Just to spell it out: YES, A value signaling property will fire the associated event even if the actual value does not change. It is not the same as polling. This is useful behavior and not a bug.
You actually need to be very careful here, for example if you would place two such nodes into your loop, every iteration would create two events, but only consume one, so you will ultimately run into serious problems.
Your signaling property should be in another event case, so it does not self-trigger itself when it fires.
01-09-2011 03:41 PM
So would you NEVER put a Value Signaling property in a while loop? It seems to cause the vi to get stuck in the event case.... I'm trying to cause an event on a value change from a DAQ's analog input channel, that's why I thought the Value Signaling might be a good option for this.
01-09-2011 05:17 PM
I just posted a response in the other thread you opened, unaware of this discussion. You just earn a bit more confusion yourself by this.
It would propably help us to help you if you post more of your code including the DAQ output from where you want to trigger the event.
Felix
01-09-2011 05:27 PM
Sorry for the confusion, I'm done with this thread, I got my answer here about value(signaling), it does constantly trigger an event. I didn't go into what I'm really trying to accomplish here because I thought I could figure it out once I understood how value(signaling) worked, but it seems like value(signaling) is not the solution, so in the other thread I am more specific in what I'm trying to accomplish.