MDrive/MForce – Electronic gearing program sample

This short program shows how to configure an MDrivePlus2 unit to be used in the following mode. The step and directions inputs may be sourced from a programmable controller, dedicated stepper motor controller or even another MDrivePlus2 unit with S7 and S8 configured for step / direction outputs. The CR motion variable allows this axis to perfom electonic gearing by setting up the ratio from 0.001 to 2.00. Important: S7 and S8 are TTL only levels, with a maximum input of 5 VDC.

'***** Electronic Gearing *****
PG 1
LB k4
  PR "Electonic Gearing"
  Rc=50 'set run current to 50%
  S7=33,0 'Sets clock type to step input
  S8=33,0 'Sets clock type to direction input
  Fm=3 'set filter motion to 1.67 Mhz cutoff freq.
  Ms=16 'Set microstep resolution to 16
  Cm=1 'Clock mode enable
  Cr=1.0 'Set clock mode ratio to 1:1
 E
 PG

Download Electronic Gearing .mxt file
(color-coded in IMS Terminal)

 

> Motion Control Code Index