Jp (jump to program location) – Yaskawa SMC–4000 User Manual
Page 145
135
SMC–4000 User Manual
JP (Jump to Program Location)
[Program Flow]
DESCRIPTION:
The JP command causes a jump to a program location on a specified condition (optional). The program
location may be any label. The condition is a conditional statement which uses a logical operator such as
equal to or less than. A jump is executed if the specified condition is true.
Multiple conditions can be used in a single jump statement. Conditional statements are combined in pairs
using operands “&” and “|”. The “&” operand between two conditions requires both statements to be true
for the combined statement to be true. The ”|” operand between two conditions requires that one statement
be true for the combined statement to be true.
*Note Each condition must be in parenthesis for controller evaluation as a boolean expression.
ARGUMENTS: JP location, condition
where
location is a program label
condition is a conditional statement using a logical operator
The logical operators are:
USAGE:
EXAMPLES:
HINT:
JP is similar to an IF, THEN command. Text to the right of the comma is the condition that must be met for a
jump to occur. The destination is the specified label before the comma.
< 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
n/a
In a Program
Yes
Default Format
n/a
Command Line
No
Can be Interrogated
No
Used as an Operand
No
JP #POS1,V1<5
Jump to label #POS1 if variable V1 is less than 5
JP #A,V7*V8=0
Jump to #A if V7 times V8 equals 0
JP #B
Jump to #B (no condition)