Jump to content

>Off vs Is Not Off


bigscience

Recommended Posts

Posted
Sorry if this is a dumb question but what's the difference between status >Off vs Is Not Off?

Edit: Apologies. I misread the question

I would think that should be fairly obvious just one being the negative condition of each other.

 

The usual gotcha' on these logic conditions is the states in between on and off. If a lamp is dimmed to 0% it should be "not off" even though it looks off.

 

I don't have an ISY yet so I cannot test this for you (and me).

Posted

Just found this link in another thread. As a new user I thought it was worthwhile.

http://www.adamsj.com/isy/programming.htm

He wrote:

5. 'Not Off' is Different from 'On'

If you want to test if a light is illuminated at all, then you want to test for 'Not Off'. Performing a test for 'On' actually is testing for the light to be at 100%, which is probably not what you want.

Posted

bigscience

 

Are you asking in the context of "If Control" or "If Status"? It makes a difference.

 

larryllix

 

You might want to wait until you have an ISY and have a chance to actually work with one. Some of the posted information in this topic and another is not correct.

Posted

For Status, in a program I can choose >Off or Is Not Off. I get that 10% is not 'ON' but is >Off. I just don't get why there is an "is not off" when ">off" looks to do the same thing. Am I missing something? Is there a case where you'd use one over the other? Thanks for the help.

Posted

For Status "> Off" and "not = Off" would mean the same thing. For the other variations they could be different things. For example ...

 

If Status 'xxxx' > 20% versus If Status 'xxxx' not = 20%

 

produces different results. The > 20% means the On Level has to be greater than 20% to be True. For "not = 20%" means it is True if the On Level is below or above 20%.

Posted

I think the most common use of "is not off" is in a "status" line of a program when you want the program to run "true" for any partially on or totally on state.

 

These 2 are not the same program

 

If

status light x is not off *****light must be 1% or more to be true*****

Then

do something

 

vs

If

status light x is on ****light must be 100% on to be true****

Then

do something

 

Please realize that there are other ways to say the same thing.

 

 

The second use is in a control program when you want to run the "else" clause. This is much less common and is only needed when you have something of a more complex program with multiple conditions. But here it is

 

If

Control light x is switched off ***then clause runs when switched off, else clause never runs from this program****

Then

do this

Else

do that

 

If

control light x is not switched off ****else clause runs when switched off, then clause never runs from this program****

Then

do this

Else

do that

 

In the above, switching off is the one and only trigger, so when an "off" command is received, it is either true or false depending on the "not" being there. I sometimes use a "is not switched" condition as a condition to abort a timer.

 

If

control button a is switched on

and

control button b is not switched on

Then

wait 10 minutes

do something

Else

do blank

 

In the above, if you push button a, the timer starts, if you push button b, the timer aborts.

Guest
This topic is now closed to further replies.

×
×
  • Create New...