CiA 402 Folder Missing
- Konstantin
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
04 Mar 2026 16:20 - 04 Mar 2026 16:29 #343849
by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
@andrax
How do you know that the vid and pid are wrong? I have set them in the .xml file as per the manufacturer .xml when I created the configuration. Attached is the .xml file.
The "dmesg | grep ethercat" still does not seem to work, I executed the command sequence you posted and it just outputs a new row in the terminal.
I am still unaware why the synchronization error keeps appearing, cables are changed and I also have grounding on the metal parts of the bench.
Perhaps, there are some settings in the servo itself that need to be configured. I still think about the fixed and variable PDO mapping, if it could be the reason for this behaviour. There is a warning that says - 1 datagram UNMATCHED!.
How do you know that the vid and pid are wrong? I have set them in the .xml file as per the manufacturer .xml when I created the configuration. Attached is the .xml file.
The "dmesg | grep ethercat" still does not seem to work, I executed the command sequence you posted and it just outputs a new row in the terminal.
I am still unaware why the synchronization error keeps appearing, cables are changed and I also have grounding on the metal parts of the bench.
Perhaps, there are some settings in the servo itself that need to be configured. I still think about the fixed and variable PDO mapping, if it could be the reason for this behaviour. There is a warning that says - 1 datagram UNMATCHED!.
Last edit: 04 Mar 2026 16:29 by Konstantin.
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 251
- Thank you received: 61
04 Mar 2026 17:44 - 04 Mar 2026 17:46 #343857
by andrax
Replied by andrax on topic CiA 402 Folder Missing
Sorry, my mistake, I misread something.
Your sync errors are gone.
But there is another problem,
Your output ethercat pdos:
[/code]
[/code]
[/code][/code]
Your sync errors are gone.
But there is another problem,
Your output ethercat pdos:
[code] RxPDO 0x1701 "RxPDO"
PDO entry 0x6040:00, 16 bit, "ControlWord"
PDO entry 0x607a:00, 32 bit, "Target position"
PDO entry 0x60b8:00, 16 bit, "Touch probe function"
PDO entry 0x6060:00, 8 bit, "Modes of operation"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
SM3: PhysAddr 0x1400, DefaultSize 15, ControlRegister 0x20, Enable 1
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 bit, "Torque actual value"
PDO entry 0x60f4:00, 32 bit, "Following error actual value"
PDO entry 0x6061:00, 8 bit, "Modes of operation display"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"
PDO entry 0x0000:00, 0 bit, "Gap"Your XML:[code][code]<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="control-word" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="control-mode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<pdoEntry idx="607C" subIdx="00" bitLen="32" halPin="home-offset" halType="s32"/>
<pdoEntry idx="6098" subIdx="00" bitLen="8" halPin="homing-method" halType="s32"/>
<pdoEntry idx="6099" subIdx="01" bitLen="32" halPin="homing-high-velocity" halType="u32"/>
<pdoEntry idx="6099" subIdx="02" bitLen="32" halPin="homing-low-velocity" halType="u32"/>
<pdoEntry idx="609A" subIdx="00" bitLen="32" halPin="homing-acceleration" halType="u32"/>[/code]
[code]The addresses are missing in the pdos, which is apparently why the errors occur.
However, the addresses are found in the sdos.
I don't know if they need to be configured manually. What does the manual say?
Last edit: 04 Mar 2026 17:46 by andrax.
Please Log in or Create an account to join the conversation.
- Konstantin
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
05 Mar 2026 17:15 - 05 Mar 2026 17:18 #343903
by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Perhaps, I found out what is happening to the drives. I read the PDO mapping part of the manual again and it seems that the PDO mapping objects - 1C12h(RxPDO) and 1C13h(TxPDO) are set to some default values. The PDO mapping cannot be saved in the EEPROM of the drive and therefore the master needs to set the desired mapping in the PREOP state of the drive every time when the drives are powered on.
The output in terminal that show "Gap" in PDO entry is because there is no object mapped to that free slot - PDO mapping is set to fixed. Here is the PDO mapping part of the manual. It can be seen that 1C12h should be set to 1600h and 1C13h should be set to 1A00h to activate the variable PDO mapping.
Attached is the PDO mapping objects description from the manual and it shows that they expect data type of ARR(perhaps array). Apparently, LinuxCNC EtherCAT master should define a variable PDO mapping and what objects to include in the mapping.
In my opinion, the PDO mapping should be defined in the .hal file or create a script that executes once when the EtherCAT master detects slaves, similar to the first scan bit of a PLC.
The output in terminal that show "Gap" in PDO entry is because there is no object mapped to that free slot - PDO mapping is set to fixed. Here is the PDO mapping part of the manual. It can be seen that 1C12h should be set to 1600h and 1C13h should be set to 1A00h to activate the variable PDO mapping.
Attached is the PDO mapping objects description from the manual and it shows that they expect data type of ARR(perhaps array). Apparently, LinuxCNC EtherCAT master should define a variable PDO mapping and what objects to include in the mapping.
In my opinion, the PDO mapping should be defined in the .hal file or create a script that executes once when the EtherCAT master detects slaves, similar to the first scan bit of a PLC.
Last edit: 05 Mar 2026 17:18 by Konstantin.
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 251
- Thank you received: 61
05 Mar 2026 20:47 #343920
by andrax
Replied by andrax on topic CiA 402 Folder Missing
No, you just adjust the servo and the ethercat master and your ethercat.xml take care of the rest.
Please Log in or Create an account to join the conversation.
- Konstantin
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
06 Mar 2026 05:25 #343928
by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
But I cannot define PDO mapping in the drive itself. The control device i.e. the EtherCAT master should write the PDO mapping on startup.
I found a few ways of defining the SDO in drive from LinuxCNC - sdoconfig and initcmds.
What do you mean by adjusting the servo?
I found a few ways of defining the SDO in drive from LinuxCNC - sdoconfig and initcmds.
What do you mean by adjusting the servo?
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 251
- Thank you received: 61
06 Mar 2026 08:26 #343933
by andrax
Replied by andrax on topic CiA 402 Folder Missing
You wrote:
“It can be seen that 1C12h should be set to 1600h and 1C13h should be set to 1A00h to activate the variable PDO mapping.”
Set this if possible. Lcec will take care of the rest when linuxcnc starts up and set the correct addresses on the servo. This is the same for Stepperonline servos.
You will then see the correct assignment when linuxcnc is running. If not, you may have to set the assignment in the servos manually.
“It can be seen that 1C12h should be set to 1600h and 1C13h should be set to 1A00h to activate the variable PDO mapping.”
Set this if possible. Lcec will take care of the rest when linuxcnc starts up and set the correct addresses on the servo. This is the same for Stepperonline servos.
You will then see the correct assignment when linuxcnc is running. If not, you may have to set the assignment in the servos manually.
Please Log in or Create an account to join the conversation.
- Konstantin
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
08 Mar 2026 15:23 - 09 Mar 2026 16:47 #344027
by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
I was trying the entire weekend to make the drives work but still no success. Basically I started from scratch and cloned "linux-cia402" from RodW github page. Then executed "ethercat pdos" and the drives return PDO mapping 1701h and 1B01h. Next, following the manual and the mapping for 1701h and 1B01h, I wrote the .xml and .hal files. In the .xml file, I tried to set the data type for each pin as per the manual but the lcec components does not like s16, u16 and u8, anyway I changed them to s32. LinuxCNC opens and loads the configuration but when I try to home, a following error occurs.
In the terminal I observed a weird output when execute "ethercat pdos" after LinuxCNC has started - there is no names on the right of the PDOs, look at the attached pdos.txt file.
Also the synchronization error and 1 datagram unmatached warning appeared again.
In the beginning of the .xml file I tried to set the PDO mapping using "sdoconfig" but it does not seem to help either.
In the terminal I observed a weird output when execute "ethercat pdos" after LinuxCNC has started - there is no names on the right of the PDOs, look at the attached pdos.txt file.
Also the synchronization error and 1 datagram unmatached warning appeared again.
In the beginning of the .xml file I tried to set the PDO mapping using "sdoconfig" but it does not seem to help either.
Last edit: 09 Mar 2026 16:47 by Konstantin.
Please Log in or Create an account to join the conversation.
- 0x2102
-
- Offline
- Elite Member
-
Less
More
- Posts: 222
- Thank you received: 86
08 Mar 2026 15:43 - 08 Mar 2026 15:50 #344028
by 0x2102
Replied by 0x2102 on topic CiA 402 Folder Missing
Never mind.
Attachments:
Last edit: 08 Mar 2026 15:50 by 0x2102.
Please Log in or Create an account to join the conversation.
- Konstantin
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
10 Mar 2026 05:23 #344079
by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
I talked to the manufacturer of the drives and they told me that the PDO mapping should be set in the control device on each start of the machine.
With the above mentioned configuration I tested the homing and it seems the motor find the index pulse but then it starts rotating very fast and following error is reported.
But the synchronization error is still present.
With the above mentioned configuration I tested the homing and it seems the motor find the index pulse but then it starts rotating very fast and following error is reported.
But the synchronization error is still present.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1313
- Thank you received: 450
10 Mar 2026 06:22 #344081
by Hakan
Replied by Hakan on topic CiA 402 Folder Missing
Initcmds can be used to set a configuration at startup github.com/linuxcnc-ethercat/linuxcnc-et...er/examples/initcmds
your cia402.0.pos-scale is very large. Double-check that one.
Set a negative value for refClockSyncCycles="–1", that switches on the PLL to synchronize
servo loop with DC clock. You also have "did not sync in 5000 cycles" in dmesg. I have no
good way of fixing that, eventually the drives will sync their time though.
your cia402.0.pos-scale is very large. Double-check that one.
Set a negative value for refClockSyncCycles="–1", that switches on the PLL to synchronize
servo loop with DC clock. You also have "did not sync in 5000 cycles" in dmesg. I have no
good way of fixing that, eventually the drives will sync their time though.
Please Log in or Create an account to join the conversation.
Time to create page: 0.504 seconds