APIs, concepts, guides, and more
Gearing

Link two or more axes such that the slave axis position is a function of the master axis position, useful in various systems like in-feed and conveying systems, achieved electronically without mechanical linkage.

๐Ÿ”น What is Gearing?

Gearing or Electronic Gearing links two or more axes such that the position of the โ€œslaveโ€ axis is a function of the position of the โ€œmasterโ€ axis.

๐Ÿ”น Gearing Overview

Mechanical gearing consists of a master unit and a slave unit-linked mechanically by a ratio determined by the number of teeth on the input gear and the output gear.

Image

Electronic gearing can achieve the same relationship without mechanical linkage. This can be useful in a variety of systems, such as:

1. In-feed systems where two pinch-rollers must rotate in an inverse relationship (-1:1)

Image

2. Conveying systems where the ratio between the pay-out and take-up spool continuously changes as product moves from one spool to the other (ratio of (1:4) at the start, ratio of (4:1) at the end)

Image

Note
  • It is possible to have one master axis and multiple slave axes.
    • E.g., Axis 0 can be the master, and axes 1,2,3,4 can be set up as slaves.
  • It is possible to have several master and slave axis combinations.
    • E.g., Axis 0 can be master to axis 1 while axis 2 is master to axis 3.
  • It is possible to make a correction move on the slave axis.
    • E.g., If axis 0 is master to axis 1, a relative or absolute move can be commanded on the slave to make a correction move. The gearing will still be in effect, however, the slave axis will speed up to complete the short move.

โ“ FAQ

What is the reaction time for electronic gearing?

The RMP should update within a single sample cycle (default is 1ms). Reaction time is mostly dependent on when the Master Source is written to the ESC for the next Network Exchange & Post Exchange waiting for the Slave to respond to the new data in its ESC.

What are the various gearing sources available?

Please check RSIAxisMasterType to see all available sources..

๐Ÿ”น RMP Motion Controller Gearing Notes

  • Cyclic Data is Exchanged with Network (including Gearing Master Axis Actual Position [One possible Gearing Source])
  • EtherCAT Master updates RMP Gearing Master's Actual Position.
  • RMP Motion Control processes <<What to do Next>>. While processing the Gearing Slave, it takes the Master Axisโ€™s Actual Position, multiples Feedback Source by the numerator, devices result by the denominator, and finally sets the value as Command Value for Gearing Slave.
  • EtherCAT Master takes Position Demand for all Axes.
  • Cyclic Data is Exchanged with Network (including Gearing Slave Axis's Scaled Position Demand).
Warning
Electronic gearing will only work when both, the Master and Slaves are in Position Mode.

๐Ÿ“œ Sample Code

  • C#

    /* This sample demonstrates how to configure electronic gearing between two axes.
    The follower axis position is controlled as a ratio of the moving axis position.
    Moving Axis: the master axis that drives the motion.
    Follower Axis: follows the moving axis at a specified gear ratio.
    */
    using RSI.RapidCode; // RSI.RapidCode.dotNET;
    Console.WriteLine("๐Ÿ“œ Gearing");
    // get rmp objects
    // set sample config params
    const int NUMERATOR = 2; // for every 1 rotation of moving axis...
    const int DENOMINATOR = 1; // ...follower axis rotates 2 times (2:1 ratio)
    const double POSITION = 10;
    const double VELOCITY = 10;
    const double ACCELERATION = 100;
    const double DECELERATION = 100;
    const double JERK_PERCENT = 50;
    try
    {
    Helpers.CheckErrors(controller);
    // get axes
    Axis movingAxis = controller.AxisGet(Constants.AXIS_0_INDEX);
    Helpers.CheckErrors(movingAxis);
    Axis followerAxis = controller.AxisGet(Constants.AXIS_1_INDEX);
    Helpers.CheckErrors(followerAxis);
    // configure phantom axes
    Helpers.PhantomAxisReset(movingAxis);
    Helpers.PhantomAxisReset(followerAxis);
    // enable phantoms to keep commanded position after motion done
    movingAxis.AmpEnableSet(true);
    followerAxis.AmpEnableSet(true);
    // configure follower axis to gear to moving axis
    followerAxis.GearingEnable(
    masterAxisNumber: movingAxis.NumberGet(),
    masterFeedbackSource: RSIAxisMasterType.RSIAxisMasterTypeAXIS_COMMAND_POSITION, // use COMMAND for phantoms, ACTUAL for real axis
    numerator: NUMERATOR,
    denominator: DENOMINATOR);
    // perform s-curve motion on moving axis
    movingAxis.MoveSCurve(POSITION, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT);
    // wait for motion to complete
    movingAxis.MotionDoneWait();
    // print results
    Console.WriteLine($"Moving axis final position: {movingAxis.CommandPositionGet()}");
    Console.WriteLine($"Follower axis final position: {followerAxis.CommandPositionGet()}");
    Console.WriteLine($"Gear ratio: {NUMERATOR}:{DENOMINATOR}");
    // disable gearing
    followerAxis.GearingDisable();
    // cleanup
    Helpers.AbortMotionObject(followerAxis);
    Helpers.AbortMotionObject(movingAxis);
    }
    // handle errors as needed
    finally
    {
    controller.Delete(); // dispose
    }
    Constants used in the C# sample apps.
    Definition _constants.cs:3
    const int AXIS_0_INDEX
    Default: 0.
    Definition _constants.cs:11
    const int AXIS_1_INDEX
    Default: 1.
    Definition _constants.cs:12
    void GearingDisable()
    Disable the electronic gearing.
    void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator)
    Enable this Axis to be follower (slave) using electronic gearing.
    void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct)
    Represents a single axis of motion control. This class provides an interface for commanding motion,...
    Definition rsi.h:5863
    static MotionController * Get()
    Get an already running RMP EtherCAT controller.
    Represents the RMP soft motion controller. This class provides an interface to general controller con...
    Definition rsi.h:800
    int32_t MotionDoneWait()
    Waits for a move to complete.
    int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
    Enable all amplifiers.
    int32_t NumberGet()
    Get the axis number.
    RSIAxisMasterType
    Sources available to a slave Axis for electronic gearing & camming.
    Definition rsienums.h:1218
    Helpers namespace provides utility functions for common tasks in RMP applications.
    Definition helpers.h:21