User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
139
Equal (=)
The Equal (=) is a logic operator and also is used to set a variable to some value.
if(temp = 10)then
endif
or
temp = 10
The two examples compares the value of temp to 10 and sets temp to 10 using “=”.
NOT Equal To (<>)
The NOT Equal (<>) is a logic operator and compares to see if a value is not equal to another
value.
if temp <> 10 then
The conditional statement will check to see if temp is not equal to 10. If the value of temp is
lower or greater the comparison will be true.
Less Than (<)
The Less Than (<) is a logic operator and compares to see if a value is less than another value.
if temp < 10 then
The conditional statement will check to see if temp is less than 10. If the value of temp is lower
the comparison is true. Therefore, any value equal to or over 10 will be false.
Greater Than (>)
The Greater Than (>) is a logic operator and compares to see if a value is greater than another
value.
if temp > 10 then
The conditional statement will check to see if temp is greater than 10. If the value of temp is
higher, the comparison is true. Therefore, any value from 0 to 10 will be false (Less Than or
Equal To).
The Less Than or Equal To (<=) is a logic operator and compares if something is less than or
equal to some value.
if temp <= 10 then
The conditional statement will check to see if temp is less than or equal to 10. If the value of
temp is less than 10 or equal to 10 the comparison is true. Therefore, any value from 11 and up
is false.