6 electronic gearing – Rockwell Automation 57C422B 2 Axis Servo Module User Manual

Page 94

Advertising
background image

5-8

2-Axis Servo Module M/N 57C422B

5.6

Electronic Gearing

The following example illustrates the software necessary to
use electronic gearing. Three examples are provided, one
each for turning the gearing mode on, changing the gear
ratio while the drive is active, and turning the gearing mode
off.

6992

!

6993

! Turn on gearing mode

6994

!

6995

! FDBK_SCALING

= feedback encoder counts/engineering unit

6996

! REF_SCALING

= gearing encoder counts/engineering unit

6997

! GEAR

= gear ratio

6998

! GEAR_DIR_SAME@

= gear direction switch

6999

!

7000

GEAR_RATIO!=(FDBK_SCALING*GEAR/REF_SCALING\ *65536.*256.

7005

MODES%=MODES% AND 0ADH

7010

IF NOT GEAR_DIR_SAME@ THEN MODES%= MODES% OR 010H

7015

MODES%=MODES% OR 2

7020

RETURN

7100

!

7293

!

7294

! Change gear ratio while drive is active

7295

!

7296

! FDBK_SCALING

= feedback encoder counts/engineering unit

7297

! REF_SCALING

= gearing encoder counts/engineering unit

7298

! GEAR

= gear ratio

7299

!

7300

GEAR_RATIO!=(FDBK_SCALING*GEAR/REF_SCALING) *65536.*256.

7305

CMD67%=8 \GOSUB 25000

7310

RETURN

7400

!

7497

!

7498

! Turn off gearing mode

7499

!

7500

MODES%= MODES% AND 0ADH

7505

RETURN

Advertising