Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FB32 SEQ1 P01 Programme choice control

 

 

 

Network 1: Progamme Choice

IF "DI MAIN GLB".M00.ManuCmpltMa_run THEN

    // Reset programme choice

    "HMI KEY".Message.Current_Programme_No := 0;

    // Load programme choice 1

    IF "HMI KEY".Execute.Select_Programme_1A THEN

        "HMI KEY".SetPointComp_A[0] := "HMI KEY".SetPointComp_A[1];

        "HMI KEY".Execute.Programme_1A_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_A[0] <> "HMI KEY".SetPointComp_A[1] THEN

        "HMI KEY".Execute.Programme_1A_Selected := FALSE;

    END_IF;

    IF "HMI KEY".Execute.Select_Programme_1B THEN

        "HMI KEY".SetPointComp_B[0] := "HMI KEY".SetPointComp_B[1];

        "HMI KEY".Execute.Programme_1B_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_B[0] <> "HMI KEY".SetPointComp_B[1] THEN

        "HMI KEY".Execute.Programme_1B_Selected := FALSE;

    END_IF;

    "HMI KEY".Message.Programme_1_Selected := "HMI KEY".Execute.Programme_1A_Selected AND "HMI KEY".Execute.Programme_1B_Selected;

    IF "HMI KEY".Message.Programme_1_Selected THEN

        "HMI KEY".Message.Current_Programme_No := 1;

    END_IF;

    // Load programme choice 2

    IF "HMI KEY".Execute.Select_Programme_2A THEN

        "HMI KEY".SetPointComp_A[0] := "HMI KEY".SetPointComp_A[2];

        "HMI KEY".Execute.Programme_2A_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_A[0] <> "HMI KEY".SetPointComp_A[2] THEN

        "HMI KEY".Execute.Programme_2A_Selected := FALSE;

    END_IF;

    IF "HMI KEY".Execute.Select_Programme_2B THEN

        "HMI KEY".SetPointComp_B[0] := "HMI KEY".SetPointComp_B[2];

        "HMI KEY".Execute.Programme_2B_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_B[0] <> "HMI KEY".SetPointComp_B[2] THEN

        "HMI KEY".Execute.Programme_2B_Selected := FALSE;

    END_IF;

    "HMI KEY".Message.Programme_2_Selected := "HMI KEY".Execute.Programme_2A_Selected AND "HMI KEY".Execute.Programme_2B_Selected;

    IF "HMI KEY".Message.Programme_2_Selected THEN

        "HMI KEY".Message.Current_Programme_No := 2;

    END_IF;

    // Load programme choice 3

    IF "HMI KEY".Execute.Select_Programme_3A THEN

        "HMI KEY".SetPointComp_A[0] := "HMI KEY".SetPointComp_A[3];

        "HMI KEY".Execute.Programme_3A_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_A[0] <> "HMI KEY".SetPointComp_A[3] THEN

        "HMI KEY".Execute.Programme_3A_Selected := FALSE;

    END_IF;

    IF "HMI KEY".Execute.Select_Programme_3B THEN

        "HMI KEY".SetPointComp_B[0] := "HMI KEY".SetPointComp_B[3];

        "HMI KEY".Execute.Programme_3B_Selected := TRUE;

    ELSIF "HMI KEY".SetPointComp_B[0] <> "HMI KEY".SetPointComp_B[3] THEN

        "HMI KEY".Execute.Programme_3B_Selected := FALSE;

    END_IF;

    "HMI KEY".Message.Programme_3_Selected := "HMI KEY".Execute.Programme_3A_Selected AND "HMI KEY".Execute.Programme_3B_Selected;

    IF "HMI KEY".Message.Programme_3_Selected THEN

        "HMI KEY".Message.Current_Programme_No := 3;

    END_IF;

END_IF;

 

 

 

Network 2: Show message on HMI

"HMI KEY".Message.Required_Pressuree_Reached_Comp_A := ABS("DI OUT P01".P24C_A.Setpoint - "DI OUT P01".P24C_A.Input) < "HMI KEY".Execute.Pressure_Tolerance_Comp_A;

"HMI KEY".Message.Required_Pressuree_Reached_Comp_B := ABS("DI OUT P01".P24C_B.Setpoint - "DI OUT P01".P24C_B.Input) < "HMI KEY".Execute.Pressure_Tolerance_Comp_B;

IF "DI MAIN P01".M00.SEQ1_Busy THEN

    "HMI KEY".Message.Current_Metering_Volume_A :=

    "HMI KEY".SetPointComp_A[0].Size * "HMI KEY".SetPointComp_A[0].Size * 0.785 * ("DI OUT P01".V90_A.DRV.Support.ActPos - "HMI KEY".SetPointComp_A[0].Position);

    "HMI KEY".Message.Current_Metering_Volume_B :=

    "HMI KEY".SetPointComp_B[0].Size * "HMI KEY".SetPointComp_B[0].Size * 0.785 * ("DI OUT P01".V90_B.DRV.Support.ActPos - "HMI KEY".SetPointComp_B[0].Position);

