08-04-2009 07:42 AM
Hello,
I have 2 while loop one with a program with a boolean indicator, ans an other with a timer.
I would use an events structure to launch a timer in the second loop when I put the boolean at 1 (when I turn on the light).
I edit my structure Events and I put the conditions "boolean value change" to start my timer, but this d'ont work, so I seen that this condition work only with a "command" (push button) and not with an "indicator" (boolean indicator), have you a solution to start the timer when the value of the INDICATOR change, and not the value of a COMMAND ????
I saw that I could send a notification but I have never used it and I don't know if it's usefull...
Best regards.
Solved! Go to Solution.
08-04-2009 07:47 AM
The property node
Value Signalling
Will fire any event associated that object changing.
Ben
08-04-2009 08:04 AM
Do you mean right clik on my indicator, then property node and then value?
I haven't be able to resolve my problem with that...
I put put it an example of my problem.
08-04-2009 08:11 AM - edited 08-04-2009 08:11 AM
No it's ok I have just find the solution. 🙂
Best regards.
08-04-2009 08:44 AM
Sorry, but I have an other problem with the property node it seems that it start like if the value was change, and I want that the program start like if the value had not change yet...
Do you have a solution for this problem ?
08-04-2009 10:05 AM
First, put a small wait statement in your upper loop so it doesn't consume 100% of the CPU cycles.
Second, the name of the value change event can be slightly misleading. Anytime you send a value to the value(signalling) property node, it fires the value change event even if the value has not actually changed. You can do a comparison of the old and new values to see if the value actually changed.
08-04-2009 10:11 AM
I put my example here.
In fact I want to count how many states are finish, I have a big problem with this property node...
08-04-2009 10:45 AM
10-21-2010 06:35 AM
10-22-2010 08:39 PM
aliasThree, instead of using references to the Main VI's controls (that's like sneeking on the top level VI, which does not sound like a very robust approach, expecially if you want to change your Main VI) you could instead have the Main VI send Dynamic Events to the sub VI each time one of the cluster components is modified. You would have to first define the Dynamic Event in the Main VI and find a way to pass the reference to that Dynamic Event to the Sub-VI (usually done via a LV2 global or even a global variable) so that it can register to it. You would have one event for each component (for instance the type of the event could be an enum listing the components you are interested in).
My 2 cts,
X.