06-18-2010 04:27 AM
I have a stepper motor (with an encoder) connected to a NI 7350 motion controller. The encoder and the stepper have different count per revolution.
I'm trying to reset the motor to a non-zero position, i.e. different count values for stepper and encoder, with the "Reset Position.vi" under trajectory control, but it seems I can only set them to the same value. How come?
--ray
Solved! Go to Solution.
06-21-2010 02:24 PM
Hello Raymond,
Since Reset Position.flx has reference to the same board ID, you would only be able to reset the position to the same value.
06-21-2010 06:04 PM
Hmm... But the board has 8 axes, each has one set of stepper motor+encoder attached.
06-22-2010 01:53 PM
Hi Raymond,
According to the detailed help, although the Reset Position VI can be applied to multiple axes on the same Board, for each axis, it will reset the the axis position and the associated primary feedback position to the value you specify.
That is because when you reset position, it is really just setting the count value of your encoder. There is no motor step value you could set, because the position of the motor determined from the encoder. So if your motor has 200 steps/revolution and your encoder has 24 counts/revolution. You can only reset your position to 24 different values.
Hope this helps!
06-22-2010 08:05 PM
Thanks for your response.
Using your example, if I set it to 96 counts (I configured it open loop), that means 4 rev for the encoder and almost 1/2 rev for the stepper. Is that right?
Actually, since I can read the stepper counts from the motor, I assume there are two counters.
I read the detailed help. It says there's a "secondary" reset value. It is possible to make it pint to the stepper counter?
Or, is there any way to work around this?
Thanks so much!
06-23-2010 01:01 PM
You have the option of adding a secondary feedback.
However, you may want to read the following article. As long as you set the appropriate settings in MAX, it should be able to make the calculations in the background with respect to commands you send to the motor. And then setting the value of the primary feedback is not really an issue.
For example lets say we use the example in the article (1000 steps/rev and 2000 counts/rev on the encoder) you start out at position 0, provide a command of 100, it will make the 2:1 calculation and stop driving the motor once it counts 200 pulses from the encoder. Let's say you want to make this the new "home" position, you set it to 0 and go from there. If you set it to something other than 0, let's say 150, that corresponds to 150 steps of the motor or 300 counts of the encoder.
In summary if you set the counts/rev and steps/rev in MAX, the associated values you command will be in terms of motor steps. LabVIEW will make the necessary ratio calculation to stop on the appropriate encoder count.