First Tests with ethercat
- kor
- Away
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 2
23 Nov 2025 15:36 #339055
by kor
First Tests with ethercat was created by kor
I finally insalled my ethercat master. and when running "ethercat slaves"
I see my beckhoff devices:
So next I created a standard axis-sym conf
I modified the axis.ini by adding a new halfile:
This is my ethercat.hal:
and here is my xml file:
when starting linuxcnc I get this error message:which does not really help me to figure out what is wrong. My guess is that I did something wrong in the xml, but I can not figure out what.
Thanks for your help.
I see my beckhoff devices:
bf20@bf20:~$ ethercat slaves
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 PREOP + EL1014 4K. Dig. Eingang 24V, 10�s
2 0:2 PREOP + EL2004 4K. Dig. Ausgang 24V, 0.5A
3 0:3 PREOP + EL3102 2K. Ana. Eingang +/-10V, Diff.
So next I created a standard axis-sym conf
I modified the axis.ini by adding a new halfile:
HALFILE = ethercat.halThis is my ethercat.hal:
# EtherCat
loadusr -W lcec_conf /home/bf20/linuxcnc/configs/sim.axis/ethercat-conf.xml
loadrt lcec add lcec.read-all servo-thread
add lcec.write-all servo-thread
net mon halui.machine.on lcec.0.EL1014.din-2
net mon halui.machine.off lcec.0.EL1014.din-3and here is my xml file:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<slave idx=0" type="EK1100" name="EK1100"/>
<slave idx=1" type="EL1014" name="EL1014"/>
<slave idx=2" type="EL2004" name="EL2004"/>
<slave idx=3" type="EL3102" name="EL3102"/>
</master>
</masters>
when starting linuxcnc I get this error message:
Note: Using POSIX realtime
lcec_conf: ERROR: Parse error at line 4: not well-formed (invalid token)
./ethercat.hal:3: waitpid failed lcec_conf lcec_conf
./ethercat.hal:3: lcec_conf exited without becoming ready
6791
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtimeThanks for your help.
Please Log in or Create an account to join the conversation.
- onceloved
-
- Offline
- Premium Member
-
Less
More
- Posts: 130
- Thank you received: 58
23 Nov 2025 16:11 #339058
by onceloved
Replied by onceloved on topic First Tests with ethercat
# EtherCat
loadusr -W lcec_conf /home/bf20/linuxcnc/configs/sim.axis/ethercat-conf.xml
loadrt lcec
add lcec.read-all servo-thread
add lcec.write-all servo-thread
net mon halui.machine.on lcec.0.EL1014.din-2
net mon halui.machine.off lcec.0.EL1014.din-3
loadusr -W lcec_conf /home/bf20/linuxcnc/configs/sim.axis/ethercat-conf.xml
loadrt lcec
add lcec.read-all servo-thread
add lcec.write-all servo-thread
net mon halui.machine.on lcec.0.EL1014.din-2
net mon halui.machine.off lcec.0.EL1014.din-3
Please Log in or Create an account to join the conversation.
- kor
- Away
- Senior Member
-
Less
More
- Posts: 70
- Thank you received: 2
23 Nov 2025 17:30 #339064
by kor
Replied by kor on topic First Tests with ethercat
the linebreak was a copy paste error. still same error message
file information:
Note: Using POSIX realtime
lcec_conf: ERROR: Parse error at line 4: not well-formed (invalid token)
./ethercat.hal:2: waitpid failed lcec_conf lcec_conf
./ethercat.hal:2: lcec_conf exited without becoming ready
9917
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
file information:
Note: Using POSIX realtime
lcec_conf: ERROR: Parse error at line 4: not well-formed (invalid token)
./ethercat.hal:2: waitpid failed lcec_conf lcec_conf
./ethercat.hal:2: lcec_conf exited without becoming ready
9917
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
Please Log in or Create an account to join the conversation.
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1060
- Thank you received: 354
23 Nov 2025 17:47 #339067
by Hakan
Replied by Hakan on topic First Tests with ethercat
Unbalanced """s
should be idx="0", not idx=0"
should be idx="0", not idx=0"
Please Log in or Create an account to join the conversation.
Time to create page: 0.301 seconds