92 lines
3.1 KiB
Plaintext
92 lines
3.1 KiB
Plaintext
FUNCTION_BLOCK "VPtoEP_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_OUTPUT
|
|
MB4457 : Byte; // war "MB4457"
|
|
END_VAR
|
|
|
|
VAR_IN_OUT
|
|
MB3247 : Byte; // war "MB3247"
|
|
MB3275 : Byte; // war "MB3275"
|
|
MB3363 : Byte; // war "MB3363"
|
|
MB3366 : Byte; // war "MB3366"
|
|
MB4443 : Byte; // war "MB4443"
|
|
MB4445 : Byte; // war "MB4445"
|
|
MB4450 : Byte; // war "MB4450"
|
|
END_VAR
|
|
|
|
VAR
|
|
Schleuse_3247 : "MZylinder"; //
|
|
Schleuse_3275 : "MZylinder"; //
|
|
Schleuse_3363 : "MZylinder";
|
|
Schleuse_3366 : "MZylinder";
|
|
Schleuse_4443 : "MZylinder";
|
|
Weiche_4445 : "MZylinder"; //
|
|
Schleuse_4450 : "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 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_UZ7104.Area_Stop) AND NOT (#SGes.Simulation_ohne_HW_aktiv) THEN GOTO Next; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_3247
|
|
#Schleuse_3247(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3247);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3275
|
|
#Schleuse_3275(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3275);
|
|
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_3363
|
|
#Schleuse_3363(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3363);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3366
|
|
#Schleuse_3366(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3366);
|
|
END_REGION
|
|
|
|
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 Next2; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4443
|
|
#Schleuse_4443(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4443);
|
|
END_REGION
|
|
|
|
REGION Weiche_4445
|
|
#Weiche_4445(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4445);
|
|
#MB4457 := #MB4445;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4450
|
|
#Schleuse_4450(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4450);
|
|
END_REGION
|
|
|
|
REGION Ende
|
|
RETURN;
|
|
END_REGION
|
|
|
|
END_FUNCTION_BLOCK
|