Files

160 lines
5.5 KiB
Plaintext

FUNCTION_BLOCK "LP_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
MB3305 : Byte; // war "MB3305"
MB3310 : Byte; // war "MB3310"
MB3311 : Byte; // war "MB3311"
MB3312 : Byte; // war "MB3312"
MB3313 : Byte; // war "MB3313"
MB3314 : Byte; // war "MB3314"
MB3315 : Byte; // war "MB3315"
MB3316 : Byte; // war "MB3316"
MB3317 : Byte; // war "MB3317"
MB3320 : Byte; // war "MB3320"
MB3330 : Byte; // war "MB3330"
MB3331 : Byte; // war "MB3331"
MB3332 : Byte; // war "MB3332"
MB3333 : Byte; // war "MB3333"
MB3334 : Byte; // war "MB3334"
MB3335 : Byte; // war "MB3335"
MB3336 : Byte; // war "MB3336"
MB3337 : Byte; // war "MB3337"
MB3340 : Byte; // war "MB3340"
MB3341 : Byte; // war "MB3341"
END_VAR
VAR
Sorter_3305 : "MZylinder"; //
Weiche_LP1 : "MZylinder"; //
Weiche_LP2 : "MZylinder";
Weiche_LP3 : "MZylinder";
Weiche_LP4 : "MZylinder";
Weiche_LP5 : "MZylinder";
Weiche_LP6 : "MZylinder";
Weiche_LP7 : "MZylinder";
Weiche_LP8 : "MZylinder";
Weiche_LP9 : "MZylinder";
Weiche_LP10 : "MZylinder";
Schleuse_Ausfahrt_LP1 : "MZylinder"; //
Schleuse_Ausfahrt_LP2 : "MZylinder";
Schleuse_Ausfahrt_LP3 : "MZylinder";
Schleuse_Ausfahrt_LP4 : "MZylinder";
Schleuse_Ausfahrt_LP5 : "MZylinder";
Schleuse_Ausfahrt_LP6 : "MZylinder";
Schleuse_Ausfahrt_LP7 : "MZylinder";
Schleuse_Ausfahrt_LP8 : "MZylinder";
Schleuse_Ausfahrt_LP9 : "MZylinder";
Schleuse_Ausfahrt_LP10 : "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 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 Next; END_IF;
END_REGION
REGION Schleuse_3305
#Sorter_3305(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3305);
END_REGION
REGION Weiche_LP1
#Weiche_LP1(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3320);
END_REGION
REGION Weiche_LP2
#Weiche_LP2(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3317);
END_REGION
REGION Weiche_LP3
#Weiche_LP3(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3316);
END_REGION
REGION Weiche_LP4
#Weiche_LP4(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3315);
END_REGION
REGION Weiche_LP5
#Weiche_LP5(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3314);
END_REGION
REGION Weiche_LP6
#Weiche_LP6(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3313);
END_REGION
REGION Weiche_LP7
#Weiche_LP7(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3312);
END_REGION
REGION Weiche_LP8
#Weiche_LP8(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3311);
END_REGION
REGION Weiche_LP9
#Weiche_LP9(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3310);
END_REGION
REGION Weiche_LP10
#Weiche_LP10(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5);
END_REGION
REGION Schleuse_Ausfahrt_LP1
#Schleuse_Ausfahrt_LP1(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3341);
END_REGION
REGION Schleuse_Ausfahrt_LP2
#Schleuse_Ausfahrt_LP2(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3340);
END_REGION
REGION Schleuse_Ausfahrt_LP3
#Schleuse_Ausfahrt_LP3(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3337);
END_REGION
REGION Schleuse_Ausfahrt_LP4
#Schleuse_Ausfahrt_LP4(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3336);
END_REGION
REGION Schleuse_Ausfahrt_LP5
#Schleuse_Ausfahrt_LP5(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3335);
END_REGION
REGION Schleuse_Ausfahrt_LP6
#Schleuse_Ausfahrt_LP6(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3334);
END_REGION
REGION Schleuse_Ausfahrt_LP7
#Schleuse_Ausfahrt_LP7(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3333);
END_REGION
REGION Schleuse_Ausfahrt_LP8
#Schleuse_Ausfahrt_LP8(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3332);
END_REGION
REGION Schleuse_Ausfahrt_LP9
#Schleuse_Ausfahrt_LP9(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3331);
END_REGION
REGION Schleuse_Ausfahrt_LP10
#Schleuse_Ausfahrt_LP10(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3330);
END_REGION
REGION Ende
RETURN;
END_REGION
END_FUNCTION_BLOCK