EasyManuals Logo

Galil Motion Control DMC-1000 User Manual

Galil Motion Control DMC-1000
206 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #114 background imageLoading...
Page #114 background image
DMC-1000 Chapter 7 Application Programming 95
Using the JP Command:
The JP command will cause the controller to execute commands at the location specified by the label
or line number if the condition of the jump statement is satisfied. If no condition is specified, program
execution will automatically jump to the specified line. If the condition is not satisfied, the controller
continues to execute the next commands in program sequence.
Using the Js Command:
The JS command is significantly different from the JP command. When the condition specified by the
JS command is satisfied, the controller will begin execution at the program location specified by the
line or label number. However, when the controller reaches an end statement, EN, the controller will
jump back to the location of the JS command and resume executing the next commands. This is
known as jumping to a subroutine. For more information, see section
Conditional Statements
The conditional statement is satisfied if it evaluates to any value other than zero. The conditional
statement can be any valid DMC-1000 numeric operand, including variables, array elements, numeric
values, functions, keywords, and arithmetic expressions. If no conditional statement is given, the jump
will always occur.
Examples:
Number V1=6
Numeric Expression V1=V7*6
@ABS[V1]>10
Array Element V1<Count[2]
Variable V1<V2
Internal Variable _TPX=0
_TVX>500
I/O V1>@AN[2]
@IN[1]=0
Multiple Conditional Statements
The DMC-1000 will accept multiple conditions 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. In
addition, the DMC-1000 will execute operations from left to right. For further information on
Mathematical Expressions and the bit-wise operators ‘&’ and ‘|’, see pg. 7-
100.
For example, using variables named V1, V2, V3 and V4:
JP #TEST, (V1<V2) & (V3<V4)
In this example, this statement will cause the program to jump to the label #TEST if V1 is less than V2
and V3 is less than V4. To illustrate this further, consider this same example with an additional
condition:
JP #TEST, ((V1<V2) & (V3<V4)) | (V5<V6)
This statement will cause the program to jump to the label #TEST under two conditions; 1. If V1 is
less than V2 and V3 is less than V4. OR
2. If V5 is less than V6.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Galil Motion Control DMC-1000 and is the answer not in the manual?

Galil Motion Control DMC-1000 Specifications

General IconGeneral
BrandGalil Motion Control
ModelDMC-1000
CategoryController
LanguageEnglish

Related product manuals