xml and hal - I am lost
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
06 Jun 2025 12:46 #329809
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
You were right: The servo had a slave id o as well as the ek1100. I fixed that. The error msg seems to stay the same.
wopass: load_the_modules cmd=<orig_loadrt lcec>
waitpid failed /usr/bin/rtapi_app lcec
/usr/bin/rtapi_app exited without becoming ready
insmod for lcec failed, returned -1
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7f3c65f33c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7f3c66e4d050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7f3c65ef752f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7f3c65f34f38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x5595ad189cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x5595ad18a62e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x5595ad18ac2c]
7 /usr/bin/rtapi_app(+0xc974) [0x5595ad185974]
8 /usr/bin/rtapi_app(main+0x70f) [0x5595ad18544f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7f3c66e3824a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f3c66e38305]
11 /usr/bin/rtapi_app(_start+0x21) [0x5595ad185861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready.Waited 3 seconds for master. giving up.
Note: Using POSIX realtime
5660
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
lcec: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
motmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
trivkins: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
homemod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
tpmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
<commandline>:0: unloadrt failed
Note: Using POSIX realtime
This is what dmesg shows:
[ 4.277444] ec_master: loading out-of-tree module taints kernel.
[ 4.277719] ec_master: module verification failed: signature and/or required key missing - tainting kernel
[ 4.314529] EtherCAT: Master driver 1.6.4 1.6.4.g703b611-1+17.2
[ 4.314659] EtherCAT: 1 master waiting for devices.
[ 4.337595] ec_generic: EtherCAT master generic Ethernet device module 1.6.4 1.6.4.g703b611-1+17.2
[ 4.337610] EtherCAT: Accepting A0:36:9F:47:90:13 as main device for master 0.
[ 4.337624] ec_generic: Binding socket to interface 2 (enp2s0).
[ 4.360462] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 4.510128] NET: Registered PF_QIPCRTR protocol family
[ 6.785160] igb 0000:02:00.0 enp2s0: igb: enp2s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[ 6.785464] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[ 6.792420] EtherCAT 0: Link state of ecm0 changed to UP.
[ 6.804450] EtherCAT 0: 8 slave(s) responding on main device. Re-scanning on next possibility.
[ 6.804453] EtherCAT 0: Slave states on main device: PREOP.
[ 6.804454] EtherCAT 0: Re-scanning now.
[ 6.804968] EtherCAT 0: Scanning bus.
[ 7.713258] e1000e 0000:00:1f.6 enp0s31f6: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 7.713306] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes ready
[ 8.683950] EtherCAT 0: Bus scanning completed in 1876 ms.
[ 8.683953] EtherCAT 0: Using slave 0 as DC reference clock.
[ 192.576441] EtherCAT: Requesting master 0...
[ 192.576444] EtherCAT: Successfully requested master 0.
[ 192.576962] EtherCAT 0: Domain0: Logical address 0x00000000, 4 byte, expected working counter 6.
[ 192.576964] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 4 byte, type LRW.
[ 192.576972] EtherCAT 0: Master thread exited.
[ 192.576973] EtherCAT 0: Starting EtherCAT-OP thread.
[ 192.972388] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 219.612558] EtherCAT 0: Master thread exited.
[ 219.612573] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 219.612597] EtherCAT ERROR 0-5: Failed to receive AL state datagram: Datagram initialized.
[ 219.612606] EtherCAT 0: Releasing master...
[ 219.612607] EtherCAT 0: Released.
[ 219.700744] EtherCAT 0: Slave states on main device: PREOP.
[ 219.788706] EtherCAT WARNING: Datagram 00000000c1702745 (master-fsm) was SKIPPED 1 time.
[ 1676.699770] EtherCAT: Requesting master 0...
[ 1676.699773] EtherCAT: Successfully requested master 0.
[ 1676.705131] EtherCAT 0: Releasing master...
[ 1676.705134] EtherCAT 0: Released.
[ 2530.014495] EtherCAT: Requesting master 0...
[ 2530.014498] EtherCAT: Successfully requested master 0.
I can`t really understand what`s going wrong
wopass: load_the_modules cmd=<orig_loadrt lcec>
waitpid failed /usr/bin/rtapi_app lcec
/usr/bin/rtapi_app exited without becoming ready
insmod for lcec failed, returned -1
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7f3c65f33c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7f3c66e4d050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7f3c65ef752f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7f3c65f34f38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x5595ad189cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x5595ad18a62e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x5595ad18ac2c]
7 /usr/bin/rtapi_app(+0xc974) [0x5595ad185974]
8 /usr/bin/rtapi_app(main+0x70f) [0x5595ad18544f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7f3c66e3824a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f3c66e38305]
11 /usr/bin/rtapi_app(_start+0x21) [0x5595ad185861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready.Waited 3 seconds for master. giving up.
Note: Using POSIX realtime
5660
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
lcec: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
motmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
trivkins: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
homemod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
tpmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
<commandline>:0: unloadrt failed
Note: Using POSIX realtime
This is what dmesg shows:
[ 4.277444] ec_master: loading out-of-tree module taints kernel.
[ 4.277719] ec_master: module verification failed: signature and/or required key missing - tainting kernel
[ 4.314529] EtherCAT: Master driver 1.6.4 1.6.4.g703b611-1+17.2
[ 4.314659] EtherCAT: 1 master waiting for devices.
[ 4.337595] ec_generic: EtherCAT master generic Ethernet device module 1.6.4 1.6.4.g703b611-1+17.2
[ 4.337610] EtherCAT: Accepting A0:36:9F:47:90:13 as main device for master 0.
[ 4.337624] ec_generic: Binding socket to interface 2 (enp2s0).
[ 4.360462] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 4.510128] NET: Registered PF_QIPCRTR protocol family
[ 6.785160] igb 0000:02:00.0 enp2s0: igb: enp2s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
[ 6.785464] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[ 6.792420] EtherCAT 0: Link state of ecm0 changed to UP.
[ 6.804450] EtherCAT 0: 8 slave(s) responding on main device. Re-scanning on next possibility.
[ 6.804453] EtherCAT 0: Slave states on main device: PREOP.
[ 6.804454] EtherCAT 0: Re-scanning now.
[ 6.804968] EtherCAT 0: Scanning bus.
[ 7.713258] e1000e 0000:00:1f.6 enp0s31f6: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 7.713306] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes ready
[ 8.683950] EtherCAT 0: Bus scanning completed in 1876 ms.
[ 8.683953] EtherCAT 0: Using slave 0 as DC reference clock.
[ 192.576441] EtherCAT: Requesting master 0...
[ 192.576444] EtherCAT: Successfully requested master 0.
[ 192.576962] EtherCAT 0: Domain0: Logical address 0x00000000, 4 byte, expected working counter 6.
[ 192.576964] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 4 byte, type LRW.
[ 192.576972] EtherCAT 0: Master thread exited.
[ 192.576973] EtherCAT 0: Starting EtherCAT-OP thread.
[ 192.972388] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 219.612558] EtherCAT 0: Master thread exited.
[ 219.612573] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 219.612597] EtherCAT ERROR 0-5: Failed to receive AL state datagram: Datagram initialized.
[ 219.612606] EtherCAT 0: Releasing master...
[ 219.612607] EtherCAT 0: Released.
[ 219.700744] EtherCAT 0: Slave states on main device: PREOP.
[ 219.788706] EtherCAT WARNING: Datagram 00000000c1702745 (master-fsm) was SKIPPED 1 time.
[ 1676.699770] EtherCAT: Requesting master 0...
[ 1676.699773] EtherCAT: Successfully requested master 0.
[ 1676.705131] EtherCAT 0: Releasing master...
[ 1676.705134] EtherCAT 0: Released.
[ 2530.014495] EtherCAT: Requesting master 0...
[ 2530.014498] EtherCAT: Successfully requested master 0.
I can`t really understand what`s going wrong
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 738
- Thank you received: 249
06 Jun 2025 14:31 #329821
by Hakan
Replied by Hakan on topic xml and hal - I am lost
Yeah, I wonder what that can be. lcec crashes with signal 11, segmentation fault.
It's not a simple configuration error that causes that. Well, who knows.
I think of a few things one can try.
In ethercat-conf.xml, comment out all slaves. Linuxcnc should at least not crash on lcec, instead one expects a lot of missing pins. Then, enable/uncomment slave after slave in ethercat-conf.xml until you see what is causing the problem.
I think you should back to the previous xml-entry for the A6 servo. There needs to be the <watchdog> entry and syncmanager 0 and 1 need to be in there even if they are empty. From what I have read about that servo.
The attached hal file was empty, but I see in the linuxcnc startup error list you have a homemod module. Comment out that for now.
In the ini file you have a lot of references to sim_*.hal (HALFILE), they need to be commented out. They can't be in the real version.
So it will be a bit of step by step. First figure out why lcec crashes and fix that. Then get the servo going and then work on the config.
It's not a simple configuration error that causes that. Well, who knows.
I think of a few things one can try.
In ethercat-conf.xml, comment out all slaves. Linuxcnc should at least not crash on lcec, instead one expects a lot of missing pins. Then, enable/uncomment slave after slave in ethercat-conf.xml until you see what is causing the problem.
I think you should back to the previous xml-entry for the A6 servo. There needs to be the <watchdog> entry and syncmanager 0 and 1 need to be in there even if they are empty. From what I have read about that servo.
The attached hal file was empty, but I see in the linuxcnc startup error list you have a homemod module. Comment out that for now.
In the ini file you have a lot of references to sim_*.hal (HALFILE), they need to be commented out. They can't be in the real version.
So it will be a bit of step by step. First figure out why lcec crashes and fix that. Then get the servo going and then work on the config.
Please Log in or Create an account to join the conversation.
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
08 Jun 2025 11:58 - 08 Jun 2025 11:59 #329941
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
As promised - here is a little update.
Now evrything is running or better starting. The Beckhoff modules do what they should do, 2 oft the servos can be jogged but 1 servo is not able to be jogged and when trying to an amplifier error ist displayed in a pop up display. The motors are not yet tuned as they are no yet mounted to the machine.
I can`t really understand the difference of behaviour as all of the 3 servos are out of the box without any change to the values.
The only thing inside lcnc wich is possibly related to it is the ferror value - nothing else.
What could be a good starting point to figure out what goes wrong?
- If helpful for anybody I could post my setup files
Now evrything is running or better starting. The Beckhoff modules do what they should do, 2 oft the servos can be jogged but 1 servo is not able to be jogged and when trying to an amplifier error ist displayed in a pop up display. The motors are not yet tuned as they are no yet mounted to the machine.
I can`t really understand the difference of behaviour as all of the 3 servos are out of the box without any change to the values.
The only thing inside lcnc wich is possibly related to it is the ferror value - nothing else.
What could be a good starting point to figure out what goes wrong?
- If helpful for anybody I could post my setup files
Last edit: 08 Jun 2025 11:59 by SwitchWitch.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 738
- Thank you received: 249
08 Jun 2025 16:14 #329958
by Hakan
Replied by Hakan on topic xml and hal - I am lost
I think just switching the drives between the two axis would be one thing. Relatively easy done in the config, or perhaps moving ethernet cables between the drives.
Then one can think of hunting done the reason for joint n amplifier fault. It happens because joint.n.amp_fault bit get set by the drive.
Check how that is connected in the hal file.
Look at the drives' outputs in halshow, compare between good and bad drive. Under lcec component.
Also temporarily increase FERROR and MIN_FERROR, set them really high while testing. Don't forget to lower them when done.
Search the forum, rodw had an amplifier fault and needed to perform a factory reset on an ethercat stepper drive.
Then one can think of hunting done the reason for joint n amplifier fault. It happens because joint.n.amp_fault bit get set by the drive.
Check how that is connected in the hal file.
Look at the drives' outputs in halshow, compare between good and bad drive. Under lcec component.
Also temporarily increase FERROR and MIN_FERROR, set them really high while testing. Don't forget to lower them when done.
Search the forum, rodw had an amplifier fault and needed to perform a factory reset on an ethercat stepper drive.
Please Log in or Create an account to join the conversation.
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
09 Jun 2025 12:05 #330009
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
Finally all my Motors are joggable. The key was this part of the hal-file where I had to add some entries:
addf lcec.read-all servo-thread
addf cia402.0.read-all servo-thread
addf cia402.1.read-all servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf cia402.0.write-all servo-thread
addf cia402.1.write-all servo-thread
addf lcec.write-all servo-thread
The amp-error still pops up from time to time but this is something wich could be caused of the not yet tuned motors I think.
Thx a lot (!!!!) for all you help and hints!!
addf lcec.read-all servo-thread
addf cia402.0.read-all servo-thread
addf cia402.1.read-all servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf cia402.0.write-all servo-thread
addf cia402.1.write-all servo-thread
addf lcec.write-all servo-thread
The amp-error still pops up from time to time but this is something wich could be caused of the not yet tuned motors I think.
Thx a lot (!!!!) for all you help and hints!!
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 738
- Thank you received: 249
09 Jun 2025 17:46 #330033
by Hakan
Replied by Hakan on topic xml and hal - I am lost
Sounds promising.
But you mentioned three servos? You need one "kit" with cia402 and lcec for each servo.
So there should be a cia402.2.read-all and one cia402.2.write-all for the third servo as well. And it need to be hooked up to lcec in the same way as the two other servos. Maybe you have that already, it is hard to think the servo works at all without that.
But you mentioned three servos? You need one "kit" with cia402 and lcec for each servo.
So there should be a cia402.2.read-all and one cia402.2.write-all for the third servo as well. And it need to be hooked up to lcec in the same way as the two other servos. Maybe you have that already, it is hard to think the servo works at all without that.
Please Log in or Create an account to join the conversation.
Time to create page: 0.393 seconds