Jump to content

Using another "If" in the "Then" section


lpollis

Recommended Posts

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

     

Link to comment

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

 ......

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...