123 lines
4.5 KiB
Plaintext
123 lines
4.5 KiB
Plaintext
FUNCTION_BLOCK "HWtoVP_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
|
|
MB3131 : Byte; // war "MB3131"
|
|
MB3134 : Byte; // war "MB3134"
|
|
MB3136 : Byte; // war "MB3136"
|
|
MB3137 : Byte; // war "MB3137"
|
|
MB3140 : Byte; // war "MB3140"
|
|
MB3141 : Byte; // war "MB3141"
|
|
MB3143 : Byte; // war "MB3143"
|
|
MB3725 : Byte; // war "MB3725"
|
|
MB4200 : Byte; // war "MB4200"
|
|
MB4207 : Byte; // war "MB4207"
|
|
MB4212 : Byte; // war "MB4212"
|
|
MB4214 : Byte; // war "MB4214"
|
|
MB4217 : Byte; // war "MB4217"
|
|
END_VAR
|
|
|
|
VAR
|
|
Schleuse_3725 : "MZylinder"; //
|
|
Schleuse_4200 : "MZylinder";
|
|
Schleuse_4207 : "MZylinder";
|
|
Schleuse_4212 : "MZylinder";
|
|
Schleuse_4214 : "MZylinder";
|
|
Schleuse_3143 : "MZylinder"; //
|
|
Schleuse_3141 : "MZylinder"; //
|
|
Weiche_3137 : "MZylinder"; //
|
|
Weiche_3140 : "MZylinder"; //
|
|
Schleuse_3131 : "MZylinder"; //
|
|
Schleuse_3134 : "MZylinder"; //
|
|
Schleuse_3136 : "MZylinder"; //
|
|
Schleuse_4217 : "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 UC072/A01
|
|
#Auto := #DOutbound_Bereich.A01_UH07.Automatik AND NOT (#DOutbound_Bereich.A01_UH07.Handbetrieb);
|
|
IF ((#DOutbound_Bereich.A01_UC072.BereichErr OR #DOutbound_Bereich.A01_UZ7201.Area_Stop) OR #DOutbound_Bereich.A01_UZ7202.Area_Stop) AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_3725
|
|
#Schleuse_3725(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3725);
|
|
END_REGION
|
|
|
|
REGION Übergabe des Bereichstatus System UC073/A01
|
|
#Auto := #DOutbound_Bereich.A01_UH07.Automatik AND NOT (#DOutbound_Bereich.A01_UH07.Handbetrieb);
|
|
IF #DOutbound_Bereich.A01_UC073.BereichErr AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next2; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4200
|
|
#Schleuse_4200(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4200);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4207
|
|
#Schleuse_4207(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4207);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4212
|
|
#Schleuse_4212(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4212);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4214
|
|
#Schleuse_4214(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4214);
|
|
END_REGION
|
|
|
|
REGION Übergabe des Bereichstatus System UC071/A01
|
|
#Auto := #DOutbound_Bereich.A01_UH07.Automatik AND NOT (#DOutbound_Bereich.A01_UH07.Handbetrieb);
|
|
IF (#DOutbound_Bereich.A01_UC071.BereichErr OR #DOutbound_Bereich.A01_UZ7102.Area_Stop) AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next3; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_3143
|
|
#Schleuse_3143(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3143);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3141
|
|
#Schleuse_3141(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3141);
|
|
END_REGION
|
|
|
|
REGION Weiche_3137
|
|
#Weiche_3137(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3137);
|
|
END_REGION
|
|
|
|
REGION Weiche_3140
|
|
#Weiche_3140(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3140);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3131
|
|
#Schleuse_3131(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3131);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3134
|
|
#Schleuse_3134(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3134);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3136
|
|
#Schleuse_3136(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3136);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4217
|
|
#Schleuse_4217(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4217);
|
|
END_REGION
|
|
|
|
REGION Ende
|
|
RETURN;
|
|
END_REGION
|
|
|
|
END_FUNCTION_BLOCK
|