I am new to ethercat and am experimenting with IgH EtherCAT master 1.5.1 on Ubuntu 10.04. We're using it for Copley Xenus Plus motor controllers. I have some questions regarding application layer state control. To begin with, here is a quote from the controller's programmer's manual, pg 41:

"The following [AL] states are defined for the Copley Controls CANopen amplifiers: Pre-operational, Operational, Stopped."

Note there is no Safeop state. When ethercat master tries to set that state, I get the (PREOP + ERROR) error message I've seen in the archives here. I looked at the SII record and the enable_safeop flag was set, which is obviously a bug on Copley's part. Still, I thought if I could clear that bit, master stack would not attempt to go into the safeop state.

First problem: though the command line sii_read produced a file I could hex edit to clear the bit, sii_write failed to change the entry in the controller. dmesg shows the write was successful, but the controller's record did not alter. Whatever mechanism sii_write uses, it doesn't facilitate a change in flash memory on the Copley controller.

Second problem: since I couldn't correct the source, I sabotaged the SII read in slave.c (ec_slave_fetch_sii_general) by simply commenting out the assignment, leaving the previously memset 0 data intact. This did result in enable_safeop=no, but unfortunately ethercat master *still* tries to go into safeop the first time ecrt_master_send is invoked. Why does the master stack try to go into a state it has been informed does not exist?

Third problem: I must have a fundamental misunderstanding of ethercat, because I thought there would be a really obvious method exposed in the user library named something like "ecrt_slave_config_request_al_state_change" that I could use to request the slaves go directly to OP state. Or for that matter, allow me to control AL state within the application realtime as may be needed. I can't find any such method. Are applications not "supposed" to control AL state outside of the master thread? Or am I just blind...?

I'm at a loss of how to proceed. Suggestions welcome.

Keith Rogers

_______________________________________________
etherlab-users mailing list
[email protected]
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to