Hardware reset button now triggers an alarm acknowledge signal

This commit is contained in:
Matthias Heisig
2025-04-14 19:46:02 +02:00
parent f79cf27c0c
commit 390b831286
3 changed files with 58 additions and 49 deletions

File diff suppressed because one or more lines are too long

View File

@@ -121,6 +121,9 @@ VAR
// Flag to set all components in manual mode
_xAllComponentsToManualMode : BOOL;
// Hardware reset button rising edge trigger
_fbRTrigHardwareAck : R_TRIG;
// DEBUG
_ModbusDebugTest : ST_MODBUS_REG_11;
@@ -196,6 +199,12 @@ IF GVL_MODBUS.stBMSErrorReg.wConfirmAlarms > 0 THEN
_xConfirmAlarms := TRUE;
END_IF
// Ack alarms from hardware button
_fbRTrigHardwareAck(CLK := _xHarwareResetButton);
IF _fbRTrigHardwareAck.Q THEN
_xConfirmAlarms := TRUE;
END_IF
// ===============================
// EtherCAT communication error
// ===============================