Jump to content

Using another "If" in the "Then" section


lpollis

Recommended Posts

Posted

Example:

If

   Control 'KpIrr A Zone 1' is switched on

then

   Set Scene 'Irrigation Zone 1 Indicator' On

   Set EZRain 1 - Driop Zone' On

   If

      $Int_Irrigation_Time = 5

   Then

      Wait 5 min

   Else If

      $Int_Irrigation_Time = 10

   Then

      Wait 10 min

   Else If

      $Int_Irrigation_Time = 15

   Then

      Wait 15 min

 

How can this be accomplished?

Lp

     

Posted

Example:

If

   Control 'KpIrr A Zone 1' is switched on

then

   Set Scene 'Irrigation Zone 1 Indicator' On

   Set EZRain 1 - Driop Zone' On

   If

      $Int_Irrigation_Time = 5

   Then

      Wait 5 min

   Else If

      $Int_Irrigation_Time = 10

   Then

      Wait 10 min

   Else If

      $Int_Irrigation_Time = 15

   Then

      Wait 15 min

 

How can this be accomplished?

Lp

Multiple programs.

ISY is an event triggered engine and does not support sequential line code well in this style without confused logic.

 

If

   Control 'KpIrr A Zone 1' is switched on

then

   Set Scene 'Irrigation Zone 1 Indicator' On

   Set EZRain 1 - Driop Zone' On

   Run program2

 

program2

If

      $Int_Irrigation_Time = 5

Then

      Wait 5 min

 Else

       Run program3

 

program3

If

     $Int_Irrigation_Time = 10

then

 ......

Posted

I use the same approach as larryllix.  Just be aware that when you call the second program, make sure to choose IF path:

 

Run second program (if path)

Guest
This topic is now closed to further replies.

×
×
  • Create New...