First version Tray Feeder ready for test

- Tray feeder implementation ready for first tests
- Some refactoring of packml function names
- Added .xtv file to project again because of linking issues
- Added hmi button for packml complete command
- Started media cabinet
This commit is contained in:
2026-03-03 14:11:58 +01:00
parent dbfa6fc7cc
commit 0ea0887bb4
17 changed files with 4430 additions and 486 deletions

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="FB_MediaCabinet" Id="{9de34b64-23ba-4fef-b086-9297bbd06f24}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FB_MediaCabinet
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
// (1) Acetic acid 99%
_fbTankAceticAcidHigh : FB_Tank;
// (2) Sulfuric acid
_fbTankSulfuricAcid : FB_Tank;
// (3) Nitric acid 65% mixing
_fbTankNitricAcid : FB_Tank;
// (4) Acetic acid 10%
_fbTankAceticAcidLow : FB_Tank;
// (5) Hydrofluoric acid 40%
_fbTankHydrofluoricAcid : FB_Tank;
// (6) Sulfuric acid mixing
_fbTankSulfuricAcidMixing : FB_Tank;
// (7) Hydrofluoric acid 40% for mixing
_fbTankHydrofluoricAcidMixing : FB_Tank;
// (8) SEF
_fbTankSEF : FB_Tank;
// (9) Filmetch
_fbTankFilmetch : FB_Tank;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[]]></ST>
</Implementation>
</POU>
</TcPlcObject>

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="FB_Tank" Id="{d029e65c-5c27-470b-8bee-fea9f0455669}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FB_Tank
VAR_INPUT
xReleaseErrors : BOOL;
xReleaseManualMode : BOOL;
xConfirmAlarms : BOOL;
END_VAR
VAR_OUTPUT
xOverfull : BOOL;
xFull : BOOL;
xEmpty : BOOL;
xError : BOOL;
END_VAR
VAR_IN_OUT
stHMIInterface : ST_HMI_Tank;
END_VAR
VAR
i_xOverfull AT %I* : BOOL;
i_xFull AT %I* : BOOL;
i_xEmpty AT %I* : BOOL;
fbFillingValve : FB_Valve;
fbDrainValve : FB_Valve;
fbPumpValve : FB_Valve;
_stValveConfig : ST_ValveConfig;
_wFillingValveSafetyIntlkUsed : T_INTERLOCK;
_wFillingValveSafetyIntlk : T_INTERLOCK;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[// Overfull is NC so true if ok
_wFillingValveSafetyIntlk.0 := i_xOverfull;
fbFillingValve(
xReleaseErrors:= xReleaseErrors,
stValveConfig:= _stValveConfig,
xReleaseManualMode:= xReleaseManualMode,
wSafetyINTLK:= _wFillingValveSafetyIntlk,
wSafetyINTLKUsed:= _wFillingValveSafetyIntlkUsed,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stFillingValve);
fbDrainValve(
xReleaseErrors:= xReleaseErrors,
stValveConfig:= _stValveConfig,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stDrainValve);
fbPumpValve(
xReleaseErrors:= xReleaseErrors,
stValveConfig:= _stValveConfig,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stPumpValve);]]></ST>
</Implementation>
<Method Name="FB_Init" Id="{9c6d1842-9c2e-4437-b40f-941f77668ffe}">
<Declaration><![CDATA[//FB_Init is always available implicitly and it is used primarily for initialization.
//The return value is not evaluated. For a specific influence, you can also declare the
//methods explicitly and provide additional code there with the standard initialization
//code. You can evaluate the return value.
METHOD FB_Init: BOOL
VAR_INPUT
bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold)
bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change)
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[_stValveConfig.xHasOpenFeedback := FALSE;
_stValveConfig.xHasClosedFeedback := FALSE;
stHMIInterface.stFillingValve.stInterlock.asSafetyINTLKName[0] := 'Tank overfull';
_wFillingValveSafetyIntlkUsed.0 := 1;]]></ST>
</Implementation>
</Method>
<Method Name="M_HandleHMIOutput" Id="{8939e00b-3459-4b5e-a4b3-7b489eec260a}">
<Declaration><![CDATA[METHOD PRIVATE M_HandleHMIOutput : BOOL
VAR_INPUT
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[// Overfull sensor is NC
stHMIInterface.xOverfull := (NOT i_xOverfull);
stHMIInterface.xFull := i_xFull;
stHMIInterface.xEmpty := i_xEmpty;]]></ST>
</Implementation>
</Method>
</POU>
</TcPlcObject>