Ethercat HAL driver

More
22 Feb 2021 16:57 #199723 by bkt
Replied by bkt on topic Ethercat HAL driver
@db1981 It is el5151 00x0 twincat configurator see it as el5151 0000 0025 and I see there are 2 configuration "1600/1601 - 1A00/1A01" these seems ok ... but not see any value changing inside online tab on twincat configurator (I use twincat configurator because more easy than twincat3). On twincat configurator I can send el5151 in OP mode ... but in linuxcnc is anytime on PREOP when all other slaves is in OP mode.

There are any reasons? Is only because is not set the right xml or there are other reasons?

regards

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

More
22 Feb 2021 17:45 - 22 Feb 2021 17:46 #199735 by db1981
Replied by db1981 on topic Ethercat HAL driver
under the tab "process Data" , is an button "predefined PDO Assignment" there choose "standart 32 Bit" and run the configuration. this will change the pdo content of 1A00.
After this it should work with linuxcnc.

at the moment this is obiviously configured as "standart 16 Bit"...
Last edit: 22 Feb 2021 17:46 by db1981.

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

More
22 Feb 2021 18:24 #199746 by db1981
Replied by db1981 on topic Ethercat HAL driver
@bkt

sorry forget it.
I've got the same proplem by testing now.
Beckhoff changed the Pdo configuration between firmware 0024 and 0025. This will not work at the moment.
I will discuss this with sascha tomorrow.
The following user(s) said Thank You: bkt

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

More
22 Feb 2021 18:36 #199748 by bkt
Replied by bkt on topic Ethercat HAL driver
Seems I'm a very lucky man. :( ....... Thanks for the advice and I hope in your or Chimeno help tomorrow.

Good Night

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

More
22 Feb 2021 18:48 #199751 by db1981
Replied by db1981 on topic Ethercat HAL driver
the changes for this are only to edit 4 lines of codes, but then it is hardcoded for this revision of the card.

because of that this will not stay an single case in the future, we should implement an solution in lcec_conf for handling/detect this firmware rev. stuff.
The following user(s) said Thank You: bkt

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

More
23 Feb 2021 07:38 - 23 Feb 2021 08:03 #199801 by bkt
Replied by bkt on topic Ethercat HAL driver

but then it is hardcoded for this revision of the card.


does this mean that you will need to create an xml file specifically for the el5151 element? Or more clean solution is write a new custom driver called el5151_25 and use it on my xml instead the old one?

P.S.: I launch these command: ethercat xml -p6 (my el5151) and obtain these xml

Warning: Spoiler!


The problem is ethercat-xml see SubIdx=20 and SubIdx=17 as UINT32 but on ethrcat-pdos command these SubIdx seems nr.11 and 14? is these the problem? Different number of SubIdx detected or stored?

If I read lcec_el5151.c I see these part:

Warning: Spoiler!


That is the same thart i see on ethercet configurator .... same idx, same pin, same data type .... so seems lcec_el5151.c was ok .... but these part is no understand from my side, so not understand if work or not for me:

Warning: Spoiler!


I appreciate some little expalanation so maybe I have some ideas about.

regards

bkt
Last edit: 23 Feb 2021 08:03 by bkt.

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

More
23 Feb 2021 09:13 #199804 by db1981
Replied by db1981 on topic Ethercat HAL driver
the custom driver for the el5151 needs to be modified. It has to check for the revision of the card and then use the corespondending pdo mapping.

If you look at this:
static ec_pdo_entry_info_t lcec_el5151_in[] = {
   {0x6000, 0x01,  1}, // Latch C valid
   {0x6000, 0x02,  1}, // Latch extern valid
   {0x6000, 0x03,  1}, // Set counter done
   {0x0000, 0x00,  4}, // Gap
   {0x6000, 0x08,  1}, // Extrapolation stall
   {0x6000, 0x09,  1}, // Status of input A
   {0x6000, 0x0a,  1}, // Status of input B
   {0x6000, 0x0b,  1}, // Status of input C
   {0x0000, 0x00,  1}, // Gap
   {0x6000, 0x0d,  1}, // Status of extern latch
   !!!{0x1c32, 0x20,  1}, // Sync error
   {0x0000, 0x00,  1}, // Gap
   !!!{0x1800, 0x09,  1}, // TxPDO Toggle
   {0x6000, 0x11, 32}, // Counter value
   {0x6000, 0x12, 32}  // Latch value
};

and here:
LCEC_PDO_INIT(pdo_entry_regs, slave->index, slave->vid, slave->pid,!!! 0x1c32, 0x20!!!, &hal_data->sync_err_pdo_os, &hal_data->sync_err_pdo_bp);
  LCEC_PDO_INIT(pdo_entry_regs, slave->index, slave->vid, slave->pid,!!! 0x1800, 0x09!!!, &hal_data->tx_toggle_pdo_os, &hal_data->tx_toggle_pdo_bp);

beckhoff changed :

0x1c32, 0x20 to 0x6000 , 0x0E and
0x1800, 0x09 to 0x6000 , 0x10

sizes are the same...

so if you are firm with this, you can change these 4 lines, compile and test it.
The following user(s) said Thank You: bkt

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

More
23 Feb 2021 12:08 #199815 by bkt
Replied by bkt on topic Ethercat HAL driver

so if you are firm with this, you can change these 4 lines, compile and test it.


I'm not very ... but I don't see any other chances for my incremental encoder .... is there any?

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

More
23 Feb 2021 12:34 #199820 by db1981
Replied by db1981 on topic Ethercat HAL driver
ok, then i will prepare this ...

-which linuxcnc version ?
-debian?
-RIP version oder installed linuxcnc?

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

More
23 Feb 2021 13:53 #199825 by db1981
Replied by db1981 on topic Ethercat HAL driver
@bkt

sorry i am on the "woodway".....

Now i also got an newer EL5151, and both of them old and new run in the test setup without problems. May be there is wrong information in the SII eeprom. writing the coded pdo config is without errors.

So there must be an wrong thing in your config.

please post the ethercat_conf.xml

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

Time to create page: 0.144 seconds
Powered by Kunena Forum