Sub 순환auto()
while 1
a1 = GetTagVal("순환1")
a2 = GetTagVal("순환2")
a3 = GetTagVal("순환자동")
if a3 = 1 then
SetTagVal "순환1",1
SetTagVal "순환2",0
Sleep(5000)
SetTagVal "순환2",1
SetTagVal "순환1",0
Sleep(5000)
end if
Wend
End Sub
//////////////////////////////
Sub 대류auto()
while 1
a1 = GetTagVal("대류1")
a2 = GetTagVal("대류2")
a3 = GetTagVal("대류자동")
if a3 = 1 then
SetTagVal "대류1",1
SetTagVal "대류2",0
Sleep(4000)
SetTagVal "대류2",1
SetTagVal "대류1",0
Sleep(4000)
end if
Wend
End Sub
//////////////////////////////////
Sub 증기auto()
bu7 = GetTagVal("증기자동")
aa2 = GetTagVal("탱크온도")
aa4 = GetTagVal("급탕")
while bu7=1
a = aa4-aa2
if a>5 then
b=100
elseif a<-5 then
b=0
else
b=(a+5)*10
end if
SetTagVal "증기밸브",b
Sleep(100)
bu7 = GetTagVal("증기자동")
aa2 = GetTagVal("탱크온도")
aa4 = GetTagVal("급탕")
wend
if bu7=0 then SetTagVal "증기밸브",0
End Sub
댓글 없음:
댓글 쓰기