Anything you can do in the ethercat command line tool, you can do in code by 
making the equivalent ioctl calls that it does, although it's a less-documented 
and more fragile interface.

Having said that, there is ordinarily no reason to manually change slave 
operation states -- the master will automatically take care of bringing all 
slaves from INIT to PREOP as a matter of course, and then once you activate 
your master application, all slaves configured in its domains will be brought 
to OP (and similarly back to PREOP after the master is deactivated).  If a 
slave reboots while the master is active then it will automatically be brought 
back to OP if your app is using it.  If a slave errors and returns to SAFEOP, 
the error will be acknowledged, and then it will similarly be reconfigured and 
returned to OP.


Gavin Lambert
Senior Software Developer

 


COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New 
Zealand
Switchboard: +49 2630 96520 | https://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.
-----Original Message-----
From: Yaw Mensah Bonsu Nana
Sent: Wednesday, 21 April 2021 5:54 pm
To: etherlab-users@etherlab.org
Subject: Re: [Etherlab-users] C- Function to change slave-state

Hallo Richard,

thank you for the fast reply. But I am looking for a way to the State change in 
code.

Best Regards
Yaw
-- 
Etherlab-users mailing list
Etherlab-users@etherlab.org
https://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to