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