Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

water_sys1 / MAIN (OB1)

Block: MAIN
Author:
Created: 02/21/2021 09:11:15 am
Last Modified: 11/29/2021 03:51:21 pm

Symbol Var Type Data Type Comment


TEMP
TEMP
TEMP

PROGRAM COMMENTS
Network 1 Level Sensor
read analog value of level transducer the level in mm (0-2100mm)
VD3 : Level

SM0.5 MOV_W SUB_I


EN ENO EN ENO 1.A

AIW0 IN OUT VW0 VW0 IN1 OUT


+6000 IN2

I_DI
1.A EN ENO 1.B

VW1 VW1 IN OUT VD0 VD0

DI_R DIV_R
1.B EN ENO EN ENO 1.C

IN OUT VD1 VD1 IN1 OUT VD2


26000.0 IN2

MUL_R
1.C EN ENO

VD2 IN1 OUT level :VD1010


2100.0 IN2

Symbol Address Comment


level VD1010

1/9
water_sys1 / MAIN (OB1)

Network 2 Flow Sensor


read analog value of Flow meter 0-5000 L/H

SM0.0 MOV_W SUB_I


EN ENO EN ENO 2.A

AIW2 IN OUT VW2 VW2 IN1 OUT


+6000 IN2

I_DI
2.A EN ENO 2.B

VW3 VW3 IN OUT VD4 VD4

DI_R DIV_R
2.B EN ENO EN ENO 2.C

IN OUT VD5 VD5 IN1 OUT VD6


26000.0 IN2

MUL_R
2.C EN ENO

VD6 IN1 OUT Flow_meter :VD1006


5000.0 IN2

Symbol Address Comment


Flow_meter VD1006

2/9
water_sys1 / MAIN (OB1)

Network 3 Temp1 Sensor


read analog value of Temp1 transducer the level in
VD3 : Level

SM0.0 MOV_W SUB_I


EN ENO EN ENO 3.A

AIW4 IN OUT VW4 VW4 IN1 OUT


+6000 IN2

I_DI
3.A EN ENO 3.B

VW5 VW5 IN OUT VD8 VD8

DI_R DIV_R
3.B EN ENO EN ENO 3.C

IN OUT VD9 VD9 IN1 OUT VD10


26000.0 IN2

MUL_R
3.C EN ENO

VD10 IN1 OUT Temp1 :VD1012


200.0 IN2

Symbol Address Comment


Temp1 VD1012

3/9
water_sys1 / MAIN (OB1)

Network 4 Temp2 Sensor


read analog value of level transducer the level in mm (0-2100mm)
VD3 : Level

SM0.0 MOV_W SUB_I


EN ENO EN ENO 4.A

AIW6 IN OUT VW6 VW6 IN1 OUT


+6000 IN2

I_DI
4.A EN ENO 4.B

VW7 VW7 IN OUT VD12 VD12

DI_R DIV_R
4.B EN ENO EN ENO 4.C

IN OUT VD13 VD13 IN1 OUT VD14


26000.0 IN2

MUL_R
4.C EN ENO

VD14 IN1 OUT Temp2 :VD1004


200.0 IN2

Symbol Address Comment


Temp2 VD1004

Network 5
vfd run output

Start_pump_~ :M30.2 VFD_Run :Q0.0

Symbol Address Comment


Start_pump_cmd M30.2
VFD_Run Q0.0

4/9
water_sys1 / MAIN (OB1)

Network 6

Network 7

Network 8
pid

SM0.0 Start_pump_~ :M30.2 PID0_INIT


EN

AIW2 PV_I Output AQW0


pid_setpoint :VD200 Setpoint~
pid_auto_mo~ :M30.1 Auto_M~
pid_manual~ :VD202 Manual~

Symbol Address Comment


pid_auto_mode M30.1
pid_manual_setpoint VD202
pid_setpoint VD200
Start_pump_cmd M30.2

Network 9

pid_manual_~ :M30.0 pid_auto_mo~ :M30.1


/

Symbol Address Comment


pid_auto_mode M30.1
pid_manual_mode M30.0

5/9
water_sys1 / SBR_0 (SBR0)

Block: SBR_0
Author:
Created: 02/21/2021 09:11:15 am
Last Modified: 02/21/2021 09:11:15 am

Symbol Var Type Data Type Comment


EN IN BOOL
IN
IN_OUT
OUT
TEMP

SUBROUTINE COMMENTS
Network 1 Network Title
Network Comment

6/9
water_sys1 / INT_0 (INT0)

Block: INT_0
Author:
Created: 02/21/2021 09:11:15 am
Last Modified: 02/21/2021 09:11:15 am

Symbol Var Type Data Type Comment


TEMP
TEMP
TEMP
TEMP

INTERRUPT ROUTINE COMMENTS


Network 1 Network Title
Network Comment

7/9
water_sys1 / PID0_INIT (SBR1)

Block: PID0_INIT
Author:
Created: 11/29/2021 03:32:18 pm
Last Modified: 11/29/2021 03:32:18 pm

Symbol Var Type Data Type Comment


EN IN BOOL
LW0 PV_I IN INT Process Variable Input: Range 0 to 32000
LD2 Setpoint_R IN REAL Setpoint Input: Range 0.0 to 5000.0
L6.0 Auto_Manual IN BOOL Auto or Manual Mode (0=Manual Mode, 1=Automatic Mode).
LD7 ManualOutput IN REAL Desired loop output when in manual mode: Range 0.0 to 1.0
IN
IN_OUT
LW11 Output OUT INT PID Output: Range 0 to 50
OUT
LD13 Tmp_DI TEMP DWORD
LD17 Tmp_R TEMP REAL
TEMP

This POU was created by the PID formula of the S7-200 Instruction Wizard.
To enable this configuration within the program, use SM0.0 to call this Subroutine from the MAIN program block every scan cycle.
This code configures PID 0. See DB1 for the PID loop variable table starting at VB18. This subroutine initializes the variables
used by the PID control logic and starts the PID Interrupt "PID_EXE" routine. The PID interrupt routine is called cyclically based
on the PID sample time. For a complete description of the PID instruction see the S7-200 System Manual. Note:When the PID is
in manual mode the output should be controlled by writing a normalized value(0.00 to 1.00) to the Manual Output parameter
instead of changing the output directly. This will automatically provide a bumpless transfer when the PID is returned to automatic
mode.

8/9
water_sys1 / PID_EXE (INT1)

Block: PID_EXE
Author:
Created: 11/29/2021 03:32:18 pm
Last Modified: 11/29/2021 03:32:18 pm

Symbol Var Type Data Type Comment


TEMP
TEMP
TEMP
TEMP

This POU was created by the PID formula of the S7-200 Instruction Wizard.
This interrupt routine implements Timed Interrupt for PID exec ution. This interrupt routine was attached in subroutine "PID0_INIT".

9/9

You might also like