Setting alarm if switch on xx minutes

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

ChrisQ0904

Valuable Member
View Badges
Joined
Dec 8, 2013
Messages
1,197
Reaction score
663
Location
Florida
Rating - 100%
1   0   0
Is it possible to write a code for a n alarm along the lines of if sw1 closed for 10 minutes then on? If so what's the proper way to writes it?

I want to know if sw1 stays closed for too long and once it opens I would like the alarm to turn off.
 

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,226
Location
Oregon
Rating - 0%
0   0   0
Create a virtual output to act as a timer:

[Timer_Sw1]
Set OFF
If sw1 CLOSED Then ON
Defer 010 Then ON


Then add this line to your alarm programming:

[EmailAlm]
Set OFF
If Output Timer_Sw1 = ON Then ON

See my tutorials on Virtual Outputs and Timers for more details.
 

When to mix up fish meal: When was the last time you tried a different brand of food for your reef?

  • I regularly change the food that I feed to the tank.

    Votes: 42 23.0%
  • I occasionally change the food that I feed to the tank.

    Votes: 60 32.8%
  • I rarely change the food that I feed to the tank.

    Votes: 60 32.8%
  • I never change the food that I feed to the tank.

    Votes: 17 9.3%
  • Other.

    Votes: 4 2.2%
Back
Top