User Manual
MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
140
Greater Than or Equal To (>=)
The Greater Than or Equal To (>=) is a logic operator and compares to see if a value is greater
than or equal to another value.
if temp >= 10 then
The conditional statement will check to see if temp is greater than or equal to 10. If the value of
temp is greater than 10 or equal to 10 the comparison is true. Therefore, any value from 0 to 9
is false.
AND
The AND operator is a logic comparison operator. It compares two conditions to make a single
true or false statement. The AND operator will return a true only if both conditions are true. If
one condition is false then a false is returned. The truth table demonstrates all combinations:
Condition 1 Condition 2 Result
True True True
True False False
False True False
False False False
The AND operator is used in decision making commands such as IF..THEN, DO..WHILE and so
on. It differs from the & operator which is used in binary math functions. Example of the AND
operator:
if minute = 10 AND hour = 1 then alarm
The conditional statement will check to see if both expressions are true before returning a true
and jumping to the alarm label. If one of the expressions is not true, a false is returned and the
label is skipped. The IF..THEN only jumps to the label if the statement is true.