SP16384;

Set the speed

PR10000;

Prepare mode of motion

BGX;

Begin motion

MCX

 

JS#CORRECT;

Move to correction

#MOTION2

 

SP16384;

Set the speed

PR-10000;

Prepare mode of motion

BGX;

Begin motion

MCX

 

JS#CORRECT;

Move to correction

JP#MOTION

 

#CORRECT;

Correction code

spx=_SPX

 

#LOOP;

Save speed value

SP2048;

Set a new slow correction speed

WT100;

Stabilize

JP#END,@ABS[_QSX]<10;

End correction if error is within defined tolerance

YRX=_QSX;

Correction move

MCX

 

WT100;

Stabilize

JP#LOOP;

Keep correcting until error is within tolerance

#END;

End #CORRECT subroutine, returning to code

SPX=spx

 

EN

 

Dual Loop (Auxiliary Encoder)

The DMC-2x00 provides an interface for a second encoder for each axis except for axes configured for stepper motor operation and any 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 a,b,c,d (or a,b,c,d,e,f,g,h for controllers with more than 4 axes) where the parameters a,b,c,d each equal the sum of two integers m and n. m configures the main encoder and n configures the auxiliary encoder.

NOTE: This operation is not available for axes configured for stepper motors.

DMC-2X00

Chapter 6 Programming Motion y 67

Page 122
Image 122
Galil DMC-2X00 user manual Dual Loop Auxiliary Encoder