Ethercat HAL driver

More
5 years 8 months ago #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
More
5 years 8 months ago #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
More
5 years 8 months ago #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
More
5 years 8 months ago - 5 years 8 months ago #199801 by bkt
Replied by bkt on topic Ethercat HAL driver

db1981 wrote: 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: 5 years 8 months ago by bkt.
More
5 years 8 months ago #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:
Code:
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:
Code:
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
More
5 years 8 months ago #199815 by bkt
Replied by bkt on topic Ethercat HAL driver

db1981 wrote: 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?
Time to create page: 1.632 seconds
Powered by Kunena Forum