Re: [etherlab-users] API for enabling/disabling sync managers of a slave
That looks fine as far as it goes, but you do need to run the cyclic loop after calling ecrt_master_activate. That kicks off the configuration process but it requires several cycles to complete and actually transition the slaves to OP. And once your application exits, the master will automatically deactivate and return the slaves to PREOP. From: Mohsen Alizadeh Noghani Sent: Monday, 1 October 2018 22:09 To: Gavin Lambert ; etherlab-users@etherlab.org Subject: Re: [etherlab-users] API for enabling/disabling sync managers of a slave I still haven't been able to enable sync managers (and thus change the state to SAFEOP) Currently, I'm executing this code<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmohse-n%2FL7N_EtherLab%2Fblob%2Fmaster%2Fsimple_test.c=02%7C01%7Cgavin.lambert%40tomra.com%7Cde4676633de44877b14b08d6277d949a%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C636739817661893040=L9ZYnno%2FqdrZNpqI7Zp02Xglc8dUybnVKy%2BnXniYeik%3D=0>, which is basically the user example. Output of $ethercat xml of the slave is: 30101 L7N #x1601 2nd Receive PDO Mapping #x6040 0 16 Controlword UINT16 #x607a 0 32 Target Position UINT32 #x1a01 2nd Transmit PDO Mapping #x6041 0 16 Statusword UINT16 #x6064 0 32 Position Actual Value UINT32 On Wed, Sep 26, 2018 at 3:02 AM Gavin Lambert mailto:gavin.lamb...@tomra.com>> wrote: You typically don’t need to explicitly disable a sync manager; you simply don’t refer to it or any PDOs it contains, and then it will not be included in the domain’s data. Alternatively, you can configure the sync manager but then list zero PDOs for it, to explicitly set the PDO Assign register for that SM to 0 (for slaves that support flexible assignment). Note that you should not enable the SM watchdog if you’re setting it to have zero PDOs. It sounds like you should probably read the documentation for the EtherCAT protocol and for the Etherlab master in particular. From: Mohsen Alizadeh Noghani mailto:m.aliza...@gmail.com>> Sent: Wednesday, 26 September 2018 04:52 To: Gavin Lambert mailto:gavin.lamb...@tomra.com>>; etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: Re: [etherlab-users] API for enabling/disabling sync managers of a slave Thanks Gavin. 1- Would ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE ) enable Sync Manager 2 of slave sc? 2- How can I disable it then? I doesn't seems the function provides an option to enable/disable. Best, Mohsen On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert mailto:gavin.lamb...@tomra.com>> wrote: You need to write an application, and then use ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the Sync Managers for each slave. From: Mohsen Alizadeh Noghani Sent: Tuesday, 25 September 2018 02:29 To: etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] API for enabling/disabling sync managers of a slave Hello everyone. Is there a function call that I can use for enabling a particular sync manager of a slave? For example, I'd like to enable sync manager 2 of slave 1. Best, Mohsen ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] API for enabling/disabling sync managers of a slave
I still haven't been able to enable sync managers (and thus change the state to SAFEOP) Currently, I'm executing this code <https://github.com/mohse-n/L7N_EtherLab/blob/master/simple_test.c>, which is basically the user example. Output of $ethercat xml of the slave is: 30101 L7N #x1601 2nd Receive PDO Mapping #x6040 0 16 Controlword UINT16 #x607a 0 32 Target Position UINT32 #x1a01 2nd Transmit PDO Mapping #x6041 0 16 Statusword UINT16 #x6064 0 32 Position Actual Value UINT32 On Wed, Sep 26, 2018 at 3:02 AM Gavin Lambert wrote: > You typically don’t need to explicitly disable a sync manager; you simply > don’t refer to it or any PDOs it contains, and then it will not be included > in the domain’s data. > > > > Alternatively, you can configure the sync manager but then list zero PDOs > for it, to explicitly set the PDO Assign register for that SM to 0 (for > slaves that support flexible assignment). Note that you should not enable > the SM watchdog if you’re setting it to have zero PDOs. > > > > It sounds like you should probably read the documentation for the EtherCAT > protocol and for the Etherlab master in particular. > > > > *From:* Mohsen Alizadeh Noghani > *Sent:* Wednesday, 26 September 2018 04:52 > *To:* Gavin Lambert ; etherlab-users@etherlab.org > *Subject:* Re: [etherlab-users] API for enabling/disabling sync managers > of a slave > > > > Thanks Gavin. > > > > 1- Would > > ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE ) > > enable Sync Manager 2 of slave sc? > > 2- How can I disable it then? I doesn't seems the function provides an > option to enable/disable. > > > > Best, > > Mohsen > > > > > > On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert > wrote: > > You need to write an application, and then use > ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the > Sync Managers for each slave. > > > > *From:* Mohsen Alizadeh Noghani > *Sent:* Tuesday, 25 September 2018 02:29 > *To:* etherlab-users@etherlab.org > *Subject:* [etherlab-users] API for enabling/disabling sync managers of a > slave > > > > Hello everyone. > > > > Is there a function call that I can use for enabling a particular sync > manager of a slave? > > For example, I'd like to enable sync manager 2 of slave 1. > > > Best, > > Mohsen > > > ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] API for enabling/disabling sync managers of a slave
You typically don’t need to explicitly disable a sync manager; you simply don’t refer to it or any PDOs it contains, and then it will not be included in the domain’s data. Alternatively, you can configure the sync manager but then list zero PDOs for it, to explicitly set the PDO Assign register for that SM to 0 (for slaves that support flexible assignment). Note that you should not enable the SM watchdog if you’re setting it to have zero PDOs. It sounds like you should probably read the documentation for the EtherCAT protocol and for the Etherlab master in particular. From: Mohsen Alizadeh Noghani Sent: Wednesday, 26 September 2018 04:52 To: Gavin Lambert ; etherlab-users@etherlab.org Subject: Re: [etherlab-users] API for enabling/disabling sync managers of a slave Thanks Gavin. 1- Would ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE ) enable Sync Manager 2 of slave sc? 2- How can I disable it then? I doesn't seems the function provides an option to enable/disable. Best, Mohsen On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert mailto:gavin.lamb...@tomra.com>> wrote: You need to write an application, and then use ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the Sync Managers for each slave. From: Mohsen Alizadeh Noghani Sent: Tuesday, 25 September 2018 02:29 To: etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] API for enabling/disabling sync managers of a slave Hello everyone. Is there a function call that I can use for enabling a particular sync manager of a slave? For example, I'd like to enable sync manager 2 of slave 1. Best, Mohsen ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] API for enabling/disabling sync managers of a slave
Thanks Gavin. 1- Would ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE ) enable Sync Manager 2 of slave sc? 2- How can I disable it then? I doesn't seems the function provides an option to enable/disable. Best, Mohsen On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert wrote: > You need to write an application, and then use > ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the > Sync Managers for each slave. > > > > *From:* Mohsen Alizadeh Noghani > *Sent:* Tuesday, 25 September 2018 02:29 > *To:* etherlab-users@etherlab.org > *Subject:* [etherlab-users] API for enabling/disabling sync managers of a > slave > > > > Hello everyone. > > > > Is there a function call that I can use for enabling a particular sync > manager of a slave? > > For example, I'd like to enable sync manager 2 of slave 1. > > > Best, > > Mohsen > ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] API for enabling/disabling sync managers of a slave
You need to write an application, and then use ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the Sync Managers for each slave. From: Mohsen Alizadeh Noghani Sent: Tuesday, 25 September 2018 02:29 To: etherlab-users@etherlab.org Subject: [etherlab-users] API for enabling/disabling sync managers of a slave Hello everyone. Is there a function call that I can use for enabling a particular sync manager of a slave? For example, I'd like to enable sync manager 2 of slave 1. Best, Mohsen ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
[etherlab-users] API for enabling/disabling sync managers of a slave
Hello everyone. Is there a function call that I can use for enabling a particular sync manager of a slave? For example, I'd like to enable sync manager 2 of slave 1. Best, Mohsen ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users