110 lines
3.9 KiB
Plaintext
110 lines
3.9 KiB
Plaintext
FUNCTION_BLOCK "LPtoHW_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
|
|
MB4210 : Byte; // war "MB4210"
|
|
END_VAR
|
|
|
|
VAR_IN_OUT
|
|
MB3323 : Byte; // war "MB3323"
|
|
MB3324 : Byte; // war "MB3324"
|
|
MB3325 : Byte; // war "MB3325"
|
|
MB3342 : Byte; // war "MB3342"
|
|
MB3345 : Byte; // war "MB3345"
|
|
MB3722 : Byte; // war "MB3722"
|
|
MB4221 : Byte; // war "MB4221"
|
|
MB4223 : Byte; // war "MB4223"
|
|
MB4227 : Byte; // war "MB4227"
|
|
MB4235 : Byte; // war "MB4235"
|
|
END_VAR
|
|
|
|
VAR
|
|
Schleuse_3342 : "MZylinder"; //
|
|
Schleuse_3323 : "MZylinder"; //
|
|
Schleuse_3345 : "MZylinder"; //
|
|
Schleuse_3325 : "MZylinder"; //
|
|
Schleuse_4221 : "MZylinder";
|
|
Weiche_4223 : "MZylinder"; //
|
|
Schleuse_4227 : "MZylinder"; //
|
|
Schleuse_4235 : "MZylinder"; //
|
|
Schleuse_3722 : "MZylinder"; //
|
|
Stopper_3324 : "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_3342
|
|
#Schleuse_3342(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3342);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3323
|
|
#Schleuse_3323(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3323);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3345
|
|
#Schleuse_3345(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3345);
|
|
END_REGION
|
|
|
|
REGION Schleuse_3325
|
|
#Schleuse_3325(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3325);
|
|
END_REGION
|
|
|
|
REGION Stopper 3324
|
|
#Stopper_3324(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3324);
|
|
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 Next1; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4221
|
|
#Schleuse_4221(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4221);
|
|
END_REGION
|
|
|
|
REGION Weiche_4223
|
|
#Weiche_4223(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4223);
|
|
#MB4210 := #MB4223;
|
|
END_REGION
|
|
|
|
REGION Schleuse_4227
|
|
#Schleuse_4227(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4227);
|
|
END_REGION
|
|
|
|
REGION Schleuse_4235
|
|
#Schleuse_4235(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB4235);
|
|
END_REGION
|
|
|
|
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 Next2; END_IF;
|
|
END_REGION
|
|
|
|
REGION Schleuse_3722
|
|
#Schleuse_3722(Automatik := #Auto, Handbetrieb := FALSE, T_Ast := 0, T_Gst := 5, ZylAst := #MB3722);
|
|
END_REGION
|
|
|
|
REGION Ende
|
|
RETURN;
|
|
END_REGION
|
|
|
|
END_FUNCTION_BLOCK
|