Ethercat HAL driver

More
11 years 10 months ago #54347 by roschi
Hi,

my comments are based on the latest commit on github aschiffler
The add-hal-ethercat branch is merged to master.

Homing
- set both velocities (latch, search) in the ini file to zero --> simulation purpose, testing
- set search to zero and latch to 6.6 --> multi turn absolut encoders, position will taken from feedback as it is
- set search to zero and latch to 9.9 --> drive driven homing search motion, started by homing pin, finished by home-sw-in pin, (e.g. make use of wireing for overtravel switches directly to drive)
- set search to != zero and latch != 6.6 or 9.9 --> NC driven homing search motion, remember home-sw-in is active low, movement won't start if axis.N.home-sw-in is 0

Please Log in to join the conversation.

More
11 years 10 months ago #54357 by ccdodo
Hi Roschi,

Thanks for your help first. The home does move the joints after I modified the signals in hal file.

BUT the home procedure is not like what I expected: After the home button is pressed, two possible results will turn out according to different config:
A The joint moves to the home switch but makes no more move when it reaches the switch, and homing stays True.
B The joint moves to the home switch which is reused as limit switch, sets the current coordinate as HOME_OFFSET, shows the homed sign like BMW, and sent a limit error.

Different combinations of parameters in ini file are test:
home_sw & limit_sw are different | home_sw & limit_sw are the same
HM_OFFSET: 0 0 0 0 | 0 30 30 -30
SEARCH_VEL: 30 30 -30 -30 | 30 30 30 30
LATCH_VEL: -5 5 5 -5 | -5 -5 5 5
IGNORE LIMIT: Y Y Y Y | Y Y Y Y
Result: A A * * | B B B B
*) Homing is aborted manually as homing direction is wrong

The mechanism structure in my machine is like:

X+ [Axis end] joint home-sw limit-sw [Axis end] X-

In condition A, limit-sw is false when it is not touched and it is wired into t input port on EL2521, home-sw is true when it is not touched and it is wired into input port on EL1008.
In condition B, home-sw in A is disabled and limit-sw is reused as home-sw, the input is connected into t-not port in hal file as it has to be the opposite to limit-sw.

The results seem to show that the action used to find the exact position of home after the joint reached the home-sw is invalid.

It really confused me...

Please Log in to join the conversation.

More
11 years 10 months ago #54432 by roschi
Hi,

as I understand your post/problem above you use the "classic" homing sequence state machine. (LinuxCNC commands moves and recognize the switches)
I have modified this to my needs.
I have tested the "classic" homing so far but I can't reply 100% if it is doing all things right. For my config it does. ("classic" and my new variantes to state machine)

Please use the version for homing.c before my edits and look for common help on homing. ( link to correpondinf git hub file homing.c )

I think this is not a special topic which is connected to EtherCAT HAL Driver. Independent if you use the digital I/O via EtherCAT.

Hope that will help

Regards Andreas

Please Log in to join the conversation.

More
11 years 9 months ago #54484 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Hi,

First of all, thank you for your contribution.

However, I am having problems installing HAL-driver. I am planning to use LinuxCNC with EtherCAT slaves.

So, I've downloaded and installed LinuxCNC 2.6 LiveCD. Then, following roschi's tutorial, I downloaded EtherLab and "ec-debianize-master.zip".

I put "debian" folder from "ec-debianize-master.zip" inside Etherlab folder and ran the followings in terminal:

cd debian

sudo ./configure -a

However, I get error saying "sudo: ./configure: command not found"

Does anyone knows how to fix this? Any help will be appreciated

Thanks, Steve

Please Log in to join the conversation.

More
11 years 9 months ago #54486 by mariusl
Replied by mariusl on topic Ethercat HAL driver
Is there a configure script in the directory?

Regards
Marius


www.bluearccnc.com

Please Log in to join the conversation.

More
11 years 9 months ago #54488 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Thank you for your reply

There is a configure file inside debian folder. There are 10 files and 2 folders inside debian folder.

Please Log in to join the conversation.

More
11 years 9 months ago #54646 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
UPDATE:

