LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number addition onto itself

Hi,
 
I'm a new LV7.1 user. I've been able to use it to control some stepper motors successfully for a while. I wanted to count how many steps I've taken but could figure out the algorithm to write it in LV. For instance,
 
in C++, if you want to increment a number:
 
n = 12    'number of steps to be added or subtracted depending on which button push
i = 100    'initial number
 
i = i+n    ' if the "up" button is push
i = i-n     ' if the "down button is push
 
How do I get this into LV format?
 
Thank you for any inputs,
Q
0 Kudos
Message 1 of 3
(2,543 Views)
qle;

Check the attached VI. Certainly you can do it more nicely with event structures. This is only to show you the concept.

Regards;
Enrique
www.vartortech.com
Message 2 of 3
(2,540 Views)
Wow!!
 
Thank you, this is exactly what I need!! Thank you!!!
 
0 Kudos
Message 3 of 3
(2,517 Views)