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>
|
||||
Reference in New Issue
Block a user