LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reset position different stepper encoder

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(4,495 Views)

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.

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 2 of 6
(4,453 Views)

Hmm... But the board has 8 axes, each has one set of stepper motor+encoder attached.

0 Kudos
Message 3 of 6
(4,438 Views)

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!

 

 

 

 

 

 

0 Kudos
Message 4 of 6
(4,412 Views)

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!

0 Kudos
Message 5 of 6
(4,401 Views)
Solution
Accepted by topic author RaymondTsang

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.

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 6 of 6
(4,377 Views)