Programming the example. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Advertisement
Advertisement
Example
Programming the example
Proposed processing method
The block PID1 is assigned to temperature process control. The temperature setpoint is calculated on the basis of the ambient temperature.
On reconnection to the mains, the process control operating mode is selected and the pump is started.
The state of the controller is conditioned by the operating state of the pump. If the pump is faulty the PID switches to MANU and the output is forced to 0.
The status word bits (process value high threshold, process value low threshold, deviation high threshold and deviation low threshold) are used to generate alarms.
The PID loop coefficients will be initialized to: l l l
KP = 600
TI = 300
TD = 50
The display on the CCX is as follows: l l
KP = 6
TI = 30 l TD = 5
These values can of course be fine-tuned during a subsequent adjustment phase.
398
TLX DS 37 PL7 xxE
MAST-MAIN
Example
(*Initialization of constants on cold restart-> PID loop buffer and initialization of PWM period to 10 s*)
%LO
%SW10:XO OPERATE
%MW10:10:=%KW10:10
OPERATE
%MW55:=1000
(*Pump activation *)
%L1O
%I1.4
%Q2.1
(* PID loop controller operating mode management. This program allows the CCX17 to modify the A/M bit *)
%L11
%I1.3
P
%I1.3
N
OPERATE
%MW11:=0
(* Initialization of water temperature setpoint to 27 °C *)
OPERATE
%MW10:=5400
%M10
S
%M10
R
TLX DS 37 PL7 xxE
399
Example
(* Execution of the temperature process control loop *)
%L12
OPERATE
(1)
OPERATE
PWM(%MW53,%Q2.0,%MW55:5)
(* Management of process value alarms *)
%L15
COMPARE
%IW3.0>6400
COMPARE
%IW3.0<4400
(* Management of deviation alarms *)
%L16
OPERATE
(%MW60:=%IW3.0-%MW10)
COMPARE
%MW60>400
COMPARE
%MW60<-400
%Q2.2
%Q2.3
%Q2.4
400
TLX DS 37 PL7 xxE
(* PID loop controller on CCX17 *)
%L20
OPERATE
PID_MMI(ADR#0.0.4,%I1.6,%MO:5,%MW100/62)
%I1.6
S
Example
TLX DS 37 PL7 xxE
401
Example
402
TLX DS 37 PL7 xxE
Download
Advertisement