PLC Sequence Programming
This is PLC Program for sequence control application.
In flare application, fluid or gas is processed in a vessel. If the presser is low in vessel, both the valves should be closed. Compressor valve continues to open until PID controller output reaches 50%. Flare valve will start if the pressure in vessel still increases. Write PLC program for this flare application using ladder diagram language.
For this application, we will use sequence control concept. Here we are discussing about flare control example.
Two control valves are used for controlling, one is for compressor and other is for flare.
Pressure transmitter is used for pressure control in a vessel.
We use an PID controller in PLC for controlling of two valves as per requirements.
If the pressure is low, the PID controller output is 0% output and both valves are closed and it will allow pressure to build up in the vessel. When pressure increases, the control valve allow product to exit and compressor valve continues to open until controller output reaches 50%.
If the pressure still increases flare valve starts to open to evacuate the gas and burn it. When controller output is 100% both the outputs are fully open.
PLC uses SPLIT programming so you can connect two control valves with separate analog output. Hence you can calculate output range in PLC.
List of Inputs /Outputs
- PID enable :- M61.0
- Manual enable :- M61.1
- PID reset :- M61.2
- Analog input from PT :- IW64
- Compressor control valve analog output :- QW96
- Flare control valve analog output :- QW98
- Set pressure :- MD500
- Actual pressure :- MD704
- PID output (%) : -MD758
- PID state word :- MW770
- PID error word :- MD778
- Calculated output for compressor valve :- MD790
- Calculated output for flare valve :- MD204
- Scaling word :- MD798
- PID enable input :- M61.0
- PID manual mode enable input :- M61.1
- PID controller reset :- M61.2
- PID high limit alarm :- M766.0
- PID low limit alarm :- M766.1
- PID input warning :- M766.2
PLC Program for Sequence Control Application
For this application we used S7-1200 PLC and TIA portal software for programming.
Network 1 :
In network we configured standard parameters for PID function.
- “Drive PID”.sRet.r_Ctrl_Gain:- saved proportional gain or P gain for PID (1.0).
- “Drive PID”.sRet.r_Ctrl_Ti:-Saved integral time or I gain for PID (20s).
Network 2 :
“Drive PID”.sRet.r_Ctrl_Td:-Saved derivative time or D gain for PID (0s).
Network 3 :
Here we have taken temperature PID max output limit and minimum output limit. We have considered here max limit for PID output 100 and minimum limit is 0.
Network 4 :
Sampling time of the PID_Compact instruction r_Cycle is determined automatically and usually equivalent to the cycle time of the calling OB. Consider 0.1s for this application.
Network 5 :
When PID enable (M61.0) is pressed PID block will be executed. As per SET point (MD500) it will generate output (0-27648) and according to actual pressure transmitter will give feedback (IW96) to PID.Manual enable (M61.1) is for manual operation and PID reset (M61.2) is for resetting the PID.
Network 6 :
Activate Mode after CPU restart If sb_RunModeByStartup = FALSE, the controller will remain inactive after a CPU startup.
Network 7 :
Here we calculated the PID output range for the compressor valve. It will continue to open until PID output reaches 50%.
Network 8 :
Here we calculated the PID output range for the flare control valve. It will start to open when control output reaches 50%. Hence when controller output reaches 50%, flare valve will start to open and it will be fully open when controller output is 100%.
Conversion of calculated output for compressor control valve.
Network 9 :
Conversion of calculated output for flare control valve.
Note :- Above application may be different from actual application. We can also make this application by using ready-made PID control and current to pressure converters. This example is only for explanation purpose only. We can implement this logic in other PLC also. This is the simple sequence control application used in industry, we can use this concept in other examples also.
All parameters and graphical representations considered in this example are for explanation purpose only, parameters or representation may be different in actual applications. Also all interlocks are not considered in the application.