My config matches output of 'ethercat cstruct' with one difference. Is it normally ok to zero out receive pdo's if I don't plan to using those? I've written an empty SM2 in place of what 'ethercat cstruct' populates with defaults. My syncs appear as:
ec_sync_info_t slave_0_syncs[] = { {2, EC_DIR_OUTPUT, 0, 0, EC_WD_DISABLE}, {3, EC_DIR_INPUT, 1, 0x8dd315021341, EC_WD_DISABLE}, {255, EC_DIR_INVALID, 0, 0, EC_WD_DEFAULT}, }; On Wed, Jun 3, 2020 at 7:26 PM Gavin Lambert <gavin.lamb...@tomra.com> wrote: > Typically, yes. > > > > What you should try is this: > > 1. Ensure that your master app is not running. > 2. Physically reboot the slave (eg. power cycle). > 3. Run “ethercat cstruct -p0” (substitute the position of your actual > slave if different) > 4. Compare the output to the code in your master app. > > > > This will tell you the default PDO layout of the slave, which is typically > what you want to use in your master app – unless you can prove otherwise, > assume anything different in your code is a bug. > > > > In some cases you may want to use some non-default PDOs, and there are > ways to get the cstruct output for that as well, but typically slaves will > only support a limited set of alternative configurations. > > > > > *Gavin Lambert*Senior Software Developer > > > [image: TOMRA] <http://www.compacsort.com> [image: Facebook] > <https://www.facebook.com/Compacsort> [image: Linkedin] > <https://www.linkedin.com/company/compac-sorting-equipment/> [image: > Youtube] <https://vimeo.com/compacsort> [image: twitter] > <https://twitter.com/compacsort> [image: instagram] > <https://www.instagram.com/compacsort/> > > *COMPAC SORTING EQUIPMENT LTD* | 4 Henderson Pl | Onehunga | Auckland > 1061 | New Zealand > Switchboard: +64 96 34 00 88 | tomra.com <http://www.tomra.com> > > The information contained in this communication and any attachment is > confidential and may be legally privileged. It should only be read by the > person(s) to whom it is addressed. If you have received this communication > in error, please notify the sender and delete the communication. > > *From:* William Zumwalt > *Sent:* Thursday, 4 June 2020 12:15 > *To:* etherlab-users@etherlab.org > *Subject:* [etherlab-users] Invalid output configuration > > > > I getting "Invalid output configuration" when starting up a slave. Can > anyone help narrow this down, to what this might refer to? > > [ 4101.757740] EtherCAT DEBUG 0-main-0: PREOP -> PREOP + ERROR. > [ 4101.757751] EtherCAT ERROR 0-main-0: Failed to set SAFEOP state, slave > refused state change (PREOP + ERROR). > [ 4101.765760] EtherCAT 0: Slave states on main device: PREOP + ERROR. > [ 4101.765769] EtherCAT ERROR 0-main-0: AL status message 0x001D: "Invalid > output configuration". > > Could this be configuration issue with the sync EC_DIR_OUTPUT? > >
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users