- Posts: 40
- Thank you received: 0
Ethercat HAL driver
is it possible to send the parameters with CoE?
regards Frank
Please Log in to join the conversation.
CoE doesn't seem to be an option for configuration link , only for synchronization.
I had missed an error message while uploading parameters, a problem that has been mentioned a couple times in etherlab-users mailing list. IDN P-0-0150, encoder configuration, is longer than others (228B), and should be sent in two parts. Snooping on TwinCAT, first packet is sent just as SoE packet with FragmentsLeft, and the second one sends rest of data with IDN headers; then, the servo driver acknowledges the transfer. Etherlab-master sends the first part, but second is left out, and when next configuration packet comes the servo driver responds with 7003 Malformed Packet - rightly so.
The mailing list discussions never came to any conclusion on the error, so I'll have to dig on this - any clues?
BR, Jolli
Please Log in to join the conversation.
As the first part was sent a-ok with ethercat-tool but second part never
appeared, I tried sending first more than fragment-length of the data, and
then the second part in another call. The first part quits with timeout,
but after second part the write can be confirmed full and successful with
'ethercat soe_read'. (ethercat-tool has been patched to accept hex-ascii)
Following part is for reference for anyone else dealing with this:
Commands, data cut:
dmesg, rather intresting value for timeout:
Please Log in to join the conversation.
Although the configuration data is (should be) ok, servos still don't go OP. After configuring with ethercat-tool and starting system (start halrun, load modules, load lcec_conf, start) everything else seems to work according to dmesg (ec_master debuglevel set to 1) but synchronising.. well, it's interesting. I plotted all "EtherCAT DEBUG 0-0: Sync after x ms: y ns" output in following picture:
Looks like the system doesn't even try to synchronize? From what I see, I guess the servo configuration is reset and DC is simply not running?
dmesg from the run, until sync messages start:
Please Log in to join the conversation.
mfalcon wrote: hello
I tried several times with the mentioned steps, but I failed to get the whole thing to work, please help me to understand what I am missing. I am a newbie in linuxcnc, and my experience with linux itself is limited . The following are the steps that I made:
Step 0 : you need to install Debian Linuxcnc with RTAI core (I failed to do the following procedure when I tried Linux with
RT Preemption). The following procedure was fully tested with Linux Debian-7.9'-'3.4-9-rtai-686-pae' linuxcnc.
First Part: Intallation of Eathercatlab Hal Component
1st Download ethercat master from IgH from here:
www.etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2
2nd Open a shellTerminal, and go to the folder that contains the ethercat master, and Untar the file
3rd download debian folder from sittner from here:
github.com/sittner/ec-debianize/archive/master.zip
4th Unzip the file "ec-debianize-master.zip"
5th copy debian folder (the was produced in 4th step) to /ethercat-1.5.2/ (that was produced 2nd step)
6th now in the shell terminal, use the following instructions:
cd ethercat-1.5.2
cd debian
./configure -a
cd ..
sudo apt-get update
dpkg-checkbuilddeps
(I was missing dpatch package)
dpkg-buildpackage
wait until it finishes building. use command "cd .." in the shell to go to the parent directory.
You will find two files : etherlabmaster-dev_1.5.2+hg4b0b90_i386.deb , etherlabmaster_1.5.2+hg4b0b90_i386.deb
7th sudo dpkg -i etherlabmaster_1.5.2+hg4b0b90_i386.deb
8th edit the file : "/etc/default/ethercat"
9th sudo update-ethercat-config
10th sudo dpkg -i etherlabmaster-dev_1.5.2+hg4b0b90_i386.deb
11th restart the machine to get the driver loaded at start. After that you can execute # ethercat master in terminal
Second Part : Installation of linuxcnc with lcec Hal Driver
1st Download sittner linuxcnc modification with lcec inside:
# git clone github.com/sittner/linuxcnc-ethercat.git linuxcnc-ethercat
# cd linuxcnc-ethercat
2nd # make
3rd # sudo make install
4th cd linuxcnc-ethercat/src
5th Build
6th make
7th sudo make install
8th . Copy the built binary to the ethercat directory : sudo cp lcec_conf /usr/bin/
9th restart
after all of this I get the following error when I run the example CDP17_x:
Debug file information:
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/lcec.ko: Invalid parameters
./cpd17_x.hal:2: exit value: 1
./cpd17_x.hal:2: insmod for lcec failed, returned -1
See the output of 'dmesg' for more information.
4645
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
how can I resolve this??
I have encountered the same problem with you, so whether you have resolved this or not?
Please Log in to join the conversation.
Please Log in to join the conversation.
what is your hardware?
regards Frank
Please Log in to join the conversation.
I am studying AX5000 drive too, but fall far behind than you. When you wrote:
"...As linuxcnc-ethercat doesn't support SoE init configuration, I've tried to upload the data with a script using "ethercat soe_write" or by plugging ethercat cable to a machine running TwinCAT in config/freerun state. ..."
For so-called "ethercat soe_write", I guess you are calling "ecrt_master_write_idn()" from "lcec_write_master()", right?
Could you please provide the complete file for using "ethercat soe_write"?
Thanks
Jerry
Please Log in to join the conversation.
I'm new to LinuxCNC and at the foot of steep learning curve as it seems.
My Beckhoff Devices/Modules:
- EK1101 Bus coupler, unsupported (the same as EK1100 which is supported, but the EK1101 has a selectable address)
- BK1250 K-Bus Translator, unsupported, enables to use of "old" K-Bus Devices on the EtherCat bus. Probably no own functionality but it maps any number of K-Bus-Devices.
- KL1104, 4 Inputs
- KL2114, 4 Outputs
- 4 pieces of KL2531, Stepper Drivers
What worked on Linux:
- LinuxCNC 2.7 wheezy installed.
- EtherCat Hal driver installed : wiki.linuxcnc.org/cgi-bin/wiki.pl?EtherCatDriver
- I can see the connected devices
user@phywe:~/linuxcnc/configs/phywe$ ethercat slaves
0 0:0 PREOP + EK1101 EtherCAT-Koppler (2A E-Bus, ID-Switch)
1 0:1 PREOP + BK1250 Koppler zwischen E-Bus- und K-Bus-Klemmen
What worked on Windows:
- Visual Studio install
- Twincat 3
- I can connect the Windows Box to the Beckhoff device and see the nodes of the devices.
So far so good.
But as you maybe know, the Beckhoff devices from my setup are not supported by the ethercat driver. So I assume I have to use generic type in XML configuration.
Questions:
1. If the EtherCatDriver does not support the Beckhoff Modules I have, then I still can use them by creating a "generic type" XML file for them?
2. I struggled to find a way to extract the "sdo" and "syncmaster" stuff. Where can I do it? I only found the option "Export XML Description" under the "TwinCat" Tab in Visual Studio. Please see the attached files.
3. If I will be able to compile that XML file, what is the way to test it? Is it ok to load the XML with
halrun
and then
halcmd: loadusr -W lcec_conf /home/user/linuxcnc/configs/phywe/ethercat-conf.xml
and some more commands? I'm still investigating this...sorry
Unfortunately I don't have any of the already implemented devices found on the web, so I cannot compare XML outputs.
If somebody has a pro-tip, you are welcome!
Ben
Please Log in to join the conversation.
LinuxBen wrote: Questions:
1. If the EtherCatDriver does not support the Beckhoff Modules I have, then I still can use them by creating a "generic type" XML file for them?
2. I struggled to find a way to extract the "sdo" and "syncmaster" stuff. Where can I do it? I only found the option "Export XML Description" under the "TwinCat" Tab in Visual Studio. Please see the attached files.
3. If I will be able to compile that XML file, what is the way to test it? Is it ok to load the XML with
halrun
and then
halcmd: loadusr -W lcec_conf /home/user/linuxcnc/configs/phywe/ethercat-conf.xml
and some more commands? I'm still investigating this...sorry
Unfortunately I don't have any of the already implemented devices found on the web, so I cannot compare XML outputs.
If somebody has a pro-tip, you are welcome!
Ben
1. Yes, you can.
2. linuxcnc-ethercat uses the so called raw SDO. It is a toil. So rather preconfigure your slaves with a bash scripts consisting of
What do you mean by "syncmaster" stuff? A Hex value for DC configuration? This can be read out from your ESI xml file.
3. Yes, that's right.
Please Log in to join the conversation.
