Setting up the Stepperonline A6 battery encoder cable

  • andrax
  • andrax's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
06 Mar 2026 17:29 - 06 Mar 2026 17:32 #343947 by andrax
Hello everyone,

As most of you know, Stepperonline A6 servos have 17-bit multiturn encoders. 
Encoder cables with battery boxes are also available for these servos. The cables are supplied with batteries.
When these cables are used, the servos become multi-turn absolute value encoders and the reference run is no longer necessary.

Here is a step-by-step guide on how to set up the servos after installing the cables.

1. Switch on the servo.
2. Set parameter C00.07 > 2 (linear mode, absolute position).
3. The servo displays error ER20.8.
4. Set parameter F31.10 > 4.
5. Switch the servo off and on again.
6. Perform a reference run.
7. The .hal and .ini files must be adjusted.

I recommend commenting out the relevant sections.

HAL:
remove or  recommend commenting from all joints: 
 => cia-statusword
and remove or  recommend commenting section #CIA Custom Homing

INI:
remove or  recommend commenting
[EMCMOT]
# HOMEMOD=cia402_homecomp

[JOINT]
HOME_ABSOLUTE_ENCODER     = 2
HOME             = 0
HOME_OFFSET         = 0 
HOME_SEQUENCE         = 0
HOME_SEARCH_VEL     = 0 
HOME_LATCH_VEL         = 0
HOME_IGNORE_LIMITS    = YES

# only for homing
#HOME                 = 0
#HOME_OFFSET             = 0.0
#HOME_SEQUENCE             = 2                 
#HOME_SEARCH_VEL        = 1
#HOME_LATCH_VEL            = 1
#HOME_IGNORE_LIMITS        = YES
#CIA402_HOMING_ENABLED         = 1
#CIA402_HOMING_METHOD        = 4
#CIA402_HOMING_SEARCH_VELOCITY    = 300000
#CIA402_HOMING_LATCH_VELOCITY    = 30000
#CIA402_HOMING_ACCELERATION    = 131072

Now, all you have to do is press the home button after switching on the machine, and all axes are immediately referenced.

That's it.

 
Attachments:
Last edit: 06 Mar 2026 17:32 by andrax.
The following user(s) said Thank You: grandixximo, tommylight, rodw, spumco

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

More
01 Jun 2026 15:36 #346844 by spumco
@andrax,

Thank you for posting the A6 encoder and homing information - very helpful.

If you don't mind, I have a few questions directly related to your post:
  • Step 6 - I assume you mean trigger the drive's internal homing routine, yes?
    • If so, what homing method (of the 33 available) did you select?
      • Reviewing your HAL file, it appears you have a home switch connected to one of the drive's built-in input pins - is that what you used to home the servo?
      • How did you trigger the drive's homing routine?
    • If not, can you clarify "perform a reference run"
  • Step 7 - do you mean adjust HAL and INI files as you've described in your post, or some other adjustment?
    • Maybe once the servo is homed, you calculate the joint/axis max & min limits and put that in the INI file?
  • XML file - can you post your xml file please?
    • That would help me, and perhaps others, understand the various lcec pins in your HAL file
Again, thanks very much for assisting the LCNC community.
The following user(s) said Thank You: tommylight

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

  • andrax
  • andrax's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
03 Jun 2026 08:37 #346868 by andrax
Hi,

Yes, the internal homing routine needs to be triggered one more time; after that, the axes will remain permanently referenced.
I am using internal homing method 4.
Once that is complete, you can comment out or delete everything related to homing.
My home and limit switches run via EtherCAT. This allows me to save a significant amount of cabling.
My XML file is nothing special.
Attachments:
The following user(s) said Thank You: spumco

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

More
04 Jun 2026 02:01 - 04 Jun 2026 03:11 #346889 by fer662
I'm afraid i've got about the same questions as spumco and then some. I got the cables with the batteries installed today and followed your process, changed the config on each of the drives via the physical buttons and updated the relevant parts of the ini. I hadn't set up homing in any particular way before so i didn't have any of the stuff you commented in the hal file, though i was able to trigger homing and they would reference correctly against the inductive sensors even without any special config in the hal.
It'd seem like when i start linuxCNC the axis start on random positions. I get out of range errors if i try to home as is, and if i jog them into range and home after, i usually get amplifier faults. Am i misunderstanding what you mean by reference run? is there somewhere else in the drive's software where the homing needs to be triggered?

Besides that, my kinematics are the same as yours, with dual Y drives, and i'm wondering how gantry squaring works in this mode.

Edit: Ok, i think i sort of understand now, the config you have commented afterwards, you do need for the initial setup. However, where is request-cia-homing and start-cia-homing coming from? github.com/rodw-au/cia402_homecomp uses different names, not sure if what you're using is equivalent. I'm trying to get the initial config to get the homing done before turning off all the config now.
Last edit: 04 Jun 2026 03:11 by fer662.

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

  • andrax
  • andrax's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
04 Jun 2026 11:39 #346895 by andrax
Hold on—you need to make a distinction.
There are two fundamental homing methods:
1. LinuxCNC Homing
2. CiA-402 Homing using the CIA402_home_comp.
Your machine should first be running entirely under EtherCAT. The internal servo homing using CIA402_home_comp.comp should function without any issues.
Only then can you proceed to implement the topic discussed here.

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

More
04 Jun 2026 13:08 #346897 by fer662
Yes, I get that, but it seems you're using a different version of CIA402_home_comp than the one i posted there. Which one is it? I have everything working in the ethercat setup but the homing was the regular one.

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

  • andrax
  • andrax's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
04 Jun 2026 16:56 - 04 Jun 2026 16:57 #346900 by andrax
Oh, right,
I use the CIA402 and CIA402_homecomp by Colin Bardini. It works very well on XYZ machines.
However, there are generally issues with XYYZ machines.
It can happen that during homing, only one gantry axis moves. The other one stays still or starts moving late. It’s a known issue. 
@Marcos DC has taken on the problem. The current status of the work is unknown.
forum.linuxcnc.org/ethercat/58592-cia402...ation-easier-debuggi
There may also be issues with jitter.
Read more here:
forum.linuxcnc.org/ethercat/58103-ethercat-random-jitter-fix
@rodw has already incorporated all of this into his repositories and created installation instructions. I can’t find the link right now.

regards

andrax
Attachments:
Last edit: 04 Jun 2026 16:57 by andrax.

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

Time to create page: 0.496 seconds
Powered by Kunena Forum