xml and hal - I am lost
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
04 Jun 2025 17:07 #329703
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
Sorry - my mistake.
For sure it is a good idea to share the error message.
Now - my problems with the beckhoff modules are solved with the help from 2 friends.
Now I have to get the servos running and to figure out how to configure them.
I will give an update.
For sure it is a good idea to share the error message.
Now - my problems with the beckhoff modules are solved with the help from 2 friends.
Now I have to get the servos running and to figure out how to configure them.
I will give an update.
Please Log in or Create an account to join the conversation.
- Kieran
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 3
04 Jun 2025 18:16 - 04 Jun 2025 18:17 #329710
by Kieran
Replied by Kieran on topic xml and hal - I am lost
Im at about the same step as you. Last night I used the XMLconfiggen to make an xml for the 3 servos i had plugged in at the time. seems reasonable at first glance but might need some edits. My Hal and Ini are based on Hakan's ethercat Rpi video/forum post. getting errors indicating my ini and hal are not up to snuff.
forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4
Tonight I will bash my head against the keyboard some more and see if I can get a servo to move.
forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4
Tonight I will bash my head against the keyboard some more and see if I can get a servo to move.
Last edit: 04 Jun 2025 18:17 by Kieran.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 738
- Thank you received: 249
04 Jun 2025 18:40 #329711
by Hakan
Replied by Hakan on topic xml and hal - I am lost
Hi guys, the best way is to show so much detail that someone can pinpoint what's wrong.
Starting from lcec_configgen is often a good way for the ethercat-conf.xml
Servos and stepper motors almost always follow the CIA402 standard so there it is best to take the example from github.com/dbraun1981/hal-cia402/tree/main/example and mix that into the config. There are more nuances for drives but lets not go there unless needed.
I and others can help to see what's wrong with your config, you need to attach the errors and outputs from the linuxcnc startup. This output, together with the hal file and ethercat-conf.xml can be attached here.
Starting from lcec_configgen is often a good way for the ethercat-conf.xml
Servos and stepper motors almost always follow the CIA402 standard so there it is best to take the example from github.com/dbraun1981/hal-cia402/tree/main/example and mix that into the config. There are more nuances for drives but lets not go there unless needed.
I and others can help to see what's wrong with your config, you need to attach the errors and outputs from the linuxcnc startup. This output, together with the hal file and ethercat-conf.xml can be attached here.
The following user(s) said Thank You: Kieran
Please Log in or Create an account to join the conversation.
- Kieran
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 3
05 Jun 2025 05:15 #329725
by Kieran
Replied by Kieran on topic xml and hal - I am lost
Ive got a single X axis going!
I used info from here... forum.linuxcnc.org/ethercat/54965-stepperonline-a6-servo
My main problem this evening was installing the cia402 hal correctly. I ended up just making a dedicated folder home/linuxcnc/cia402 and placed cia402.comp there.
Then I opened the terminal and >> sudo halcompile --install cia402.comp
that worked!
I used info from here... forum.linuxcnc.org/ethercat/54965-stepperonline-a6-servo
My main problem this evening was installing the cia402 hal correctly. I ended up just making a dedicated folder home/linuxcnc/cia402 and placed cia402.comp there.
Then I opened the terminal and >> sudo halcompile --install cia402.comp
that worked!
Please Log in or Create an account to join the conversation.
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
05 Jun 2025 15:01 #329745
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
I went the same way but without success. I combined my working files (Beckhoff modules are working as they should) with the ones from MobiusToast. No error on startup but unfortunately no possibility to jog the axis as well. forum.linuxcnc.org/ethercat/54965-steppe...ervo?start=40#329744
Please Log in or Create an account to join the conversation.
- Kieran
- Offline
- Junior Member
-
Less
More
- Posts: 28
- Thank you received: 3
05 Jun 2025 15:27 #329749
by Kieran
Replied by Kieran on topic xml and hal - I am lost
Hmmm.... so linuxcnc starts with no error, you hit power on (F2?) and servo doesn't come to life? does linuxcnc think its moving when jogging?
Please Log in or Create an account to join the conversation.
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
05 Jun 2025 15:49 - 05 Jun 2025 17:29 #329752
by SwitchWitch
Yes - I hit power and lcnc thinks it is moving. The servo stays in PreOp.
My mistake - the changed files were not copied into the folders.
Now I have success - I have errors
twopass:pass0: loadusr -W lcec_conf ethercat-conf.xml
twopass: load_the_modules cmd=<orig_loadrt motmod servo_period_nsec=1000000 num_joints=3 base_period_nsec=100000 servo_period_nsec=1000000 num_joints=3 unlock_joints_mask=16 num_dio=6 num_aio=3>
waitpid failed /usr/bin/rtapi_app motmod
/usr/bin/rtapi_app exited without becoming ready
insmod for motmod failed, returned -1
twopass: 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
cia402_homecomp: dlopen: /usr/lib/linuxcnc/modules/cia402_homecomp.so: cannot open shared object file: No such file or directory
<commandline>:0: waitpid failed /usr/bin/rtapi_app cia402_homecomp
<commandline>:0: /usr/bin/rtapi_app exited without becoming ready
<commandline>:0: insmod for cia402_homecomp failed, returned -1
motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: update_joint_homing_params
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7feb9d9b0c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7feb9e68a050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7feb9d97452f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7feb9d9b1f38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x55e898f48cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x55e898f4962e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x55e898f49c2c]
7 /usr/bin/rtapi_app(+0xc974) [0x55e898f44974]
8 /usr/bin/rtapi_app(main+0x70f) [0x55e898f4444f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7feb9e67524a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7feb9e675305]
11 /usr/bin/rtapi_app(_start+0x21) [0x55e898f44861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready........Waited 3 seconds for master. giving up.
Note: Using POSIX realtime
6457
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
trivkins: 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
Mmmhh - in my understanding just the cia402_homecomp.so is missing - could this be right?
Replied by SwitchWitch on topic xml and hal - I am lost
My mistake - the changed files were not copied into the folders.
Now I have success - I have errors
twopass:pass0: loadusr -W lcec_conf ethercat-conf.xml
twopass: load_the_modules cmd=<orig_loadrt motmod servo_period_nsec=1000000 num_joints=3 base_period_nsec=100000 servo_period_nsec=1000000 num_joints=3 unlock_joints_mask=16 num_dio=6 num_aio=3>
waitpid failed /usr/bin/rtapi_app motmod
/usr/bin/rtapi_app exited without becoming ready
insmod for motmod failed, returned -1
twopass: 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
cia402_homecomp: dlopen: /usr/lib/linuxcnc/modules/cia402_homecomp.so: cannot open shared object file: No such file or directory
<commandline>:0: waitpid failed /usr/bin/rtapi_app cia402_homecomp
<commandline>:0: /usr/bin/rtapi_app exited without becoming ready
<commandline>:0: insmod for cia402_homecomp failed, returned -1
motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: update_joint_homing_params
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7feb9d9b0c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7feb9e68a050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7feb9d97452f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7feb9d9b1f38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x55e898f48cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x55e898f4962e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x55e898f49c2c]
7 /usr/bin/rtapi_app(+0xc974) [0x55e898f44974]
8 /usr/bin/rtapi_app(main+0x70f) [0x55e898f4444f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7feb9e67524a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7feb9e675305]
11 /usr/bin/rtapi_app(_start+0x21) [0x55e898f44861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready........Waited 3 seconds for master. giving up.
Note: Using POSIX realtime
6457
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
trivkins: 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
Mmmhh - in my understanding just the cia402_homecomp.so is missing - could this be right?
Last edit: 05 Jun 2025 17:29 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
06 Jun 2025 07:52 #329796
by Hakan
Replied by Hakan on topic xml and hal - I am lost
Yes it is missing.
Maybe you already have fixed it by now. It's not a standard component so you need to "halcompile --compile cia402_homecomp.comp" to put the .so file in you config directory.
It's daring to try to get the servo working using a custom setup, I wouldn't do it. I would start with the simplest config possible from dbraun1981 and when that works I would build on with other functions.
But i understand this is part of a complete working setup, so you need to find the cia402_homecomp, compile it and hope for the best.
Maybe you already have fixed it by now. It's not a standard component so you need to "halcompile --compile cia402_homecomp.comp" to put the .so file in you config directory.
It's daring to try to get the servo working using a custom setup, I wouldn't do it. I would start with the simplest config possible from dbraun1981 and when that works I would build on with other functions.
But i understand this is part of a complete working setup, so you need to find the cia402_homecomp, compile it and hope for the best.
Please Log in or Create an account to join the conversation.
- SwitchWitch
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
06 Jun 2025 08:55 - 06 Jun 2025 08:58 #329799
by SwitchWitch
Replied by SwitchWitch on topic xml and hal - I am lost
You`re right. When I realized that it is a special customized Version I started everything all over again to go with the simplest version. I did what you proposed and compiled the cia402_homecomp. Than I mixed my working Beckhoff starting point files with the ones from dbraun. Unfortunately it still crashes:
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
motion.c: Creating unlock hal pins for joint 4
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7fc1af3e9c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7fc1b0303050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7fc1af3ad52f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7fc1af3eaf38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x56167d468cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x56167d46962e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x56167d469c2c]
7 /usr/bin/rtapi_app(+0xc974) [0x56167d464974]
8 /usr/bin/rtapi_app(main+0x70f) [0x56167d46444f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7fc1b02ee24a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7fc1b02ee305]
11 /usr/bin/rtapi_app(_start+0x21) [0x56167d464861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready.....Waited 3 seconds for master. giving up.
.Note: Using POSIX realtime
2971
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
Do you have any Idea what to try next?
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
motion.c: Creating unlock hal pins for joint 4
LinuxCNC Ethercat crashed with signal 11
-- STACK TRACE START
0 /usr/lib/linuxcnc/modules/lcec.so(+0xfc8c) [0x7fc1af3e9c8c]
1 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7fc1b0303050]
2 /lib/x86_64-linux-gnu/libethercat.so.1(ecrt_slave_config_pdos+0x2f) [0x7fc1af3ad52f]
3 /usr/lib/linuxcnc/modules/lcec.so(rtapi_app_main+0x40a) [0x7fc1af3eaf38]
4 /usr/bin/rtapi_app(+0x10cd7) [0x56167d468cd7]
5 /usr/bin/rtapi_app(+0x1162e) [0x56167d46962e]
6 /usr/bin/rtapi_app(+0x11c2c) [0x56167d469c2c]
7 /usr/bin/rtapi_app(+0xc974) [0x56167d464974]
8 /usr/bin/rtapi_app(main+0x70f) [0x56167d46444f]
9 /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7fc1b02ee24a]
10 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7fc1b02ee305]
11 /usr/bin/rtapi_app(_start+0x21) [0x56167d464861]
-- STACK TRACE END
Waiting for component 'cia402' to become ready.....Waited 3 seconds for master. giving up.
.Note: Using POSIX realtime
2971
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
Do you have any Idea what to try next?
Last edit: 06 Jun 2025 08:58 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
06 Jun 2025 11:34 #329804
by Hakan
Replied by Hakan on topic xml and hal - I am lost
I see you have two slaves with idx="0", that won't work.
List the indexes with "ethercat slaves"
There is another debug option or possibility. The output of "sudo dmesg" show a lot, at the end it may have info that can show the error.
Especially info messages from ethercat master and lcec goes there.
List the indexes with "ethercat slaves"
There is another debug option or possibility. The output of "sudo dmesg" show a lot, at the end it may have info that can show the error.
Especially info messages from ethercat master and lcec goes there.
Please Log in or Create an account to join the conversation.
Time to create page: 0.354 seconds