- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Technical questions about CIA402 and homecomp.comp on A6
Technical questions about CIA402 and homecomp.comp on A6
- Marcos DC
-
- Offline
- Junior Member
-
Less
More
- Posts: 37
- Thank you received: 21
16 Feb 2026 00:45 #343035
by Marcos DC
Replied by Marcos DC on topic Technical questions about CIA402 and homecomp.comp on A6
From what I understand, the immediate goal here is to get the A6 working reliably, and for that it makes a lot of sense to tailor the logic to what this specific drive exposes in 0x6040/0x6041. In that context, taking an SCL-style example and adapting it is a very pragmatic approach.
I also agree that the resync problem itself is exactly what homecomp is trying to solve. During internal CiA-402 homing the drive moves on its own, so LinuxCNC needs a way to keep pos_cmd in sync with pos_fb or to resynchronize cleanly afterwards to avoid the jump / E87.1. So the mechanism for handling this is already there.
Where I think we just need to be a bit careful (based on the docs and on what’s described in this thread) is mainly in the integration details:
1) The actual semantics of the homing bits.
Yes, 0x6040/0x6041 are standardized for the basic FSA, but in practice the homing-related bits are OMS / manufacturer-specific. Bosch uses 10/12/13 in a very clean and well-documented way, but Lichuan, for example, documents “origin found” on bit 15 and leaves 12/13 as “mode specific”. So for the A6, it probably makes sense to first confirm which bits really indicate “in progress / done / error” and then wire exactly those into homecomp.
2) When exactly the resync should happen.
homecomp provides the mechanism, but it still depends on being told when homing is active, when it is finished, and when it failed. If those signals come from bits that don’t quite match the drive’s real behavior, the resync may simply happen at the wrong time. So the key part here is just making sure the drive-specific semantics are mapped correctly.
3) Details like how “start homing” is triggered (pulse vs level, required preconditions, etc.) also tend to be drive-specific and are probably best verified on the A6 itself.
So I think we’re actually pretty close in approach: for the A6, observing the bits during a home run and adapting the logic accordingly sounds like the right next step. My only point is that the state machine itself is the easy part — the main work is just confirming the drive’s real homing semantics and hooking those cleanly into homecomp so everything stays consistent.
I also agree that the resync problem itself is exactly what homecomp is trying to solve. During internal CiA-402 homing the drive moves on its own, so LinuxCNC needs a way to keep pos_cmd in sync with pos_fb or to resynchronize cleanly afterwards to avoid the jump / E87.1. So the mechanism for handling this is already there.
Where I think we just need to be a bit careful (based on the docs and on what’s described in this thread) is mainly in the integration details:
1) The actual semantics of the homing bits.
Yes, 0x6040/0x6041 are standardized for the basic FSA, but in practice the homing-related bits are OMS / manufacturer-specific. Bosch uses 10/12/13 in a very clean and well-documented way, but Lichuan, for example, documents “origin found” on bit 15 and leaves 12/13 as “mode specific”. So for the A6, it probably makes sense to first confirm which bits really indicate “in progress / done / error” and then wire exactly those into homecomp.
2) When exactly the resync should happen.
homecomp provides the mechanism, but it still depends on being told when homing is active, when it is finished, and when it failed. If those signals come from bits that don’t quite match the drive’s real behavior, the resync may simply happen at the wrong time. So the key part here is just making sure the drive-specific semantics are mapped correctly.
3) Details like how “start homing” is triggered (pulse vs level, required preconditions, etc.) also tend to be drive-specific and are probably best verified on the A6 itself.
So I think we’re actually pretty close in approach: for the A6, observing the bits during a home run and adapting the logic accordingly sounds like the right next step. My only point is that the state machine itself is the easy part — the main work is just confirming the drive’s real homing semantics and hooking those cleanly into homecomp so everything stays consistent.
The following user(s) said Thank You: andrax
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11712
- Thank you received: 3963
16 Feb 2026 10:23 #343043
by rodw
Sorry but I am flat out on other projects right now!
Replied by rodw on topic Technical questions about CIA402 and homecomp.comp on A6
Of course, that is supported. I wanted to do this with #if debug statements but it is not possible to insert such statements before the pins so I had to also include some comments to put them in or out.I have an idea.
rodw: Can you make the bits from 0x6041 available as pins?
Then we can observe the bits during the home run.
If we know which bit is set when, the state machine could be set up accordingly.
Sorry but I am flat out on other projects right now!
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Technical questions about CIA402 and homecomp.comp on A6
Time to create page: 0.203 seconds