Obsidean_VM/04-SIDEL/00 - MASTER/Source/source/VacuumCtrl.md

51 lines
3.2 KiB
Markdown

```pascal
// Block Type: FC
// Block Number: 2023
// Original Network Languages: LAD
FUNCTION "VacuumCtrl" : Void
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_TEMP
Vacuum : Real;
TimeOut : S5Time;
END_VAR
#_3M : Bool; // Auto-generated temporary
#_5M : Bool; // Auto-generated temporary
BEGIN
// Network 1: PRESSURE - Deaireator vacuum pressure acheaved (Original Language: LAD)
"Vacuum" := "Blender_Constants"."gTN301VacuumPress" + "Blender_Constants"."gTN301VacuumIst";
// Network 2: Vacuum Acheaved - still product signal from vacuum probe (Original Language: LAD)
"gPTN313_Acheaved" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_Deareation_Vacum";
// Network 3: Waiting Vacuum (Original Language: LAD)
// Message TO HMI: Waiting Vacuum If Needed.
"HMI_Alarms"."gH_Status" := ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" AND "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_ByPassDeair" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Latch") OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" AND "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_ByPassDeair" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Done") OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" AND "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_EnDeaireation" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Latch") OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" AND "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_EnDeaireation" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Done") OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_ByPassDeair" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Latch" AND "Blender_Variables_Pers"."gCarboStillRecipe") OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_ByPassDeair" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Done" AND "Blender_Variables_Pers"."gCarboStillRecipe") OR ("HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_EnDeaireation" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Latch" AND "Blender_Variables_Pers"."gCarboStillRecipe") OR ("HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_EnDeaireation" AND "gPTN313_Acheaved" AND "Procedure_Variables"."TN301_StartUp"."Done" AND "Blender_Variables_Pers"."gCarboStillRecipe");
// Network 4: Timeout Septoint (Original Language: LAD)
IF "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" THEN
"TimeOut" := S5T#5M;
END_IF;
IF NOT "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" THEN
"TimeOut" := S5T#3M;
END_IF;
// Network 5: VacuumFault (Original Language: LAD)
"mVacuumFaultTmr"(IN := "HMI_Device"."PPN304"."Out", PT := "TimeOut"); // TODO: Declarar "mVacuumFaultTmr" : TON;
"gVacuumTimeOut_Fault" := ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_DoubleDeair" AND "mVacuumFaultTmr".Q AND "gPTN313_Acheaved") OR ("mVacuumFaultTmr".Q AND "gPTN313_Acheaved" AND "Blender_Variables_Pers"."gCarboStillRecipe");
END_FUNCTION
```