Jump to content

values >,<,<=,>=


C Martin

Recommended Posts

I am confused and I know that this is a question that should have been asked a long time ago.

 

> evaluates as Greater Than,

>= evaluates as Greater Than or Equal to,

< evaluates as Less Than,

<= evaluates as Less Than or Equal To.

Is this correct, or am I backwards?

I seem to be getting reverse values.

 

Sorry if this seems to be a Juvenile question.

 

Clarence

Link to comment

Thanks apostolakisl,

 

But is ISY programming backwards?

I seem to get reversed results from my evaluations.

If
       Status  'Thermostats / Remote Stat / Remote Thermostat' < 84° (Temperature)

Then
       $sRemote_Stat_temp_alert  = 1

Else
       $sRemote_Stat_temp_alert  = 0


 

How would you evaluate this program?

I actually want my variable to evaluate to 1 if the temp is greater than 84.

This actually evaluates to 1 when the temp is 84 or even 83 - 84 or less.

 

Clarence

Link to comment

While I have yet to take advantage of the variables, I would evaluate your condition as:

 

Status  'Thermostats / Remote Stat / Remote Thermostat' IS LESS THAN 84°

Given this, your program would set your variable to "1" if the teperature is below 84 degrees. This appears to me to be consistent with every math convention that I learned.

 

I actually want my variable to evaluate to 1 if the temp is greater than 84.

 

Given this, I believe it would be more correct to write your condition:

 

Status  'Thermostats / Remote Stat / Remote Thermostat' > 84°

Link to comment

The symbol compares the two things on each side of it. The alligator eats the bigger number

 

For example:

 

1<2 4>3

 

So if you wrote

 

if

Status 'Thermostats / Remote Stat / Remote Thermostat' < 84° (Temperature) (in plain English you would say, "if the remote thermostat is reading less than 84 degrees")

 

then

$sRemote_Stat_temp_alert = 1

 

else

$sRemote_Stat_temp_alert = 0

 

 

Your variable would be set to 1 whenever the temp is less than 84 because that is when the if statement is true.

Link to comment

Archived

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


×
×
  • Create New...