Examples and tips
PROGRAMMING MANUAL
325
R
e
vi
si
o
n
1
.0
'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)
'Pn110=0012h (autotuning disabled)
restart=1
ENDIF
DRIVE_READ($202,2,10)
IF VR(10)<>1 THEN
DRIVE_WRITE($202,2,1,1)
'Pn202=1 (gear ratio numerator in the drive. Default is 4)
restart=1
ENDIF
DRIVE_READ($511,2,10)