LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inc dec event generation

Hi..My requirements is to increment and decrement numeric value. If user holding increment button i should get the value 1 in one indicator until he release the button.  Same thing for for decrement button. This i like to do with event structure. i created one simple vi. but i am not getting corrcet logic for this.
totally i need 3 values.
1. Increment button status
2. Decrement button status
3. Inremented or decremented value. (i get the value from numeric control)
 Some help pls...
Ranjith
0 Kudos
Message 1 of 7
(3,525 Views)
Hi ranjith,
maybe this works for you.
Mike


Message Edited by MikeS81 on 07-11-2008 02:03 PM
Message 2 of 7
(3,522 Views)

Hi ranjith,

please explain why you can´t use the timeout event. Where do your events come from. I think the vi is only an example. Do you read from hardware?

Mike

0 Kudos
Message 3 of 7
(3,499 Views)
Hi Mike,
I do regular updates in timeout event for deferent purpouse. . so i cant reset that for increment and decrement logic. 
Ranjith
0 Kudos
Message 4 of 7
(3,495 Views)

I am planning to have 2 boolean push buttons for increment and decrement, one numeric indicator for value.

Using this i can get values generating seperate events. but there is a problem again... When i hold the button, i should increment or decrement the values continuesly.

Can i generate continues events holding the button? or any other way i can do this?

Pls help on this..

Ranjith

0 Kudos
Message 5 of 7
(3,478 Views)

You would need to change the mechanical action of the buttons and have a while loop which monitors if the button is still true at regular intervals, thus causing the appropriate action (increment or decrement).  You could place this within the Event Structure for that button.

R

0 Kudos
Message 6 of 7
(3,465 Views)
Instead of using a timeout event to reset the increment/decrement indicators, use a mouse up event on the speed control.  That way as soon as you release the mouse, the event fires and resets those two indicators.
0 Kudos
Message 7 of 7
(3,461 Views)