Hi dear all ,
the summer End,school is open and i back to painting!
between the season , 4 pipe AHUs need changeover switch and for example at the noontime , cold valve in action and in the nighttime hot valve in action . there is a set point and dead-bond factor . in the picture , show obviously that when temperature feedback cross (Setpoint+deadbond) , cold valve is in action and open with pid 2 , and when the temperature feedback below( Set point - deadbond) , hot valve is in action and open with pid 1 .and for the temperature inside the bond , valve action must be work in the previous stage .
in below you can see my program about this job , any idea about this ? or more simple program ?
Details : Temp is feedback , Hot_s is a switch value that hot valve in action for the temp below bounds , EXP is switch value that work inside the bond , col_s is a switch value that cold valve in action for the temp upper bounds , db is dead-bond factor
9 IF Temp <= AHU_SP-DB THEN GOSUB 120 ELSE HOT_S=0
10 IF Temp > AHU_SP+DB THEN GOSUB 130 ELSE COL_S=0
11 IF COL_S=0 AND HOT_S=0 THEN GOSUB 170 ELSE EXP=0
12 RETURN
120 HOT_S=1
140 Hotvalve= PID2
141 Coldvalv=0
122 RETURN
130 COL_S=1
160 Coldvalv= PID1
161 Hotvalve=0
132 RETURN
170 EXP=1
171 IF TIME-OFF( COL_S ) > TIME-OFF( HOT_S ) THEN GOSUB 176 ELSE GOSUB 173
172 RETURN
173 Hotvalve= PID2
174 Coldvalv=0
175 RETURN
176 Coldvalv= PID1
177 Hotvalve=0
178 RETURN