Skip to main content

PID Block in RSLogix 500

 In this article, I will cover the PID block in RSlogix 500 with an example of process control.

This is an output instruction that controls physical properties such as temperature, pressure, liquid level, or flow rate using process loops.

PID closed-loop control holds a process variable at the desired set point.

The PID equation controls the process by sending an output signal to the control valve. The greater the error between the setpoint and process variable input, the greater the output signal, and vice versa.

The PID algorithm is used to control an analog process having a single control point and a single feedback signal. The PID algorithm controls the output to the control point so that a setpoint is achieved. The setpoint may be entered as a static variable or as a dynamic variable that is calculated from a mathematical operation.

PID Controllers are generally available in two types. One is a Single-stand-alone microcontroller-based hardware controller unit. The second one is as a software block in PLC or DCS programming.

To understand the PID block (software) in RSlogix software follows the below steps.

Step 1:

Open RSlogix 500. Create a new project and open programming environment.

Download RsLogix 500 if you don’t have it.

Step 2:
Let’s consider the process where I have to control the flow of fluid.

For that, I have a flow transmitter that provides me the present flow rate (feedback), a controller (PID block) which compares with the setpoint and present flow rate, then PID controls the manipulated variable (control valve) to maintain the required flow rate as per setpoint.

Step 3:
To do that, I need two Scale with Parameter (SCP) instructions. One SCP instruction will convert the value of the flow transmitter (4-20 mA) to raw value and another SCP instruction will convert a raw value to 4-20 mA (control valve).

Following is the program, in the first rung I have used SCP instruction which has input coming from the flow transmitter (I0:1).

Input minimum and maximum are 4mA and 20mA respectively. I have scaled it for raw value from 0 to 8192 counts as I have considered a resolution of 12 bit for my analog input card.

The output of the scaled input will store to a memory location (N7:0).

In the second rung, the PID block is used where I have a process variable (flow rate). I have given the address of input which I have scaled and a control variable address (N7:1) which represents the control valve memory address.

In the third rung, I have scaled the raw value to 4 to 20 mA signal to operate the valve.

For example, I have the following condition

SP (setpoint) : 12 m3/hr

PV (Input coming from the transmitter – flow rate): 12 m3/hr

MV (Control valve output) : 50 %
If I changed the setpoint or process variable value change from 12m3/hr to 11 m3/hr, then the controller compares it with a setpoint and produces an error. The PID changes the manipulated variable based on the error, then fed to the control valve to open/close the valve until the process reaches its flowrate as per the required setpoint.

Step 4:
To set all the value, Double click “setup screen” on the PID block. The following window will pop-up as shown in below.

You can set all the required values from this window. You can tune the controller.
As RSlogix won’t allow running a PID block with an emulator, I can not show you by running the logic. But, this is the best way to understand how logic works.

Step 5:
When you add PID block to the rung and compile it. You receive an error. To solve this, we have to define a PID block.

To do that, on the left side right click on “data file” and click on “new”.
Step 6:
The following window will pop-up.

In the “type” section, select PID and define the name. Click “ok” and you are done with PID block data type.

END

Comments

Popular posts from this blog

PLC Program for Mixing Tank

 Create a ladder diagram for controlling a batch mixing process. Implement a PLC program for mixing tank or Mixing Process using PLC Ladder Logic. PLC Program for Mixing Tank Fig : Mixing tank A tank is used to mix two liquids. The required control circuit operates as follows: A. When the START button is pressed, solenoids A and B energize. This permits the two liquids to begin filling the tank. B. When the tank is filled, the float switch trips. This de-energizes solenoids A and B and starts the motor used to mix the liquids together. C. The motor is permitted to run for 1 minute. After 1 minute has elapsed, the motor turns off and solenoid C energizes to drain the tank. D. When the tank is empty, the float switch de- energizes solenoid C. E. A STOP button can be used to stop the process at any point. F. If the motor becomes overloaded, the action of the entire circuit will stop. G. Once the circuit has been energized, it will continue to operate until it is manually stopped. Solution : A

What is Relay? How it Works? Types, Applications, Testing

 We use relays for a wide range of applications such as home automation, cars and bikes (automobiles), industrial applications, DIY Projects, test and measurement equipment, and many more. But what is Relay? How a Relay Works? What are the Applications of Relays? Let us explore more about relays in this guide. What is a Relay? A Relay is a simple electromechanical switch. While we use normal switches to close or open a circuit manually, a Relay is also a switch that connects or disconnects two circuits. But instead of a manual operation, a relay uses an electrical signal to control an electromagnet, which in turn connects or disconnects another circuit. Relays can be of different types like electromechanical, solid state. Electromechanical relays are frequently used. Let us see the internal parts of this relay before knowing about it working. Although many different types of relay were present, their working is same. Every electromechanical relay consists of an consists of an Electroma

Chlorine dioxide Analyzer Principle

 Chlorine dioxide measurement Chlorine dioxide (ClO2) is an instable, non-storable, toxic gas with a characteristic scent. The molecule consists of one chlorine atom and two oxygen atoms – represented in the chemical formula ClO2. It is very reactive. To avoid the risk of spontaneous explosions of gaseous chlorine dioxide or concentrated solutions, it is generally handled in dilution with low concentrations. ClO2 is soluble in water, but tends to evaporate quickly. Typically it is prepared on site, for example from hydrochloric acid and sodium chlorite. The procedure provides solutions with approx. 2 g/l ClO2 that can be safely handled and stored for several days. Image Credits : krohne Sensor Parts : Reference electrode Applied chlorine dioxide specific potential Current needed to maintain the constant potential Counter electrode Measuring electrode The disinfection effect of ClO2 is due to the transfer of oxygen instead of chlorine, so that no chlorinated byproducts are formed. ClO2