Galil DMC-3425 Manual De Usuario

Descargar
Página de 210
DMC-3425 
Chapter 7 Application Programming
  149 
The program reads the input voltage periodically and assigns its value to the variable VIN.  To get a 
speed of 200,000 ct/sec for 10 volts, we select the speed as 
 
Speed = 20000 x VIN 
The corresponding velocity for the motor is assigned to the VEL variable. 
 
Instruction 
#A 
JG0 
BGA 
#B 
VIN=@AN[1] 
VEL=VIN*20000 
JG VEL 
JP #B 
EN 
Position Control by Joystick 
This system requires the position of the motor to be proportional to the joystick angle.  Furthermore, 
the ratio between the two positions must be programmable.  For example, if the control ratio is 5:1, it 
implies that when the joystick voltage is 5 Volts, corresponding to 1028 counts, the required motor 
position must be 5120 counts.  The variable V3 changes the position ratio. 
Instruction Interpretation 
#A Label 
V3=5 
Initial position ratio 
DP0 
Define the starting position 
JG0 
Set motor in jog mode as zero 
BGA Start 
#B  
V1=@AN[1] Read 
analog 
input 
V2=V1*V3 
Compute the desired position 
V4=V2-_TPA-_TEA 
Find the following error 
V5=V4*20 
Compute a proportional speed 
JG V5 
Change the speed 
JP #B 
Repeat the process 
EN End