- Added strings not ready in time error - Added battery already full warning - Added battery already empty warning - Added battery in stop input to tower light - Added warnings active to tower light - Added BMS State Machine errors to tower light input
62 lines
2.1 KiB
XML
62 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.12">
|
|
<POU Name="FB_AlarmMessage" Id="{4e628f13-10b9-47d9-8d26-ceb4bcb9bf43}" SpecialFunc="None">
|
|
<Declaration><![CDATA[FUNCTION_BLOCK FB_AlarmMessage
|
|
VAR_INPUT
|
|
xActive : BOOL;
|
|
xAcknowledge : BOOL;
|
|
END_VAR
|
|
VAR_OUTPUT
|
|
END_VAR
|
|
VAR
|
|
_fbAlarmMessage : Fb_TcAlarm;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[IF xActive AND (NOT _fbAlarmMessage.bRaised) THEN
|
|
_fbAlarmMessage.Raise();
|
|
END_IF
|
|
|
|
IF (NOT xActive) AND (_fbAlarmMessage.bRaised) THEN
|
|
_fbAlarmMessage.Clear(0);
|
|
END_IF
|
|
|
|
IF _fbAlarmMessage.eConfirmationState = TcEventConfirmationState.WaitForConfirmation AND xAcknowledge THEN
|
|
_fbAlarmMessage.Confirm(0);
|
|
END_IF]]></ST>
|
|
</Implementation>
|
|
<Property Name="Arguments" Id="{f40c819a-ad71-4e81-830e-67d02b4e9e2f}">
|
|
<Declaration><![CDATA[PROPERTY PUBLIC Arguments : I_TcArguments]]></Declaration>
|
|
<Get Name="Get" Id="{c1b8ca1b-cb6c-4841-8282-61423914cb4e}">
|
|
<Declaration><![CDATA[VAR
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[Arguments := _fbAlarmMessage.ipArguments;]]></ST>
|
|
</Implementation>
|
|
</Get>
|
|
</Property>
|
|
<Property Name="ClearedAndConfirmed" Id="{4e7fa79e-e44f-42ff-ab45-0e14a9921a12}">
|
|
<Declaration><![CDATA[PROPERTY ClearedAndConfirmed : BOOL]]></Declaration>
|
|
<Get Name="Get" Id="{70df159d-fc9d-44c5-ae42-7d731a5dae12}">
|
|
<Declaration><![CDATA[VAR
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[ClearedAndConfirmed := (NOT _fbAlarmMessage.bRaised) AND (_fbAlarmMessage.eConfirmationState <> TcEventConfirmationState.WaitForConfirmation);]]></ST>
|
|
</Implementation>
|
|
</Get>
|
|
</Property>
|
|
<Method Name="Init" Id="{c066689c-dd69-4f09-b5b0-76b34267abac}">
|
|
<Declaration><![CDATA[METHOD Init : BOOL
|
|
VAR_INPUT
|
|
stEventType : TcEventEntry;
|
|
xWithConfirmation : BOOL;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[_fbAlarmMessage.CreateEx(stEventEntry := stEventType, bWithConfirmation := xWithConfirmation);]]></ST>
|
|
</Implementation>
|
|
</Method>
|
|
</POU>
|
|
</TcPlcObject> |