Examples and tips
PROGRAMMING MANUAL
283
Revi
si
on 3.0
6.2.2
Initialization program
The Initialization program sets the parameters for the axes. These
parameters are dependant upon the Motor Encoder resolution and
the motor maximum speed.
'================================================
'EXAMPLE OF INITIALIZATION PROGRAM
'THIS VERSION IS DESIGNED FOR MECHATROLINK SERVOS
'ADAPT THIS PROGRAM ACCORDING TO YOUR APPLICATION
'================================================
BASE(x)
restart=0
inertia_ratio=set_load_inertia_ratio
'----------------------------
'EXAMPLE 1
'SGMAH-01AAA61D-OY motor data
'----------------------------
enc_resolution=2^13 '13 bit encoder
max_speed=5000 '5000 rpm max. speed
'----------------------------
'EXAMPLE 2
'SGMAH-01A1A61D-OY motor data
'----------------------------
enc_resolution=2^16 '16 bit encoder
max_speed=5000 '5000 rpm max. speed
'----------------------------
'WRITE PARAMETERS IN THE SERVO
'----------------------------
DRIVE_WRITE($103,2,inertia_ratio) 'Write inertia ratio
DRIVE_READ($110,2,10)
IF VR(10)<>$0012 THEN
DRIVE_WRITE($110,2,$0012,1)
Note:
Refer to the Servo Driver and the motor data sheet for
this information.
I52E-EN-03.book Seite 283 Freitag, 29. Juni 2007 11:55 11