[etherlab-users] Beckhoff EL2252...
pier
perlsoft at bluewin.ch
Mon May 27 14:59:21 CEST 2013
Dear Florian And Etherlab Users
we are trying to use the Beckhoff Timestamp n. 2 outputs module...
The autodetect of the cstruct do corresponds partially to the XML file
so we adjusted from to :
/* Master 0, Slave 3, "EL2252"
* Vendor ID: 0x00000002
* Product code: 0x08cc3052
* Revision number: 0x00130000
*/
ec_pdo_entry_info_t slave_3_pdo_entries[] = {
{0x1d09, 0x81, 8}, /* Activate */
{0x1d09, 0x90, 64}, /* StartTime */
{0x7000, 0x01, 1}, /* Output */
{0x7000, 0x02, 1}, /* TriState */
{0x7010, 0x01, 1}, /* Output */
{0x7010, 0x02, 1}, /* TriState */
{0x0000, 0x00, 4},
};
ec_pdo_info_t slave_3_pdos[] = {
{0x1602, 1, slave_3_pdo_entries + 0}, /* DC Sync Activate */
{0x1603, 1, slave_3_pdo_entries + 1}, /* DC Sync Start */
{0x1600, 2, slave_3_pdo_entries + 2}, /* Channel 1 */
{0x1601, 3, slave_3_pdo_entries + 4}, /* Channel 2 */
{0x1604, 0, NULL}, /* Reserved */
};
/*
* This is Autodetected...
* But no corresponding to XML informations....
* All Registers are outputs here...
*/
ec_sync_info_t slave_3_syncs[] = {
{0, EC_DIR_INPUT, 1, slave_3_pdos + 0, EC_WD_DISABLE},
{1, EC_DIR_INPUT, 1, slave_3_pdos + 1, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 3, slave_3_pdos + 2, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{4, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
{0xff}
};
to :
// Completed From XML File....
ec_pdo_entry_info_t slave_3_pdo_entries[] = {
{0x1d09, 0x81, 8}, /* Activate */
{0x1d09, 0x90, 64}, /* StartTime */
{0x7000, 0x01, 1}, /* Output */
{0x7000, 0x02, 1}, /* TriState */
{0x7010, 0x01, 1}, /* Output */
{0x7010, 0x02, 1}, /* TriState */
{0x0000, 0x00, 4}, /* Reserved */
{0x1d09, 0x10, 64}, /* SysTime */
{0x1d09, 0x11, 8}, /* Feedback */
};
ec_pdo_info_t slave_3_pdos[] = {
{0x1602, 1, slave_3_pdo_entries + 0}, /* DC Sync Activate */
{0x1603, 1, slave_3_pdo_entries + 1}, /* DC Sync Start */
{0x1600, 2, slave_3_pdo_entries + 2}, /* Channel 1 */
{0x1601, 2, slave_3_pdo_entries + 4}, /* Channel 2 */
{0x1604, 0, NULL}, /* Reserved */
{0x1a00, 1, slave_3_pdo_entries + 7}, /* SysTime..*/
{0x1a01, 1, slave_3_pdo_entries + 8}, /* Feedback...*/
};
ec_sync_info_t slave_3_syncs[] = {
{0, EC_DIR_OUTPUT, 1, slave_3_pdos + 0, EC_WD_DISABLE},
{1, EC_DIR_OUTPUT, 1, slave_3_pdos + 1, EC_WD_DISABLE},
{2, EC_DIR_OUTPUT, 2, slave_3_pdos + 2, EC_WD_ENABLE},
{3, EC_DIR_INPUT, 1, slave_3_pdos + 4, EC_WD_DISABLE},
{4, EC_DIR_INPUT, 1, slave_3_pdos + 5, EC_WD_DISABLE},
{5, EC_DIR_INPUT, 1, slave_3_pdos + 6, EC_WD_DISABLE},
{0xff}
};
Finally we get the configuration working for etherlab but
the outputs remain always off and we read also the systime to 0....
On the module is declared an eeprom.... probably must be programmed ?
How to do that ? Must be Twincat software ?
I found here some messages on January :
http://www.mail-archive.com/etherlab-users@etherlab.org/msg01741.html
But not a solution....
Best Regards
Pier
--
Perlsoft GmbH
Sennereigasse 27
3900 Brig
Switzerland
Tel. +41977022933
More information about the Etherlab-users
mailing list