Ethercat HAL driver

More
31 Mar 2015 06:12 #57326 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Hi, kyoshiro1108,

Would you please try typing "sudo ethercat start" on your terminal before running LinuxCNC?

Regards,

Steve

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

More
31 Mar 2015 12:34 #57341 by kyoshiro1108
Replied by kyoshiro1108 on topic Ethercat HAL driver

Hi, kyoshiro1108,

Would you please try typing "sudo ethercat start" on your terminal before running LinuxCNC?

Regards,

Steve


The ethercat run on background when I boot up the computer.
so that I can execute ethercat slaves and ethercat master command.

but the problem still exist....

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

More
01 Apr 2015 13:47 #57363 by kyoshiro1108
Replied by kyoshiro1108 on topic Ethercat HAL driver
I used the other command

$./configure --enable-simulator

to build linuxcnc and the error is .....

$ cd linuxcnc-add-hal-ethercat/
$ . scripts/rip-environment
$ halrun

halcmd: loadrt threads name1=master period1=1000000
halcmd: loadusr -W lcec_conf /home/oslab/Desktop/ethercat_config_my.xml
halcmd: loadrt lcec
lcec: dlopen: /home/oslab/linuxcnc-add-hal-ethercat/rtlib/lcec.so: cannot open shared object file: No such file or directory
<stdin>:3: /home/oslab/linuxcnc-add-hal-ethercat/bin/rtapi_app exited without becoming ready
<stdin>:3: insmod failed, returned -1

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

More
03 May 2015 07:19 #58343 by euerka
Replied by euerka on topic Ethercat HAL driver
I start to try Sittner new repository <github.com/sittner/linuxcnc-ethercat> , and make, make install.
Everything goes well until I try to load my configure xml, there are errors as follow:
halcmd: loadusr -W lcec_conf ethercat_config_my.xml
lcec_conf: ERROR: unexpected node master found
lcec_conf: ERROR: Parse error at line 1: parsing aborted
<stdin>:4: lcec_conf exited without becoming ready

My configure file as below:
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<slave idx="0" type="generic" vid="00000539" pid="02200001" configPdos="true">
<syncManager idx="0" dir="out"/>
<syncManager idx="1" dir="in"/>
<syncManager idx="2" dir="out">
	<pdo idx="1602">
	<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="drivecontrol" halType="bit"/>
	<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="velocity" halType="s32"/>
	</pdo>
</syncManager>
<syncManager idx="3" dir="in">
	<pdo idx="1A02">	
	<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="drivestatus" halType="bit"/>
	<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="pos" halType="S32"/>
	</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<sdoConfig idx="6060" subIdx="0">
	<sdoDataRaw data="08"/>
</sdoConfig
><sdoConfig idx="60C2" subIdx="1">
	<sdoDataRaw data="01"/>
</sdoConfig>
<sdoConfig idx="60C2" subIdx="2">
	<sdoDataRaw data="FD"/>
</sdoConfig>
</slave>
</master>

I think my configure file format should be OK, because I use it before. May I know how to test this new respository works ?

I already start ethercat,
ethercat master
or
ethercat slave -v
show normal.


By the way

sdfzz wrote:
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

I also meet this problem when I install hal on another computer.
Can u tell me how to solve it ?
Thank U.


After you install etherlab, the default directory will be /opt/etherlab
you can use soft link
sudo ln -s /opt/etherlab/etc/init.d/ethercat /etc/init.d/ethercat
Then you can start ethercat by
/etc/init.d/ethercat start
Hope it helps.
-Chengxi

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

More
03 May 2015 08:43 #58345 by euerka
Replied by euerka on topic Ethercat HAL driver
I got the answer after I read the source code.
add
<masters>
......
</master>
in configure file to support multi-master.

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

More
19 May 2015 03:56 #58833 by pavel7890
Replied by pavel7890 on topic Ethercat HAL driver
Hi,

I finally started to work out my indradrive ethercat project. I acquired Wasino gang lathe and want to use 2 axis servo and main spindle, all controlled by ethercat.

I started with main spindle. So far so good :) Just a bit playing with correct soft start/stop spindle procedure.

I guess I found a bug in sittners lcec_conf.c for scale and offset. Since I do not have any experience with git contribution i put it here:

// parse scale
if (strcmp(name, "scale") == 0) {
floatReq = 1;
p->floatScale = atof(val);
continue;
}

// parse offset
if (strcmp(name, "offset") == 0) {
floatReq = 1;
p->floatOffset = atof(val);
continue;
}

There was not continue; so it just parsed scale parameter with error.
Hope it helps.

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

More
20 May 2015 17:21 #58889 by sascha
Replied by sascha on topic Ethercat HAL driver
You are right, thank you.

I've took it into master: github.com/sittner/linuxcnc-ethercat/com...7da79e3406d6d881dc8b

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

More
26 May 2015 13:17 #59059 by bkt
Replied by bkt on topic Ethercat HAL driver
sorry at all .... I have not experience with ethercat ..... and i read some specification on linuxcnc doc ethercat, I have a doubt: How many drives can be connected to LinuxCNC with EtherCAT with safe/robust operation ?

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

More
06 Jun 2015 19:02 #59516 by a60081
Replied by a60081 on topic Ethercat HAL driver
I want to create two domain for pdos because the motor i used is required one domain(1600) for transfer, and another one for receive(1A00).
If only one domain, it will be synchronize error.

How could i edit it in lcec.c?

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

More
08 Jun 2015 23:11 - 08 Jun 2015 23:12 #59628 by narogon
Replied by narogon on topic Ethercat HAL driver

I want to create two domain for pdos because the motor i used is required one domain(1600) for transfer, and another one for receive(1A00).
If only one domain, it will be synchronize error.

How could i edit it in lcec.c?


Check tutorial

step 9 parameter 4.

I think you mean sync managers when you say domains.
Last edit: 08 Jun 2015 23:12 by narogon.
The following user(s) said Thank You: a60081, Nico2017

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

Time to create page: 0.177 seconds
Powered by Kunena Forum