FB42 SEQ1 P02 Heating Cooling

 

 

 

Network 1: Show message on HMI

"HMI KEY".Message.T201_PEW_Heating_Temperature_Reached :=

ABS("DI OUT P02".RV200_PID.Setpoint - "DI OUT P02".RV200_PID.Input) < "HMI KEY".SetValues."T201 Temperature_Deviation"

AND "DI OUT P02".T201_PEW.Support.PEW_Scaled > 75.0;

"HMI KEY".Message."T202_PEW Cooling_Temperature_Reached" :=

ABS("DI OUT P02".RV200_PID.Setpoint - "DI OUT P02".RV200_PID.Input) < "HMI KEY".SetValues."T201 Temperature_Deviation"

AND "DI OUT P02".T202_PEW.Support.PEW_Scaled < 23.6 AND NOT "HMI KEY".Message.T201_PEW_Heating_Temperature_Reached;

// Show on HMI RdyToStart

"DI MAIN P02".M00.RdyToStart := "DI MAIN GLB".M00.HomPosSR AND "DI MAIN GLB".M00.AutoCmpltMa_run;

 

 

 

Network 2: Define SSM last step

#SSM(LAST_STEP := 2);

 

 

 

Network 3: Step Switching Mechanism (SSM)

CASE #SSM.S.stepact OF

    0: // Waiting for sequencer to start

        "DI MAIN P02".M00.SEQ1_Busy := FALSE;

        IF #SSM.S.steps THEN

            #SSM.S.stepd := "DI MAIN P02".M00.RdyToStart;

            #RunTimeCounter := 0;

        END_IF;

       

    1: // Heating process

        IF #SSM.S.steplo THEN

            "DI MAIN P02".M00.SEQ1_Busy := TRUE;

            // Assign actors pre-setting automatic mode

            "DI OUT P02".RV200_PID.Mode := 3;

            #SSM.S.c1.set := 100;

            "DI OUT P02".RV200_PID.ModeActivate := "HMI KEY".P02.RV200_PID.F12_Enable_WP;

        ELSE

            "DI OUT P02".RV200_PID.ModeActivate := FALSE;

            // Simulate suction V204 for 10sec

            #SSM.S.c1.start := "DI MAIN P01".M00.SEQ1_DoWP1;

            "DI OUT P02".M202.DRV.CmdExe_WP := "HMI KEY".P02.M202.F12_Enable_WP AND "DI MAIN P01".M00.SEQ1_DoWP1 AND #SSM.S.stepa;

            "DI OUT P02".E200.DRV.CmdExe_WP := "HMI KEY".P02.E200.F12_Enable_WP AND "DI OUT P02".M202.DRV.CmdExe_WP AND NOT #SSM.S.c1.done;

            "DI OUT P02".V204.VLV_O.CmdExe_WP := "HMI KEY".P02.V204.F12_Enable_WP AND "DI OUT P02".M202.DRV.CmdExe_WP AND NOT #SSM.S.c1.done;

            // Heating actors WP

            "DI OUT P02".V201.VLV_O.CmdExe_WP := "HMI KEY".P02.V201.F12_Enable_WP AND #SSM.S.stepa AND NOT #SSM.S.c1.done;

            "DI OUT P02".M200.DRV.CmdExe_WP := "HMI KEY".P02.V201.F12_Enable_WP AND #SSM.S.stepa AND NOT #SSM.S.c1.done;

            "DI OUT P02".V200.VLV_O.CmdExe_WP := "HMI KEY".P02.V200.F12_Enable_WP AND NOT "HMI KEY".Message."T201_PEW Heating_Over_Heated_whilst_Production"

            AND #SSM.S.stepa;

            // Calculate required temperature

            #SEQ400.SSM.S.steph := #SSM.S.steph OR NOT "DI OUT P02".M200.DRV.LampWP;

            #SEQ400.SSM.S.steps := #SSM.S.steps AND "DI OUT P02".RV200_PID.State = 3

            AND "HMI KEY".P02.RV200_PID.F12_Enable_WP AND "DI OUT P02".V200.FB_WP AND "DI OUT P02".M200.DRV.LampWP AND "DI OUT P02".V201.FB_WP

            AND NOT "DI MAIN GLB".M00.TOF_CmpltMaOFF_Pulse.Q;

            #SEQ400();

            "FC CALC PE UNITS"(PU_EXE := #SSM.S.stepa,

                               PIPE_DN := 20.0,

                               PIPE_LENGTH := 6.52, // meter

                               HL_H := "HMI KEY".SetValues.FIT200_Hot_Water_Flow,

                               TEMP_ACT_VAL := "DI OUT P02".T200_PEW.Support.PEW_Scaled,

                               PU_SET_VAL := "HMI KEY".SetValues.Scal_PE_Unit_PU_SET_VAL,

                               SET_POINT_TEMP => #Set_Point_Temperature,

                               PU_ACT_VAL => #PU_Current_Value,

                               TEMP_HOLD_TIME_SEC => #Temperature_Holding_Time); // sec

            "DI OUT P02".RV200_PID.Setpoint := #Set_Point_Temperature * "HMI KEY".SetValues.Scal_PE_Unit_Regulating_Factor;

        END_IF;

        "DI OUT P02".V202.VLV_O.CmdExe_WP := "HMI KEY".P02.V202.F12_Enable_WP;

        #SSM.S.stepd := "DI OUT P02".V202.FB_WP AND "DI OUT P02".M200.DRV.LampHP AND "DI OUT P02".V200.FB_WP AND "DI OUT P02".V201.FB_HP AND "DI OUT P02".V204.FB_HP

        AND "DI OUT P02".E200.DRV.LampHP AND #SSM.S.c1.done;

       

    2: // Cooling process

        "DI OUT P02".RV200_PID.Setpoint := 2.0; // °C

        "DI MAIN P01".M00.SEQ1_DoWP1 := FALSE;

        "DI OUT P02".V202.VLV_O.CmdExe_WP := "HMI KEY".P02.V202.F12_Enable_WP;

        #SSM.S.c1.set := 70;

        #SSM.S.c1.start := "HMI KEY".Message."T202_PEW Cooling_Temperature_Reached";

        "DI MAIN P02".M00.SEQ1_Done := #SSM.S.c1.done;

        "DI OUT P02".V203.VLV_O.CmdExe_WP := "HMI KEY".P02.V203.F12_Enable_WP AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        "DI OUT P02".M201.DRV.CmdExe_WP := "HMI KEY".P02.M202.F12_Enable_WP AND "DI OUT P02".V202.FB_WP AND NOT #SSM.S.c1.done AND #SSM.S.stepa;

END_CASE;

 

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO