This commit is contained in:
2026-01-08 11:08:17 +01:00
commit fe882dc444
311 changed files with 511562 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.11">
<POU Name="FlowCheck_FB" Id="{17b1d40e-e4e0-4b29-8651-216f03eb8211}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FlowCheck_FB
VAR_INPUT
iStation : INT;
MediaIndex : INT;
Config : REFERENCE TO sConfigFlowCheck;
UnderLimitErrorIndex : INT;
OverLimitErrorIndex : INT;
NotInRangeErrorIndex : INT;
END_VAR
VAR_OUTPUT
Warning : BOOL;
FlowOk : BOOL;
MediaName : T_MaxString;
CurrentFlow : LREAL;
END_VAR
VAR
Timer : TON;
FlowStatus : (Off, Wait, InLimit, UnderLimit, OverLimit);
TimerInLimit : TON;
Output : BOOL;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[Output := MediaArray[iStation][MediaIndex].bReferenceControl;
CurrentFlow := MediaArray[iStation][MediaIndex].rReferenceFlow;
MediaName := MediaArray[iStation][MediaIndex].ServiceName[Language];
Timer(IN := Output, PT := T#5S);
IF NOT Output THEN
FlowStatus := Off;
ELSE
IF CurrentFlow >= Config.rMin AND
CurrentFlow <= Config.rMax THEN
Timer(IN := FALSE);
FlowStatus := InLimit;
ELSIF Timer.Q THEN
IF CurrentFlow < Config.rMin THEN
FlowStatus := UnderLimit;
ELSIF CurrentFlow > Config.rMax THEN
FlowStatus := OverLimit;
END_IF
ELSE
FlowStatus := Wait;
END_IF
END_IF
TimerInLimit(IN := FlowStatus = InLimit, PT := T#3S, Q => FlowOk);
CASE FlowStatus OF
Off, Wait, InLimit:
AlarmSend(iStation, UnderLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, TRUE);
AlarmSend(iStation, OverLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, TRUE);
Warning := FALSE;
UnderLimit:
AlarmSend(iStation, UnderLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, FALSE);
AlarmSend(iStation, OverLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, TRUE);
Warning := TRUE;
OverLimit:
AlarmSend(iStation, UnderLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, TRUE);
AlarmSend(iStation, OverLimitErrorIndex, FALSE, eReportType.Warning, sAvailableResponse.NoResponse, FALSE);
Warning := TRUE;
END_CASE]]></ST>
</Implementation>
</POU>
</TcPlcObject>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.12">
<DUT Name="sConfigFlowCheck" Id="{ff7e35fc-ec2f-4900-9dc7-61f535f82af3}">
<Declaration><![CDATA[TYPE sConfigFlowCheck :
STRUCT
rLimit : LREAL;
rTol : LREAL;
END_STRUCT
END_TYPE
]]></Declaration>
</DUT>
</TcPlcObject>