END_IF;

 

 

 

Network 3: Pre-Setting

"DI MAIN P01".M00.ProductCounter.DlyOnReset(IN := "DI MAIN P01".M00.ProductCounter.ResetGoodProducts,

                                            PT := "DI MAIN P01".M00.ProductCounter.DlyOnReset.PT);

IF "DI MAIN P01".M00.ProductCounter.DlyOnReset.Q THEN

    "DI MAIN P01".M00.ProductCounter.GoodProducts := "DI MAIN P01".M00.ProductCounter.SetCounter;

ELSIF "DI OUT P02".Support.CommisionCancel_TON.Q THEN

    "HMI KEY".Execute.Programme_1A_Selected :=

    "HMI KEY".Execute.Programme_1B_Selected :=

    "HMI KEY".Execute.Programme_2A_Selected :=

    "HMI KEY".Execute.Programme_2B_Selected :=

    "HMI KEY".Execute.Programme_3A_Selected :=

    "HMI KEY".Execute.Programme_3B_Selected := FALSE;

END_IF;

#Support.Enabled := NOT ("DI MAIN P01".M00.HomPosRun OR "DI MAIN P02".M00.HomPosRun);

"DI MAIN P01".M00.RdyToStart := #Support.Enabled AND "HMI KEY".Message.Current_Programme_No > 0 AND "DI MAIN P02".M00.ProductCounter.GoodProducts < "HMI KEY".Execute.Number_of_Pallets_ToGo;

 

 

 

Network 4: Define SSM last step

#SSM(LAST_STEP := 9);

IF "HMI KEY".P01.GLB.F19_GoToStep THEN

    #SSM.S.stepact := "HMI KEY".P01.GLB.GoToStep;

    RETURN;

END_IF;

 

 

 

