Initial
This commit is contained in:
91
PLC/1 Cassette/POUs/CASSETTE_IO_FB.TcPOU
Normal file
91
PLC/1 Cassette/POUs/CASSETTE_IO_FB.TcPOU
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.11">
|
||||
<POU Name="CASSETTE_IO_FB" Id="{f9ad0b2b-7197-4fd8-acd3-0022e65b08f6}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK CASSETTE_IO_FB EXTENDS Station_GENERAL_IO_FB
|
||||
VAR_INPUT
|
||||
CarrierAvailable : BOOL := TRUE;
|
||||
|
||||
TrayLock : ARRAY[1..2] OF PneumaticCylinder_FB;
|
||||
|
||||
DoorLock : Lock_FB;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE iStation OF
|
||||
LastCassette:
|
||||
TrayLock[1]();
|
||||
TrayLock[2]();
|
||||
|
||||
DoorLock();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="Initialization" Id="{e031683a-b05e-468f-8639-835f16bd7b1c}">
|
||||
<Declaration><![CDATA[METHOD Initialization : BOOL
|
||||
VAR_INPUT
|
||||
iStation : INT;
|
||||
END_VAR
|
||||
VAR
|
||||
ServiceNameUp : ARRAY[0..NumberOfLanguages] OF T_MaxString;
|
||||
ServiceNameDown : ARRAY[0..NumberOfLanguages] OF T_MaxString;
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[InitializationExt(iStation);
|
||||
|
||||
CASE iStation OF
|
||||
LastCassette:
|
||||
iMediaArray[eCassetteMedienNamen.TrayInit].Invisible := TRUE;
|
||||
iMediaArray[eCassetteMedienNamen.TrayNextSlot].Invisible := TRUE;
|
||||
iMediaArray[eCassetteMedienNamen.FindSize].Invisible := TRUE;
|
||||
|
||||
|
||||
ServiceNameUp[0] := 'Tray 45°$NLock';
|
||||
ServiceNameDown[0] := 'Tray 45°$NUnlock';
|
||||
|
||||
TrayLock[1].Initialization(
|
||||
iStation,
|
||||
eCassetteMedienNamen.TrayLock1Up,
|
||||
eCassetteMedienNamen.TrayLock1Down,
|
||||
Cassette_ErrorNr.TrayLock1UpTimeout,
|
||||
ServiceNameUp,
|
||||
ServiceNameDown
|
||||
);
|
||||
|
||||
ServiceNameUp[0] := 'Tray 90°$NLock';
|
||||
ServiceNameDown[0] := 'Tray 90°$NUnlock';
|
||||
|
||||
TrayLock[2].Initialization(
|
||||
iStation,
|
||||
eCassetteMedienNamen.TrayLock2Up,
|
||||
eCassetteMedienNamen.TrayLock2Down,
|
||||
Cassette_ErrorNr.TrayLock2UpTimeout,
|
||||
ServiceNameUp,
|
||||
ServiceNameDown
|
||||
);
|
||||
|
||||
|
||||
ServiceNameUp[0] := 'Tray Lock';
|
||||
|
||||
DoorLock.Initialization(
|
||||
iStation,
|
||||
eCassetteMedienNamen.DoorLock,
|
||||
Cassette_ErrorNr.eDoor1CloseTimeout,
|
||||
Cassette_ErrorNr.eDoor1LockTimeout,
|
||||
ServiceNameUp
|
||||
);
|
||||
ELSE
|
||||
iMediaArray[eCassetteMedienNamen.TrayLock1Up].Invisible := TRUE;
|
||||
iMediaArray[eCassetteMedienNamen.TrayLock1Down].Invisible := TRUE;
|
||||
|
||||
iMediaArray[eCassetteMedienNamen.TrayLock2Up].Invisible := TRUE;
|
||||
iMediaArray[eCassetteMedienNamen.TrayLock2Down].Invisible := TRUE;
|
||||
END_CASE
|
||||
|
||||
CASE iStation OF
|
||||
11:
|
||||
iMediaArray[eCassetteMedienNamen.FindSize].Invisible := TRUE;
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
1118
PLC/1 Cassette/POUs/CASSETTE_MAIN_FB.TcPOU
Normal file
1118
PLC/1 Cassette/POUs/CASSETTE_MAIN_FB.TcPOU
Normal file
File diff suppressed because it is too large
Load Diff
29
PLC/1 Cassette/POUs/CheckRecipeForFlow.TcPOU
Normal file
29
PLC/1 Cassette/POUs/CheckRecipeForFlow.TcPOU
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4026.11">
|
||||
<POU Name="CheckRecipeForFlow" Id="{49d63b5e-c859-4b4e-aa90-93579f23246e}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION CheckRecipeForFlow : BOOL
|
||||
VAR_INPUT
|
||||
Data : sCassetteStepData;
|
||||
END_VAR
|
||||
VAR
|
||||
i : INT;
|
||||
RecipeList : sRecipeList;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF StationsStatus[RecipeGetStationType(Data.StationType)].NoRecipe THEN
|
||||
CheckRecipeForFlow := TRUE;
|
||||
RETURN;
|
||||
END_IF
|
||||
|
||||
CheckRecipeForFlow := FALSE;
|
||||
RecipeList := StationsStatus[RecipeGetStationType(Data.StationType)].IRecipe.GetProcessList;
|
||||
FOR i := 1 TO RecipeList.NumberOfRecipe DO
|
||||
IF Data.RecipeName = RecipeList.RecipeList[i] THEN
|
||||
CheckRecipeForFlow := TRUE;
|
||||
RETURN;
|
||||
END_IF
|
||||
END_FOR]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user