Galil Motion Control DMC-1000 User Manual page 115

Table of Contents

Advertisement

Instruction
JP #Loop, COUNT<10
JS #MOVE2,@IN[1]=1
JP #BLUE,@ABS[V2]>2
JP #C,V1*V7<=V8*V2
JP#A
Move the X motor to absolute position 1000 counts and back to zero ten times. Wait 100 msec
between moves.
Instruction
#BEGIN
COUNT=10
#LOOP
PA 1000
BGX
AMX
WT 100
PA 0
BGX
AMX
WT 100
COUNT=COUNT-1
JP #LOOP,COUNT>0
EN
FORMAT:
JS destination, logical condition
JP destination, logical condition
The destination is a program line number or label where the program sequencer will jump if the
specified condition is satisfied. Note that the line number of the first line of program memory is 0.
The comma designates "IF". The logical condition tests two operands with logical operators.
OPERATOR
<
>
=
<=
96 • Chapter 7 Application Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Examples Using JP and JS
Interpretation
Jump to #Loop if the variable, COUNT, is less than 10
Jump to subroutine #MOVE2 if input 1 is logic level high. After the subroutine
MOVE2 is executed, the program sequencer returns to the main program location
where the subroutine was called.
Jump to #BLUE if the absolute value of variable, V2, is greater than 2
Jump to #C if the value of V1 times V7 is less than or equal to the value of
V8*V2
Jump to #A
Example Using JP command:
Interpretation
Begin Program
Initialize loop counter
Begin loop
Position absolute 1000
Begin move
Wait for motion complete
Wait 100 msec
Position absolute 0
Begin move
Wait for motion complete
Wait 100 msec
Decrement loop counter
Test for 10 times through loop
End Program
Command Format - JP and JS
DESCRIPTION
Jump to subroutine if logical condition is satisfied
Jump to location if logical condition is satisfied
Logical Operators:
DESCRIPTION
less than
greater than
equal to
less than or equal to
DMC-1000

Advertisement

Table of Contents
loading

Table of Contents