02-08-2010 07:27 AM
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.
Solved! Go to Solution.
02-08-2010 09:53 AM
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
02-08-2010 10:39 AM