Calculations for Stop offset w/Encoder/PLC/AC Drive

headbngr76

Member
Join Date
Apr 2004
Posts
3
Here is my application. I have and point to point indexing application that uses a 200pls A/B Phase encoder hooked up to the PLC. The PLC also adjust the speed on a AC Vector Drive via a Frequency input. I'm using the PLC high speed zone compares to stop the drive at desired postions. It stops the drive always off the compared value but always stops the drive within +/-2 pulses of the same off postion. I think the largest error is generated by the Deccel time setup in the AC Drive. If I lower the Deccel time in the drive the postion error is greatly reduced. Is there any calculation that I can do using the speed I set and the deccel time used in the AC drive to get an offset encoder postion to use in the high speed compare?

Here is the Spec on my system:
200pls/rev A/B ecoder mounted on gearbox
geabox 10:1
motor 1695rpm
Acc Drive Deccel time=.01s
 
It sounds like you are issuing the stop command when the axis reaches position instead of when you want it to start decelling. It looks like you also realize this is not a good thing.
First of all, its a good idea to use a decel time the drive/motor can actually perform under control. I really doubt if the motor could stop itself from 1700 RPM in 10 milliseconds, much less itself and the load. So put in something that it looks like the axis can handle.
The equation you are probably looking for is a variant of :
d = V^2/(2a)
This will give you the 'offset distance' you talk about. It is actually the distance required to decel from a specified velocity at a specified accel rate.

Make sure you babysit your units when you use this equation. Everyting needs to be in the same base unit for it to work. For example, a velocity (V) in inches per second and an acceleration (a) in inches/sec^2 will yield a distance (d) in inches.
You will need to turn your decel time value into a usable acceleration value. Many drives specify the decel time as the time from base speed to zero. Some specify it as max speed to zero. You will have to look up which it is and the come up with the appropriate accel rate.

Now all of this is a moot point if you are always decelling from the same speed. If that is the case and you configure a decel rate the drive can actually achieve you can offset your target position by a constant since it will always take the same distance to decel.
And this still may not get you what you want. You may need to use a two-step speed, a traverse speed and a creep speed at the end, to get the accuracy you want. If that's not enough or you need faster cycle times you may need to look into motion controllers

Let us know if you have any additional questions on this.

Keith
 
You state you're controlling the drive via a frequency input. Therefore, isn't the PLC controlling the decel rate?... :confused:

If, as Keith suspects, you're simply issuing a 'stop' command when you reach some offset position, and letting the motor decel at a fixed rate, I'm amazed you're ANYWHERE near the correct stopping position. If you're getting ±2 counts repeatably, consider yourself lucky... ;)

beerchug

-Eric
 
I have an application similar to this, if you have a speed command signal to the drive then try this;

Set the drive to "coast to stop"
Use a PID block to control the drive speed and ramp this down to zero as you approach the position setpoint. Use the position setpoint and actual position information from your encoder as SP and PV for your PID block and the drive speed command as CV.


If you do not have speed control of the drive then do the same thing but with the drive in "ramp to stop" or "ramp to hold" and use trigger the stop command by monitoring CV and triggering a bit at a pre-set threshhold value.

It will take some experimentation to get it right.

The system I am using this on is a 600ton mechanical moulding press with a 11 kW Powerflex70 driving a moving mass of 4 tons via 830-1 step down gearbox. The powerflex has an external braking resistor.
 
Update

Thanks guys for your help. This is what I tried so far. I'm using a Yaskawa AC drive. A while back for another application we got Yaskawa to write special software to adjust the Decel curve based on the set speed the drive was set. On a previos application we used it to get close to the same stoping distances when using four wire prox swiches. Anyway the special software written inside the drive is called Decel positioning.

http://www.yaskawa.com/web/download/DMDrive.nsf/(DocID)/MNEN-5J7M56/$File/TM.V7SW.030.DecelPositioning.pdf?openelement

Well they improve it by adding the possibilty to use an input to the drive which automatically send the drive in a creep speed plus also adjust the Decel curve depending on the speed the drive was currently going before the creep input was energized. So what I did is setup up a HS compare to energize an output from the drive at a fixed offset away from the desired position. Then when the first HS compare generated an interrupt I setup another HS comapre to stop the drive at the desired stopping distance. The only problem I see is that with the fixed creep offset that I use the creep speed is noticable at slow speeds. Some how I need to make a relationship to adjust the creep distance that I need since at slower speeds the distance can be shorter. Good news is that at any speed I have +/-2pls error which is about equal to 2mm in my system. I know that error might seem great but I was shooting for 1/4" with this project. I know 1 pls per mm is not good so I plan to increase the encoder resloution 6x to the max rate that PLC can handle at the motor's top speed. Can any one suggest a relationship on the required creep distance needed at different speeds?

I'm still experimenting on using other methods on doing the same application by ramping the speed of the drive using the PLC. I like JohnW method of using PID to ramp the drive down but it will require more time and a whole lot of patience. One benifit with using that method is I won't be required to use the model of drive with the special Decel positioning software.
 
Last edited:
Find the creep distance by experiment, measure the creep distance at different speeds and draw a graph. find the slope of the graph and use this to find the creep distance for any speed. Bearing in mind that at very slow speeds the graph will probably not be linear due to friction.

Using PID takes care of all this as it integrates the error over time and will corrrect for friction at low speeds. If you use the derivitive term then this will correct for overruning loads etc.
But a simple speed x scale factor will do.
 

Similar Topics

In a safety circuit it's clear how to use sistema or similar to calculate the PL given hardware components. But how are various degrees of pure SW...
Replies
4
Views
91
I know this isn't PLC related, thanks for bearing with me. Does anyone have an excel sheet to calculate full load amps for branch circuits? Im...
Replies
0
Views
718
Has anyone had any experience with calculations for SRML wire. I have searched through all the articles I can, googled it and even talked to...
Replies
4
Views
1,691
Hello experts, I'm making my first steps in hydraulics and recently I have come across to a very old thread in which the following task was...
Replies
14
Views
3,044
Hi All, I have a task to decipher a calculation done by one of our S7 PLC's onsite. The problem being that its in statement list, and this...
Replies
4
Views
1,851
Back
Top Bottom