This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Check group status one time in resident script
#1
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 Sad

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
Reply


Messages In This Thread
Check group status one time in resident script - by AlexLV - 23.10.2017, 19:23

Forum Jump: