FB52 SEQ1 P03 SEQ1 Loading automatic mode

 

 

 

Netzwerk 1: Enable Round-Trip Transport

    "M01 RdyToStart" := "HMI KEY".P01."1M1".Enable_WP AND ("DI MAIN P01".SEQ1.LiftStartUp OR "DI OUT P01".Support."1M2 EndLimDown");

    "M02 RdyToStart" := "HMI KEY".P02."2M1".Enable_WP AND ("DI OUT P01".Support."1M2 EndLimUp" OR "DI OUT P01".Support."1M2 EndLimDown");

    "M03 RdyToStart" := "HMI KEY".P03."3M1".Enable_WP AND "DI MAIN P04".SEQ1.LiftStartUp;

    "M04 RdyToStart" := "HMI KEY".P04."4M1".Enable_WP AND "DI MAIN P04".SEQ1.LiftStartUp;

   

    #tmp_enable_RTT := "M01 RdyToStart" AND "M02 RdyToStart" AND "M03 RdyToStart" AND "M04 RdyToStart";

 

 

 

Netzwerk 2: Execute SEQ1

    #SEQ1(STEP_PLS := "HMI KEY".P03.GLB.F17_StepPls,

         STEP_MNS := "HMI KEY".P03.GLB.F18_StepMns,

         GOTO_STEP := "HMI KEY".P03.GLB.F19_GoToStep,

         GOTO_STEP_NO := "HMI KEY".P03.GLB.GoToStep,

         MAX_STEP := 15);

    #ACT_STEP := #SEQ1.S.stepact;

 

 

 

