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

Table of Contents

Advertisement

#main;
SH
ABC;
VM
AB;
VP
160000,160000;
VE;
VS
200000;
VA
1544000;
BG
S;
AM
S;
PRC=-80000;
SPC=80000;
BG
C;
AM
C;
CR
80000,270,-360;
VE;
VS
40000;
BG
S;
AM
S;
PRC=80000;
BG
C;
AM
C;
PRA=-21600;
SPA=20000;
BG
A;
AM
A;
PRC=-80000;
BG
C;
AM
C;
CR
80000,270,-360;
VE;
VS
40000;
BG
S;
AM
S;
PRC=80000;
BG
C;
AM
C;
VP
-37600,-16000;
VE;
VS
200000;
BG
S;
AM
S;
MO
ABC;
EN;
Speed Control by Joystick
The speed of a motor is controlled by a joystick. The joystick produces a signal in the range between -10V and
+10V. The objective is to drive the motor at a speed proportional to the input voltage. Assume that a full voltage of
10 Volts must produce a motor speed of 3000 rpm with an encoder resolution of 1000 lines or 4000 count/rev.
This speed equals:
3000 rpm = 50 rev/sec = 200000 count/sec
The program reads the input voltage periodically and calculates the necessary speed To get a speed of 200,000
ct/sec for 10 volts, select the speed as:
Chapter 7 Application Programming ▫ 115
'main program label
'enable A, B, and C axes
'select A and B axes for Vector Mode
'define vector position
'end vector sequence
'set vector speed
'set vector acceleration
'begin vector motion
'wait for motion to finish
'define move for C axis to move down
'set speed for C axis
'begin motion
'wait for motion to finish
'define a circle in vector mode
'end vector sequence
'set vector speed
'begin vector motion
'wait for motion to finish
'define move for C axis to move up
'begin motion
'wait for motion to finish
'define relative position move for A axis
'set speed for A axis
'begin motion
'wait for motion to finish
'define move for C axis to move down
'begin motion
'wait for motion to finish
'define a circle in vector mode
'end vector sequence
'set vector speed
'begin vector motion
'wait for motion to finish
'define move for C axis to move up
'begin motion
'wait for motion to finish
'move to return A and B axes to initial position
'end vector sequence
'set vector speed
'begin vector motion
'wait for motion to finish
'disable A, B, and C axes
'end program
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents