Ethercat HAL driver

More
08 Jan 2015 18:30 - 08 Jan 2015 18:31 #54754 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Nevermind....I got it somewhat working now...

I will try further after configuring an actual system

Thank you guys for help

Regards,

Steve
Last edit: 08 Jan 2015 18:31 by sdfzz.

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

More
12 Jan 2015 21:27 - 12 Jan 2015 21:28 #54934 by Allan
Replied by Allan on topic Ethercat HAL driver
Inspired by Sascha and Roschi I would like to try using Sascha's driver and have purchased
and experimented with a couple of Bechhoff EtherCAT terminals.

At the moment I can't afford to buy servos. Would it be possible to use Sascha's generic
driver with Bechhoff's EL7041 stepper motor driver?

Sascha, in an earlier post you mentioned documentation. If you have some notes in German
or in English I would be happy to put together some documentation (I can translate) which I
would hope would help both others and me to understand and use your driver. EtherCAT makes
so much sense for LinuxCNC it would be great to make it much easier for all to use.
Last edit: 12 Jan 2015 21:28 by Allan.

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

More
27 Jan 2015 23:09 #55391 by euerka
Replied by euerka on topic Ethercat HAL driver
Dear all,
Now I follow this post and Andreas's manual to connect Yaskawa servopack with linuxcnc, everthing goes well until :
~/linuxcnc-ethercat/linuxcnc$ halrun
rtapi:0 stopped
msgd:0 stopped
halcmd: loadrt threads name1=master period1=1000000
halcmd: loadusr -W lcec_conf ethercat_config_my.xml
halcmd: loadrt lcec
halcmd: addf lcec.read-all master
halcmd: addf lcec.write-all master
halcmd: start
dmesg message shows:
[705599.272444] EtherCAT 0: Link state of ecm0 changed to UP.
[705599.280070] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[705599.292077] EtherCAT 0: 1 slave(s) responding on main device.
[705599.292087] EtherCAT 0: Slave states on main device: INIT.
[705599.292581] EtherCAT 0: Scanning bus.
[705599.316499] EtherCAT 0: Bus scanning completed in 24 ms.
[705599.316509] EtherCAT 0: Using slave 0 as DC reference clock.
[705599.320410] EtherCAT 0: Slave states on main device: PREOP.[color=#ff0000]
[705602.382934] EtherCAT ERROR 0-0: Corrupt mailbox response received![/color]
[705602.382945] EtherCAT DEBUG: 7E 00 01 00 00 63 00 80 04 00 00 00 01 10 05 00 
[705602.382965] EtherCAT DEBUG: 00 07 45 72 72 6F 72 20 52 65 67 69 73 74 65 72 
[705602.382983] EtherCAT DEBUG: 65 60 9A 60 B1 60 B2 60 B8 60 B9 60 BA 60 BC 60 
[705602.383001] EtherCAT DEBUG: C1 60 C2 60 E0 60 E1 60 F4 60 FC 60 FD 60 FE 60 
[705602.383019] EtherCAT DEBUG: FF 60 02 65 03 27 10 27 20 27 E0 27 3F 60 40 60 
[705602.383037] EtherCAT DEBUG: 41 60 5A 60 5B 60 5C 60 5D 60 5E 60 60 60 61 60 
[705602.383055] EtherCAT DEBUG: 62 60 63 60 64 60 65 60 66 60 67 60 68 60 6B 60 
[705602.383073] EtherCAT DEBUG: 6C 60 6D 60 6E 60 71 60 72 60 74 60 76 60 77 60 
[705670.466102] EtherCAT: Requesting master 0...
[705670.466114] EtherCAT: Successfully requested master 0.
[705670.466230] EtherCAT 0: Domain0: Logical address 0x00000000, 6 byte, expected working counter 1.
[705670.466236] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 6 byte, type LWR.
[705670.466290] EtherCAT 0: Master thread exited.
[705670.466297] EtherCAT 0: Starting EtherCAT-OP thread.
[705670.467927] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[705715.024606] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 1 time.
[705715.464737] EtherCAT WARNING 0: 3 datagrams UNMATCHED!
[705716.183720] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[705716.190654] EtherCAT 0: Domain 0: Working counter changed to 1/1.
[705716.312261] EtherCAT 0: Slave states on main device: OP.
[705716.349656] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[705716.353660] EtherCAT 0-0: Acknowledged state SAFEOP.
[705716.464063] EtherCAT WARNING 0: 6 datagrams UNMATCHED!
[705717.032627] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 5 times.
[705717.192606] EtherCAT 0: Domain 0: 3 working counter changes - now 0/1.
[705717.464687] EtherCAT WARNING 0: 18 datagrams UNMATCHED!
[705718.036643] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 3 times.
[705719.040649] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 1 time.
[705719.464082] EtherCAT WARNING 0: 3 datagrams UNMATCHED!
[705721.492751] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[705721.499648] EtherCAT 0: Domain 0: Working counter changed to 1/1.
[705722.885394] EtherCAT 0: Domain 0: Working counter changed to 0/1.
[705723.056714] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 1 time.
[705723.464068] EtherCAT WARNING 0: 3 datagrams UNMATCHED!
[705723.888711] EtherCAT 0: Domain 0: Working counter changed to 1/1.
[705726.893333] EtherCAT 0: Domain 0: Working counter changed to 0/1.
[705726.901697] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".
[705726.904702] EtherCAT 0-0: Acknowledged state SAFEOP.
[705727.072708] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 1 time.
[705727.464031] EtherCAT WARNING 0: 3 datagrams UNMATCHED!
[705727.896710] EtherCAT 0: Domain 0: 2 working counter changes - now 0/1.
[705731.088737] EtherCAT WARNING: Datagram f1fadf0c (domain0-0-main) was SKIPPED 1 time.
[705731.464045] EtherCAT WARNING 0: 3 datagrams UNMATCHED

!

There are two error as I analyzed, first of all [705602.382934] EtherCAT ERROR 0-0: Corrupt mailbox response received, Is it means there is something wrong with slave?

Second, there is sychronization error, what does it mean? I have to set slave as reference DC clock? DC cycle time is how much? please refer to ethercat_config_my.xml. I am trying to figure it out refer to William post and Ivan 's post ,since
Enable notLRW:yes shows by ethercat slave -v

File Attachment:

File Name: YaskawaSGD...5.00.xml
File Size:725 KB


File Attachment:

File Name: ethercat_c...g_my.xml
File Size:1 KB

.
I am appreciated anyone can give any solution I also will post it to etherlab mailing list.
Thanks!
Attachments:

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

More
28 Jan 2015 03:01 - 28 Jan 2015 03:06 #55398 by narogon
Replied by narogon on topic Ethercat HAL driver
why have you two dcconf lines:

<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<dcConf assignActivate="0" sync0Cycle="0" sync0Shift="0"/>

I think you must delete the second one

Besides you can't comment the entering pdo. You must define all the data that the master are receiving and sending.
Last edit: 28 Jan 2015 03:06 by narogon.

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

More
28 Jan 2015 10:58 #55408 by euerka
Replied by euerka on topic Ethercat HAL driver
Hi Nacho,

I use two two dcconf lines:

<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<dcConf assignActivate="0" sync0Cycle="0" sync0Shift="0"/> because I tried to test William's post
I commented the entering pdo because I would like to try Ivan's method , since he mention that his driver also Enable notLRW: yes.

I did as you comment before, the result is the same.

If anyone has other suggestions, I will try it.
Anyhow I will update my status.

Thanks!
-chengxi

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

More
28 Jan 2015 17:08 #55410 by narogon
Replied by narogon on topic Ethercat HAL driver
Two DC lines have no sense for me, the parser is going to read one and overwrite the info in the second line.

In any case have you tried to connect and get the OP mode using TwinCAT from Beckhoff? It helps me a lot to understand what was happening and how to write the .xml files.

Other possible error is that you are using fixed pdo configuration 1602 but you don't specify to the slave configuring parameter with sdoconfig

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

More
28 Jan 2015 22:38 #55419 by euerka
Replied by euerka on topic Ethercat HAL driver

Two DC lines have no sense for me, the parser is going to read one and overwrite the info in the second line.


Understand, Thanks for your explaination.

In any case have you tried to connect and get the OP mode using TwinCAT from Beckhoff? It helps me a lot to understand what was happening and how to write the .xml files.


Yes, I tried it. It works well with Twincat, I can rotate the motor. Maybe I have to come back and try again, because I just tried it, never figure out how does it work and how to write .xml files.

Other possible error is that you are using fixed pdo configuration 1602 but you don't specify to the slave configuring parameter with sdoconfig


I am not clear out this, I will read .xml from vendor creafully and to see how.

-chengxi

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

More
28 Jan 2015 22:49 #55421 by narogon
Replied by narogon on topic Ethercat HAL driver

Other possible error is that you are using fixed pdo configuration 1602 but you don't specify to the slave configuring parameter with sdoconfig


I am not clear out this, I will read .xml from vendor creafully and to see how.

-chengxi


I've read quickly the manual of your servo, check 0x1c12 and 0x1c13 entries. I think you must configure them before sync mode using sdo.

Sorry I'm from my phone and can't describe it better.

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

More
29 Jan 2015 00:50 #55424 by sascha
Replied by sascha on topic Ethercat HAL driver
Dear all,

to be able to better coordinate future development and for easier setup I've decided to build up a separate project for the Ethercat HAL driver stuff. Please find the new repos (including new devices, functions and bugfixes) here:

github.com/sittner/linuxcnc-ethercat

So, if you have new functions, device drivers or fixes please feel free to fork and send me pull requests.

I also have set up a simple Debian repos (currently without keys) which is intended to be used with the current LinuxCNC Debian Wheezy based dist. This way installation should be very easy:
  • create a file "/etc/apt/sources.list.d/linuxcnc-mds.list":
    deb http://repo.modusoft.de/linuxcnc/wheezy ./
  • # sudo apt-get update
  • # sudo apt-get install linuxcnc-ethercat
    The etherlabmaster should be installed automaticaly.
    Currently you will get a warning about missing key.
  • edit /etc/default/ethercat to match your setup
  • # sudo update-ethercat-config
  • reboot
  • # ethercat slaves
    this sould show your connected slaves
  • start working with Ethercat enabled LinuxCNC

After installation you will find some examples in /usr/share/linuxcnc-ethercat/examples.

Have Fun & Kind Regards

Sascha
The following user(s) said Thank You: cgc, narogon, Allan, sqmathlete, Nico2017

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

More
02 Feb 2015 09:21 #55572 by sdfzz
Replied by sdfzz on topic Ethercat HAL driver
Dear all,

Thanks to all your help, now I can jog 3 servos using Omron G5 servo drivers. However, when I hit "home all" button, nothing happens...

- I've connected "axis.N.home-sw-in" to a homing switch, and it seems working fine
- in my ini file, under axis, I added:
HOME = 0.0
HOME_DELAY = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 3.0
HOME_LATCH_BEL = 3.0
HOME_FINAL_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS=NO
HOME_SEQUENCE = 0
- when I press the home switch, linuxcnc says homing is completed (although the servo did not move at all)
- I did not connect velocity command pins (axis.N.joint-vel-cmd)....would this cause a problem in homing? I can jog all right using position command..

Does anyone encountered a similar issue?

Best regards,

Steve

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

Time to create page: 0.225 seconds
Powered by Kunena Forum