2017년 5월 30일 화요일

급배기팬 모니터링 시스템






























































































=====================
Sub main()

runscript("timeon")

End Sub

=====================

Sub timeon()

a=0

while 1

SetTagVal "time",a

if a<24 then a=a+1

if a=24 then a=0

sleep(1000)

wend

End Sub

=====================

Sub autoon()

ti=GetTagVal("time")
au=GetTagVal("auto")


if au=1 then

if 5<ti and ti<22 then

SetTagVal "화장배기",1
SetTagVal "복도배기",1
SetTagVal "로비1급기",1
SetTagVal "로비1배기",1
Else
SetTagVal "화장배기",0
SetTagVal "복도배기",0
SetTagVal "로비1급기",0
SetTagVal "로비1배기",0
end if

if 8<ti and ti<19 then
SetTagVal "사무2급기",1
SetTagVal "사무2배기",1
SetTagVal "사무3배기",1
SetTagVal "사무4배기",1
Else
SetTagVal "사무2급기",0
SetTagVal "사무2배기",0
SetTagVal "사무3배기",0
SetTagVal "사무4배기",0
end if


Else
SetTagVal "사무2급기",0
SetTagVal "사무2배기",0
SetTagVal "사무3배기",0
SetTagVal "사무4배기",0
SetTagVal "화장배기",0
SetTagVal "복도배기",0
SetTagVal "로비1급기",0
SetTagVal "로비1배기",0


end if


=====================

댓글 없음:

댓글 쓰기