Festo CMMT-ST
- lorenzing
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
17 Oct 2025 13:00 #336594
by lorenzing
Festo CMMT-ST was created by lorenzing
Good morning, I'm trying to build an XYYZZ gantry with two motors on the Y and Z axes. To do this, I've used 5 CMMT-ST drives with absolute encoder servomotors. I have some doubts about the homing procedure. At the moment I can see the drives, but I haven't managed to move them yet. Before causing any damage, I wanted to get your opinion on the configuration files, since this is my first time using LinuxCNC.
ethercat.ini
ethercat.hal
ethercat-conf.xml
I hope this can eventually help other people who want to use these drives.
Many thanks to all for your help.
ethercat.ini
[EMC]
VERSION = 1.1
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
#DEBUG = 0x7FFFFFFF
DEBUG = 0
[DISPLAY]
DISPLAY = axis
CYCLE_TIME = 0.1
MAX_LINEAR_VELOCITY = 50.0
DEFAULT_LINEAR_VELOCITY = 10.0
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
[TASK]
TASK = milltask
CYCLE_TIME = 0.01
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Servo task period, in nano-seconds
SERVO_PERIOD = 1000000
# section for main IO controller parameters -----------------------------------
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[HAL]
HALFILE = ethercat.hal
# Single file that is executed after the GUI has started. Only supported by
# AXIS at this time (only AXIS creates a HAL component of its own)
#POSTGUI_HALFILE = test_postgui.hal
HALUI = halui
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[TRAJ]
COORDINATES = XYYZZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 25.0
DEFAULT_LINEAR_VELOCITY = 2.50
[KINS]
JOINTS = 5
KINEMATICS = trivkins coordinates=XYYZZ kinstype=BOTH
# --- X Axis ---
[AXIS_X]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
FERROR = 1000
MIN_FERROR = 1000
HOME_ABSOLUTE_ENCODER = 2
HOME_SEQUENCE = 0
# --- Y Axis (dual) ---
[AXIS_Y]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 1000
MIN_FERROR = 1000
# both Y joints home together
HOME_SEQUENCE = 1
HOME_ABSOLUTE_ENCODER = 2
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 1000
MIN_FERROR = 1000
# both Y joints home together
HOME_SEQUENCE = 1
HOME_ABSOLUTE_ENCODER = 2
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
# --- Z Axis (dual) ---
[AXIS_Z]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
FERROR = 1000
MIN_FERROR = 1000
# both Z joints home together
HOME_SEQUENCE = 2
HOME_ABSOLUTE_ENCODER = 2
[JOINT_4]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -30.0
MAX_LIMIT = 1700.0
FERROR = 1000
MIN_FERROR = 1000
# both Z joints home together
HOME_SEQUENCE = 2
HOME_ABSOLUTE_ENCODER = 2ethercat.hal
# --- load components ---
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=5
# load EtherCAT xml then drivers
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
loadrt cia402 count=5
# estop loopback
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
#machine enabled if no estop loopback
#setp iocontrol.0.emc-enable-in 1
# --- add functions to servo-thread ---
addf lcec.read-all servo-thread
# read from cia402 drivers (one per joint)
addf cia402.0.read-all servo-thread
addf cia402.1.read-all servo-thread
addf cia402.2.read-all servo-thread
addf cia402.3.read-all servo-thread
addf cia402.4.read-all servo-thread
# motion stack
addf motion-command-handler servo-thread
addf motion-controller servo-thread
# writes: cia402 then lcec
addf cia402.0.write-all servo-thread
addf cia402.1.write-all servo-thread
addf cia402.2.write-all servo-thread
addf cia402.3.write-all servo-thread
addf cia402.4.write-all servo-thread
addf lcec.write-all servo-thread
# =========================
# JOINT 0 (X) -> cia402.0 -> lcec.0.4
# =========================
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 2000 # match SCALE in .ini; negate if direction reversed
# joint signals for motion
net x-pos-cmd joint.0.motor-pos-cmd => cia402.0.pos-cmd
net x-pos-fb joint.0.motor-pos-fb <= cia402.0.pos-fb
net x-enable joint.0.amp-enable-out => cia402.0.enable
net x-amp-fault joint.0.amp-fault-in <= cia402.0.drv-fault
# ethercat to cia402 driver
net x-statusword lcec.0.4.cia-statusword => cia402.0.statusword
net x-opmode-display lcec.0.4.opmode-display => cia402.0.opmode-display
net x-drv-act-pos lcec.0.4.actual-position => cia402.0.drv-actual-position
# cia402 driver to ethercat
net x-controlword cia402.0.controlword => lcec.0.4.cia-controlword
net x-modes-of-operation cia402.0.opmode => lcec.0.4.opmode
net x-drv-target-pos cia402.0.drv-target-position => lcec.0.4.target-position
# homing (optional)
# net x-home-request joint.0.request-custom-homing => cia402.0.home
# net x-homing joint.0.is-custom-homing <= cia402.0.stat-homing
# net x-homed joint.0.custom-homing-finished <= cia402.0.stat-homed
# =========================
# JOINT 1 (Y1) -> cia402.1 -> lcec.0.2
# =========================
setp cia402.1.csp-mode 1
setp cia402.1.pos-scale 2000
#setp cia402.1.abs-encoder 1
net y1-pos-cmd joint.1.motor-pos-cmd => cia402.1.pos-cmd
net y1-pos-fb joint.1.motor-pos-fb <= cia402.1.pos-fb
net y1-enable joint.1.amp-enable-out => cia402.1.enable
net y1-amp-fault joint.1.amp-fault-in <= cia402.1.drv-fault
net y1-statusword lcec.0.2.cia-statusword => cia402.1.statusword
net y1-opmode-display lcec.0.2.opmode-display => cia402.1.opmode-display
net y1-drv-act-pos lcec.0.2.actual-position => cia402.1.drv-actual-position
net y1-controlword cia402.1.controlword => lcec.0.2.cia-controlword
net y1-modes-of-operation cia402.1.opmode => lcec.0.2.opmode
net y1-drv-target-pos cia402.1.drv-target-position => lcec.0.2.target-position
# =========================
# JOINT 2 (Y2) -> cia402.2 -> lcec.0.3
# =========================
setp cia402.2.csp-mode 1
setp cia402.2.pos-scale 2000
#setp cia402.2.abs-encoder 1
net y2-pos-cmd joint.2.motor-pos-cmd => cia402.2.pos-cmd
net y2-pos-fb joint.2.motor-pos-fb <= cia402.2.pos-fb
net y2-enable joint.2.amp-enable-out => cia402.2.enable
net y2-amp-fault joint.2.amp-fault-in <= cia402.2.drv-fault
net y2-statusword lcec.0.3.cia-statusword => cia402.2.statusword
net y2-opmode-display lcec.0.3.opmode-display => cia402.2.opmode-display
net y2-drv-act-pos lcec.0.3.actual-position => cia402.2.drv-actual-position
net y2-controlword cia402.2.controlword => lcec.0.3.cia-controlword
net y2-modes-of-operation cia402.2.opmode => lcec.0.3.opmode
net y2-drv-target-pos cia402.2.drv-target-position => lcec.0.3.target-position
# =========================
# JOINT 3 (Z1) -> cia402.3 -> lcec.0.0
# =========================
setp cia402.3.csp-mode 1
setp cia402.3.pos-scale 2000
#setp cia402.3.abs-encoder 1
net z1-pos-cmd joint.3.motor-pos-cmd => cia402.3.pos-cmd
net z1-pos-fb joint.3.motor-pos-fb <= cia402.3.pos-fb
net z1-enable joint.3.amp-enable-out => cia402.3.enable
net z1-amp-fault joint.3.amp-fault-in <= cia402.3.drv-fault
net z1-statusword lcec.0.0.cia-statusword => cia402.3.statusword
net z1-opmode-display lcec.0.0.opmode-display => cia402.3.opmode-display
net z1-drv-act-pos lcec.0.0.actual-position => cia402.3.drv-actual-position
net z1-controlword cia402.3.controlword => lcec.0.0.cia-controlword
net z1-modes-of-operation cia402.3.opmode => lcec.0.0.opmode
net z1-drv-target-pos cia402.3.drv-target-position => lcec.0.0.target-position
# =========================
# JOINT 4 (Z2) -> cia402.4 -> lcec.0.1
# =========================
setp cia402.4.csp-mode 1
setp cia402.4.pos-scale 2000
#setp cia402.4.abs-encoder 1
net z2-pos-cmd joint.4.motor-pos-cmd => cia402.4.pos-cmd
net z2-pos-fb joint.4.motor-pos-fb <= cia402.4.pos-fb
net z2-enable joint.4.amp-enable-out => cia402.4.enable
net z2-amp-fault joint.4.amp-fault-in <= cia402.4.drv-fault
net z2-statusword lcec.0.1.cia-statusword => cia402.4.statusword
net z2-opmode-display lcec.0.1.opmode-display => cia402.4.opmode-display
net z2-drv-act-pos lcec.0.1.actual-position => cia402.4.drv-actual-position
net z2-controlword cia402.4.controlword => lcec.0.1.cia-controlword
net z2-modes-of-operation cia402.4.opmode => lcec.0.1.opmode
net z2-drv-target-pos cia402.4.drv-target-position => lcec.0.1.target-position
# End of HALethercat-conf.xml
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<!-- Joint Z1 -->
<slave idx="0" type="generic" vid="0000001D" pid="007b5a25" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
<!-- Joint Z2 -->
<slave idx="1" type="generic" vid="0000001D" pid="007b5a25" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
<!-- Joint Y1 -->
<slave idx="2" type="generic" vid="0000001D" pid="007b5a25" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
<!-- Joint Y2 -->
<slave idx="3" type="generic" vid="0000001D" pid="007b5a25" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
<!-- Joint X -->
<slave idx="4" type="generic" vid="0000001D" pid="007b5a25" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
</master>
</masters>I hope this can eventually help other people who want to use these drives.
Many thanks to all for your help.
Please Log in or Create an account to join the conversation.
- jc2ktr
- Offline
- Premium Member
-
Less
More
- Posts: 84
- Thank you received: 9
20 Oct 2025 10:31 - 20 Oct 2025 10:32 #336741
by jc2ktr
Replied by jc2ktr on topic Festo CMMT-ST
I´ve got one CMMT-ST drive too, and got it finally to move.
With a absolute Encoder you don´t need Movement for the drives.
If you have HOME_ABSOLUTE_ENCODER = 2 in your .ini file declared.
I could share my Config if needed.
Greetings Sven
With a absolute Encoder you don´t need Movement for the drives.
If you have HOME_ABSOLUTE_ENCODER = 2 in your .ini file declared.
I could share my Config if needed.
Greetings Sven
Last edit: 20 Oct 2025 10:32 by jc2ktr. Reason: found typo
Please Log in or Create an account to join the conversation.
- lorenzing
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
20 Oct 2025 20:03 - 21 Oct 2025 20:28 #336770
by lorenzing
Replied by lorenzing on topic Festo CMMT-ST
Many thanks Sven, probably I miss something in my config, maybe in the festo drive. Because when I launch linuxcnc the festo drives goes in error “EtherCAT process data invalid”. I’m not sure of the drive reference method on the festo side.
When I’m able I’ll upload my festo setup from the festo automation suite.
If it’s not a problem for you to share your setup it would be great.
Many thanks again, Lorenzo
When I’m able I’ll upload my festo setup from the festo automation suite.
If it’s not a problem for you to share your setup it would be great.
Many thanks again, Lorenzo
Attachments:
Last edit: 21 Oct 2025 20:28 by lorenzing.
Please Log in or Create an account to join the conversation.
- jc2ktr
- Offline
- Premium Member
-
Less
More
- Posts: 84
- Thank you received: 9
22 Oct 2025 15:23 #336885
by jc2ktr
Replied by jc2ktr on topic Festo CMMT-ST
Sorry for the late Answer,
yes i had this Error in Festo Automation Suite too first. I don´t really know what i´ve done that it works now.
i put my working config in the Attachments.
yes i had this Error in Festo Automation Suite too first. I don´t really know what i´ve done that it works now.
i put my working config in the Attachments.
Attachments:
The following user(s) said Thank You: lorenzing
Please Log in or Create an account to join the conversation.
- endian
-
- Offline
- Elite Member
-
Less
More
- Posts: 241
- Thank you received: 68
24 Oct 2025 03:40 #337019
by endian
Replied by endian on topic Festo CMMT-ST
hi there,
I think you have to check if drivers is running at FHPP or Cia402 protocol shape .. It is configurable and it should be hidden pain...
then you have to setup the SDOs and then PDOs for Cia402
If you are familiar with twincat 3 I can recommend it for you to jog motor from scratch... if it will jog over them just swap yout master to lcec
regards
I think you have to check if drivers is running at FHPP or Cia402 protocol shape .. It is configurable and it should be hidden pain...
then you have to setup the SDOs and then PDOs for Cia402
If you are familiar with twincat 3 I can recommend it for you to jog motor from scratch... if it will jog over them just swap yout master to lcec
regards
Please Log in or Create an account to join the conversation.
- lorenzing
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
26 Oct 2025 09:28 - 26 Oct 2025 09:39 #337183
by lorenzing
Replied by lorenzing on topic Festo CMMT-ST
Thank you all very much for the support. The drives use the CiA402 protocol, with the jc2ktr setup I was able to see the drives and I can perform jogging, but I don't understand why I see Z1 on joint 0, which should be X. And when I try to jog joint 1, joint 0 always moves. I definitely made a lot of confusion in the HAL file.
Last edit: 26 Oct 2025 09:39 by lorenzing.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19680
- Thank you received: 4560
26 Oct 2025 17:40 #337229
by andypugh
Replied by andypugh on topic Festo CMMT-ST
Your kinematics setup seems to be wrong:
Should be 5 joints and probably XYYZZ
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZShould be 5 joints and probably XYYZZ
Please Log in or Create an account to join the conversation.
- lorenzing
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
26 Oct 2025 18:04 #337232
by lorenzing
Replied by lorenzing on topic Festo CMMT-ST
Hi andypugh, jc2ktr shared his working setup, but here is mine:
[KINS]
JOINTS = 5
KINEMATICS = trivkins coordinates=XYYZZ kinstype=BOTHPlease Log in or Create an account to join the conversation.
- jc2ktr
- Offline
- Premium Member
-
Less
More
- Posts: 84
- Thank you received: 9
27 Oct 2025 18:34 #337304
by jc2ktr
I´ve had at work that if you swap in and out of the Ethercat ports you get weird behavior on the EC-Bus.
Replied by jc2ktr on topic Festo CMMT-ST
Maybe your Hardware (ethercat ports, or motorcables) are wired wrong, your halfile looks okay to me?Thank you all very much for the support. The drives use the CiA402 protocol, with the jc2ktr setup I was able to see the drives and I can perform jogging, but I don't understand why I see Z1 on joint 0, which should be X. And when I try to jog joint 1, joint 0 always moves. I definitely made a lot of confusion in the HAL file.
I´ve had at work that if you swap in and out of the Ethercat ports you get weird behavior on the EC-Bus.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20894
- Thank you received: 7125
27 Oct 2025 19:19 #337307
by tommylight
That is in your hal file for the X axis, it should beif you want X to be the first joint/axis.
Same for other joints and axis, and there are multiple instances for each joint to be changed.
Replied by tommylight on topic Festo CMMT-ST
cia402.4.xxxxxcia402.0.xxxxxSame for other joints and axis, and there are multiple instances for each joint to be changed.
Please Log in or Create an account to join the conversation.
Time to create page: 0.149 seconds