How To Simulate a Cam Operation In Sysmac Studio

When considering a control solution that involves factors such as quick changeover and high-speed coordinated motion, an electronic cam can be an ideal solution.

Electronic control has clear advantages over mechanical solutions. Aside from factors like fixed motion profiles, difficult changeover and expensive design costs, mechanical cam solutions suffer from wear and maintenance issues as well.
Many motion controllers support electronic camming and gearing, but Omron's advantage is in the implementation of these complex operations. Manually creating cam profiles can involve intense calculations and a deep understanding of motion control. With Sysmac Studio's new Cam Profile Editor this challenge becomes surprisingly simple.

When a different cam profile is needed during machine operation, provided motion control instructions command the axes based on the user-program execution. With capacity of up to 640 different cam profiles, several configurations can be created and saved in the controller for quick machine changeover.
The profiles can be stored in the controller, imported/exported via CSV format, or even modified by the user-program during run-time. These innovative features offer maximum flexibility for motion control applications with high variability.

To examine a real solution related to cam operations on a packaging machine application, click the link below. 

This tutorial will detail the steps required to create a fully operational cam profile and view the 3D simulation results in Sysmac Studio using a simple Ladder Logic program. 

Understanding Useful Terms:

  •  Cam Operation: An operation that takes one master axis and one slave axis and follows the cam profile curve to derive the displacement of the slave axis from the phase of the master axis.
  •  Axis Servo Drive: Frequency Drive, Encoder or other type of linear or rotary control device.
  •  Master Axis: The axis that serves as the input to the cam operation. You can specify either Linear Mode or Rotary Mode.
  •  Slave Axis: The axis that serves as the output from the cam operation. You can specify either Linear Mode or Rotary Mode.
  •  Cam Profile: The relationship between Master Axis and Slave Axis(Axes) positions during a cam operation. Also known as a Cam Profile Curve.
  •  Phase: Typically referring to the Master Axis position, this is the relative distance on the Master Axis from the start point of the Cam Profile.
  •  Displacement: Typically referring to the Slave Axis(Axes) position, this is the relative distance on the Slave Axis(Axes) from the Master Axis synchronised start position.
  •  Node: Physical control component installed in the system associated with the motion application.
  •  Period: One full cycle of a Cam Profile.
  •  Cam Table: A data table that contains cam data for the Master and Slave Axis(Axes).

Intro of Steps

  • Configuration and Setup
  • Create a Cam Profile
  • Simple program creation
  • Data Trace configuration

(Program version of Sysmac Studio is 1.0)

The following detailed steps can be followed after creating a new project in Sysmac Studio.

1. Under the Configuration and Setup header, open the EtherCAT configuration and add a two servo drives to the EtherCAT Master. Give the devices unique names for later identification. 

2. In the Motion Control Setup, right click Axis Settings and "add -> Axis Setting". Do this twice for both servos that were added previously.

3. Double click the added axis "MC_Axis000(0)" to open the settings for Axis 0. Axis type should be set to "Servo axis". Input device should be set to the Node 1 slave added to the EtherCAT master (i.e. "Node: 1 Device: R88D-KN01H-ECT). Make similar changes to "MC_Axis001(1)" but choose "Node: 2..." for the input device on this axis. 

4. Make the following changes in the Unit Conversion Settings and Operation Settings for both axes. These units will be used when creating the cam profile in the next step.

5. Create a Cam Profile by right clicking Cam Data Settings under the Configuration and Setup header.

6. Double click the newly added CamProfile0 item to edit.

For this example, we are creating a curve that represents the motion that would be similar to a mechanical system with a rotating cam lobe and a follower that produces reciprocating, linear motion. This motion can be produced with a total of four segments in the Cam editor. For the first 90 degrees of the master axis, no motion is required for the slave. For the next 180 degrees of the master, the slave is required to move to 1000 mm and back to 0 mm in a smooth, parabolic motion. For the remaining 90 degrees of the master, the slave also has no motion. Clicking the "+" icon will add the first segment to the new Cam Profile Curve. Add the first segment and edit the Master axis and Slave axis values as shown.

7. Add the second segment and edit the Master axis and Slave axis values as shown.

8. Add the third segment and edit the Master axis and Slave axis values as shown.

9. Add the fourth and final segment and edit the Master axis and Slave axis values as shown. This completes the period for the cam profile.

10. The next step involves creating a simple program to execute the motion profile. Begin by entering global variables that will be used in the ladder logic program function blocks.

Recommended variables needed for Function Blocks:

11. Create a ladder logic program as shown below.

12. Under the Configuration and Setup header, right click Data Trace Settings and add a Data Trace.

13. Open the new Data Trace0 to make configuration settings as follows;

  • Check enable trigger condition and enter the created variable "Enable_Axes". This variable will start the trace and simulation function when it meets the conditions set here.
  • Change the sampling interval to time. The sampling interval is not a critical setting.
  • Check "refresh charts during tracing".

The "Show Configuration" icon can then be deselected to hide these settings.

14. Click the 3D icon.

15. Click "display 3D equipment model menu" and select add.

16. In the 3D equipment model, we need to create both axes to simulate the motion for rotary and linear movements. Click the "Add" icon to add an additional machine model. Change the name to "Master Rotary" (for easy identification only) and select Motor rotation for type on the first model. For the second model, change the name to "Slave Linear" and select Single axis position control for type. Also, for the value in the Corresponding Axis Setting, ensure the value corresponds to the proper axis designation as shown below. (click OK if skipping the optional next step to build the virtual machine)


17. This step is optional, but recommended for better visualisation of the working model. Adjusting the present position and orientation gives a better view as shown below. Click OK when finished to build the virtual machine.

18. Add watch window (view, watch tab page) to allow control of the program and motion execution. Enter variables Enable_Axis, Execute_Cam and StopExecute.

19. Begin the simulation by selecting Simulation, Run.

20. Click red Start Trace then make true the Enable_Axis variable below in the watch tab. Make true the variable Execute_Cam. This will result in a simulated motion move of the cam profile that can be seen on the simulation window. 

21. When the simulation is satisfied, click the Stop icon and the sampled data is transferred to the data trace for closer review. Pressing the Playback icon will replay the sampled data.

22. Optionally, the simulated motion can be saved in a video file by clicking the REC icon during or before the motion is executed. The data can also be exported to a .csv file for numerical analysis of the motion.

(Record button)

(Export/Import buttons)

Additional details can be found in the Sysmac Studio Operation Manual (Cat. No. W504).