If c – Yaskawa SMC–4000 User Manual
Page 133
![background image](https://www.manualsdir.com/files/819559/content/doc133.png)
123
SMC–4000 User Manual
IF
[Program
Flow]
DESCRIPTION:
The IF command is used in conjunction with an
command to form an IF conditional statement. The
arguments are one or more conditional statements. If the conditional statement(s) evaluates true, the
command interpreter will continue executing commands which follow the IF command. If the conditional
statement evaluates false, the controller will ignore commands until the associated ENDIF command OR
an
command occurs in the program. The conditional statements MUST be enclosed on parentheses
for the expression to be evaluated correctly. See the example below.
ARGUMENTS: IF condition
where
Conditions are tested with the following logical operators:
USAGE:
RELATED COMMANDS:
Optional command used only after IF command
End of IF conditional Statement
EXAMPLES:
<
less than
>=
greater than or equal to
>
greater than
<>
not equal
=
equal to
|
logical OR (pipe symbol)
<= less than or equal to
&
logical AND
While Moving
Yes
Default Value
---
In a Program
Yes
Default Format
---
Command Line
No
IF (_TEX<1000)
IF conditional statement based on X motor position
MG "Motor within 1000 counts of zero"
Message to be executed if “IF” conditional
statement
ENDIF
End of IF conditional statement
IF ((TEMP=126) | (TEMP=123))
JS # RELEASE
JS # ASSIGN
JS # CONNECT
ENDIF