![background image](http://html1.mh-extra.com/html/omron/sysmac-cj-series/sysmac-cj-series_operation-manual_743585346.webp)
Practical examples
Section 5-2
334
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)
IF VR(10)<>$6548 THEN
DRIVE_WRITE($511,2,$6548,1)
'Pn511 set the registration inputs in the Servo Driver
restart=1
ENDIF
DRIVE_READ($81E,2,10)
IF VR(10)<>$4321 THEN
DRIVE_WRITE($81E,2,$4321,1)
'Pn81E=$4321 To make the Digital inputs in the Servo
Driver
'available for reading through DRIVE_INPUTS word
restart=1
ENDIF
IF restart=1 THEN DRIVE_RESET
'----------------------------
'Initial gains For MECHATROLINK_SPEED
'----------------------------
'By experience this setting is a good starting point
P_GAIN=INT(214748.3648*max_speed/enc_resolution)
'This is the optimum value. Set if needed
VFF_GAIN=INT(60000*1073741824/enc_resolution/max_speed)
'----------------------------
'Initial gains For MECHATROLINK_POSITION mode
'----------------------------
'Change the rigidity (Fn001) according to the mechanical
'system
'Change feedforward gain Pn109 if required
'----------------------------
'Initial parameter of the AXIS
'----------------------------
'If set to 1 (and Pn202=Pn203=1) the UNITS are
'encoder counts
UNITS=1
'Theoretical FE we will have running the motor
'at "max_speed"
'without VFF_GAIN in MECHATROLINK SPEED
FE_LIMIT=1073741824/P_GAIN/UNITS
'SPEED is set to 1/3 of "max_speed
SPEED=(max_speed73)*enc_resolution/60/UNITS
'ACCEL in 200ms from 0 to "max_speed"
ACCEL=SPEED/0.2
'DECEL in 200ms from "max_speed" to 0
DECEL=SPEED/0.2
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...