Jump to content

odd behavior


aLf

Recommended Posts

Help:

 

I've got the following program which is not acting right...

 

IF

 

status GAR KPL H IS ON

or status MBR KPL H IS ON

or status APPLIANCE LINC IS ON

and FROM SUNSET

to 10:35PM (SAME DAY)

and GARAGE CLOCK APPLIANCE LINC IS OFF

 

 

THEN SET GARAGE CLOCK APPLIANCE LINC ON

 

 

This seems to work during the time sunset to 10:35, but after 10:35 is shows a "TRUE" and will not turn off. I've tried anothe appliancelinc, same result. I have an inlinelinc that has an identical program and does it perfectly. It also shows "FALSE"? What am I doing wrong?

Link to comment

Chris:

 

When sunset came around today the items fired, but they flashed on and off, on and off. I had to remove the call for else.

 

Take the Christmas lights. The program was:

 

From sunset

To 10:30PM

IF Gate outlet is OFF

 

Then Gate outlet ON

 

ELSE Gate outlet OFF

 

I would think that any time the gate outlet was turned on away from sunset to 10:30PM the program would turn it off. It did just that. But at sunset the gate outlet flashed on and off as the GUI showed the same. I removed the ELSE and the flashing stopped. I'll look tonihjt after 10:30 and see if, #1 it turned out and #2 if I try and turn it on, will ISY turn it out?

 

What did I do wrong with my program? I must be missing something in the syntax. I'm still struggling with the logic of the ( ) issues as well. I'm not sure why the TRUE FALSES change with ( ).

 

Tim

Link to comment

Chris:

 

To clarify my questions on ( ), In the case I stated last night, I needed all the "or's" and all the "and's" to be TRUE, herefore, I'm not sure why the ( ) helped differentiate the call as true or false?

 

Tim

Link to comment

Looking at your example, doesn't the state of gate determine if the program is true and therefore cause it to flip back and forth? What if you get rid of the else statement?

 

ON PROGRAM:

From sunset

To 10:30PM

IF Gate outlet is OFF

 

Then Gate outlet ON

 

ELSE do nothing

 

OFF PROGRAM:

From sunset

To 10:30PM

IF Gate outlet is ON

 

Then do nothing

 

ELSE Gate outlet OFF

Link to comment
Chris:

 

To clarify my questions on ( ), In the case I stated last night, I needed all the "or's" and all the "and's" to be TRUE, herefore, I'm not sure why the ( ) helped differentiate the call as true or false?

 

Tim

 

I think you need the group of Or's to be true right? In other words at least one them being true. Otherwise in this case, you'd just use AND for every thing.

Link to comment

Archived

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


×
×
  • Create New...