[etherlab-users] EtherCAT master 1.5.2: ec_sync_info_t
hamelin.philippe at ireq.ca
hamelin.philippe at ireq.ca
Wed Jul 3 15:00:59 CEST 2013
Hi Michael,
If a sync manager is designed to work in output, I don't think you can configure it as input or vice versa. In your case, you switched the SM1 from output to input. Look in the documentation of the EK1828 to see what direction each SM should have.
Philippe
________________________________
De : etherlab-users-bounces at etherlab.org [mailto:etherlab-users-bounces at etherlab.org] De la part de Michael Wenz
Envoyé : 3 juillet 2013 04:42
À : etherlab-users at etherlab.org
Objet : [etherlab-users] EtherCAT master 1.5.2: ec_sync_info_t
Hello,
I am using EtherCAT 1.5.2. The slave is from Beckhoff. It has the following configuration:
/* Master 0, Slave 5, "EK1828"
* Vendor ID: 0x00000002
* Product code: 0x07242c52
* Revision number: 0x00110000
*/
ec_pdo_entry_info_t slave_5_pdo_entries[] = {
{0x0000, 0x00, 4}, /* Pad */
{0x7000, 0x01, 1}, /* Output */
{0x7010, 0x01, 1}, /* Output */
{0x7020, 0x01, 1}, /* Output */
{0x7030, 0x01, 1}, /* Output */
{0x7040, 0x01, 1}, /* Output */
{0x7050, 0x01, 1}, /* Output */
{0x7060, 0x01, 1}, /* Output */
{0x7070, 0x01, 1}, /* Output */
{0x0000, 0x00, 4}, /* Pad */
{0x6000, 0x01, 1}, /* Input */
{0x6010, 0x01, 1}, /* Input */
{0x6020, 0x01, 1}, /* Input */
{0x6030, 0x01, 1}, /* Input */
{0x0000, 0x00, 4}, /* Pad */
};
ec_pdo_info_t slave_5_pdos[] = {
{0x1600, 2, slave_5_pdo_entries + 0}, /* Channel 5 */
{0x1601, 1, slave_5_pdo_entries + 2}, /* Channel 6 */
{0x1602, 1, slave_5_pdo_entries + 3}, /* Channel 7 */
{0x1603, 1, slave_5_pdo_entries + 4}, /* Channel 8 */
{0x1604, 1, slave_5_pdo_entries + 5}, /* Channel 9 */
{0x1605, 1, slave_5_pdo_entries + 6}, /* Channel 10 */
{0x1606, 1, slave_5_pdo_entries + 7}, /* Channel 11 */
{0x1607, 2, slave_5_pdo_entries + 8}, /* Channel 12 */
{0x1a00, 1, slave_5_pdo_entries + 10}, /* Channel 1 */
{0x1a01, 1, slave_5_pdo_entries + 11}, /* Channel 2 */
{0x1a02, 1, slave_5_pdo_entries + 12}, /* Channel 3 */
{0x1a03, 2, slave_5_pdo_entries + 13}, /* Channel 4 */
};
ec_sync_info_t slave_5_syncs[] = {
{0, EC_DIR_OUTPUT, 4, slave_5_pdos + 0, EC_WD_ENABLE},
{1, EC_DIR_OUTPUT, 4, slave_5_pdos + 4, EC_WD_ENABLE},
{2, EC_DIR_INPUT, 4, slave_5_pdos + 8, EC_WD_DISABLE},
{0xff}
};
How is the array slave_5_syncs determined?
First I have tried following array in my implementation.
ec_sync_info_t slave_5_newsyncs[] = {
{0, EC_DIR_OUTPUT, 8, slave_5_pdos + 0, EC_WD_ENABLE},
{1, EC_DIR_INPUT, 4, slave_5_pdos + 8, EC_WD_DISABLE},
{0xff}
};
But then it is only possible to write the outputs. It is not possible to read the inputs. The input values are always 0. But when using slave_5_syncs it is also possible to read the inputs.
Thank you in advance.
Best regards
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130703/34e3b769/attachment-0005.htm>
More information about the Etherlab-users
mailing list