Galil DMC-13X8 ユーザーズマニュアル

ページ / 210
Chapter 6  Programming Motion  
  98  
USER MANUAL 
MC
WT
100;  
'STABILIZE
 
JP
#LOOP
'KEEP CORRECTING UNTIL ERROR IS WITHIN 'TOLERANCE
 
#END
;  
 
'END #CORRECT SUBROUTINE, RETURNING TO CODE
 
SP
X
=spx 
EN
 
Dual Loop (Auxiliary Encoder) 
The DMC-13X8 provides an interface for a second encoder for each axis except for axes configured 
for stepper motor operation and axis used in circular compare.  When used, the second encoder is 
typically mounted on the motor or the load, but may be mounted in any position.  The most common 
use for the second encoder is backlash compensation, described below. 
The second encoder may be a standard quadrature type, or it may provide pulse and direction.  The 
controller also offers the provision for inverting the direction of the encoder rotation.  The main and 
the auxiliary encoders are configured with the CE command.  The command form is CE x,y,z,w where 
the parameters x,y,z,w each equal the sum of two integers m and n.  m configures the main encoder 
and n configures the auxiliary encoder. 
Using the CE Command 
m= 
Main Encoder 
n= 
Second Encoder 
Normal quadrature 
Normal quadrature 
Pulse & direction 
Pulse & direction 
Reverse quadrature 
Reversed quadrature 
Reverse pulse & direction 
12 
Reversed pulse & direction 
For example, to configure the main encoder for reversed quadrature, m=2, and a second encoder of 
pulse and direction, n=4, the total is 6, and the command for the X axis is 
 CE 
Additional Commands for the Auxiliary Encoder 
The command, DE x,y,z,w, can be used to define the position of the auxiliary encoders.  For example, 
 DE 
0,500,-30,300 
sets their initial values. 
The positions of the auxiliary encoders may be interrogated with the command, DE?.  For example 
 DE 
?,,? 
returns the value of the X and Z auxiliary encoders. 
The auxiliary encoder position may be assigned to variables with the instructions 
 V1= 
_DEX 
The command, TD XYZW, returns the current position of the auxiliary encoder. 
The command, DV XYZW, configures the auxilliary encoder to be used for backlash compensation.