[etherlab-users] "PDO entry 0x6000:02 does not byte-align in config 0:7. PDO entry registration failed! "
Fabian Herb
fabian.herb at indurad.com
Thu Mar 25 14:02:38 CET 2010
Hi Christian!
Instead of passing the structs to ecrt_slave_config_pdos(), you can use
ecrt_slave_config_reg_pdo_entry() to register each PDO individually. This
function has an optional parameter to get the bit position. With this provided
it won't complain about byte alignment.
It also seems to work to only register the first PDO entry, and you get access
to the other entries that share the same byte. I think this is the way it is
done in the digital IO examples.
Best regards,
Fabian Herb
Am Dienstag 23 März 2010 11:43:26 schrieb Richter, Christian:
> Hi,
>
> I try configure an AnalogIO-Slave like in the User-example, but have
> problems with the Input-configuration. When running application error
> message "PDO entry 0x6000:02 does not byte-align in config 0:7. PDO entry
> registration failed!" occurs.
>
> The mapping looks like this:
>
> const static ec_pdo_entry_reg_t domain1_regs[] = {
> {AnaIO, Alex_1, 0x7010, 1, &off_ana_out1},
> {AnaIO, Alex_1, 0x7010, 2, &off_ana_out2},
> {AnaIO, Alex_1, 0x6000, 1, &off_ana_in1},
> {AnaIO, Alex_1, 0x6000, 2, &off_ana_in2},
> {AnaIO, Alex_1, 0x6000, 3, &off_ana_in3},
> {AnaIO, Alex_1, 0x6000, 4, &off_ana_in4},
> {AnaIO, Alex_1, 0x6000, 5, &off_ana_in5},
> {AnaIO, Alex_1, 0x6000, 7, &off_ana_in7},
> {AnaIO, Alex_1, 0x0000, 0, &off_ana_in0},
> {AnaIO, Alex_1, 0x6000, 11, &off_ana_in11},
> {AnaIO, Alex_1, 0x6000, 12, &off_ana_in12},
> {AnaIO, Alex_1, 0x6000, 15, &off_ana_in15},
> {AnaIO, Alex_1, 0x6000, 16, &off_ana_in16},
> {AnaIO, Alex_1, 0x6000, 19, &off_ana_in19},
> {AnaIO, Alex_1, 0x6000, 13, &off_ana_in13},
> {AnaIO, Alex_1, 0x6000, 14, &off_ana_in14},
> {}
> };
>
> static ec_pdo_entry_info_t alex_1_channels[] = {
> {0x7010, 1, 16},
> {0x7010, 2, 16}
> };
> static ec_pdo_entry_info_t alex_in_channels[] = {
> {0x6000, 1, 1},
> {0x6000, 2, 1},
> {0x6000, 3, 1},
> {0x6000, 4, 1},
> {0x6000, 5, 2},
> {0x6000, 7, 2},
> {0x0000, 0, 8},
> {0x6000, 11, 32},
> {0x6000, 12, 32},
> {0x6000, 15, 16},
> {0x6000, 16, 16},
> {0x6000, 19, 16},
> {0x6000, 13, 16},
> {0x6000, 14, 16}
> };
>
> static ec_pdo_info_t alex_1_pdos[] = {
> {0x1601, 2, alex_1_channels}
> };
>
> static ec_pdo_info_t alex_in_pdos[] = {
> {0x1a00, 14, alex_in_channels}
> };
>
> static ec_sync_info_t alex_1_syncs[] = {
> {2, EC_DIR_OUTPUT, 1, alex_1_pdos},
> {3, EC_DIR_INPUT, 1, alex_in_pdos},
> {0xff}
> };
>
> hope some one can help me to solve the "byte-align"-problem
>
> best regards
> Christian Richter
> Christian Richter
> Forschung/Entwicklung
>
> KNESTEL Technologie & Elektronik GmbH
>
> Riedleweg 4, 87496 Hopferbach, Germany
> Tel.:08374/585 8352
>
> Web: http://www.knestec.de
> Email: christian.richter at knestec.de
>
> Geschäftsführer: Markus Knestel - Handelsregister Kempten (HRB 10342)
>
--
________________________________________
Fabian Herb
Embedded Software Development
indurad GmbH
The Industrial Radar Company
Lochnerstrasse 4-20
52064 Aachen, Germany
Tel: +49 241 80 968 71
fabian.herb at indurad.com
http://www.indurad.com/
_______________________________________
More information about the Etherlab-users
mailing list