Projektdateien hinzufügen.
This commit is contained in:
124
PLC/POUs/FB_String.TcPOU
Normal file
124
PLC/POUs/FB_String.TcPOU
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.12">
|
||||
<POU Name="FB_String" Id="{46501225-f446-4674-bfed-3be64273e576}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_String
|
||||
VAR_INPUT
|
||||
// Module 1 HMI interface
|
||||
stHMIInterface : ST_STRING_HMI_INTERFACE;
|
||||
|
||||
// Emergency stop ok
|
||||
xEmergencyStopOk : BOOL;
|
||||
|
||||
// Release alarms
|
||||
xReleaseErrors : BOOL;
|
||||
|
||||
// Release analog io limit errors
|
||||
xReleaseLimitErrors : BOOL;
|
||||
|
||||
// Input to confirm all errors
|
||||
xConfirmAlarms : BOOL;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
xError : BOOL;
|
||||
xWarning : BOOL;
|
||||
END_VAR
|
||||
VAR
|
||||
_fbModule1 : FB_Module(CONCAT(_sName, 'Module 1'));
|
||||
_fbModule2 : FB_Module(CONCAT(_sName, 'Module 2'));
|
||||
_fbModule3 : FB_Module(CONCAT(_sName, 'Module 3'));
|
||||
|
||||
// String name
|
||||
_sName : STRING;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// ===============================
|
||||
// Module 1
|
||||
// ===============================
|
||||
_fbModule1(
|
||||
xEmergencyStopOk:= xEmergencyStopOk,
|
||||
stHMIInterface:= stHMIInterface.stHMIInterfaceModule1,
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
xReleaseLimitErrors:= xReleaseLimitErrors,
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
IF _fbModule1.xWarning THEN
|
||||
xWarning := TRUE;
|
||||
END_IF
|
||||
|
||||
IF _fbModule1.xError THEN
|
||||
xError := TRUE;
|
||||
END_IF
|
||||
|
||||
|
||||
// ===============================
|
||||
// Module 2
|
||||
// ===============================
|
||||
_fbModule2(
|
||||
xEmergencyStopOk:= xEmergencyStopOk,
|
||||
stHMIInterface:= stHMIInterface.stHMIInterfaceModule2,
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
xReleaseLimitErrors:= xReleaseLimitErrors,
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
IF _fbModule2.xWarning THEN
|
||||
xWarning := TRUE;
|
||||
END_IF
|
||||
|
||||
IF _fbModule2.xError THEN
|
||||
xError := TRUE;
|
||||
END_IF
|
||||
|
||||
|
||||
// ===============================
|
||||
// Module 3
|
||||
// ===============================
|
||||
_fbModule3(
|
||||
xEmergencyStopOk:= xEmergencyStopOk,
|
||||
stHMIInterface:= stHMIInterface.stHMIInterfaceModule3,
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
xReleaseLimitErrors:= xReleaseLimitErrors,
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
IF _fbModule3.xWarning THEN
|
||||
xWarning := TRUE;
|
||||
END_IF
|
||||
|
||||
IF _fbModule3.xError THEN
|
||||
xError := TRUE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_init" Id="{9e8494eb-1b40-4be9-91c8-810ecbdf7f0c}">
|
||||
<Declaration><![CDATA[METHOD FB_init : BOOL
|
||||
VAR_INPUT
|
||||
bInitRetains : BOOL; // if TRUE, the retain variables are initialized (warm start / cold start)
|
||||
bInCopyCode : BOOL; // if TRUE, the instance afterwards gets moved into the copy code (online change)
|
||||
|
||||
sName : STRING;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[_sName := sName;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<LineIds Name="FB_String">
|
||||
<LineId Id="69" Count="0" />
|
||||
<LineId Id="67" Count="1" />
|
||||
<LineId Id="47" Count="1" />
|
||||
<LineId Id="50" Count="3" />
|
||||
<LineId Id="58" Count="0" />
|
||||
<LineId Id="62" Count="0" />
|
||||
<LineId Id="64" Count="0" />
|
||||
<LineId Id="66" Count="0" />
|
||||
<LineId Id="63" Count="0" />
|
||||
<LineId Id="59" Count="2" />
|
||||
<LineId Id="71" Count="17" />
|
||||
<LineId Id="70" Count="0" />
|
||||
<LineId Id="90" Count="17" />
|
||||
<LineId Id="89" Count="0" />
|
||||
</LineIds>
|
||||
<LineIds Name="FB_String.FB_init">
|
||||
<LineId Id="7" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user