Ethercat HAL driver

More
05 Jun 2017 14:28 - 05 Jun 2017 14:28 #94093 by sirop
Replied by sirop on topic Ethercat HAL driver

Hello,

i am new to ethercat and linux.
But up to now i have installed IgH EtherCAT Master 1.5.2.
I have started ethercat master in the terminal with the gineric linux driver.
The networkleds are blinking and the statemachine is in the state: PREOP
But wehn i try to change to SAFEOP or to OP then the Slave gets the an Fieldbuserror with the wrong length.
Christian


In terms of linuxcnc-ethercat your slave is a generic slave, so you need an XML description file similar to github.com/sittner/linuxcnc-ethercat/blo...at-conf.xml#L18-L143 .
If you have already such a file, please share it.

As for SDO download/upload: S300 xml is a slave description according to EtherCAT standard and you do not have to download it anyware.
SDO download however can be used to configure your slave, for instance, its mode of operation. For this you work with single values/numbers and - in less frequent cases - with array of numbers.
Last edit: 05 Jun 2017 14:28 by sirop.

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

More
05 Jun 2017 14:36 #94096 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Hi sirop. Thank you for your fast response. I habe no XML description file. How can i create one? Do you have a documentation?

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

More
05 Jun 2017 15:00 #94098 by sirop
Replied by sirop on topic Ethercat HAL driver

Hi sirop. Thank you for your fast response. I habe no XML description file. How can i create one? Do you have a documentation?


Try
<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
    <!--  S300_S400_S600_S700 CANopen slave -->
    <slave idx="0" type="generic" vid="0000006a" pid="03000600" configPdos="false">
      <syncManager idx="0" dir="out">
      </syncManager>
      <syncManager idx="1" dir="in">
      </syncManager>
      <syncManager idx="2" dir="out">
        <pdo idx="1702">
          <!-- Rx PDOs>
          <pdoEntry idx="606b" subIdx="0" bitLen="32" halPin="YourPinName1" halType="u32"/>
          <pdoEntry idx="6040" subIdx="0" bitLen="16" halPin="YourPinName2" halType="u32"/>
        </pdo>
      </syncManager>
      <syncManager idx="3" dir="in">
        <pdo idx="1b01">
          <!-- Tx PDOs -->
          <pdoEntry idx="6064" subIdx="0" bitLen="32" halPin="YourPinName3" halType="u32"/>
          <pdoEntry idx="6041" subIdx="0" bitLen="16" halPin="YourPinName4" halType="u32"/>
      </syncManager>
    </slave>
  </master>
</masters>
This is a very basic config which I reconstructed from your ethercat xml output. Do not know if I'd had to enumerate all 8 Sync Managers, but you'l see pretty quickly if it works or not.

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

More
05 Jun 2017 15:53 #94102 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Sorry, but i don´t know where to place the xml or how to activate it......

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

More
05 Jun 2017 16:01 #94103 by sirop
Replied by sirop on topic Ethercat HAL driver
It is smth. like:
loadusr -W lcec_conf  ethercat-conf.xml
loadrt lcec

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

More
05 Jun 2017 16:28 #94105 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
loadusr and loadrt are linuxCNC cmmands.
Up to now i have just tried to send commands thru the commandline tool.
My intention is at least to use the drives with linuxcnc but from this i am 100 years away.
I don´t know how to configure the .hal and the .ini and and so on
I found some infos from roschi but at the moment i just try to get one motor spinning.
So is there a way to do this with the commandlinetool or do i have to integrate it in linuxcnc.
By the way, it is not possible to use the generic Linux driver for RTAI realtime, right?
I have installed from the LinuxCNC LiveCD, do i have to compile new for the use of Ethercat?

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

More
05 Jun 2017 16:40 #94108 by sirop
Replied by sirop on topic Ethercat HAL driver

loadusr and loadrt are linuxCNC cmmands.
Up to now i have just tried to send commands thru the commandline tool.
My intention is at least to use the drives with linuxcnc but from this i am 100 years away.
I don´t know how to configure the .hal and the .ini and and so on
I found some infos from roschi but at the moment i just try to get one motor spinning.
So is there a way to do this with the commandlinetool or do i have to integrate it in linuxcnc.
By the way, it is not possible to use the generic Linux driver for RTAI realtime, right?
I have installed from the LinuxCNC LiveCD, do i have to compile new for the use of Ethercat?


Command line tools can only help you with SDO upload/download. So they are of limited use in operational phase.
As soon as you deal with PDOs, you need some real time scheduling.

linuxcnc-ethercat is not a part of the official linuxcnc release, so you have to compile and install it.
The following user(s) said Thank You: Nico2017

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

More
06 Jun 2017 18:03 #94189 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
I tryed now for hours to compile install config linuxcnc.
Is there a complete step by step tutorial for linux idiots?
Up to now i feels i have compiled the world, but nothing works.
I found this : github.com/sittner/linuxcnc-ethercat
is this enough?
I have a Ethercat linuxcnc config attached and the debugoutput.
But for me there is no useful information inside.
Attachments:

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

More
06 Jun 2017 19:02 #94194 by Allan
Replied by Allan on topic Ethercat HAL driver
Attached are some notes I made during a recent installation.
Hope they help.

Allan

File Attachment:

File Name: ethercatdr...6-06.txt
File Size:2 KB
Attachments:

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

More
06 Jun 2017 19:34 #94195 by robh
Replied by robh on topic Ethercat HAL driver
sorry for a dumb question but..
i got some estun drives with ethercat im looking to get setup now

can someone explaine the math etc how to work out what the Position factor should be
6093 & 6094
the numerator & divisor
if there was an exsample things would be clearer

i have 17bit encoders, and 10mm screw pitch on X Y Z , direct drive onto the shaft

on the 4th & 5th the motors & Drives have a gear ratio 1/5 from the motor to gear then a 1/72 final worm drive

also whats the best/easy way to tune drives , i guess using the software with the drives to tune them and then start linking them into linuxcnc fully.

as in the past i have done analog drives with linuxcnc doing the loop

thanks, rob

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

Time to create page: 0.251 seconds
Powered by Kunena Forum