Add extra ERROR on mailbox receive timeout to improv diagnostics possibilities

feature/soem_140
Andreas Karlsson 2019-05-24 14:27:41 +02:00
parent 9c921d8d4e
commit 8c1e83ee8e
2 changed files with 4 additions and 1 deletions

View File

@ -1097,7 +1097,8 @@ int ecx_mbxreceive(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int tim
}
else /* no read mailbox available */
{
wkc = 0;
if (wkc > 0)
wkc = EC_TIMEOUT;
}
}

View File

@ -45,6 +45,8 @@ extern "C"
#define EC_ERROR -3
/** return value too many slaves */
#define EC_SLAVECOUNTEXCEEDED -4
/** return value request timeout */
#define EC_TIMEOUT -5
/** maximum EtherCAT frame length in bytes */
#define EC_MAXECATFRAME 1518
/** maximum EtherCAT LRW frame length in bytes */