I've been testing the installation on Ubuntu 12.04 LTS with LinuxCNC 2.6 installed (3.4-9-rtai-686-pae).
I'm stuck at the step where I place "debian" folder inside "ethercat-1.5.2" folder and do configuration and packaging.

1. "debian" folder from ec-debianize-master.zip
--> at "./configure -a"
"sudo: ./configure: command not found"

2. "debian" folder from linuxcnc-add-hal-ethercat.zip
--> at dpkg-buildpackage
cd src && ./autogen.sh
/bin/sh: 1: cd: can't cd to src
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

3. "debian" folder from linuxcnc-master.zip
--> at dpkg-buildpackage
cd src && ./autogen.sh
/bin/sh: 1: cd: can't cd to src
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

4. debian folder in linuxcnc-master/src/hal/drivers/ethercat/master/
--> there is no configure file

it seems quiet strange for case 2 and 3 that the dpkg-buildpackage command asks for src/autogen.sh....the file is in linuxCNC directory, not in etherCAT. It sounds like dpkg-buildpackage command is trying to install LinuxCNC...

If you successed in installing EtherCAT driver for LinuxCNC, would you please let me know of your set up? Like kernel/RTAI version, LinuxCNC version and OS?

I've tried this on LinuxCNC Live CD(Debian) and Ubuntu (12.04 LTS) and both systems failed.

Any help will be appreciated

Regards,

Steve

Please Log in to join the conversation.

More
11 years 9 months ago #54709 by roschi
Replied by roschi on topic Ethercat HAL driver
Hi Steve,

So if you have checked all posts and tutorials find in this thread and have no succes. Here are the principal steps:
- Install LinuxCNC from Live CD --> get running OS with RTAI
- Download, Build, Install and test the EtherCAT Master (IgH EtherLAB) --> configure EtherCAT Master (MAC, start on boot time, kernel modul ec_master and e.g. ec_e1000e are loaded)
- Get / Download the source for LinuxCNC with EtherCAT HAL Driver
- Build LinuxCNC; the build process have to know where are the Header files from EtherCAT are stored.

Perhaps see also the Paper from 'narogon' Control de movimientos mediante bus EtherCAT y LinuxCNC were also step by step is presented

Up to now you have to rebuild LinuxCNC from source
In previous discussions in this thread there was the topic about including the EtherCAT driver in official releases. But this is not possible due to license issues.

Perhaps some one on the fourm can give a recommendation on how to proced for deploy adidtional binaries (RT-Modules, Kernel Modulkes) to just use the 'lcec' module in HAL config without recompiling LinuxCNC

Regards Andreas

Please Log in to join the conversation.

More
11 years 9 months ago #54742 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
roschi, thank you for your reply

I tried again with LinuxCNC liveCD with ubuntu 10.04, and the installation was much more smooth

One thing was that when compiling "debian" folder from "ec-debianize-master.zip", I had to set the configure file to be "executable as program" to avoid permission denied problem.

Now I've finished installing linuxCNC :)

I don't have actual hardware yet, so I guess I will have to wait to test my system.

One question though...how do you configure your system? It's a big question, and there are some good materials in the tutorial file, and it seems to me that the key factor is creating hal and xml files. So, I can create a config from 'stepconf wizard' and modify it so that it works with ethercat devices?

Regards,

Steve

Please Log in to join the conversation.

More
11 years 9 months ago #54744 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Sorry...one more question..

when I tried roschi's sameple hal and ini files to load linuxcnc, i got errors:

my-mill.hal:4: execv(lcec_conf): No such file or directory
my-mill.hal:4: lcec_conf exited without becoming ready

This line gives the error: loadusr -W lcec_conf /root/linuxcnc/configs/my-mill/ethercat_config_n.xml

I did place the correct xml file inside my config folder.

I saw from one of the video that you run

/etc/init.d/ethercat start

before you run linuxcnc. However, for my case, there is no ethercat file in /etc/init.d. Is there any mistakes in my installation?

Regards,

Steve

Please Log in to join the conversation.

Time to create page: 0.249 seconds
Powered by Kunena Forum