CASE #SSM.S.stepact OF

    0: // Waiting for sequencer to start

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

        IF NOT "DI MAIN P01".M00.RdyToStart THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            RETURN;

        ELSIF "DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run THEN

            IF "HMI KEY".Message.Programme_1_Selected THEN // Work pallet sector 1

                #SSM.S.stepd := #SSM.S.steps;

            ELSIF "HMI KEY".Message.Programme_2_Selected THEN // Work pallet sector 2

                #SSM.S.stepnew := 4;

                #SSM.S.stepd := #SSM.S.steps;

            ELSIF "HMI KEY".Message.Programme_3_Selected THEN // Work pallet sector 3

                #SSM.S.stepnew := 7;

                #SSM.S.stepd := #SSM.S.steps;

            END_IF;

        END_IF;

       

    1: // ProgChoice 1 pallet sector 1 selected

        IF "HMI KEY".Message.Current_Programme_No <> 1 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        ELSE

            "DI MAIN P01".M00.SEQ1_Busy := NOT (#SEQ341.SSM.S.step0 OR #SEQ331.SSM.S.step0);

        END_IF;

        IF #SEQ_12 THEN

            #SEQ331.SSM.S.steps := #Support.Enabled AND NOT #SEQ331.Done; // Programme choice 1/2

            #SEQ331.SSM.S.steph := #Support.steph;

            #SEQ331.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ331();

            IF #SEQ331.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

                #SSM.S.stepd := TRUE;

                #SEQ331.Done := FALSE;

            END_IF;

        ELSE

            #SEQ341.SSM.S.steps := #Support.Enabled AND NOT #SEQ341.Done; // Programme choice 2/2

            #SEQ341.SSM.S.steph := #Support.steph;

            #SEQ341.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ341();

            IF #SEQ341.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

                #SSM.S.stepd := TRUE;

                #SEQ341.Done := FALSE;

            END_IF;

        END_IF;

       

    2: // ProgChoice 1 pallet sector 2 selected

        IF "HMI KEY".Message.Current_Programme_No <> 1 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        IF #SEQ_12 THEN

            #SEQ332.SSM.S.steps := #Support.Enabled AND NOT #SEQ332.Done;

            #SEQ332.SSM.S.steph := #Support.steph;

            #SEQ332.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ332();

            IF #SEQ332.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

                #SSM.S.stepd := TRUE;

                #SEQ332.Done := FALSE;

            END_IF;

        ELSE

            #SEQ342.SSM.S.steps := #Support.Enabled AND NOT #SEQ342.Done;

            #SEQ342.SSM.S.steph := #Support.steph;

            #SEQ342.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ342();

            IF #SEQ342.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

                #SSM.S.stepd := TRUE;

                #SEQ342.Done := FALSE;

            END_IF;

        END_IF;

       

    3: // ProgChoice 1 pallet sector 3 selected

        IF "HMI KEY".Message.Current_Programme_No <> 1 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        IF #SEQ_12 THEN

            #SEQ333.SSM.S.steps := #Support.Enabled AND NOT #SEQ333.Done;

            #SEQ333.SSM.S.steph := #Support.steph;

            #SEQ333.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ333();

            IF #SEQ333.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

                #SSM.S.stepd := TRUE;

                #SEQ333.Done := FALSE;

            END_IF;

        ELSE

            #SEQ343.SSM.S.steps := #Support.Enabled AND NOT #SEQ343.Done;

            #SEQ343.SSM.S.steph := #Support.steph;

            #SEQ343.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

            #SEQ343();

            IF "DI MAIN P02".to_P01_Pallet.DoneACK AND #SEQ343.SSM.S.step0 AND NOT #SSM.S.steplo THEN

                #SSM.S.stepnew := 0;

                "DI MAIN P01".to_P02_Pallet.DoneACK := #SSM.S.stepd := TRUE;

                #SEQ343.Done := FALSE;

            END_IF;

        END_IF;

           

    4: // ProgChoice 2 pallet sector 1 selected

        IF "HMI KEY".Message.Current_Programme_No <> 2 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        ELSE

            "DI MAIN P01".M00.SEQ1_Busy := NOT #SEQ334.SSM.S.step0;

        END_IF;

        #SEQ334.SSM.S.steps := #Support.Enabled AND NOT #SEQ334.Done;

        #SEQ334.SSM.S.steph := #Support.steph;

        #SEQ334.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ334();

        IF #SEQ334.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

            #SSM.S.stepd := TRUE;

            #SEQ334.Done := FALSE;

        END_IF;

       

    5: // ProgChoice 2 pallet sector 2 selected

        IF "HMI KEY".Message.Current_Programme_No <> 2 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        #SEQ335.SSM.S.steps := #Support.Enabled AND NOT #SEQ335.Done;

        #SEQ335.SSM.S.steph := #Support.steph;

        #SEQ335.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ335();

        IF #SEQ335.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

            #SSM.S.stepd := TRUE;

            #SEQ335.Done := FALSE;

        END_IF;

       

    6: // ProgChoice 2 pallet sector 3 selected

        IF "HMI KEY".Message.Current_Programme_No <> 2 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        #SEQ336.SSM.S.steps := #Support.Enabled AND NOT #SEQ336.Done;

        #SEQ336.SSM.S.steph := #Support.steph;

        #SEQ336.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ336();

        IF "DI MAIN P02".to_P01_Pallet.DoneACK AND #SEQ336.SSM.S.step0 AND NOT #SSM.S.steplo THEN

            #SSM.S.stepnew := 0;

            "DI MAIN P01".to_P02_Pallet.DoneACK := #SSM.S.stepd := TRUE;

            #SEQ336.Done := FALSE;

        END_IF;

       

    7: // ProgChoice 3 pallet sector 1 selected

        IF "HMI KEY".Message.Current_Programme_No <> 3 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        ELSE

            "DI MAIN P01".M00.SEQ1_Busy := NOT #SEQ337.SSM.S.step0;

        END_IF;

        #SEQ337.SSM.S.steps := #Support.Enabled AND NOT #SEQ337.Done;

        #SEQ337.SSM.S.steph := #Support.steph;

        #SEQ337.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ337();

        IF #SEQ337.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

            #SSM.S.stepd := TRUE;

            #SEQ337.Done := FALSE;

        END_IF;

       

    8: // ProgChoice 3 pallet sector 2 selected

        IF "HMI KEY".Message.Current_Programme_No <> 3 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        #SEQ338.SSM.S.steps := #Support.Enabled AND NOT #SEQ338.Done;

        #SEQ338.SSM.S.steph := #Support.steph;

        #SEQ338.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ338();

        IF #SEQ338.SSM.S.step0 AND NOT #SSM.S.steplo AND #Support.Enabled THEN

            #SSM.S.stepd := TRUE;

            #SEQ338.Done := FALSE;

        END_IF;

       

    9: // ProgChoice 3 pallet sector 3 selected

        IF "HMI KEY".Message.Current_Programme_No <> 3 THEN

            "DI MAIN GLB".M00.AutoCmpltMa_run := "DI MAIN GLB".M00.InchCmpltMa_run := FALSE;

            #SSM.S.stepnew := 0;

            #SSM.S.stepd := TRUE;

        END_IF;

        #SEQ339.SSM.S.steps := #Support.Enabled AND NOT #SEQ339.Done;

        #SEQ339.SSM.S.steph := #Support.steph;

        #SEQ339.SSM.S.stepa := #Support.Enabled AND ("DI MAIN GLB".M00.AutoCmpltMa_run OR "DI MAIN GLB".M00.InchCmpltMa_run);

        #SEQ339();

        IF "DI MAIN P02".to_P01_Pallet.DoneACK AND #SEQ339.SSM.S.step0 AND NOT #SSM.S.steplo THEN

            "DI MAIN P01".to_P02_Pallet.DoneACK := #SSM.S.stepd := TRUE;

            #SEQ339.Done := FALSE;

        END_IF;

END_CASE;