DMC-1400 Series Command Reference JP ● 117
JP FUNCTION: Jump to Program Location
DESCRIPTION:
The JP command causes a jump to a program location on a specified condition. The program
location may be any program line number or label. The condition is a conditional
statement which uses a logical operator such as equal to or less than. A jump is taken if
the specified condition is true.
Multiple conditions can be used in a single jump statement. The conditional statements are
combined in pairs using the operands “&” and “|”. The “&” operand between any two
conditions requires that both statements must be true for the combined statement to be
true. The ”|” operand between any two conditions requires that only one statement be
true for the combined statement to be true. Note: Each condition must be placed in
parenthesis for proper evaluation by the controller.
ARGUMENTS: JP location,condition where
location is a program line number or label
condition is a conditional statement using a logical operator
The logical operators are:
< less than
> greater than
= equal to
<= less than or equal to
>= greater than or equal to
<> not equal to
USAGE:
While Moving Yes Default Value
In a Program Yes Default Format
Command Line No
Can be Interrogated No
Used as an Operand No
Controller Usage ALL
EXAMPLES:
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)
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.