P Controller Logic without using a PID block

John Marston

Member
Join Date
Apr 2015
Location
Chuparosa
Posts
54
Is there a way to create proportional logic for a control valve without using a PID function? I want to create a simple P controller without using the Rslogix PID function block.
 
One common model for controllers uses
Output = K*(setpoint-actual),
adjust K so it works and put it in a fixed scan cycle for best result.

Just copy what you need from wikipedia or internet since you can paste most of it directly into ST code.
 
I like to use an SCP instruction for this, which I think makes it easier to visualize. Input range on the top, output range on the bottom.
 
Right now I'm subtracting the valve position from the Setpoint to give me an error. I then take the error and drop it into my analog output going to the hydraulic servo valve. Being that the error reduces as the valve position gets closer to the setpoint, the servo closes and the control valve slows way down. This would be okay but I would like for it to be a little more weighted.
 
What do you mean by weighed?

The problem you usually end up running into is that the valve and system will have a deadband below which your command won't make a difference and as such you won't get to the value you really want to be at.
 
I like to use an SCP instruction for this, which I think makes it easier to visualize. Input range on the top, output range on the bottom.
Yes, 3 SCP instructions. One to convert counts to engineering units. One to compute the control output 0-100 using a proportional band and the third one to convert the control output to counts.

Being that the error reduces as the valve position gets closer to the setpoint, the servo closes and the control valve slows way down.
That is the way proportional only control works with servo valves.


The problem you usually end up running into is that the valve and system will have a deadband below which your command won't make a difference and as such you won't get to the value you really want to be at.
Servo valves shouldn't have a deadband. If they have one it better be very small.
 
I've never used an SCP instruction but I'm going to give it a try this afternoon. I'll report back my findings.



Peter, I believe I bought some converters from your company recently and they worked very well.
 
I posted this some time ago although it's a PI block but should do what you want & you can tailor it to do what you need, although it's in GX works it would not be hard to convert, just set the I component to a very low value & don't forget to only sample the block one scan every x milliseconds or even seconds.

PI Fun block.png
 
One common model for controllers uses
Output = K*(setpoint-actual),
adjust K so it works and put it in a fixed scan cycle for best result.

Just copy what you need from wikipedia or internet since you can paste most of it directly into ST code.




I ended up using this method and it works very well. Thanks for the help.
 

Similar Topics

Does anyone know of a way to detect if someone is online with the controller in ControlLogix (from logic) I'm thinking that maybe there is a CIP...
Replies
7
Views
380
Dear all, Currently i'm working with micrologic 1400 cpu and Temate G5 Controller. I plan to communicate micrologic with temate using...
Replies
0
Views
399
Hi. I have a question which am not able to solve. There are 3 outputs (O1,O2,O3) and 2 inputs (I1, I2) And we have to control these using the...
Replies
0
Views
1,181
I'm trying to connect for the first time to a Rx3I via Ethernet for the purpose of looking at the ladder logic and inputs/outputs while the...
Replies
5
Views
2,611
Hello everyone, Adding a remote rack of cards to control logix, I've added the cards to the controller through the enbt module, and it creates...
Replies
4
Views
2,110
Back
Top Bottom