01-04-2008 02:34 PM
01-04-2008 02:53 PM
01-04-2008 02:56 PM
If you toggle a control to false, the new value should be false, so that seems OK.
JeffCWRU wrote:
For instance, after attempting to toggle a control to false, while the front panel says True, the cache says False and the Boolean:Value Change event triggered for a False new value.
01-04-2008 03:05 PM - edited 01-04-2008 03:10 PM
Message Edited by JeffCWRU on 01-04-2008 03:08 PM
edit again - could it be that the mouse bounced, signaled the front panel to toggle the boolean twice, whereas the first event was still processing and didn't acknowledge the second hit?
01-04-2008 03:27 PM
01-04-2008 03:38 PM
JeffCWRU wrote:
I'm honestly not sure if I could recreate the problem without breaking the company's IP policy
01-04-2008 04:09 PM
01-07-2008 07:15 AM
Thanks for the replies, everybody. I appreciate the help.
Ton:
I only use Value(SGN) once, and that's in a subvi to trigger an event that enables or disables a valve based on other valve states. There isn't any data writing to the actual valve, it just changes a hidden control to trigger the event. Also, locking the panel would create other safety concerns, so unfortunately that's not an option.
Gabi:
It would take hours to make a demo vi, just based on all the logic behind it. If I just removed the actual calls to the valves and sensors, that would make the program completely different, because I have had to program in some curious ways to account for physical delays in the valves. It does seem like it would be pretty easy to have the control written twice, so I'll look through the code for that.
Matthew:
I use the NewValue in the event structure to capture the intended state of the control. All my controls are outside the event structure, but inside the main while loop. Also, I use my timeout to gather data from the sensors to make basically a continuous data read unless the user acts.
I can't shake the suspicion that the control is just accidentally being hit again while the first event is still executing. I am not 100% sure if my memory is correct, but I am pretty sure that when I had a slower, less efficient valve disabling scheme, and it checked after every potential troublesome valve to see if others needed to be disabled or enabled, the double-toggles happened more often and were easier to recreate. Then, when I simplified the scheme, they became less frequent but still annoying. Is it even possible to toggle the control while its event is still executing, or am I just way off base?
01-07-2008 07:45 AM
Yes, that's why there's a mark 'Lock front-panel until the event case for this event completes'.
@JeffCWRU wrote:Is it even possible to toggle the control while its event is still executing, or am I just way off base?
01-07-2008 07:53 AM