Files

64 lines
1.9 KiB
Plaintext

FUNCTION_BLOCK "EP_Zylinder"
{ S7_Optimized_Access := 'FALSE' }
// Mechanische AWL->SCL-Konvertierung (awl2scl.py). Kontrollfluss per GOTO,
// wo im Original mit Sprungmarken gearbeitet wurde. Vor Uebernahme in TIA
// Portal pruefen/kompilieren (siehe SCL-Export/README.md).
VAR_INPUT
DOutbound_Bereich : Word; // war "DOutbound_Bereich"
SGes : Word; // war "SGes"
END_VAR
VAR_IN_OUT
MB4503 : Byte; // war "MB4503"
MB4504 : Byte; // war "MB4504"
MB4505 : Byte; // war "MB4505"
MB4506 : Byte; // war "MB4506"
END_VAR
VAR
Sorter_4503 : "MZylinder"; //
Weiche_EP1 : "MZylinder"; //
Weiche_EP2 : "MZylinder";
Weiche_EP3 : "MZylinder";
Weiche_EP4 : "MZylinder";
END_VAR
VAR_TEMP
Auto : Bool; // Automatik ist aktiv
Hand : Bool; // Hand ist aktiv
ZylAst : Bool; // Zylinder ansteuern
END_VAR
BEGIN
REGION Übergabe des Bereichstatus System UC074/A01
#Auto := #DOutbound_Bereich.A01_UH07.Automatik AND NOT (#DOutbound_Bereich.A01_UH07.Handbetrieb);
IF #DOutbound_Bereich.A01_UC074.BereichErr AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next; END_IF;
END_REGION
REGION Schleuse_4503
#Sorter_4503(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4503);
END_REGION
REGION Weiche_EP1
#Weiche_EP1(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4504);
END_REGION
REGION Weiche_EP2
#Weiche_EP2(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4505);
END_REGION
REGION Weiche_EP3
#Weiche_EP3(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4506);
END_REGION
REGION Weiche_EP4
#Weiche_EP4(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5);
END_REGION
REGION Ende
RETURN;
END_REGION
END_FUNCTION_BLOCK