EtherCAT Absolute Position Cam Drive with XPM_CAMA
The XEM CPU supports up to 8 different CAM blocks using various CAM profiles.
-
The CAM blocks are created in XG-PM software.
-
Learn about creating CAM blocks with XGB EtherCAT CAM Data Creation and Using XPM_CAM or XPM_CAMOCAM Data Creation and Using XPM_CAM or XPM_CAMO
-
XPM_CAMA is used for executing a CAM block of a sub-axis with an added master offset position and sub-axis offset position.
The examples in this topic can be found in OnlineHelp_ECAT_Example.
XPM_CAMA Details
XPM_CAMA is used for executing a CAM block of a sub-axis with an added master offset position and sub-axis offset position.
-
MST_AXIS should have the same unit configuration as the CAM block.
-
The axis that uses the XPM_CAMA function block is considered the sub-axis.
Element Name | Element Type | Description |
---|---|---|
REQ | Input | Edge detected request to execute the function block. |
BASE | Input | Base number of the motion controller. Set to 0 for XEM CPU. |
SLOT | Input | Slot number of the motion controller. Set to Slot Number of XBF-PN04Bor XBF-PN08B module. |
AXIS | Input |
Axis number to control.
|
MST_AXIS | Input |
Master axis number.
|
CAM_BLK | Input | CAM block number to execute. Must be 1~9. 9 allows the execution of a USER CAM Operation. |
STRT_DST | Input | The distance that the CAM will move when executed. |
MST_OFFSET | Input | Set the master’s offset position. |
SLV_OFFSET | Input | Set the sub-axis offset position. |
DONE | Output | Status that function block is done. |
STAT | Output | Current status of the function block. Non-zero numbers will be an error or warning. |
XPM_CAMA Control Characteristics
The Chart below shows the interaction of the STRT_DST, MST_OFFSET, and SLV_OFFSET values on the CAM operation.

This example is Scan Program LP617_XPM_CAMA_Example.
-
In this example Axis 4 is the master axis and Axis 1 is the sub-axis.
-
When the Run_Example variable is true, Axis 4 will do an absolute move to position 1750 pulses at 500 pulses/sec and Axis1 will execute an XPM_CAMA function block.
-
Axis 1’s XPM_CAMA is setup to execute CAM block 1.
-
Home Axes before setting Run_Example to true.
-
CAM Block 1 is in XG_PM program OnlineHelp_XGPM_example.xpj
CAM Block 1
XPM_CAMA LD Code
XPM_CAMA LD Trend
LP617