Jump to content

Is there a countdown timer function in the isy ?


satwar

Recommended Posts

Posted

satwar-

 

No. But this functionality can be achieved with a few small programs depending on the resolution you are looking for. Anything more granular than 1 second is unlikely. Minutes are easy.

 

Here is an example:

 

Define a state var for your timer value

 

s.Timer = 10

 

Program: Timer Countdown

 

If s.Timer > 0

Then
  wait 1 minute
  s.Timer =- 1

Else

 

The value of s.Timer will decrement once per minute.

 

Program: Timer Expired

 

If Status LampLincDimmer is On
  And s.Timer =0

Then
  Set LamplincDimmer Off

Else

 

-Xathros

Posted

satwar-

 

I should point out that the Wait function is really a countdown timer but unless used in conjunction with a counter variable as in the example above, there is no way to check on it's progress. I could have achieved the same result with:

 

If Status LamplincDimmer is not Off

Then 
  Wait 10 minutes
  Set LampLincDimmer Off

Else

 

Only difference here is that we can't tell how much of the timer remains during the 10 minute delay.

 

-Xathros

Posted

Your first example was perfect for my project. I run a macro in mControl which writes a starting value (60 minutes) for S.Timer in ISY. ISY executes the countdown function. ISY uses countdown timer value to make further decisions.

 

Worked perfectly.

Guest
This topic is now closed to further replies.

×
×
  • Create New...