CiA 402 Folder Missing

More
10 Mar 2026 07:57 #344083 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
About the cia402.0.pos-scale, I wrote 100 000 to just start with some value. My encoders are 23bit, therefore 8 388 608 pulses per motor revolution. On my current plasma machine I have a 1:10 planetary gearbox that I plan to use when I upgrade the machine motors to servo motors and LinuxCNC. The rack gear pitch diameter is 50 mm, therefore the circumference is 157.07963267949 mm. This the linear distance that the axis will travel for 1 revolution of the rack gear or 10 revolutions of the motor.

Therefore the cia402.0.pos-scale = ((encoder res * gear ratio)/distance per rev). I am not sure what value I should use for distance per rev - is it the linear distance per the rack gear revolution or the linear distance per motor revolution(that is linear distance per rack gear revolution / gear ratio)?

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

More
10 Mar 2026 10:59 #344085 by Hakan
Replied by Hakan on topic CiA 402 Folder Missing
It is encoder pulses per mm, maybe your value isn't far off then.
It is suspicious if it start moving very fast. Use halshow to look at the
variables between cia402 and lcec and see if they look ok in size,
moves when they should etc.

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

More
11 Apr 2026 15:38 #345419 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
The topic was not updated for a long time. I was trying to get the servo drives work with LinuxCNC and at one point I decided to start from scratch. Now my configuration is with only one servo drive. I managed to get the homing on index pulse working to a certain extent. The problem is when the servo is far from the index pulse, LinuxCNC gives "joint 0 following error". The servo keeps moving but LinuxCNC is disabled. For a successful homing, the motor should close to the index pulse. What is causing the following error? I attached the configuration files. By the way, the homing components used is the standard "homemod".

The "sudo dmesg" command shows warnings about datagram unmatched, time out and slave sync. The tried writing to 1C12:001 and 1C13:001 from the command line but it returns an unknown error "SDO transfer aborted with code 0x06010003". Using the attaced .xml file, when reading 1C12:001 and 1C13:001 from command line, it returns that the PDO mapping is flexible.
Attachments:

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

More
12 Apr 2026 14:06 #345449 by andrax
Replied by andrax on topic CiA 402 Folder Missing
Your ethercat.xml file is completely wrong.
The errors are pointing that out to you.
[290201.755307] EtherCAT ERROR 0-0: SDO upload 0x1A01:00 aborted.
[290201.755312] EtherCAT ERROR 0-0: SDO abort message 0x06020000: “This object does not exist in the object directory”.
[290201.755314] EtherCAT ERROR 0-0: Failed to read number of mapped PDO entries.
[290201.755315] EtherCAT ERROR 0-0: Failed to read mapped PDO entries for PDO 0x1A01.

You had already created the correct XML file. Take another look at your pdos.txt and compare it with the ethercat.xml.
This is what should be in your XML:
RxPDO 0x1701 “RxPDO”
    PDO entry 0x6040:00, 16 bit, “ControlWord”
    PDO entry 0x607a:00, 32 bits, “Target position”
    PDO entry 0x60b8:00, 16 bits, “Touch probe function”
    PDO entry 0x6060:00, 8 bits, “Modes of operation”
  TxPDO 0x1b01 “TxPDO”
    PDO entry 0x603f:00, 16-bit, “Error Code”
    PDO entry 0x6041:00, 16-bit, “statusWord”
    PDO entry 0x6064:00, 32-bit, “Position actual value”
    PDO entry 0x6077:00, 16 bits, “Torque actual value”
    PDO entry 0x60f4:00, 32 bits, “Following error actual value”
    PDO entry 0x6061:00,  8 bits, “Modes of operation display”

You can start by setting it up for one axis.
Once you no longer see any errors in dmesg, you can continue.

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

More
12 Apr 2026 15:29 - 12 Apr 2026 15:39 #345454 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
@andrax
I figured it out, my mistake, I wrote the SDO object wrong and after trying many different ways to get it working. Now I just want to verify that my "sudo dmesg" is ok. What I did is I rebooted the computer and the drive. Attached is the last output and the lines after 64.544984 were shown after LinuxCNC was started.
I observe two error but do not know if they affect LinuxCNC and EtherCAT:
[ 10.914651] hp_bioscfg: Unable to set BIOS settings on HP systems
[ 20.801703] ec_generic: Binding socket to interface 2 (eno1).
The problem is that I do not know how the "sudo dmesg" output is supposed to look when no errors.
The .xml file is fixed and I decided to use the variable PDO mapping object - 0x1600 and 0x1A00. I check with "ethercat upload" and it seems that the SDOs are set as intended. Attached are the .xml and .hal files. 

EDIT: I want to add that when I close the LinuxCNC and open it again there is a different output after "sudo dmesg". Attached is a file. An error appears:
[ 1191.146371] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
Attachments:
Last edit: 12 Apr 2026 15:39 by Konstantin.

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

More
13 Apr 2026 16:32 #345506 by andrax
Replied by andrax on topic CiA 402 Folder Missing
That looks good.
The error is normal; it happens when LinuxCNC shuts down.
Can you move the axis in jog mode without any problems?
If so:
You now have two options. Connect the remaining axes and use the CIA402 homing.
Note: Prone to errors with gantry setups
or
Use the LinuxCNC homing. However, this is significantly less accurate.

If there are battery-powered encoder cables available for your servos,
install them, and you’ll save yourself the homing process and avoid any further trouble.

 

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

More
18 Apr 2026 15:56 #345702 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Thank you, andrax. It seems that the absolute encoder would be a good solution and perhaps using them will prevent any homing failure. The batteries are installed in the boxes of each servo. From the servo manual, the default home offset is 0. Therefore this should be the absolute homing position that the servo knows about - 0x6064 should be around 0 or 2^32. When I execute a home procedure in LinuxCNC, the 0x6064h is indeed around 0, I check it via "ethercat upload" terminal command. Then I close and start LinuxCNC again and the motor does not arrive in the same position as the previous execution of homing. There is a different value on the axis/joint DRO. This is my joint configuration:
[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 5000.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
# is this applicable for ethercat????
#STEPGEN_MAXVEL = 1250
#STEPGEN_MAXACCEL = 50000
SCALE = 1
FERROR = 200
MIN_FERROR = 100
MIN_LIMIT = -1
MAX_LIMIT = 1200
HOME = 0.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = FALSE
HOME_SEQUENCE = 0
HOME_ABSOLUTE_ENCODER = 1

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

More
19 Apr 2026 07:45 #345721 by andrax
Replied by andrax on topic CiA 402 Folder Missing

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

More
20 Apr 2026 19:06 - 20 Apr 2026 19:06 #345783 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Hello andrax,

I tried to follow your guide but still getting .hal file error for missing pins.
I ran LinuxCNC from terminal and it outputs that the HomeComp started.
Then the terminal reports that pins "joint.0.request-cia-homing" and "start-cia-homing" are not found.
Last edit: 20 Apr 2026 19:06 by Konstantin.

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

More
21 Apr 2026 10:26 #345801 by andrax
Replied by andrax on topic CiA 402 Folder Missing
At what stage are you?

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

Time to create page: 0.102 seconds
Powered by Kunena Forum