Separating CiA402 Logic from EtherCAT (lcec): Modular Adapter + Drive Stub Valid

More
7 months 4 weeks ago #343772 by Marcos DC
Quick progress update on this project.

The CiA402 semantic layer has now been fully validated in pure HAL + AXIS SIM.

Current validated behavior:

- Clean separation between PDS state machine and opmode modules
- Deterministic controlword composition (no 6040 ambiguity)
- 6060/6061 handshake confirmed
- Mask/value based statusword evaluation
- Operation Enabled gating exposed as a hard industrial gate
- Fault injection during active homing:
-> immediate abort
-> op-enabled cleared
-> no false “done”
-> clean fault-reset return to OE

All of this is transport-agnostic and does not depend on LCEC or EtherCAT internals.

The next planned step is extending this architecture to dual-axis gantry / squaring validation in SIM, keeping CiA402 logic fully modular.

At this stage I do not have EtherCAT hardware available.
If someone with LCEC + CiA402 hardware would be willing to test the modular stack on real drives, I can prepare:

- Clean HAL example configuration
- Minimal README
- Reproducible test steps
- Fault and homing test scenarios

The goal is to validate that the semantic layer behaves identically when replacing the stub with real PDOs.

Feedback on the gantry direction is also welcome before I proceed further.
The following user(s) said Thank You: NWE

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago #343774 by Hakan
I know it's a step to include motion/motmod.
Linuxcnc should be in charge of the movements, that's the whole point.
Motion should do the the homing, and control it (as best as it can).
Motion should also make possible to switch an joint from axis to spindle. 
Or make possible to use EtherCAT probing.
We don't need to invent crazy situations, but the common ones.

What we do now with these components, homecomp, etc and I have done one myself
for Profile Velocity for spindle, is to have the component decouple the real position from motion
and then re-couple it. The right thing to do would be to have motion handle all motions.

I don't expect you to go that route. I just raise the thought.

 

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago #343781 by Marcos DC
I understand your point about motion being the proper authority for movements.

My current focus is strictly on validating a clean and deterministic CiA402 semantic layer in isolation, before going into deeper motion integration discussions.

As suggested earlier, I think a dedicated thread about motion/motmod integration would be better for that architectural direction.

For now, I will proceed with the next step: extending this modular CiA402 stack toward dual-axis gantry/squaring validation in SIM.

Once the semantic layer is stable and multi-axis behavior is validated, it should be easier to explore tighter motion integration if needed.

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago #343803 by NWE

If someone with LCEC + CiA402 hardware would be willing to test the modular stack on real drives, I can prepare:

- Clean HAL example configuration
- Minimal README
- Reproducible test steps
- Fault and homing test scenarios


 
I currently have a Lichuan model OL57E-4A 4-axis drive and a Stepperonline model A6-750EC 750 watt servo drive set up on the workbench for testing, I can connect homing and limit switches without too much trouble.
Both are LCEC + CiA402.
The Lichuan manual is available here:  git.gitcoding.net/nwe/lcec_4x_stepper/src/branch/main/manual
The Stepperonline manual is  here .

I'd be willing to test drive your config. It might be a couple days till I find time.

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago #343826 by Marcos DC
Hi nwe,

That would be extremely helpful, thank you for offering to test.

No rush at all if it takes a couple of days — I will actually be working in the field for the next two days doing maintenance for a client. When I get back, I plan to implement the safety gate component and the decouple/recouple logic, so the timing works out well.

To prepare proper adapter templates for your two drives (the Lichuan OL57E-4A and the Stepperonline A6-750EC), I just need a few details from your setup so I can map the HAL pins correctly.

If possible, could you share:
1. Your LCEC configuration
• lcec.conf (or equivalent configuration file)
• The EtherCAT XML/ENI if you have it
• Or a snippet of the HAL where the lcec.* pins for the drives appear
2. PDO mapping
I mainly need to confirm the HAL pins for the standard CiA402 objects:
• 6040 Controlword
• 6041 Statusword
• 6060 Modes of Operation (command)
• 6061 Modes of Operation Display
If available in PDO as well:
• 6064 Position Actual Value
• 607A Target Position
3. Homing
• Which homing method (object 6098) you plan to use
• Whether the homing/limit switches are connected to the drive inputs
• The HAL pin names for those inputs (for example lcec.*.din-*)
4. Quick Stop
• Is Quick Stop (Controlword 0x0002) configured and usable on these drives?
• Or do they require a different shutdown sequence?
5. Anything unusual
• Any known quirks with enable, fault reset, or homing behavior.

With that information I can prepare two adapter templates (one for each drive) that plug into the CiA402 semantic layer we validated in simulation.

Thanks again for offering to test — having real hardware feedback will be extremely valuable.

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago - 7 months 4 weeks ago #343829 by Himarc3D
Last edit: 7 months 4 weeks ago by Himarc3D.

Please Log in or Create an account to join the conversation.

Time to create page: 0.124 seconds
Powered by Kunena Forum