[etherlab-users] Beckhoff EL2252...
hamelin.philippe at ireq.ca
hamelin.philippe at ireq.ca
Mon May 27 16:14:43 CEST 2013
Hi Pier,
I found an old example that I wrote for the EL2252. I know that it worked some times ago and I hope it still works. Please let me know if it works for you.
Philippe
-----Message d'origine-----
De : etherlab-users-bounces at etherlab.org [mailto:etherlab-users-bounces at etherlab.org] De la part de pier
Envoyé : 27 mai 2013 08:59
À : fp at igh-essen.com; etherlab-users at etherlab.org; Tim Poznic; Rusu Valerian
Objet : [etherlab-users] Beckhoff EL2252...
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
_______________________________________________
etherlab-users mailing list
etherlab-users at etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: el2252.cpp
Type: application/octet-stream
Size: 17300 bytes
Desc: el2252.cpp
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130527/dd246b29/attachment-0005.obj>
More information about the Etherlab-users
mailing list