- Posts: 53
- Thank you received: 0
EtherCAT + CiA402 Servo: OP state reached, but axis won’t move (only Following E
11 months 2 weeks ago #338477
by aDm1N
EtherCAT + CiA402 Servo: OP state reached, but axis won’t move (only Following E was created by aDm1N
Hello everyone,I am currently trying to commission an EtherCAT servo drive (LC10E series) using LinuxCNC + LCEC + CiA402.
The slave enters OP-state correctly, torque is enabled, the shaft is held, but the servo never moves.
Any motion command (homing or G0/G1) results instantly in a following error.Below is a complete summary of everything that was tried so far.System Setup
MatthiasDeutsche VersionHallo zusammen,ich versuche derzeit, einen EtherCAT-Servotreiber (LC10E-Serie) mit LinuxCNC + LCEC + CiA402 in Betrieb zu nehmen.
Der Servo geht korrekt in den OP-Zustand, das Haltemoment ist da, aber er bewegt sich nicht.
Jeder Bewegungsbefehl (Homen oder G0/G1) führt sofort zu einem Schleppfehler.Hier eine vollständige Übersicht über alle bisher getesteten Schritte.System
Matthias
The slave enters OP-state correctly, torque is enabled, the shaft is held, but the servo never moves.
Any motion command (homing or G0/G1) results instantly in a following error.Below is a complete summary of everything that was tried so far.System Setup
- LinuxCNC 2.10~pre0 (uspace), clean installation via
packagesCode:.deb
- EtherCAT master working
- Slave recognized
-
all OKCode:ethercat slaves → PREOP / SAFEOP / OP
- Servo drive: LC10E series (Chinese EtherCAT servo)
- EtherCAT mapping generated via
Code:lcec_configgen
- CiA402 component compiled and installed from GitHub
- Motor shaft is energized and held when LinuxCNC is activated
- Mechanical disturbance triggers an error from the drive → feedback works
- Using:
Code:lcec_configgen > ethercat-conf.xml
-
loads without errorsCode:lcec_conf ethercat-conf.xml
-
lists all expected pinsCode:halrun → show pin lcec
- CiA402 compiled successfully
- Configuration created using:
-
Code:cia402.ini
-
Code:cia402.hal
-
Code:ethercat-conf.xml
-
- CSP mode enabled:
-
Code:setp cia402.0.csp-mode 1
-
- Controlword, Statusword, Velocity pins linked correctly
- Fixed type mismatch (drv-fault bit vs u32) by removing problematic nets
- Removed unused / nonexistent pins
- Example: the LC10E has no
PDOCode:srv-actual-position
- Example: the LC10E has no
- EtherCAT pins work
- OP-state reached
-
,Code:srv-actual-velocityetc. update correctlyCode:srv-cia-controlword
- BUT actual velocity always stays 0
- Servo enables and holds torque
- But no movement at all
- Homing → immediate following error
- MDI
→ following errorCode:G0 X50
- Trying as spindle (
) → same issueCode:M3 S1000
- target position
- target velocity
- target torque (CST also tested)
- additional manufacturer-specific objects
- a different operation mode (CSV instead of CSP?)
- special enable/transition sequence
- custom PDO mapping not included in the ESI
- LC10E, LC-EH or similar Chinese EtherCAT servos with LinuxCNC?
- CiA402 in CSP mode on these drives?
- CSV or PP mode with these drives?
- Custom PDO configuration?
- which PDOs are absolutely required for motion
- how to correctly modify
for this family of drivesCode:ethercat-conf.xml
MatthiasDeutsche VersionHallo zusammen,ich versuche derzeit, einen EtherCAT-Servotreiber (LC10E-Serie) mit LinuxCNC + LCEC + CiA402 in Betrieb zu nehmen.
Der Servo geht korrekt in den OP-Zustand, das Haltemoment ist da, aber er bewegt sich nicht.
Jeder Bewegungsbefehl (Homen oder G0/G1) führt sofort zu einem Schleppfehler.Hier eine vollständige Übersicht über alle bisher getesteten Schritte.System
- LinuxCNC 2.10~pre0, frisch installiert
- EtherCAT läuft
- Slave wird korrekt erkannt
- Servotreiber: LC10E-Serie
- XML erzeugt mit
Code:lcec_configgen
- CiA402 kompiliert und installiert
- Motorwelle wird gehalten
- Manuelles Verdrehen erzeugt Fehler → Feedback vorhanden
-
Code:lcec_configgen > ethercat-conf.xml
-
lädt Datei ohne FehlerCode:lcec_conf
-
listet alle PinsCode:halrun → show pin lcec
- CSP-Modus aktiviert:
Code:setp cia402.0.csp-mode 1
- Statusword, Controlword, Velocity verknüpft
- Nicht vorhandene Pins (z. B. actual-position) entfernt
- Typfehler bei
(bit vs u32) korrigiertCode:drv-fault
- Fehlerhafte nets entfernt
- OP-State erreicht
- EtherCAT-Pins aktiv
- Tatsächliche Geschwindigkeit bleibt immer 0
- Servo geht in Betrieb
- Homen → sofort Schleppfehler
- G0 X50 → sofort Schleppfehler
- Test als Spindel (M3 S1000) → ebenfalls keine Bewegung
- Soll-Geschwindigkeit
- Soll-Position
- Soll-Drehmoment
- spezielle PDO-Konfiguration
- CSV statt CSP
- zusätzliche Hersteller-Objekte
- besondere Freigabesequenz
- LC10E / LC-EH / vergleichbare Modelle
- CiA402 im CSP-Modus
- CSV / PP als Alternativen
- angepasstes PDO-Mapping
- Welche minimalen PDOs sind zwingend notwendig, damit Bewegung möglich ist?
Matthias
Please Log in to join the conversation.
11 months 2 weeks ago #338480
by Hakan
Replied by Hakan on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
I see there wasn't an "actual-position" pdo. There absolutely must be an actual-position PDO when using csp.
I think lcec_configgen didn't do a good job this time and maybe selected wrong PDOs.
There is a long thread about Lichuan LC10E and problems to get that to work.
On page 7 forum.linuxcnc.org/ethercat/52341-proble...rive?start=60#304887
they come to a working setup, a working ethercat-conf.xml
And when I look at it, it's just a standard setup with configurable PDOs, often used.
Combine the ethercat-conf.xml with the hal file from cia402 component github.com/dbraun1981/hal-cia402/blob/main/example/cia402.hal
and I think it should move.
I think lcec_configgen didn't do a good job this time and maybe selected wrong PDOs.
There is a long thread about Lichuan LC10E and problems to get that to work.
On page 7 forum.linuxcnc.org/ethercat/52341-proble...rive?start=60#304887
they come to a working setup, a working ethercat-conf.xml
And when I look at it, it's just a standard setup with configurable PDOs, often used.
Combine the ethercat-conf.xml with the hal file from cia402 component github.com/dbraun1981/hal-cia402/blob/main/example/cia402.hal
and I think it should move.
Please Log in to join the conversation.
11 months 1 week ago #338770
by aDm1N
Replied by aDm1N on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
The reference to the forum post was helpful. I now have the basic framework up and running. The servo, which is supposed to act as a spindle, is working to the point that it can be controlled with M commands, and the stepper driver (one driver for two closed-loop steppers) is also working. I've attached the files. More to come.
de.aliexpress.com/item/1005008271228331....gatewayAdapt=glo2deu
de.aliexpress.com/item/1005010098887410....gatewayAdapt=glo2deu
de.aliexpress.com/item/1005008271228331....gatewayAdapt=glo2deu
de.aliexpress.com/item/1005010098887410....gatewayAdapt=glo2deu
Please Log in to join the conversation.
11 months 1 week ago #338774
by Hakan
Replied by Hakan on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
Okay, so one drive is for a spindle?
I made an adaptation to the cia402 component for the driver to work in PV (Profile velocity) mode
which is better suited to run as spindle.
Check out here github.com/MetalMusings/cia402pv
This person made it work after a while forum.linuxcnc.org/38-general-linuxcnc-q...tor-as-spindle-motor
I made an adaptation to the cia402 component for the driver to work in PV (Profile velocity) mode
which is better suited to run as spindle.
Check out here github.com/MetalMusings/cia402pv
This person made it work after a while forum.linuxcnc.org/38-general-linuxcnc-q...tor-as-spindle-motor
Please Log in to join the conversation.
11 months 1 week ago #338921
by aDm1N
Replied by aDm1N on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
That worked well. Currently, I'm just testing that the electronics are working; the hardware isn't connected yet, so scaling isn't realistic. What is working is the C-axis and the M commands for spindle movement. The stepper motors are also moving as they should. There are still problems with the M19 command (the servo might be trying to reach a position too quickly, which isn't possible). I'm also checking that the C-axis is working reliably. Currently, there are still problems switching from M3 to S500 for a short time after the C-axis. The servo goes into overload because it seems to be trying to reach a position too quickly, which isn't possible.
Please Log in to join the conversation.
11 months 1 week ago #338959
by Hakan
Replied by Hakan on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
Interesting to see you switching between spindle and axis.
I wonder how it works with setting a position in PV mode.
Setting position and velocity at the same time, I am not sure that works.
I wonder how it works with setting a position in PV mode.
Setting position and velocity at the same time, I am not sure that works.
Please Log in to join the conversation.
11 months 1 week ago #338972
by aDm1N
Replied by aDm1N on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
Very short explanation of how PV ↔ CSP switching works:
Only one CiA-402 mode is active at any time.
In spindle mode (PV):
- The drive receives only target-velocity.
- HAL forces: pos-cmd = pos-fb (follow-mode).
- So the axis has no position error while the spindle is turning.
When switching to C-axis mode (CSP):
- HAL switches pos-cmd from “follow-mode” to the motion planner.
- Since pos-cmd == pos-fb at the moment of switching, there is no position jump and no torque spike.
Why this is valid:
- PV mode ignores position commands.
- CSP mode ignores velocity commands.
- Therefore the drive never receives conflicting commands.
- This fully complies with CiA-402 behavior.
Status:
This configuration has been tested electrically only.
The motors run and switch modes as expected, but the mechanical connection to the machine is not installed yet.
Only one CiA-402 mode is active at any time.
In spindle mode (PV):
- The drive receives only target-velocity.
- HAL forces: pos-cmd = pos-fb (follow-mode).
- So the axis has no position error while the spindle is turning.
When switching to C-axis mode (CSP):
- HAL switches pos-cmd from “follow-mode” to the motion planner.
- Since pos-cmd == pos-fb at the moment of switching, there is no position jump and no torque spike.
Why this is valid:
- PV mode ignores position commands.
- CSP mode ignores velocity commands.
- Therefore the drive never receives conflicting commands.
- This fully complies with CiA-402 behavior.
Status:
This configuration has been tested electrically only.
The motors run and switch modes as expected, but the mechanical connection to the machine is not installed yet.
Please Log in to join the conversation.
11 months 1 week ago #339037
by Hakan
Replied by Hakan on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
Did you also get the M19 and axis-to-spindle switch to work as you said there were some issues?
My first thought there was to just verify the drive is actually switching modes, you have the
opmode-display from lcec you can watch.
My first thought there was to just verify the drive is actually switching modes, you have the
opmode-display from lcec you can watch.
Please Log in to join the conversation.
11 months 1 week ago #339082
by aDm1N
Replied by aDm1N on topic EtherCAT + CiA402 Servo: OP-State erreicht, aber keine Bewegung – nur Following
Thanks for the hint regarding opmode-display — I verified that first.Here is the current, confirmed state of M19 and PV↔CSP mode switching:
1. M19 (verified)M19 currently does not produce any motion.
The orient component runs internally, but the LC20E does not react to the orientation command.
No errors are generated — simply no movement.This is the confirmed and reproducible behaviour.
(No assumptions about the cause.)
2. PV ↔ CSP mode switching (verified)The drive does switch modes correctly, which is confirmed via:
Switching between spindle mode (PV) and axis mode (CSP) is possible.However, the switching reliability depends on the drive state after M5.
3. Behaviour after M5 (verified)After stopping the spindle:
4. Safety logic (current state)I currently use safety conditions that require:
switching becomes possible earlier, even before the drift is fully gone.Therefore the switching problem is not fundamental —
it is tied to how strict the safety logic is while
is still changing.
5. axis.c.eoffset (verified)C-axis following via external offset works as intended:
This avoids position jumps when switching to CSP.
The only difficulty is that eoffset must follow the drift until the drive settles.
6. Next stepsTo improve switching reliability, I am looking at:
Summary (facts only)
1. M19 (verified)M19 currently does not produce any motion.
The orient component runs internally, but the LC20E does not react to the orientation command.
No errors are generated — simply no movement.This is the confirmed and reproducible behaviour.
(No assumptions about the cause.)
2. PV ↔ CSP mode switching (verified)The drive does switch modes correctly, which is confirmed via:
Code:
lcec.0.D1.opmode-display
3. Behaviour after M5 (verified)After stopping the spindle:
-
continues to drift for some timeCode:actual-position
-
andCode:pos_fbfollow this driftCode:axis.c.eoffset
- zero-speed becomes TRUE early, but the position is still changing
- CSP switching during this drift often causes a drive fault
4. Safety logic (current state)I currently use safety conditions that require:
- zero-speed = TRUE
- no position change during a short window
switching becomes possible earlier, even before the drift is fully gone.Therefore the switching problem is not fundamental —
it is tied to how strict the safety logic is while
Code:
actual-position
5. axis.c.eoffset (verified)C-axis following via external offset works as intended:
Code:
actual-position → degrees → eoffset
The only difficulty is that eoffset must follow the drift until the drive settles.
6. Next stepsTo improve switching reliability, I am looking at:
- refining the “stable position” detection
- adjusting the time window or allowed variation
- possibly applying a controlled zero-velocity ramp before switching
- or any CiA402 hints to get the LC20E into a stable hold state sooner
Summary (facts only)
- M19: no movement from the drive (verified)
- Mode switching: works and the drive changes operation modes correctly
- Switching is reliable once the post-M5 drift has stopped
- Stricter switching rules block early switching
- More permissive switching rules allow earlier switching
- opmode-display confirms correct mode transitions
- The remaining issue is the LC20E’s long settling period after stopping the spindle
Please Log in to join the conversation.
11 months 1 week ago #339091
by aDm1N
Replied by aDm1N on topic EtherCAT + CiA402 Servo: OP state reached, but axis won’t move (only Following E
Since a servo drive is generally very well suited for use as a C-axis — because of its precise positioning capabilities, torque at low speed and built-in encoder feedback — it would be highly beneficial to find a reliable solution for the remaining PV → CSP switching behaviour.If this last issue can be solved in a practical and reproducible way, the same hardware could be used both as a high-speed spindle and as a fully functional C-axis, which would make this setup useful for many other users as well.Any insights or suggestions that could help move in this direction are therefore very welcome.
Please Log in to join the conversation.
Time to create page: 0.251 seconds
