Ethercat HAL driver

More
7 years 1 month ago #145986 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi Marcin,
  You do what I can! I'm glad you start the engine, I just didn't understand very well? surely only the PID configured with more margin would have to work without problems.

Hi Nico,
in theory, the configuration of any ethercat device is quite easy, if you are using TWINCAT, the values you have, you have to invert them every two bits example
TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" invert.
Parameter Linuxcnc-ethercat "0A F0 00 0F A0
When the parameters are very long, it is best to make a capture with WIRESHARK, you activate it at the same time as the configuration in TWINCAT and you can see the exact values in format for linuxcnc-ethercat.
I create my own .XML configuration files only with the parameters that I want to change, since any configuration problem creates many problems.
I don't know if I could help you a lot.
Regards
Chimeno
The following user(s) said Thank You: Nico2017

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

More
7 years 1 month ago - 7 years 1 month ago #145992 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello guys,
I have attached a new EL9576 controller, for you players!
regards
Chimeno
Attachments:
Last edit: 7 years 1 month ago by chimeno.
The following user(s) said Thank You: CORBETT

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

More
7 years 1 month ago #146633 by Nico2017
Replied by Nico2017 on topic Ethercat HAL driver
Hi,
thanks @chimeno for your answer. Although just to be sure:

TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" invert.
Parameter Linuxcnc-ethercat "0A F0 00 0F A0

Did you mean: Parameter Linuxcnc-ethercat "0A F0 00 0F 0A" the last one being different?

So if I got any device EtherCAT capable and its ESI file, I should be able to work out the associated .xml file for linuxcnc-etherCAT. Is that it?

Thank you,
Nicolas

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

More
7 years 1 month ago - 7 years 1 month ago #146733 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi Nico, Sorry I was wrong,
TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" inverted.
Parameter Linuxcnc-ethercat "A0 F0 00 0F A0
If you can configure any device in the attached .xml file.
for example
EL5152
"set up
80n0: 03 Enable up / down
counter [} 128]
Enablement of the up / down counter in place of the encoder with the bit set.
BOOLEAN RW 0x00 (0dec) "


<? xml version = "1.0" encoding = "ISO-8859-1"?>
<EtherCATMailbox><CoE> <InitCmds>
<InitCmd>
<Transition> PS </Transition>
<Comment> <! [CDATA [Max current]]> </Comment>
<Timeout> 0 </Timeout>
<Ccs> 1 </Ccs>
<Index> 32768 </Index>
<SubIndex> 3 </SubIndex>
<Data> 0x01 </Data>
</InitCmd>
</InitCmds></SoE> </EtherCATMailbox>

it helps you?

Regards
Chimeno
Last edit: 7 years 1 month ago by chimeno.

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

More
7 years 1 month ago #146745 by Nico2017
Replied by Nico2017 on topic Ethercat HAL driver
Hi @Chimeno,

just to be sure on what you just explained:

TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" inverted.
Parameter Linuxcnc-ethercat "A0 F0 00 0F A0"

The way I see it is, you keep the first and last A0 and you just reverse two by two the other pairs of characters. The example might be confusing as the characters in between the A0 form a palindrome (symetry if you reverse it).

Just another thing to be sure we are on the same page for the way I am using etherCAT with linuxcnc. What I do in my hal file is:
loadusr -W lcec_conf param-ethercat-v1.xml
addf lcec.read-all ethercat-thread-fp
addf lcec.write-all ethercat-thread-fp

So I just want to be able to understand and extract information on a ESI file to be able to implement it into the param-ethercat-v1.xml file used by linuxcnc-ethercat, for instance:
Code:
<masters> <master idx="0" appTimePeriod="1000000" refClockSyncCycles="4"> <slave idx="0" type="EK1100"/> <slave idx="1" type="EL1008"/> <slave idx="2" type="EL1008"/> <slave idx="3" type="..."/> </master> </masters>
with the slave idx=3 a non Beckhoff device which is EtherCAT capable for which I have the .ESI file. The tutorial was presenting the case of Rexroth modules but I am wondering how to do it for another brand devices.
Thanks for your help,
Nicolas

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

More
7 years 1 month ago #146753 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hi Nico, if the number invented it, now I make it clearer
TWINCAT parameter "A0E0F0" = "A0 0E F0"
Parameter Linuxcnc-ethercat "F0 0E A0"

with the slave idx = 3 a non-Beckhoff device and the driver is not in the linuxcnc-ethercat list, you have two options to create or finalize the generic
example :
<! - EL6751 CANopen slave ->
    <slave idx = "8" type = "generic" vid = "00000002" pid = "1a5f3052" configPdos = "true">
      <sdoConfig idx = "f800" subIdx = "complete">
        <sdoDataRaw data = "0A 00 05 02 80 00 1E 00" />
        <sdoDataRaw data = "01 00 12 80 64 00" />
      </ sdoConfig>
      <sdoConfig idx = "8000" subIdx = "complete">
        <sdoDataRaw data = "2B 00 05 00 00 00 00 00" />
        <sdoDataRaw data = "00 00 00 00 00 00 00 00" />
        <sdoDataRaw data = "00 00 00 00 05 04 00 00" />
        <sdoDataRaw data = "02 00 00 00 5F 1A 00 00" />
        <sdoDataRaw data = "00 00 00 00 00 00 00 00" />
        <sdoDataRaw data = "00 00 00 00 00 00 00 00" />
        <sdoDataRaw data = "00 00 02 00 64 00 03 00" />
        <sdoDataRaw data = "00 00 00 00 01 01 00 00" />
        <sdoDataRaw data = "0A 00" />
      </ sdoConfig>
      <sdoConfig idx = "8001" subIdx = "complete">
        <sdoDataRaw data = "01 00 01 00 00 00 FF 08" />
        <sdoDataRaw data = "85 01 00 00 00 00 00 18" />
      </ sdoConfig>
      <sdoConfig idx = "8002" subIdx = "complete">
        <sdoDataRaw data = "01 00 00 00 00 00 FF 08" />
        <sdoDataRaw data = "05 02 00 00 00 00 00 14" />
      </ sdoConfig>
      <syncManager idx = "0" dir = "out">
      </ syncManager>
      <syncManager idx = "1" dir = "in">
      </ syncManager>
      <syncManager idx = "2" dir = "out">
        <pdo idx = "1600">
          <! - Byte 0 ->
          <pdoEntry idx = "7000" subIdx = "01" bitLen = "1" halPin = "eps-tog-out" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "02" bitLen = "1" halPin = "emc-on" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "03" bitLen = "1" halPin = "emc-auto" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "04" bitLen = "1" halPin = "eps request" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "05" bitLen = "1" halPin = "eps- unload" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "06" bitLen = "1" halPin = "out-nc0.5" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "07" bitLen = "1" halPin = "eps-vc-rdy" halType = "bit" />
          <pdoEntry idx = "7000" subIdx = "08" bitLen = "1" halPin = "out-nc0.7" halType = "bit" />

Regards
Chimeno
The following user(s) said Thank You: Nico2017

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

Time to create page: 0.401 seconds
Powered by Kunena Forum