23.10.2017, 19:23
Hello,
need a little help - I made resident script - alarm signal is coming from fire panel to DI Logical 1 = No fire, Logical 0 = Fire. If input is open - I need alert message once that fire alarm appeared, if input closed - I need message once fire alarm disappear. I made loop and if alarm on - make alert message and make alert status message On. If no alarm - make alert message alarm disappear and that message status On. But anyway could not solve my task
fire = grp.getvalue('1/1/6')
firealertalarm = 1
firealertnoalarm = 1
if fire then
ugtrauksme = 1
else
ugtrauksme = 0
end
if ugtrauksme == 1 then
if firealertalarm == 1 then
alert('Fire alarm received')
firealertnoalarmn = 0
firealertalarm = 1
else
end
else
if firealertnoalarm == 1 then
alert('Fire alarm not active')
firealertalarmnonemts = 1
firealertalarm = 0
else
end
end
need a little help - I made resident script - alarm signal is coming from fire panel to DI Logical 1 = No fire, Logical 0 = Fire. If input is open - I need alert message once that fire alarm appeared, if input closed - I need message once fire alarm disappear. I made loop and if alarm on - make alert message and make alert status message On. If no alarm - make alert message alarm disappear and that message status On. But anyway could not solve my task
fire = grp.getvalue('1/1/6')
firealertalarm = 1
firealertnoalarm = 1
if fire then
ugtrauksme = 1
else
ugtrauksme = 0
end
if ugtrauksme == 1 then
if firealertalarm == 1 then
alert('Fire alarm received')
firealertnoalarmn = 0
firealertalarm = 1
else
end
else
if firealertnoalarm == 1 then
alert('Fire alarm not active')
firealertalarmnonemts = 1
firealertalarm = 0
else
end
end