diff --git a/master/fsm.c b/master/fsm.c index 2b18b11fabad41d15380a15dfd4c4fc395f9d513..9f518e4993599be9eaad06915bfc60f1474dced8 100644 --- a/master/fsm.c +++ b/master/fsm.c @@ -609,7 +609,7 @@ void ec_fsm_master_action_process_states(ec_fsm_t *fsm if (!(slave->sii_mailbox_protocols & EC_MBOX_COE) || slave->sdo_dictionary_fetched || slave->current_state == EC_SLAVE_STATE_INIT - || jiffies - slave->jiffies_preop < 5 * HZ + || jiffies - slave->jiffies_preop < EC_WAIT_SDO_DICT * HZ || !slave->online || slave->error_flag) continue; diff --git a/master/globals.h b/master/globals.h index ede1445f90df27625ae4fd59451fec4169ba4a75..8fb5652989f6fa94932bb92603e0b83e4f3adad4 100644 --- a/master/globals.h +++ b/master/globals.h @@ -77,6 +77,10 @@ /** datagram timeout in microseconds */ #define EC_IO_TIMEOUT 500 +/** Seconds to wait before fetching SDO dictionary + after slave entered PREOP state. */ +#define EC_WAIT_SDO_DICT 3 + /** minimum size of a buffer used with ec_state_string() */ #define EC_STATE_STRING_SIZE 30