Jump to content

question about program triggering


dbroere

Recommended Posts

Posted

Referencining the following program:

If
       Status  'MBR Bath Fan' < 95%
   And Status  'MBR Bath Overhead' < 5%

Then
       Set 'MBR Bath Fan' 85%
       Wait  8 minutes 
       Set 'MBR Bath Fan' Off

Else
  - No Actions - (To add one, press 'Action')

 

 

the MBR Bath Fan runs continuously. When it's shut off, it restarts in about 15-minutes.

 

My problem is how to properly trigger 'Then' conditions

I'd like to trigger them when the fan is on at 100% and when OFF is pressed on the MBR Bath Overhead switch.

 

the fan is an ICON switch

the MBR Bath Overhead is an INSTEON Dimmer

 

I've tried several different combinations of status and control conditions and can't get this to be repeatable.

Any Suggestions.

 

If the 'Then' portion of a program is executing and the 'If' conditions are toggled from false back to true, will the program reset and restart the 'Then' portion again?

 

if the 'Then' portion of a program causes the 'If' condition to toggle to false, while 'Then' is still running -- what happens?

Posted

back to the old test board to try and further examine this issue. Found out what appears to be a problem:

If
       Status  'TestBoard 2' is not Off
   And Control 'TestBoard 4' is switched Off

Then
       Set 'TestBoard 2' 50%
       Wait  5 seconds
       Set 'TestBoard 2' Off

Else
  - No Actions - (To add one, press 'Action')

 

Test:

turn 2 on (full)

turn 4 on (full)

turn 4 off

program runs 'then but only executes the first line then quits. Leaves 2 at 50%

turn 4 back on

turn 4 off

program runs 'then' runs all 3-lines.

 

second and third line don't seem to run unless 2 is already at 50%!

 

both switches are 2476D's V4.35

(isy v.2.7.9)

Posted

When you change the Status of Test2 the Conditions are reevaluated and since the switch is not turned off again the program changes to False.

 

Put your Actions in a second program and call it from the current program.

 

Rand

Posted

Rand -

Thanks!

I've had several programs that wouldn't perform the way I thought they should - They can all be traced back to this little ANOMALIE...whatever you want to call it.

 

It all comes down to knowing what causes IF conditions of a program to trigger and be evaluated.

 

I've never found anything written that talks about this. Don't mean to dump on you guys but, like so many other things about the ISY, it's not described in a manual. It's like you just assume folks would know it. I can tell you, from the perspective of a programmer that's trying to learn your "language", THIS IS VERY FRUSTRATING!!!

 

It appears that, whenever the conditions of ANY DEVICE in the IF statement changes:

(1) ALL the 'IF' conditions are immediately re-evaluated.

(2) if the 'THEN' processes are currently executing - they all stop.

(3) the 'THEN' processes coditionally execute, based on the new evaluation of the IF conditions.

 

I've NEVER seen a programming envrionment behave this way!

Once a series of 'THEN' processes have begun, NOTHING should be allowed to interrupt it.

IF re-evaluations processing should be suspended while this is going on.

 

I suppose, once you've become accustomed to this, it might seem logical but, right now to me, it seems really wierd!

 

Dave

Posted

Hello Dave,

 

Programs are evaluated whenever a schedule is met or a change is made to a referenced device.

 

The only time a program is halted when conditions change is during a Wait or a Repeat loop.

 

It is documented in the Wiki: ISY-99i/ISY-26_INSTEON:Scope,_Precedence_and_Execution_Order#Statement_Execution_Order.

 

For more information on programming the How-To Guide has a list of articles and examples: ISY-99i/ISY-26_INSTEON:How-To_Guide#Programs

 

Rand

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...