You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old February 24th, 2004, 04:50 PM   #1
lanman
Member
Canada

lanman is offline
 
Join Date: Nov 2003
Posts: 26
Proportional valve driver control with PID

Hi.

First let me say I've been reading this board almost daily since last July when I first started PLC programming, and have found it to be a great resource. Thanks to everyone involved.

Now, onto my question. I'm currently trying to control a hydraulic tube end forming machine using PID on an AB slc 5/04.
The machine has 4 cylinders, and 8 valves (2 per cyl, 1 advance and 1 retract). The valves are controlled via 4 Dennison Dual Proportional Valve Drivers connected to 2 analog output cards on the plc. Each cylinder has an encoder to provide the positioning feedback. I've never used PID control before and figured this machine would be a great place to implement it on.
My problem is that the cylinders are controlled by supplying -10 to +10 volts to the valve drivers. A positive voltage drives output A, which in turn is connected to the advance valve. A negative voltage drives output B, which opens the retract valve. The amount of voltage controls the speed that the cylinder moves. The voltage is controlled by supplying a value of -32767 to +32767 to the analog card in the plc.
I spent all day today implementing PID control on one valve. I managed to get it to work! As the cylinder approached the set point, it would slow down then creep into it's final position. This is where I got stuck. If I now reduced the setpoint (ie to retract the cylinder), the PID instruction gives a zero output. What I need it to do is output a negative value in order to open the retract valve.

So, what I need is this...an output on the PID control that is from 0 to 32767 if the current value is below the set value, and an output of 0 to -32767 if the current value is above the set value. Obviously scaling needs to be performed, since the max output of the PID function is 16383.

FYI, we called several AB tech support reps today and 2 didnt have an answer, and the other said it couldn't be done because of a "bug" in the PID function.

Any help would be appreciated.
  Reply With Quote
Old February 24th, 2004, 05:16 PM   #2
randylud
Member
United States

randylud is offline
 
randylud's Avatar
 
Join Date: Oct 2002
Location: Greensboro,NC
Posts: 933
PID control over cylinders?

Quote:
If I now reduced the setpoint (ie to retract the cylinder), the PID instruction gives a zero output.
I am not sure you actually want or need PID control for this application. PID works well for keeping a system at a setpoint when the process or outside forces try to pull it away from that setpoint. Case in point, if you have a level of liquid you need to control in a vessel, the PID function will compensate for process upsets that want to increase or decrease that level. Now, in your situation, you are trying to use the PID function to control positioning of the cylinders and allow you to move them to new positions under said control. Is there some process condition that tries to move the cylinders while that are at a particular position?

If there is no good reason to have PID control over a setpoint position but just to move the cylinders, then I think you would be better off doing that with discrete programming. Meaning, do the move control by a set of instructions that achieves the desired result.

Quote:
What I need it to do is output a negative value in order to open the retract valve.
If you are dead set on doing this with the PID instruction, you will have to set your proportional term or gain very high so as to give you error for any deviation you induce. Also, make sure you have any deadband settings at 0. I feel though, if you get this loop reacting to your change in setpoint, you may also have a very unstable system that will tend to hunt once at or near setpoint.

But in review, to generate the + and - values you need, to drive your valves, the error produced by the change in setpoint will do that if you have the gain set high enough. Turn off any I or D settings, you will not need integral or derivative in this case I don't think.

Keep us posted on your progress!
Also see Norm's post below, good suggestions and welcome to the forum and glad you are enjoying it.
__________________
Thunder is good, thunder is impressive; but it is lightning that does the work!
Mark Twain-8/28/1908

Last edited by randylud; February 24th, 2004 at 05:19 PM.
  Reply With Quote
Old February 24th, 2004, 05:16 PM   #3
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,323
You may find that the PID controller in the SLC is not fast enough to perform the positioning.

What most people would do in this situation is use a signal from the PLC to tell a servo controller where to position the cylinder.

If you need a fast response with no overshoot, this is most likely the path you will have to take. If you look at the AB specialty cards for the SLC they make ones specifically for servo positioning (mostly geared toward electric motors but may be workable).

Rexroth makes a card called the DMX that is specifically designed to position a cylinder based on an analog or SSI input. Also Delta Computer systems makes a servo hydrauilc controller that is more than capable for what you describe.
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth
  Reply With Quote
Old February 24th, 2004, 05:25 PM   #4
lhnv
Member
Australia

lhnv is offline
 
Join Date: Feb 2004
Location: Roxburgh Park
Posts: 1
Hi,

I think you only need to add a variable X to your scaling!

Value' = X * value

For direct drive, X = 1 or -1 depends on the advance/retract.

Value' range is 0..16383
Value range is 0..32767

You would probably need a linear factor of 2/-2 for X. You
might want to consider some free run or softlanding as X value
would indicate how fast the values are (X would be a variable).

Regards

/Linh
  Reply With Quote
Old February 24th, 2004, 05:26 PM   #5
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,336
Randy and Norm have a lot more experience with this subject than I do ... if I were you, I'd carefully consider what they have to say ... but just to give you an answer your question, here's something that might help ... I haven't read it myself so it might turn out to be a wild goose chase, but the title looks interesting ...

knowledgebase entry for Bipolar PID
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old February 24th, 2004, 07:11 PM   #6
lanman
Member
Canada

lanman is offline
 
Join Date: Nov 2003
Posts: 26
Thanks all!

I'm not surprised to hear that using pid in this application is not really appropriate. I was already wondering about that. However, this project is simply a learning experience at the moment. The machine is actually already working and ready for shipment to the customer using descrete programming like Randy described. Since we have it for a few more days and will be doing more of them in the future, we wanted to experiment with using PID since it was something none of us at the shop had any experience with.
This bi-polar pid seems to be just the answer I was looking for. I can't wait to get to work tomorrow to try it out. Will keep you posted.

Graeme
  Reply With Quote
Old February 25th, 2004, 10:05 PM   #7
lanman
Member
Canada

lanman is offline
 
Join Date: Nov 2003
Posts: 26
Update. I tried the bi-polar pid method described in the AB article. It worked perfectly! The cylinders move to their setpoints within 3/1000" without overshooting.

Thanks again for the help.

Graeme
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PID - what is it anyway? Ron Beaufort LIVE PLC Questions And Answers 21 November 25th, 2014 07:36 PM
Control Logix PID block not working russrmartin@hotmail.com LIVE PLC Questions And Answers 8 March 1st, 2012 11:14 PM
Siemens S7 PID Control Problem qee LIVE PLC Questions And Answers 27 May 15th, 2007 10:53 AM
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 01:18 AM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM


All times are GMT -5. The time now is 05:49 AM.


.