PID micro810

zweistein

Member
Join Date
Apr 2018
Location
Manaus
Posts
5
Hello everyone
I'm working on a project where i have to use the pid instruction (ipidcontroller) in my AB micro810 plc to control the water level of a tank, in the manual it says that it's possible, but i have no ideal how to do it since the plc has neither analog output nor pwm.
If you have ever done that or have any idea of how to it i'd be really glad to hear how to do it from you.
 
Do you plan on using an open/close valve or a modulating valve? Will the PID control the rise or drop in the water level? Does the water level drop or rise on its own when there is no control?
 
DaDaDadeo, thank you for asking.
Basically i have a water tank which has a high flow of water going out, a weg vector inverter CFW08, a Pump, a AB plc micro810 and a ultrasonic sensor.
The sensor should read the level of water in the tank and then compare with the desired level (set point, which should be changed according to the need. for example: i may want to keep in 80% or 50%) and after that turn on the pump by sending a signal to the vector inverter.
 
In this case, the use of a PID may not be necessary since there is a constant effect to the value of the input caused by the high outward flow. You can simply create a basic math function for an output percentage when the sensor is within the pband.

Below is a rudimentary example of the proportional output function.

SetPoint := 80;
PBand := 10 ;
Start_P := SetPoint - PBand;

IF Sensor_Input < Start_P THEN Output := 100; ELSE
IF Sensor_Input > SetPoint THEN Output := 0; ELSE
Percent := ((SetPoint-Sensor_Input)/PBand)*100;
END_IF
END_IF

Example:
Sensor_Input = 69 (The percentage output = 100%)
Sensor_Input = 75 (The percentage output = 50%)
Sensor_Input = 79 (The percentage output = 10%)
Sensor_Input = 81 (The percentage output = 0%)

There is also a way to use the proportional percentage as a digital output by adding a timer and using a timed proportional activation of the digital output. This would be based on the comparison of the timer's accumulated value and the percentage output.

For simple controls, it is overkill to create and tune PID functions from different PLCs. In this case, the simple function may be surprisingly effective.
 
Last edited:
DaDaDadeo, thank you again. If my problem were only to control the level i'd probably do what you said, but since it's college stuff and it's not about control the level by itself, it's about applying a PID controller, i do need to learn how to use the pid intruction in that pcl.
 
Last edited:
Do I understand you correctly that you have no analog inputs or outputs on your PLC? If that is the case then the real problem becomes what are you going to hook the ultrasonic sensor to?


Bubba.
 
It's sounds like a pretty much a straight forward project. It's not rocket science...... Oh wait, it is.

The 800s have PID functions. This project looks like you will have to concentrate on the inverter's digital input functions that the manual states in chapter 3. If this assigned project requires the use of an 810 with no AO, then the timed proportional control of a digital output based on the output of the PID can be used.

Let's use the output of the PID that has its output scaled to from 0 - 5000.

Create a 5 second timer with a millisecond base with a preset of 5000. The timer will run and reset itself continuously by using the timer's negated done bit.

In another condition, use the timer's done bit to check the value of the PID output. If the output is greater than 1/2 second (500), turn on the output. This keeps the digital output from toggling faster than 1/2 second.

While the timer is running, if the timer's accumulated value is greater than the PID output, turn off the digital output.


Example:
PID output = 0, Digital output is off always.
PID output = 20%, Digital output is on for 1 seconds and off for 4 seconds.
PID output = 50%, Digital output is on for 2.5 seconds and off for 2.5 seconds.
PID output = 80%, Digital output is on for 4 seconds and off for 1 seconds.
PID output = 100%, Digital output is on always.


This does not require PWM and is easily applied to many different PLCs. This method has been proven to work very well when there is no analog control.
 
Last edited:

Similar Topics

Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
85
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
591
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
926
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
409
Back
Top Bottom