This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. 

Try our online
PLC Simulator FREE.
Click here now to try it.

New Here? Please read this important info!!!
July 7th, 2018, 04:58 PM  #1 
Member
Join Date: Apr 2018
Location: Landrum, SC
Posts: 12

VFD and linear motion
I am currently trying to figure out how to program a machine that has a rack and pinion driven by a 7.5 hp gear motor and a Mitsubishi D700 series VFD. I have a AB Ethernet IP encoder hooked up directly to the pinion drive shaft for location feedback. The drive has 3 inputs controlling it forward and reverse and a 420ma for speed. The sled is driven back and fourth at a distance and speed set by the user. The acceleration time and deceleration time are pertinently set in the VFD. The 420 just sets the max speed. The pinion only rotates 20 times max and I only need to +or an inch so this doesn't have to be extremely accurate. My plan was to just to switch my output from forward to reverse when the counter gets to a certain set point. The main problem with this is I don't know how to calculate how many revolutions I'm going to get on the deceleration so I can subtract that from the set point. Any guidance would be great!

July 7th, 2018, 05:38 PM  #2 
Lifetime Supporting Member + Moderator

Picture a graph of velocity vs time. Your sled goes from Y inches per second to zero inches per second in t seconds. The distance traveled during deceleration is equal to the area of the triangle described by the point where you begin to decelerate, the point where you get to zero speed, and the horizontal axis, or Y/(2*t).

July 7th, 2018, 06:11 PM  #3  
Member
Join Date: Apr 2018
Location: Landrum, SC
Posts: 12

Quote:
40/(2*1)=20 Also does the way I want to control my machine seem fairly feasible? Is my drive going to have a ramp as linear as I expect? 

July 7th, 2018, 07:55 PM  #4 
Member

If you are using a rack and pinion that would mean the motor has to start and stop for each direction?? I doubt that a 7.5 hp gear motor is going to last long doing that.

July 7th, 2018, 10:03 PM  #5 
Member

This has been covered before on this forum. A fellow posted a calculation that can be done in the plc to drive a VFD to a position.
If it doesn’t need anything fancy, then don’t make it fancy. The data points you will need: 1) Current Position 2) Position Setpoint 3) Position Error 4) Minimum Speed 5) Maximum Speed 6) Position Window I can’t remember the exact formula, and can’t seem to find the post. Basically, the position error with a gain is going to drive the motor to the position setpoint. The minimum speed keeps the motor turning until it reaches setpoint. The max speed keeps it from shooting to the moon. A position window is nice to have so you can tell when the motor has positioned itself to the position setpoint. If you don’t find the old post by Monday, I can give you a sample.
__________________
“Did the Lord say that machines outta take the place of livin’, and what’s the substitute for bread and beans? Do engines get rewarded for their steam?” John Henry 
July 8th, 2018, 07:27 AM  #6 
Member
Join Date: Mar 2010
Location: casablanca
Posts: 382

May be this will help you
http://www.plctalk.net/qanda/showthread.php?t=18455 
July 18th, 2018, 09:35 AM  #7 
Member

Just remembered this thread, sorry. Lol
The calculation I was talking about is this: ((Square Root ( Target Position  Current Position )) x Velocity Gain ) + Minimum Velocity This will output a speed reference that you can then send to the VFD. You will also need a max speed limit as well. Have another rung that checks if the speed reference is greater than X, if so then MOV your max speed into your speed reference. I can’t remember or find where I originally found this but it was here on this forum. I don’t take credit for it at all.
__________________
“Did the Lord say that machines outta take the place of livin’, and what’s the substitute for bread and beans? Do engines get rewarded for their steam?” John Henry Last edited by seth350; July 18th, 2018 at 09:41 AM. 
July 18th, 2018, 10:22 AM  #8  
Member

Quote:
The basic formula is v^2=2*decel*dist http://zonalandeducation.com/mstm/ph...troduction.htm but when transitioning from one speed to another it is v^2vmin^2 = 2 * decel*dist. Therefore the equation is v = sqrt(vmin^2+2*decel*dist) dist is the command position  actual position decel is the deceleration rate
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon 

