APIs, concepts, guides, and more
Camming

Convert rotary motion into linear motion, or vice versa.

🔹 What is Camming?

Camming refers to the use of a cam, where cams are mechanical devices with a shaped profile that are used to transmit motion or force in a controlled manner. They are often used to convert rotary motion into linear motion, or vice versa.

In RMP (our motion controller) context, camming is a mode in which controls follow a cam profile curve to derive slave-axis displacement from master-axis position, whether linear or rotary. It is a nonlinear coordinated motion between two axes, and normally, one axis is linear while the other is rotational.

🔹 Why use Camming?

In a master-slave motion system, there are at least two axes and the position of each axis is measured by the motion controller.

Master Axis: this axis/motor may or may not be controlled by the motion controller.

Slave Axis: the motion controller controls the position of this axis/motor as a function of the position of the master axis.

The servo controller will take the master rotational or linear information from one axis and then follow the master to a predefined nonlinear path. The operation is cyclical and both axes will start each cycle at the same 0 position reference.

See also → Cam: A projection on a rotating part in machinery, designed to make sliding contact with another part while rotating and to impart reciprocal or variable motion to it.

A mechanical cam consists of a shaped rotating form and a follower that tracks its surface.

In the image below, the Slave Axis/Motor is moving on the y-axis and the Master Axis/Motor is moving around the z-axis.

Image

You can achieve the same relationship between the master and slave positions using electronic control.

The simplest way is to define the relationship between the master and slave positions as a series of linear segments.

Image

For each segment, you need to define the distance that the master will move during the segment and the position that the slave will achieve at the end of the segment.

This cam profile will be represented by the following cam table.

Note - Cam segments are numbered from zero

Note
Master motion happens in a RELATIVE fashion.
Slave motion happens in an ABSOLUTE fashion.
Camming does not use the given axis user units but instead works in encoder ticks. If you want to work in user units instead of encoder ticks simply multiply by your user unit (i.e. the number of ticks per unit).
Warning
A RELATIVE MOVE of 25 will move the axis 25 units ahead of the current position, rather than to position 25.
An ABSOLUTE MOVE of 25 will move the axis to position 25 rather than 25 units ahead of the current position.

So, in Segment 0, the Master Axis will move 50 units and the Slave Axis will move 200 units.

The speed of the Slave Axis gets computed so it can achieve 200 units at the same time the Master Axis achieves the 50 units of Segment 0.

The same is true for all the other segments

🔹 When to use Camming?

Here are a few examples of when you might consider using the RMP camming feature in your application:

  1. Industrial automation: If you need to control the motion of mechanical components in an industrial automation system, such as a conveyor belt or a robotic arm, you may consider using cams to transmit motion in a precise and repeatable manner.
  2. Motion simulation: If you need to create a realistic and controllable movement for training, entertainment, or research purposes, you may consider using cams in a motion simulator.
  3. Robotics: If you need to control the movement of robotic joints or limbs, you may consider using cams to transmit motion in a precise and repeatable manner.
  4. Mechanical engineering: If you need to actuate valves, control pumps, or transmit power in a mechanical system, you may consider using cams to transmit motion and force in a controlled manner.

🔹 Use Cases

Automotive Manufacturing Company

A manufacturing company that produces automotive parts uses a conveyor belt system to transport parts through various stages of production. The conveyor belt system includes a series of mechanical arms that lift and rotate the parts as they move along the belt. To control the motion of these mechanical arms, the company uses cams that transmit rotary motion from a motor to linear motion in the arms.

The cams are designed with a specific profile that allows the arms to move in a precise and repeatable manner, ensuring that the parts are properly positioned at each stage of production. The use of cams in this application allows the company to achieve precise and repeatable motion control, improving the efficiency and accuracy of their production process.

Robotic Arms in Food Processing Facility

A food processing facility uses a series of robotic arms to sort and package food items. The robotic arms are equipped with grippers that can open and close to grasp and release food items. To control the movement of the grippers, the facility uses cams that transmit rotary motion from a motor to linear motion in the grippers.

The cams are designed with a specific profile that allows the grippers to open and close in a precise and repeatable manner, ensuring that the food items are properly sorted and packaged. The use of cams in this application allows the facility to achieve precise and repeatable motion control, improving the efficiency and accuracy of their food processing operations.

📜 Sample Code

  • C#

    //Create RapidCode Objects
    Axis moving_axis = controller.AxisGet(Constants.MAIN_AXIS_NUMBER);
    Axis follower_axis = controller.AxisGet(Constants.DRIVEN_AXIS_NUMBER);
    HelperFunctions.CheckErrors(follower_axis);
    // Constants
    const double MAIN_VELOCITY = 50; // Specify your Moving Axis's velocity. - units: Units/Sec (it will do 1 counts / (1/104857) of a revolution every 1 second.)
    const double MAIN_ACCELERATION = 20; // Specify your Moving Axis's acceleration. - units: Units/Sec^2
    // Commanded Positions
    double[] movingAxisDistances = { 5, 10, 8 }; // This is the RELATIVE Moving Axis distance, every n revolutions it changes its Driven position. (This is the x-axis)
    double[] followerAxisPositions = { 10, 20, 10 }; // This is the final ABSOLUTE Driven position, for every 5 revolutions one of this positions gets applied. (This is the y-axis)
    // Command motion on the Driven before the Moving Axis starts
    follower_axis.MoveCamLinear(moving_axis.NumberGet(),
    RSIAxisMasterType.RSIAxisMasterTypeAXIS_COMMAND_POSITION, // Use COMMAND for phantoms and ACTUAL for real axis.
    movingAxisDistances,
    followerAxisPositions,
    movingAxisDistances.Length);
    moving_axis.MoveVelocity(MAIN_VELOCITY, MAIN_ACCELERATION); // Command a constant velocity on the master axis, Driven will follow.
    follower_axis.MotionDoneWait(); // Wait for the cam motion to complet
    moving_axis.Stop(); // Stop the Moving Axis