LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming Help

Solved!
Go to solution

Hello all, the VI i have attached was working fine for the purpose till I had to add "Measurement Interval" in it.

Since the Total Pulse Count and the Measurement interval are user inputs I am restricted to not use any math functions.

For example if total pulse count was set to 100000 and measurement interval was set to 2000, how do I modify the VI that stepper motor

will step in every 2000 pulses??? For now the VI works such that it will see the Measurement interval once but never again.

Any suggestions will be greatly appreciated. 

 

 

0 Kudos
Message 1 of 3
(2,262 Views)
Solution
Accepted by topic author JayP

JayP,

Your motor steps only once because the interval is a constant and i from the while loop is a number that goes from 0 to  2147483647, so i is equals to an interval only once until i reaches its limit and rolls over. What you want is a modulo of i instead of just i. Use Quotient and Remainder from Numeric palette and monitor for condition when the i modulo interval is an integer (Remainder in this case would be zero)

 

Serge 

Message 2 of 3
(2,237 Views)
Thank You Serge. I use the concept you provided and it works.
0 Kudos
Message 3 of 3
(2,223 Views)