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:
Code:
lcec.0.D1.opmode-display
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:
-
continues to drift for some time
-
and
follow this drift
- zero-speed becomes TRUE early, but the position is still changing
- CSP switching during this drift often causes a drive fault
This post-M5 settling is the core issue.
However, switching is possible if you wait until the drift has fully settled.Once the position stops changing, CSP can be enabled without a fault.So the mode switching itself works — the problem is only the time it takes for the LC20E to reach a stable state.
4. Safety logic (current state)I currently use safety conditions that require:
- zero-speed = TRUE
- no position change during a short window
With these checks, switching is reliable as soon as the drift has stopped.If the safety thresholds are made more permissive (larger allowed 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
is still changing.
5. axis.c.eoffset (verified)C-axis following via external offset works as intended:
Code:
actual-position → degrees → eoffset
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:
- 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
Any hints or experience with LC20E behaviour after M5 or with CiA402 PV→CSP transitions would be very helpful.