[etherlab-users] Requesting application layer state change in code
Gavin Lambert
gavin.lambert at tomra.com
Tue Oct 2 00:43:51 CEST 2018
Ordinarily you just call ecrt_master_activate to activate the master. This will return slaves to PREOP (if they’re somehow in a different state – PREOP is the normal state when the master is not active however), configure them, then bring them to SAFEOP and then OP.
It will also do this again automatically if a slave reboots or otherwise falls out of OP while the master is active (which is why it’s important to use the slave_config_sdo methods instead of manually writing config SDOs).
See the example code.
(There is a way to manually request a different state, which is what the “ethercat state” command uses, but it is not intended for application use.)
From: messiah esfahani
Sent: Monday, 1 October 2018 22:05
To: ronaldo.mercado at diamond.ac.uk; etherlab-users at etherlab.org
Subject: Re: [etherlab-users] Requesting application layer state change in code
Thanks Ronaldo.
Now my question is, which function changes the state from PREOP to SAFEOP? Does "ecrt_master_activate" request this state transition too?
Sincerely,
Messiah
On Mon, Oct 1, 2018 at 12:24 PM ronaldo.mercado at diamond.ac.uk<mailto:ronaldo.mercado at diamond.ac.uk> <ronaldo.mercado at diamond.ac.uk<mailto:ronaldo.mercado at diamond.ac.uk>> wrote:
Hi,
It is the “ecrt_master_activate” call that causes the change from SAFEOP -> OP
Ronaldo
From: etherlab-users <etherlab-users-bounces at etherlab.org<mailto:etherlab-users-bounces at etherlab.org>> On Behalf Of messiah esfahani
Sent: 01 October 2018 09:40
To: etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: [etherlab-users] Requesting application layer state change in code
Dear EtherLab users,
How can I request a change in application layer of a slave (e.g. SAFEOP -> OP) in code?
I have examined the examples and although they all eventually begin exchanging data with PDOs, I have not encountered an explicit function call that causes the transition from safe-operational to operational state.
Sincerely,
Messiah
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181001/8d271493/attachment-0004.htm>
More information about the Etherlab-users
mailing list