[etherlab-users] SoE configuration failes (during startup).
Florian Pose
fp at igh-essen.com
Tue Dec 7 14:51:13 CET 2010
On Thu, Dec 02, 2010 at 04:09:01PM +0100, Baur Andreas wrote:
> Sometimes SoE configuration failes (during startup).
>
> I use DC, RTAI, the newest devel-version of the master and a Rexroth servo drive.
>
> Is it a synchronization problem among threads? See the error message:
Maybe. What is really strange, is that the datagram state seems to be different
in subsequent calls. Please try the below patch:
diff -r b5391b329b5d master/fsm_soe.c
--- a/master/fsm_soe.c Tue Nov 30 15:24:21 2010 +0100
+++ b/master/fsm_soe.c Tue Dec 07 14:49:04 2010 +0100
@@ -646,11 +646,18 @@
uint8_t *data, mbox_prot, opcode, error_flag;
uint16_t idn;
size_t rec_size;
+ uint8_t state = datagram->state;
- if (datagram->state == EC_DATAGRAM_TIMED_OUT && fsm->retries--)
+ if (state == EC_DATAGRAM_SENT
+ || state == EC_DATAGRAM_QUEUED) {
+ // datagram was not sent or received yet.
+ return;
+ }
+
+ if (state == EC_DATAGRAM_TIMED_OUT && fsm->retries--)
return; // FIXME: request again?
- if (datagram->state != EC_DATAGRAM_RECEIVED) {
+ if (state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_soe_error;
EC_SLAVE_ERR(slave, "Failed to receive SoE write"
" response datagram: ");
--
Best regards,
Florian Pose
http://etherlab.org
More information about the Etherlab-users
mailing list