100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
FUNCTION_BLOCK "EPtoLP_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
|
|
MB3303 : Byte; // war "MB3303"
|
|
MB3370 : Byte; // war "MB3370"
|
|
MB4462 : Byte; // war "MB4462"
|
|
MB4463 : Byte; // war "MB4463"
|
|
MB4466 : Byte; // war "MB4466"
|
|
MB4512 : Byte; // war "MB4512"
|
|
MB4516 : Byte; // war "MB4516"
|
|
MB4520 : Byte; // war "MB4520"
|
|
MB4522 : Byte; // war "MB4522"
|
|
MB4532 : Byte; // war "MB4532"
|
|
END_VAR
|
|
|
|
VAR
|
|
Schleuse_4512 : "MZylinder"; //
|
|
Schleuse_4532 : "MZylinder";
|
|
Schleuse_4516 : "MZylinder"; //
|
|
Schleuse_4522 : "MZylinder"; //
|
|
Schleuse_4520 : "MZylinder";
|
|
Schleuse_4466 : "MZylinder";
|
|
Schleuse_4462 : "MZylinder";
|
|
Schleuse_4463 : "MZylinder";
|
|
Schleuse_3370 : "MZylinder";
|
|
Schleuse_3303 : "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_4512
|
|
#Schleuse_4512(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4512);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4532
|
|
#Schleuse_4532(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4532);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4516
|
|
#Schleuse_4516(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4516);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4522
|
|
#Schleuse_4522(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4522);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4520
|
|
#Schleuse_4520(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4520);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4466
|
|
#Schleuse_4466(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4466);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4462
|
|
#Schleuse_4462(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4462);
|
|
END_REGION
|
|
|
|
REGION Übergabe des Bereichstatus System UH07/A01
|
|
#Auto := #DOutbound_Bereich.A01_UH07.Automatik AND NOT (#DOutbound_Bereich.A01_UH07.Handbetrieb);
|
|
IF #DOutbound_Bereich.A01_UH07.BereichErr AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next1; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4463
|
|
#Schleuse_4463(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4463);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3370
|
|
#Schleuse_3370(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3370);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3303
|
|
#Schleuse_3303(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3303);
|
|
END_REGION
|
|
|
|
REGION Ende
|
|
RETURN;
|
|
END_REGION
|
|
|
|
END_FUNCTION_BLOCK
|