Ethercat HAL driver

More
14 years 3 months ago #22444 by andypugh
Replied by andypugh on topic Re:Ethercat HAL driver
Does your driver use RTNet? I noticed the other day that there is an option in RTAI to add RTNet support, but I am not sure if it is turned on by default in the LinuxCNC distributions.
More
14 years 3 months ago #22445 by sascha
Replied by sascha on topic Re:Ethercat HAL driver
andypugh wrote:

Does your driver use RTNet? I noticed the other day that there is an option in RTAI to add RTNet support, but I am not sure if it is turned on by default in the LinuxCNC distributions.


No, it uses IgH's EtherCAT master. It's a driver for EtherCAT, not RTNet. The intension was to use a protocol that is
(relatively) open and where a good base of reasonable priced hardware is available. Fortunately the EthcerCAT
matser compiles fine with the version of RTAI that is included in the LinuxCNC distribution.
More
13 years 7 months ago #32111 by willrat
Replied by willrat on topic Ethercat HAL driver
Has anyone tried this? I've got some Beckhoff modules I'd like to try out.

I'm following wiki.linuxcnc.org/cgi-bin/wiki.pl?EtherCatDriver

I'm trying it on 10.04 as per livecd install

The file src/hal/drivers/ethercat/master/debian/configure is missing so the ethercat master cannot be built as a deb file. (as per the instructions)

When I install the ethercat master using 'normal' configure prefix=/usr, make, install, install_modules the linuxcnc build process cannot find ecrt.h (even though it seems to be in /usr/include)

I notice that in the debian build folder for the master the src/hal/drivers/ethercat/master/debian folder references ecrt.h in ethercat-dev.links.in presumably linking the header elsewhere for realtime components?
More
13 years 7 months ago - 13 years 7 months ago #32118 by sascha
Replied by sascha on topic Ethercat HAL driver
Sorry, it was my mistake. Files named "configure" are ignored by git by default and the repos is
not really maintained at the moment since I am very busy and community response for this
driver was very frugal.

We are using the driver in several machines.

I have commited the current development version to the repos now (including the missing script).
EtherCAT master is updated to 1.5.2 (wiki is fixed for this). There are some important fixes plus new
supported devices including a (currently not heavily testet) generic driver which allows simple
mapping of PDOs to HAL pins by the configuration xml.

The problem with ecrt.h in /usr/include is, that the kernel build system will not find it there.
So I softlinked it to /lib/modules/2.6.32-122-rtai/build/include.
Last edit: 13 years 7 months ago by sascha. Reason: Typo, missing sentence.
The following user(s) said Thank You: cncbasher, Nico2017
More
13 years 7 months ago - 13 years 7 months ago #32134 by willrat
Replied by willrat on topic Ethercat HAL driver
Great, Thanks for the update.

And you've added 40x2 - useful as I have a EL4032 AO unit to utilise. I also have a EL3063 12bit AI - I'll have a look at the setup for the 3162 and see if I can figure it out.

There was a typo (.o changed to .c) in the Makefile that prevented building. I've attached a diff of what I assumed to be a fix. however I now have undefined symbols when it builds emcec.ko

WARNING: "ecrt_master_receive" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_create_domain" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_sdo" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_send" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_sdo_request_state" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_domain_queue" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_sync_slave_clocks" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_complete_sdo" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_watchdog" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_domain_reg_pdo_entry_list" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_application_time" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_domain_process" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_callbacks" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_state" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_state" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_slave_config" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_dc" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_sdo_request_data" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_domain_data" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_pdos" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_sync_reference_clock" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_slave_config_create_sdo_request" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_deactivate" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_domain_size" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_sdo_request_read" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_master_activate" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_release_master" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_request_master" [/home/user/linux-ec/src/emcec.ko] undefined!
WARNING: "ecrt_sdo_request_timeout" [/home/user/linux-ec/src/emcec.ko] undefined!
Last edit: 13 years 7 months ago by willrat. Reason: added build errors
More
13 years 6 months ago #32146 by sascha
Replied by sascha on topic Ethercat HAL driver
OK, I've fixed the Makefile (was the tribute to try a fast action :-) ).

In case of EL41x2 to EL40x2 just the output object ID's are changed. EL31x2 to EL30x2 is
not such simple, as the state information differs a little (I think you mean EL3062?).
If you have such a device, it would be fine if you try. Keep asking when I could help.

The warnings you see come from the missing "extern" keyword on the
function declaration in ecrt.h (in my opinion), but I haven't testet it yet.
I will have to do it and send the developers a notice. But the warning has no
functional impact. It also appears when you build the EtherCAT RT demo apps.
Time to create page: 0.765 seconds
Powered by Kunena Forum