Hardware reset button now triggers an alarm acknowledge signal
This commit is contained in:
96
PLC/PLC.tmc
96
PLC/PLC.tmc
File diff suppressed because one or more lines are too long
@@ -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
|
||||
// ===============================
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
</System>
|
||||
<Plc>
|
||||
<Project GUID="{9AE64910-5EB2-4866-93FD-EFE059C38C36}" Name="PLC" PrjFilePath="PLC\PLC.plcproj" TmcFilePath="PLC\PLC.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" CopyTmcToTarget="true" CopyTpyToTarget="false" SymbolicMapping="true">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{3270BB88-6285-1427-AFE9-B1C8C7F0C387}" TmcPath="PLC\PLC.tmc">
|
||||
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{7ED08416-1955-C55E-9601-98E642FFD609}" TmcPath="PLC\PLC.tmc">
|
||||
<Name>PLC Instance</Name>
|
||||
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
|
||||
<Vars VarGrpType="2" AreaNo="1">
|
||||
|
||||
Reference in New Issue
Block a user