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.