From 2b339a135ba183c0351058b952f4dbbb955a2f9e Mon Sep 17 00:00:00 2001 From: rtlaka Date: Fri, 2 Feb 2018 08:27:19 +0100 Subject: [PATCH] When broadcast read the state,it is OK if the WKC is higher --- soem/ethercatmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soem/ethercatmain.c b/soem/ethercatmain.c index 666325d..b15fae6 100644 --- a/soem/ethercatmain.c +++ b/soem/ethercatmain.c @@ -732,7 +732,7 @@ int ecx_readstate(ecx_contextt *context) rval = 0; wkc = ecx_BRD(context->port, 0, ECT_REG_ALSTAT, sizeof(rval), &rval, EC_TIMEOUTRET); - if(wkc == *(context->slavecount)) + if(wkc >= *(context->slavecount)) { allslavespresent = TRUE; }