July 18th, 2018, 11:02 AM  #9 
Member

Thank you Peter.
If the calculation is time independent, what would the units be for the deceleration rate? Would it be the distance from target to decel? I am currently testing your revised calculation against the one I mentioned.
__________________
“Did the Lord say that machines outta take the place of livin’, and what’s the substitute for bread and beans? Do engines get rewarded for their steam?” John Henry 
July 18th, 2018, 03:54 PM  #10  
Member

Quote:
It can be meters/second^2, ft/second^2, inches/second^2, mm/second^2. Some crude motion controllers use counts/second^2. The equation you found is wrong. It is missing the 2.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon 

July 18th, 2018, 04:03 PM  #11 
Member

Peter, that equation isn't intended to do profiled motion or determine time ir distance to decel. It is basically a self contained position proportional controller. The square root will provide a quasilinear decel rate in time but in reality it is just position reflexive. The axis operates at a speed proportional to how far it is away from where it should be.
We do this here on occasion with low bandwidth, low accuracy positioning axes just because it is so simple and it is fairly hard for people to mess up. Keith 
July 18th, 2018, 04:11 PM  #12 
Member

I'm not sure about the D700 but most drive decel time settings are relative to max speed. Until told otherwise we will assume this is the case. Divide the drive max speed in RPM by 60 to get revs/sec max speed then divide that by the decel time to get revs/sec^2.
At that point distance to decel from a known velocity to zero speed in motor revs is: V^2/(2*a) where V is the motor velocity in revs/sec and a is the decel rate in revs/sec^2. divide that number of revs by your gear ratio and you end up with pinion revs to stop. Since the encoder is on the pinion shaft this is probably the number you want to work with. You could also convert to inches of pinion pitch diameter travel if you want bu that isn't necessary. Keith 
July 18th, 2018, 06:13 PM  #13  
Member

Quote:
I was not able to test for position accuracy improvement. I did place a compute instruction in parallel to my other to compare how the two reacted to the same inputs. The revised calculation seemed to offer more control of the speed or would seemingly be able to slow down to a specific position with more repeatability. The first calc is essentially very near sighted. It can either be setup to creep slowly towards a target and stop at target or to hit the gas and speed toward the target then hit the brakes when it finally can see the brick wall (target). This is probably just a trade off between accuracy and speed, but it does work. Our machine will hold +/ .100” with a max travel speed of 250IPM and minimum at 1IPM. I think Peters calc will essentially put some glasses on the previous calc so that it can see the brick wall sooner and prepare to stop. If that is the wrong way to look at it, please correct me. PS: I don’t understand how the calculation can be time independent but the decel rate be in a measurement of distance over time? I don’t know what other unit it could be? Most if not all rates I have seen are distance over time squared.
__________________
“Did the Lord say that machines outta take the place of livin’, and what’s the substitute for bread and beans? Do engines get rewarded for their steam?” John Henry 

Bookmarks 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)  
Thread Tools  
Display Modes  


Similar Topics  
Thread  Thread Starter  Forum  Replies  Last Post 
Can I acquire motor shaft position using my motor and VFD?  belae1ka  LIVE PLC Questions And Answers  3  March 24th, 2017 03:55 PM 
Is a Separate Encoder Axis Needed after Setting Up VFD Axis with Encoder Feedback?  jake4eng  LIVE PLC Questions And Answers  1  October 20th, 2016 03:38 PM 
Less suction pressure on Blower after Stardelta starter replaced by VFD  kArTmAN  LIVE PLC Questions And Answers  38  October 3rd, 2016 11:19 PM 
Constant Web Tension using VFD and PLC  raholter  LIVE PLC Questions And Answers  8  October 17th, 2013 09:29 AM 
Motion Coordinated Linear Move  Oboy  LIVE PLC Questions And Answers  12  October 20th, 2005 03:37 PM 