Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

***Resubmitted for further review*** How can I do position maintenance using a digital input to capture an encoder count and adjust the move profile on the fly.

I have a rotary table (45:1 ratio) being driven by a stepper motor with an encoder attached to the motor. I am using a 7344 motion controller. I want to be able to do position maintenance on the move. The problem is that I am always moving in the same direction and the table has mechanical error. I have a home input on the table, which I have wired to the trigger input for the corrosponding axis. My thoughts were to capture the position when the table goes by the home input and compare it with the previous time and make the adjustment in the next move. I am just not sure what the best way to do this
is.
0 Kudos
Message 1 of 3
(4,262 Views)
Hello,

So when you say that the table has mechanical error you mean that the number of steps per table revolution will vary from revolution to revolution? I apologize that I misunderstood this initially. What you could do is use high speed capture to read the position of the stepper every time the home switch (or some other mechanical switch) is hit for each revolution of travel. Then when the high speed capture lined is toggled you can read the current position and modify your next move accordingly. To get details about High Speed Capture please search for High Speed Capture from our Developers Zone at: zone.ni.com

There are examples programs on our website and examples available with the FlexMotion driver.

Please let me know if you have any further questions.

Re
gards,
Andy Bell
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,262 Views)
I have just finished a VI that seems to be doing the trick. What I was having trouble with was the mechanical gearing in the table after the stepper. No gear is perfect, so a 45:1 might be a 45.001:1 so every revolution is off a little more than the last. What I did was configured the High Speed Capture (HSC) and then enabled it at the beginning of each move, I then trigger it with the home sensor inside the table. I then feed the data I get through a shift register and the next time around compare it to the wanted number. I then adjust the next move based on what the calculation gave me. The table is never off more than 2 encoder pulses for every four moves. I have been running it now for over 2000 moves and it seems to be holding quite well. Thanks for all of the hel
p.
0 Kudos
Message 3 of 3
(4,262 Views)