Galil Motion Control DMC-21 5 Series User Manual page 89

Table of Contents

Advertisement

Event Trigger - Repetitive Position Trigger
To set the output every 10000 counts during a move, the
#trip;
JG
50000;
SH
A;
BG
A;n=0;
#loop;
AR
10000;
TP
A;
SB
1;
WT
50;
CB
1;
n=n+1;
JP
#loop,(n<5);
ST
A;
AM
A;
EN;
Event Trigger - Start Motion on Input
This example waits for input 1 to become active and then starts motion. The
of the program until the input occurs. Input Interrupt command (II) or a conditional jump on an input can be used
if code execution should not be paused.
#input;
AI
-1;
SH
A;
PR
10000;
BG
A;
AM
A;
MO
A;
EN;
Event Trigger - Set Output when at speed
#atspeed;
JG
50000;
AC
10000;
SH
A;
BG
A;
AS
A;
SB
1;
ST
A;
AM
A;
MO
A;
EN;
Chapter 7 Application Programming ▫ 84
trippoint is used as shown in the next example.
AR
'program label
'specify jog speed
'enable A axis
'begin motion, create counter variable
'label for loop
'wait 10000 counts
'tell position
'set Output 1
'wait 50 msec
'clear Output 1
'increment counter
'repeat 5 times
'stop motion
'wait for motion to finish
'end program
'program label
'wait for input 1 to be active
'enable A axis
'position relative command
'begin motion
'wait for motion to finish
'disable A axis
'end program
'program label
'specify jog speed
'set acceleration rate
'enable A axis
'begin motion
'wait for at slew speed 50000
'set Output 1
'stop motion
'wait for motion to finish
'disable A axis
'end program
AI
command actually halts execution
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents