- Posts: 3
- Thank you received: 0
Ethercat HAL driver
- Doyle
- Offline
- New Member
-
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
- sirop
- Offline
- Elite Member
-
- Posts: 193
- Thank you received: 57
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
- narogon
- Offline
- Senior Member
-
- Posts: 43
- Thank you received: 14
Editing the el7041 component file, it wouldn't be so difficult define some sdo commands using the parameters defined on the xml file.
- sirop
- Offline
- Elite Member
-
- Posts: 193
- Thank you received: 57
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 ) .
- narogon
- Offline
- Senior Member
-
- Posts: 43
- Thank you received: 14
narogon wrote: I've just make a pull request to sasha to add the posibility of using additional attributes in xml files.
Editing the el7041 component file, it wouldn't be so difficult define some sdo commands using the parameters defined on the xml file.
I've just included the parameters to the component, check my fork github.com/narogon/linuxcnc-ethercat
Just have to use
I've just had a quick look to beckhoff documentation and I think you want to configure 0x8010 0x01 and 0x8010 0x03 parameters. Tell me if the parameters you want are others
- Markux
- Offline
- New Member
-
- Posts: 9
- Thank you received: 1
narogon wrote: Editing the el7041 component file, it wouldn't be so difficult define some sdo commands using the parameters defined on the xml file.
I've just included the parameters to the component, check my fork github.com/narogon/linuxcnc-ethercat
Just have to useCode:<slave idx="0" type="EL7041-1000" nomVoltage="numberyouwant" maxCurrent="numberyouwant">.....
Thank you narogon.
Since these two are crucial parameters that can cause also immediate hardware damage without even moving the motor, it might not be a bad idea to have them in the .xml file. It would be nice however to have the liberty of accessing the entire CoE register later on; how do you see this been done? as described in the link provided by cgc in Thinkpad example, sending commands or maybe a file with all of the addresses inside?
Macheinekit_Thinkpad
Thanks again to both, you have been really helpful. Also thanks sirop, I'll give the files a go in the next days.
Have you tried your fork practically?
If you wish I can try it, got all of the hardware needed..I can set the parameters and check them later with TwinCAT before moving/powering the motor to be on the safe side...