Netzwerk 3: Step jump distributor

    CASE #SEQ1.S.stepact OF

        0: // Waiting for SEQ1 enable

            "M03 SEQ1 Active" := FALSE;

            "M03 MW58" := 0;

            #SEQ1.S.stepd := "M03 HomPos" AND #SEQ1.S.steps;

           

        1: // Query WPC counter status.

            "M03 SEQ1 Active" := TRUE;

            IF #WT_CounterStat <> #WT_CounterSetP AND NOT #SEQ1.S.steph THEN

                #WT_CounterStat := #WT_CounterStat + 1;

                #SEQ1.S.stepd := TRUE;

            ELSIF #WT_CounterStat >= #WT_CounterSetP THEN

                #SEQ1.S.stepnew := 8;

                #SEQ1.S.stepd := TRUE;

            END_IF;

           

        2: // 3V2 Rotary cylinder HP (90°)

            "DI OUT P03"."3V2".VLV.CmdExe_WP := FALSE;

            "DI OUT P03"."3V2".VLV.CmdExe_HP := "HMI KEY".P03."3V2".Enable_HP;

            #SEQ1.S.stepd := "DI OUT P03"."3V2".FB_HP;

           

        3: // 3M2+3M1 Charging conveyor WP

            IF #SEQ1.S.stepfc THEN

                "DI OUT P03"."3M2".DRV.SetTrgtPos := "DI OUT P03".MANUAL.Support."3M2".Set_TchInPos_1;

                "DI OUT P03"."3M1".DRV.SetTrgtPos := "DI OUT P03".MANUAL.Support."3M1".Set_TchInPos_1;

                #SEQ1.S.c2.start := TRUE;

                #SEQ1.S.c2.set := 15;

                RETURN;

            END_IF;

           

            "M03 3M2 GoToPos" := "M03 3M1 GoToPos" := "HMI KEY".P03."3M1".Enable_WP AND "HMI KEY".P03."3M2".Enable_WP;

           

            IF #SEQ1.S.c2.done THEN

                IF "DI OUT P03"."3M2".DRV.SetPoReach THEN

                    "M03 3M2 GoToPos" := FALSE;

                END_IF;

                IF "DI OUT P03"."3M1".DRV.SetPoReach THEN

                    "M03 3M1 GoToPos" := FALSE;

                END_IF;

                IF NOT "M03 3M2 GoToPos" AND NOT "M03 3M1 GoToPos" THEN

                    #SEQ1.S.stepd := "E03 3M1 LB";

                    IF NOT #SEQ1.S.stepd THEN

                        #FLT."3M1_WP" := TRUE;

                    END_IF;

                END_IF;

            END_IF;

           

        4: // 3V2 Rotary cylinder WP (0°)

            "DI OUT P03"."3V2".VLV.CmdExe_HP := FALSE;

            "DI OUT P03"."3V2".VLV.CmdExe_WP := "HMI KEY".P03."3V2".Enable_WP;

            #SEQ1.S.stepd := "DI OUT P03"."3V2".FB_WP;

           

        5: // 3V1 Centring unit WP

            "DI OUT P03"."3V1".VLV.CmdExe_HP := FALSE;

            "DI OUT P03"."3V1".VLV.CmdExe_WP := "HMI KEY".P03."3V1".Enable_WP;

            #SEQ1.S.stepd := "DI OUT P03"."3V1".FB_WP;

           

        6: // 3M1+3M2 write conveyor reference point =0

            IF #SEQ1.S.stepfc THEN

                #SEQ1.S.c1.start := TRUE;

                #SEQ1.S.c1.set := 15;

                "HMI KEY".P03."3M1".F5_Set_Ref_Point := "HMI KEY".P03."3M2".F5_Set_Ref_Point := TRUE;

            ELSIF #SEQ1.S.c1.done THEN

                "HMI KEY".P03."3M1".F5_Set_Ref_Point := "HMI KEY".P03."3M2".F5_Set_Ref_Point := FALSE;

                #SEQ1.S.stepd :=

                "DI OUT P03"."3M1".DRV.ReferenceOK AND "DI OUT P03"."3M2".DRV.ReferenceOK

                 AND "DI OUT P03"."3M1".DRV.CrntPos = 0.0 AND "DI OUT P03"."3M2".DRV.CrntPos = 0.0;

            END_IF;

           

        7: // 3V1 Centring unit HP

            "DI OUT P03"."3V1".VLV.CmdExe_WP := FALSE;

            "DI OUT P03"."3V1".VLV.CmdExe_HP := "HMI KEY".P03."3V1".Enable_HP;

            #SEQ1.S.stepd := "DI OUT P03"."3V1".FB_HP;

           

        8: // Query RTT enabling signal

            #SEQ1.S.stepd := #tmp_enable_RTT;

           

        9: // Assign modules start signal

            #WP_PLACE.%X0 := "E03 3M1 LB";

            #WP_PLACE := SHL_BYTE(IN := #WP_PLACE, N := 1);

            "M01 Enbl RTT" :="M02 Enbl RTT" :="M03 Enbl RTT" :="M04 Enbl RTT" :=#SEQ1.S.stepd := TRUE;

           

        10: // 3M1 conveyor WP (RTT-Takt)

            IF #SEQ1.S.stepfc THEN

                "DI OUT P03"."3M1".DRV.SetTrgtPos := "DI OUT P03".MANUAL.Support."3M1".Set_TchInPos_2;

                #SEQ1.S.c2.start := TRUE;

                #SEQ1.S.c2.set := 15;

                RETURN;

            END_IF;

           

            IF "DI OUT P03"."3M1".DRV.SetPoReach AND #SEQ1.S.c2.done THEN

                #SEQ1.S.c1.start := "M03 ToRTT SetPoReach" := TRUE;

                #SEQ1.S.c1.set := 15;

                "M03 Enbl RTT" := FALSE;

            END_IF;

           

            "M03 3M1 GoToPos" := "HMI KEY".P03."3M1".Enable_WP AND "M03 Enbl RTT";

           

            IF #SEQ1.S.c1.done THEN

                #SEQ1.S.stepd := NOT #WP_PLACE.%X5 OR "E03 3M1 LB";

                IF NOT #SEQ1.S.stepd THEN

                    #FLT."3M1_WP" := TRUE;

                END_IF;

            END_IF;

           

        11: // 3V1 Centring unit WP

            "DI OUT P03"."3V1".VLV.CmdExe_HP := FALSE;

            "DI OUT P03"."3V1".VLV.CmdExe_WP := "HMI KEY".P03."3V1".Enable_WP;

            #SEQ1.S.stepd := "DI OUT P03"."3V1".FB_WP;

           

        12: // 3M1 write convyor reference point=0 mm        

            IF #SEQ1.S.stepfc THEN

                #SEQ1.S.c1.start := TRUE;

                #SEQ1.S.c1.set := 15;

                "HMI KEY".P03."3M1".F5_Set_Ref_Point := TRUE;

            ELSIF #SEQ1.S.c1.done THEN

                "HMI KEY".P03."3M1".F5_Set_Ref_Point := FALSE;

                #SEQ1.S.stepd := "DI OUT P03"."3M1".DRV.ReferenceOK AND "DI OUT P03"."3M1".DRV.CrntPos = 0.0;

            END_IF;

           

        13: // 3V1 centring unit HP

            "DI OUT P03"."3V1".VLV.CmdExe_WP := FALSE;

            "DI OUT P03"."3V1".VLV.CmdExe_HP := "HMI KEY".P03."3V1".Enable_HP;

            #SEQ1.S.stepd := "DI OUT P03"."3V1".FB_HP;

           

        14: // Query transport Setpoint reached

            IF "M01 ToRTT SetPoReach" AND "M02 ToRTT SetPoReach" AND "M03 ToRTT SetPoReach" AND "M04 ToRTT SetPoReach" THEN

               "M01 ToRTT SetPoReach" :="M02 ToRTT SetPoReach" :="M03 ToRTT SetPoReach" :="M04 ToRTT SetPoReach" := FALSE;

               #SEQ1.S.stepd := TRUE;

            END_IF;

           

        15: // Query modules RTT done

            IF NOT "M01 Enbl RTT" AND NOT "M02 Enbl RTT" AND NOT "M03 Enbl RTT" AND NOT "M04 Enbl RTT" THEN

                "M03 SEQ1 Done" := TRUE;

            END_IF;

    END_CASE;

 

 

 

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO