07-14-2006 03:34 PM
07-14-2006 05:22 PM
hi there
here's my suggestion:
1. create a event case for "button.value changed". this will handle the event
2. create a while loop that polls the value of button with a rate of lets say 20Hz
3. if the value of button is TRUE (button pressed) then set the val(signl) property of the button object to TRUE in your while loop
4. the val(sgnl) property will fire the event button.value changed even if the value remains TRUE
5. your event case and so your code will then be executed with a rate of 20 Hz
6. maybe you have to handle the button.mouse up event to set the value of button back to FALSE
i don't have LV at hand by now to try this out, but i think this schoukd work
07-15-2006 06:43 PM
07-15-2006 08:30 PM
07-15-2006 08:56 PM
07-16-2006 01:30 AM - edited 07-16-2006 01:30 AM
Attached is a simple demo, modify as needed.
Message Edited by altenbach on 07-15-2006 11:31 PM
07-16-2006 11:51 AM - edited 07-16-2006 11:51 AM
Message Edited by DanPHS on 07-16-2006 11:52 AM
Message Edited by DanPHS on 07-16-2006 11:53 AM
07-16-2006 12:02 PM
@DanPHS wrote:
Your suggestion sounds like it would work, but I can't have the event fire when the button is pressed and when it is released. One button press has to switch the menu to the next item only once.