Ethercat HAL driver

More
10 years 9 months ago - 10 years 9 months ago #68392 by narogon
Replied by narogon on topic Ethercat HAL driver
Check the hal ethercat component you have installed, it must contain a file called lcec_el7041_1000.c

In any case you could use the generic component to configure a el7041 in an easy way. Check roschi's tutorial

Tutorial
Last edit: 10 years 9 months ago by narogon.
The following user(s) said Thank You: Markux

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #68433 by cgc
Replied by cgc on topic Ethercat HAL driver
Hi,
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
Last edit: 10 years 9 months ago by cgc.
The following user(s) said Thank You: Markux

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #68870 by Markux
Replied by Markux on topic Ethercat HAL driver
Hi guys, sry for the late reply, reached the computer just today.

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
Last edit: 10 years 9 months ago by Markux.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #69087 by Markux
Replied by Markux on topic Ethercat HAL driver
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).

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #69115 by cgc
Last edit: 10 years 9 months ago by cgc.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #69166 by rogerz6217
Replied by rogerz6217 on topic Ethercat HAL driver
Dear all,
This is my halrun cmd, everthing goes well.
Code:
halcmd: loadrt threads name1=master period1=1000000 halcmd: loadusr -W lcec_conf /home/lab428/hiwin.xml halcmd: loadrt lcec halcmd: addf lcec.read-all master halcmd: addf lcec.write-all master halcmd: start setp lcec.0.0.drivecontrol-1 1 setp lcec.0.0.drivecontrol-2 1 setp lcec.0.0.drivecontrol-0 1

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 addf motion-command-handler servo-thread addf motion-controller servo-thread addf lcec.write-all servo-thread #set the control word to 6 and the state will be ready to switch on. setp lcec.0.0.drivecontrol-1 1 setp lcec.0.0.drivecontrol-2 1 #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

The change of statusword as below.


Thanks for help.

Please Log in or Create an account to join the conversation.

Time to create page: 0.137 seconds
Powered by Kunena Forum