From 5ef41daa61081ae013062c1c7bd799c6eaac2c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Wed, 14 Aug 2024 09:33:27 +0200 Subject: [PATCH] ethercatmcController: setAlarmStatusSeverity on custom parameters When the MCU is disconnected, set the alarm severity even on custom (output) parameters. --- ethercatmcApp/src/ethercatmcController.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ethercatmcApp/src/ethercatmcController.cpp b/ethercatmcApp/src/ethercatmcController.cpp index 744f5cc8..ce7ee34e 100644 --- a/ethercatmcApp/src/ethercatmcController.cpp +++ b/ethercatmcApp/src/ethercatmcController.cpp @@ -1270,6 +1270,16 @@ void ethercatmcController::setAlarmStatusSeverityAllReadbacks( setAlarmStatusSeverityAllAxes(function, status); } } + for (unsigned paramIndex = 0; + paramIndex < (sizeof(ctrlLocal.functionFromParamIndex) / + sizeof(ctrlLocal.functionFromParamIndex[0])); + paramIndex++) { + int function = ctrlLocal.functionFromParamIndex[paramIndex]; + if (function) { + setAlarmStatusSeverityAllAxes(function, status); + } + } + #ifdef motorMessageTextString setAlarmStatusSeverityAllAxes(motorMessageText_, status); #endif