- Posts: 43
- Thank you received: 0
Ethercat HAL driver
In any case you could use the generic component to configure a el7041 in an easy way. Check roschi's tutorial
Tutorial
Please Log in to join the conversation.
first install this repo:
repo.modusoft.de/linuxcnc/wheezy/linuxcnc-ethercat_0.9.0-2_i386.deb
this is version 0.9.0 without the 7041-1000
then download the latest master from github, and type in a terminal "sudo make install"
this is version 0.9.2 with 7041-1000
you need also "linuxcnc-dev"
regards Frank
Please Log in to join the conversation.
Thanks Frank, worked like a charm.
I mean, at least it is recognized now and I can see the pins named lcec.0.7041-1000.XXXXX still haven't tried moving a motor, but should be ok. Yeah, apparently I never had the files for parsing installed.
Also thank you narogon...when I saw Franks reply, didn't want to type the component on my own (if thats what is called, not rly sure what it is...is it a program/function of both a .c and a .h files that you can write by yourself and call it later during the work of LinuxCNC?) so I just followed his advice. But the tutorial is useful if I need to add stuff later.
M
Please Log in to join the conversation.
Another question about the el7041: is there a way to do the commissioning part (current limit and nominal voltage settings) through LinuxCNC and this driver?
I had a successful test run on a motor but I had to do this part through TwinCAT since I didn't know how to do it through our setup.
I was wondering that maybe someone here does.
I would ideally like to bypass using TwinCAT; quite user friendly but I'd have to switch every time I change the parameters and it poses some limits on the hardware as well (works only with intel chipsets as far as I know).
Please Log in to join the conversation.
Please Log in to join the conversation.
- rogerz6217
- Offline
- New Member
-
- Posts: 1
- Thank you received: 0
This is my halrun cmd, everthing goes well.
However, when i use .hal file with linuxcnc, the statusword stuck in 0x650 no matter how i set the controlword.
My .hal file as below.
The change of statusword as below.
Attachment not found
Thanks for help.
Please Log in to join the conversation.
First many thanks to Sascha and Andreas for such a great job and clear instructions on how to get things working. I am a complete beginner on this but learning fast to develop a fully open-source plotting method for making yacht sails.
I have Indra drives and motors on the way and a while back decided to get the EK1818 as being the most cost-effective for my needs. When it turned up I suddenly realised that it is not currently supported under the EtherCat driver (dohh!). I have followed the instructions as far as I can without drivers and motors and can see it sitting there as an "ethercat slaves" device.
I understand that it is essentially a EK1100 with 8 digital inputs (like a EL1018) and 4 digital ouputs (cf. EL2004).
Has anybody got any tips on what I need to modify to get this working with the EtherCat driver? Or can I just "call" it an EK1100 in the xml? I haven't scratched it (yet) so I'm guessing they would exchange it for individual EK1100, EL1018, etc. but that will much more expensive.
I know this is a steep learning curve for me but really appreciate the support of the community!
Thanks,
David
Please Log in to join the conversation.
Markux wrote: Hello
Another question about the el7041: is there a way to do the commissioning part (current limit and nominal voltage settings) through LinuxCNC and this driver?
I had a successful test run on a motor but I had to do this part through TwinCAT since I didn't know how to do it through our setup.
I was wondering that maybe someone here does.
I would ideally like to bypass using TwinCAT; quite user friendly but I'd have to switch every time I change the parameters and it poses some limits on the hardware as well (works only with intel chipsets as far as I know).
If your slave understands SDO commands ( and PDO ampping), then you can use a shell script with Etherlab SDO commands
like:
www.iram.fr/~blanchet/ethercat/akd/examples/akd_free_pdo.sh -- example for Kollmorgen CoE slave
github.com/sirop/EtherCAT_HAL/blob/master/setPDO.sh -- example fro Copley CoE slave
Please Log in to join the conversation.
Editing the el7041 component file, it wouldn't be so difficult define some sdo commands using the parameters defined on the xml file.
Please Log in to join the conversation.
rogerz6217 wrote: Dear all,
However, when i use .hal file with linuxcnc, the statusword stuck in 0x650 no matter how i set the controlword.
My .hal file as below.Code:#load the XML config & the ethercat hal parser. loadusr -W lcec_conf /home/lab428/hiwin.xml loadrt lcec #load the motion component loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES #add the function we need to the servo-thread addf lcec.read-all servo-thread #check if the state is in OP mode then enable emc and go to switched on state. net ready_to_switch lcec.state-op => iocontrol.0.emc-enable-in => lcec.0.0.drivecontrol-0
Thanks for help.
I did not follow your previous comments and I do not know your slave.
So my quick guess: if it is not about improper slave configuration, then it can be a timing issue.
Suppose, your control word is always set (one cycle ?) too late?
To gain more control about this try
either
wiki.linuxcnc.org/cgi-bin/wiki.pl?Etherlab (LinuxCNC, RTAI)
or
github.com/sirop/EtherCAT_HAL/blob/master/pdortapi2dc.comp (Machinekit, Xenomai/RT-Preempt ) .
Please Log in to join the conversation.
