Ethercat HAL driver
@Tetw,
I checked both the EL1104 and EL2004 are available for the Lcec.
Your file is correct, your Os and Ethercat bus is correct.
Have you tried another cat4 cable? What does $ ethercat cstruct
say to you in terminal with only the EK1100?
It is ethercat-conf.xml
At this location : /home/ **yourname** /Desktop/linuxcnc_axis/configs/sim.qtvcp_screens/
You are giving up a different story by :
/ethercat_lcec.xml
Thanks grotius,
solved error 0x6000 the problem was the cable.
in the previous post I was wrong to enter xml.
I tried to insert only "ES9100" but you don't see it (ethercat slaves ethercat cstruct )?
why in the terminal when I start halrun and load lcec it goes into error?
you have a link or file on how to write the xml file?
Please Log in or Create an account to join the conversation.
We have tried to help you. If you installed the grotius iso and added just one line to the existing xml file your EL1104 was working.
On github there is a readme enclosed by the grotius iso. But reading takes too much time?
Your cable was a problem. Oke that is solved.
Your really have to begin study this topic first. If you don't know what "ethercat cstruct" means, you have to google it and
study this command until you succeed !
You don't read my comment's good enough, and you don't interact on my comment's, accept changing a cat4 cable.
I tried to insert only "ES9100" but you don't see it (ethercat slaves ethercat cstruct )?
why in the terminal when I start halrun and load lcec it goes into error?
you have a link or file on how to write the xml file?
This is a proof you have too study first. Don't waste our time please before studying our comments !!
Please Log in or Create an account to join the conversation.
i try to use the same ECT60 driver as you, but don't get it to move, tried to use your config from the post. Do you think it is possible to share your Config with us?
greetings Sven
Please Log in or Create an account to join the conversation.
Dear @Chimeno,
I am still a little lost I think. I received the drives this morning and loaded the ECT60 description file in TWINCAT and I have managed to move the motors using the NC so this is good.
And I have a working config and pdo in twincat. It curently uses CSP (cyclic dynamic position mode). I tried to change to PP but it doesn't work when I do....
Now when I export the "startup" which is much more full of data...
it saves a very generic file with almost no info:
test.xml
So I don't yet understand what I should export in xml from twincat..
Also I don't know how to export pdo's there is no export to xml in this window...
Sorry I can't understand what I need to do to export the two xml files from twincat...
I guess one is for PDOs and one for startup config.
1. Do I need to write the files by hand because export from twincat doesn't seem to work? Did you write the example files you sent me manually?
2. or how did you export them from twincat? Maybe I missunderstood and twincat is only for experimenting on the settings.
Thank you again so much in advance and sorry for being slow to understand.
So I edited manually the .xml from my current understanding:
I only added the PDO with SM2 and SM3... I don't know really know if the others pdo idx are useful, nor the reason they exist in twincat.
So I loaded this xml in linuxcnc and after a few trials I still do get errors which are probably due to the fact that I don't really know what to put in the DC sync config and ref clock sync cycles...
In twincat it seems to work at 2000us...
So I changed to:
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
<dcConf assignActivate="500" sync0Cycle="2000000" sync0Shift="1000000"/>
according to the thread here:
forum.linuxcnc.org/38-general-linuxcnc-q...rcat-sync-dc-problem
but then I get this:
[ 2350.778194] EtherCAT WARNING: Datagram e64197b9 (master-fsm) was SKIPPED 1 time.
[ 2385.334576] EtherCAT: Requesting master 0...
[ 2385.334592] EtherCAT: Successfully requested master 0.
[ 2385.335248] EtherCAT 0: Domain0: Logical address 0x00000000, 18 byte, expected working counter 3.
[ 2385.335256] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 18 byte, type LRW.
[ 2385.335411] EtherCAT 0: Master thread exited.
[ 2385.335422] EtherCAT 0: Starting EtherCAT-OP thread.
[ 2385.335562] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 2385.494210] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 2385.496263] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration".
[ 2385.500254] EtherCAT 0-0: Acknowledged state PREOP.
Hello theshade & Chimeno,
i have the same ECT60 EtherCAT Driver and Motor, and have been trying for some time, to get it to work with Linuxcnc.
I am able to Enable the Drive in Linuxcnc and to read out the Encoder but i can´t get it to move.
In TwinCAT 3 i am able to move the drive in the NC:TASK but i don´t get it to work with LinuxCNC.
When i compare your TwinCAT Startup Tab for the Drive with mine yours have much more entrys. But i can´t export/import them.
Have you added them manually or how you got them inserted?
May i ask you to share youre Machine Config, HAL-Files etc with me/us?
I am no Programmer or anything else, at the moment i am stuck and get along.
Thank you and best Regards
Sven
Please Log in or Create an account to join the conversation.
I don't have that unit,
Is the unit in OP mode?
You can read this post in linuxcnc
PositionActualValue
compare these signals with TWINCAT3 to see which ones you have to enable
complexEntry bitLen="1" halPin="SwitchON" halType="bit"/>
<complexEntry bitLen="1" halPin="EnableVoltage" halType="bit"/>
<complexEntry bitLen="1" halPin="NoQuickStop" halType="bit"/>
<complexEntry bitLen="1" halPin="EnableOperation" halType="bit"/>
<complexEntry bitLen="1" halPin="OpMode-bit01" halType="bit"/>
<complexEntry bitLen="1" halPin="OpMode-bit02" halType="bit"/>
<complexEntry bitLen="1" halPin="OpMode-bit03" halType="bit"/>
<complexEntry bitLen="1" halPin="FaultReset" halType="bit"/>
<complexEntry bitLen="1" halPin="TimeOut" halType="bit"/>
<complexEntry bitLen="1" halPin="OpMode-bit04" halType="bit"/>
<complexEntry bitLen="1" halPin="bit10" halType="bit"/>
<complexEntry bitLen="1" halPin="bit11" halType="bit"/>
<complexEntry bitLen="1" halPin="bit12" halType="bit"/>
<complexEntry bitLen="1" halPin="bit13" halType="bit"/>
<complexEntry bitLen="1" halPin="bit14" halType="bit"/>
<complexEntry bitLen="1" halPin="bit15" halType="bit"/>
in TWINCAT3 you have enabled the "distributed clock"
in your .xml file you don't have the line
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"
Gretting
Chimeno
Please Log in or Create an account to join the conversation.
Hello @jc2ktr
I don't have that unit,
Is the unit in OP mode?
You can read this post in linuxcnc, then you only have to enable the unitPositionActualValue
compare these signals with TWINCAT3 to see which ones you have to enablecomplexEntry bitLen="1" halPin="SwitchON" halType="bit"/> <complexEntry bitLen="1" halPin="EnableVoltage" halType="bit"/> <complexEntry bitLen="1" halPin="NoQuickStop" halType="bit"/> <complexEntry bitLen="1" halPin="EnableOperation" halType="bit"/> <complexEntry bitLen="1" halPin="OpMode-bit01" halType="bit"/> <complexEntry bitLen="1" halPin="OpMode-bit02" halType="bit"/> <complexEntry bitLen="1" halPin="OpMode-bit03" halType="bit"/> <complexEntry bitLen="1" halPin="FaultReset" halType="bit"/> <complexEntry bitLen="1" halPin="TimeOut" halType="bit"/> <complexEntry bitLen="1" halPin="OpMode-bit04" halType="bit"/> <complexEntry bitLen="1" halPin="bit10" halType="bit"/> <complexEntry bitLen="1" halPin="bit11" halType="bit"/> <complexEntry bitLen="1" halPin="bit12" halType="bit"/> <complexEntry bitLen="1" halPin="bit13" halType="bit"/> <complexEntry bitLen="1" halPin="bit14" halType="bit"/> <complexEntry bitLen="1" halPin="bit15" halType="bit"/>
in TWINCAT3 you have enabled the "distributed clock"
in your .xml file you don't have the line<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"
Gretting
Chimeno
Hi @Chimeno,
the Post above was from @theshade a few pages before page 93 i think.
He has the same Driver and you helped him, that´s why i mentioned you too.
Ok, try to add the line to my ethercat-conf.xml
I can already enable the drive, when i set the line:
net x-enable => lcec.0.M701.EnableVoltage lcec.0.M701.EnableOperation lcec.0.M701.SwitchON lcec.0.M701.NoQuickStop
I think the Unit was in op mode, will try it later again.
Thank you
Edit 12/13/2020
All of Devices are in OP-Status in TwinCAT3.
I tried to use these LinuxCNC Profile for my machine ---> github.com/GuiHue/myfenjalinuxcnc
I edited the hal files to my needs, but i can't Start it it gives me following error on Startup.
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.0-77-ge6cfcfa39
Machine configuration directory is '/home/linuxcnc/linuxcnc/configs/myfenjalinuxcnc'
Machine configuration file is 'groot.ini'
INIFILE=/home/linuxcnc/linuxcnc/configs/myfenjalinuxcnc/groot.ini
VERSION=1.1
PARAMETER_FILE=hallib/linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=gmoccapy
COORDINATES=X Y Z
KINEMATICS=trivkins
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Found file(REL): ./hallib/ec.hal
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
motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: kinematicsType
./hallib/ec.hal:3: waitpid failed /usr/bin/rtapi_app motmod
./hallib/ec.hal:3: /usr/bin/rtapi_app exited without becoming ready
./hallib/ec.hal:3: insmod for motmod failed, returned -1
1085
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
Info report created by linuxcnc_info:
The file: /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
pastebin.com
in order to provide information about the linuxcnc
system and configuration.
Date: So 13. Dez 15:05:14 CET 2020
UTC Date: So 13. Dez 14:05:14 UTC 2020
this program: /usr/bin/linuxcnc_info
uptime: 15:05:14 up 1 min, 1 user, load average: 0,61, 0,30, 0,11
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/linuxcnc/linuxcnc/configs/myfenjalinuxcnc
USER: linuxcnc
LOGNAME: linuxcnc
HOME: /home/linuxcnc
EDITOR:
VISUAL:
LANGUAGE:
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: lightdm-xsession
display size: 1920x1080 pixels (508x285 millimeters)
PATH: /usr/bin:/home/linuxcnc/linuxcnc/configs/myfenjalinuxcnc/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
uname items:
nodename -n: LinuxCNCM92p
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.160-2 (2020-11-28)
machine -m: x86_64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux
/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-13-rt-amd64 root=UUID=fbb4b888-5874-40a0-9887-0d439423432e ro initrd=/install/gtk/initrd.gz quiet
model name: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
cores: 4
cpu MHz: 1796.006
parport:
serial: 0000-0000 : serial 0000-0000 : serial
Versions:
gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 2.7.16
git: git version 2.20.1
git commit: NA
tcl: 8.6
tk: 8.6
glade: glade 3.22.1
glade-gtk2: glade3 3.8.0
linuxcnc_var all:
LINUXCNCVERSION: 2.8.0-77-ge6cfcfa39
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /etc/init.d/realtime
RTS: uspace
HALLIB_DIR: /usr/share/linuxcnc/hallib
dpkg -l '*linuxcnc*':
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
+++-===================-============================-============-=====================================================================
un linuxcnc <keine> <keine> (keine Beschreibung vorhanden)
un linuxcnc-dev <keine> <keine> (keine Beschreibung vorhanden)
un linuxcnc-doc <keine> <keine> (keine Beschreibung vorhanden)
ii linuxcnc-doc-en 1:2.9.0~pre0.3162.g52dc76b1c all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-doc-es 1:2.9.0~pre0.3162.g52dc76b1c all controlador de movimiento para máquinas CNC y robots (Español).
ii linuxcnc-doc-fr 1:2.9.0~pre0.3162.g52dc76b1c all motion controller for CNC machines and robots (French documentation)
un linuxcnc-sim <keine> <keine> (keine Beschreibung vorhanden)
un linuxcnc-sim-dev <keine> <keine> (keine Beschreibung vorhanden)
ii linuxcnc-uspace 1:2.8.0.77.ge6cfcfa39 amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.8.0.77.ge6cfcfa39 amd64 PC based motion controller for real-time Linux
Edit 12/14/2020
after i did a dmesg i got this, see attached image(s)
Please Log in or Create an account to join the conversation.
I will try to help you in everything I can,
I can already enable the drive, when i set the line:
net x-enable => lcec.0.M701.EnableVoltage lcec.0.M701.EnableOperation lcec.0.M701.SwitchON lcec.0.M701.NoQuickStop
I think the Unit was in op mode, will try it later again.
Is it possible that you have the driver configured in another mode? there are several modes, speed, position ..
the first thing is to try to solve error by mistake
1- error motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: kinematicsType
something seems to be wrongly compiled, you still have to compile linuxcnc again without ethercat configuration, if linuxcnc starts correctly, go to step 2
2- configure the 2 pre-configured devices EK100 / EL1809 / EL2004 and start linuxcnc and see that they work correctly.
3-create another configuration, just the generic one, and first try to get linuxcnc to start and put the device in OP, then if it starts to configure by trial and error.
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
Hello @jc2ktr
I will try to help you in everything I can,
I can already enable the drive, when i set the line:
net x-enable => lcec.0.M701.EnableVoltage lcec.0.M701.EnableOperation lcec.0.M701.SwitchON lcec.0.M701.NoQuickStop
I think the Unit was in op mode, will try it later again.
Is it possible that you have the driver configured in another mode? there are several modes, speed, position ..
the first thing is to try to solve error by mistake
1- error motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: kinematicsType
something seems to be wrongly compiled, you still have to compile linuxcnc again without ethercat configuration, if linuxcnc starts correctly, go to step 2
2- configure the 2 pre-configured devices EK100 / EL1809 / EL2004 and start linuxcnc and see that they work correctly.
3-create another configuration, just the generic one, and first try to get linuxcnc to start and put the device in OP, then if it starts to configure by trial and error.
Greeting
Chimeno
Hello @Chimeno
first of all thank you for your help and patience
#1 the motmod.so error was my faul, i missed to write the: loadrt [KINS]KINEMATICS entry in my .hal file
#2 the preconfigured Beckhoff devices EK1100,EL1809 & EL2004 are good in LinuxCNC in Halshow i can toggle my Limit/Home Switches and the input is shown correctly, when i do a setp lcec.0.K010B1.dout-0 true --> the relay connected to my EL2004 switches on - that seems to work too.
#3 all of my Beckhoff Modules are in OP-State only my last Slave, the ECT60 Driver is still in Preop, i think i have misconfigured something in TwinCAT3, because i have tried to get the same Startup entries like @theshade on my drive... which was not really succesfull
The Drive was in OP mode under LinuxCNC, before i reconfigured it in TwinCAT. At the moment i don´t know how to reset the Drive or to get it in OP State again.
Please Log in or Create an account to join the conversation.
Well, the first thing is to reconfigure the driver in TWINCAT3, that it works in OP and you can move the engines, I attach the program in TWINCAT3 with the modified PDOs according to linuxcnc-ethercat, now you will have to configure the rest yourself, compare and see if you help.
I attach an image of where to change the PDOs, if you change the operating mode you will also have to change them.
I attach an image of where you have the configuration in blue, it is configured in mode 8, (position) you will have to read the manual to see the different modes to see which one interests you the most
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
Mike
Please Log in or Create an account to join the conversation.