01-28-2013 03:19 PM
Hello, i was working on a VI to check encoder values on my motor, i want the program to add 1 to a variable or some stored integer every 1140 ticks of the encoder, allowing me to track how many rotations that motor makes over the course of the program, i built a system to check the encoder, and a way to initally set a value, but i dont know how to create a variable to store it in, i tried using a local variable, but it wont let me set the value from a constant, any help would be appriciated
01-28-2013 04:06 PM
Use a shift register on your loop.
01-28-2013 04:09 PM
i have never used a shift register, could you explain what it does?
01-28-2013 04:22 PM
It is used to pass a value from one loop iteration to the next.
For example, the following code is used to add the numbers 1 through 10.
01-28-2013 04:22 PM
It depends on your requirements. In general, I have found the use of a shift register in the loop to do the job. See png file.