FB52 SEQ1 P03 Stacker Crane SEQ1 (2/3)

[hit  <- on your browser to return]

 

 

 

    4:  // M302 > HBS1 or M303 > HBS2

        IF #SSM.S.stepfc THEN

            // M302 > HBS1

            "DI MAIN P03".MoDa.RunTimeSetP_seq1 := 280;

            "DI MAIN P03".MoDa.RunTimeCntrl_seq1 := 0;

            #ExecuteCoordinate(INDEX_POS := "DI OUT P03".M302_Box_Data.Trgt_Storage.Place,

                               REF_POS := "ModulDa".MaPa.HBS1.RefPos,

                               PLACES_ON_X := "ModulDa".MaPa.HBS1.NoOf_Places_X,

                               PLACES_ON_Y := "ModulDa".MaPa.HBS1.NoOf_Places_Y,

                               GAP_FACTOR_X := "ModulDa".MaPa.HBS1.Gap.X,

                               GAP_FACTOR_Y := "ModulDa".MaPa.HBS1.Gap.Y,

                               TARGET_POS := "ModulDa".MaPa.HBS1.PlacingPos);

            #Distance_Xaxis_HBS1 := ABS(IN := "DI OUT P03".G120C_X.DRV.Support.ActPos - "ModulDa".MaPa.HBS1.PlacingPos.X);

            // M303 > HBS2

            #ExecuteCoordinate(INDEX_POS := "DI OUT P03".M303_Box_Data.Trgt_Storage.Place,

                               REF_POS := "ModulDa".MaPa.HBS2.RefPos,

                               PLACES_ON_X := "ModulDa".MaPa.HBS2.NoOf_Places_X,

                               PLACES_ON_Y := "ModulDa".MaPa.HBS2.NoOf_Places_Y,

                               GAP_FACTOR_X := "ModulDa".MaPa.HBS2.Gap.X,

                               GAP_FACTOR_Y := "ModulDa".MaPa.HBS2.Gap.Y,

                               TARGET_POS := "ModulDa".MaPa.HBS2.PlacingPos);

            #Distance_Xaxis_HBS2 := ABS(IN := "DI OUT P03".G120C_X.DRV.Support.ActPos - "ModulDa".MaPa.HBS2.PlacingPos.X);

            IF #Distance_Xaxis_HBS2 < #Distance_Xaxis_HBS1 THEN

                // M303 > HBS2

                #CurrentStoragePlace := "DI OUT P03".M303_Box_Data.Trgt_Storage.Place;

                "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := - "ModulDa".MaPa.HBS2.Gap.Z * "DI OUT P03".M303_Box_Data.Trgt_Storage.Depth;

                "DI OUT P03".G120C_Z.DRV.Support.SetVelo := "DI OUT P03".Manual.G120C_Z.TchInVelo_1;

                "DI OUT P03".HBS2.RdyToTakeIn_FrmNC := TRUE;

                IF "DI OUT P03".M303_Box_Data.Info.SizeTyp = 1 THEN

                    "DI OUT P03".M303_Box_Data.Info.SmalBox := TRUE;

                ELSIF "DI OUT P03".M303_Box_Data.Info.SizeTyp = 2 THEN

                    "DI OUT P03".M303_Box_Data.Info.LargeBox := TRUE;

                ELSE

                    #SSM.S."1_FAULT_00_15".%X1 := TRUE;

                END_IF;

            ELSIF #Distance_Xaxis_HBS1 <= #Distance_Xaxis_HBS2 THEN

                // M302 > HBS1

                #CurrentStoragePlace := "DI OUT P03".HBS2_Box_Data.Trgt_Storage.Place;

                "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := "ModulDa".MaPa.HBS1.Gap.Z * "DI OUT P03".HBS2_Box_Data.Trgt_Storage.Depth;

                "DI OUT P03".G120C_Z.DRV.Support.SetVelo := "DI OUT P03".Manual.G120C_Z.TchInVelo_1;

                "DI OUT P03".HBS1.RdyToTakeIn_FrmNC := TRUE;

                IF "DI OUT P03".M302_Box_Data.Info.SizeTyp = 1 THEN

                    "DI OUT P03".M302_Box_Data.Info.SmalBox := TRUE;

                ELSIF "DI OUT P03".M302_Box_Data.Info.SizeTyp = 2 THEN

                    "DI OUT P03".M302_Box_Data.Info.LargeBox := TRUE;

                ELSE

                    #SSM.S."1_FAULT_00_15".%X1 := TRUE;

                END_IF;

            END_IF;

        ELSE

            // Move STC to TargetPos M302 > HBS1

            IF "DI OUT P03".HBS1.RdyToTakeIn_FrmNC THEN

                "POS REACHED"(START := #SSM.S.steplo OR NOT #SSM.S.stepa,

                              TARGET_POS := "ModulDa".MaPa.HBS1.PlacingPos,

                              VELO_X := "DI OUT P03".Manual.G120C_X.TchInVelo_1,

                              VELO_Y := "DI OUT P03".Manual.G120C_Y.TchInVelo_1,

                              ENABLE_X := "DI OUT P03".G120C_X.DRV.Support.Epos_Enabled,

                              ENABLE_Y := "DI OUT P03".G120C_Y.DRV.Support.Epos_Enabled,

                              WINDOW_RANGE := 1.0,

                              MOV_TO_POS_X => "DI OUT P03".G120C_X.DRV.Support.Cmd_MovAbso,

                              MOV_TO_POS_Y => "DI OUT P03".G120C_Y.DRV.Support.Cmd_MovAbso,

                              TARGET_REACHED => "DI MAIN P03".M00.SEQ1_Busy);

                "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := "DI OUT P03".G120C_Z.DRV.Support.Epos_Enabled

                AND "E03 GapCntrl HBS1" AND "DI MAIN P03".M00.SEQ1_Busy AND ("E03 M302 LimS21" OR #SSM.S.c1.done) AND #SSM.S.stepa;

                // G120C_Z MovAbso towing arm towards extended pos. HBS1

                IF "DI OUT P03".G120C_Z.DRV.Support.InPos AND NOT ("E03 G120C_Z MiddleCntrl" OR #SSM.S.c1.done) THEN

                    "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := FALSE;

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

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

                    "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := 0.0;

                    // G120C_Z MovAbso towing arm towards middle pos. 0.0   

                ELSIF "DI OUT P03".G120C_Z.DRV.Support.InPos AND "E03 G120C_Z MiddleCntrl" THEN

                    "DI MAIN P03".M00.SEQ1_Done := #BoxCommissionDone_HSB1;

                END_IF;

                // Move STC to TargetPos M303 > HBS2      

            ELSIF "DI OUT P03".HBS2.RdyToTakeIn_FrmNC THEN

                "POS REACHED"(START := #SSM.S.steplo OR NOT #SSM.S.stepa,

                              TARGET_POS := "ModulDa".MaPa.HBS2.PlacingPos,

                              VELO_X := "DI OUT P03".Manual.G120C_X.TchInVelo_1,

                              VELO_Y := "DI OUT P03".Manual.G120C_Y.TchInVelo_1,

                              ENABLE_X := "DI OUT P03".G120C_X.DRV.Support.Epos_Enabled,

                              ENABLE_Y := "DI OUT P03".G120C_Y.DRV.Support.Epos_Enabled,

                              WINDOW_RANGE := 1.0,

                              MOV_TO_POS_X => "DI OUT P03".G120C_X.DRV.Support.Cmd_MovAbso,

                              MOV_TO_POS_Y => "DI OUT P03".G120C_Y.DRV.Support.Cmd_MovAbso,

                              TARGET_REACHED => "DI MAIN P03".M00.SEQ1_Busy);

                "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := "DI OUT P03".G120C_Z.DRV.Support.Epos_Enabled

                AND "E03 GapCntrl HBS2" AND "DI MAIN P03".M00.SEQ1_Busy AND ("E03 M305 LimS52" OR #SSM.S.c1.done) AND #SSM.S.stepa;

                // G120C_Z MovAbso towing arm towards extended pos. HBS2

                IF "DI OUT P03".G120C_Z.DRV.Support.InPos AND NOT ("E03 G120C_Z MiddleCntrl" OR #SSM.S.c1.done) THEN

                    "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := FALSE;

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

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

                    "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := 0.0;

                    // G120C_Z MovAbso towing arm towards middle pos. 0.0

                ELSIF "DI OUT P03".G120C_Z.DRV.Support.InPos AND "E03 G120C_Z MiddleCntrl" THEN

                    "DI MAIN P03".M00.SEQ1_Done := #BoxCommissionDone_HSB2;

                END_IF;

            END_IF;

        END_IF;

       

    5: // M302 > HBS1 or M304 > HBS2

        IF #SSM.S.stepfc THEN

            // M302 > HBS1

            "DI MAIN P03".MoDa.RunTimeSetP_seq1 := 310;

            "DI MAIN P03".MoDa.RunTimeCntrl_seq1 := 0;

            #ExecuteCoordinate(INDEX_POS := "DI OUT P03".M302_Box_Data.Trgt_Storage.Place,

                               REF_POS := "ModulDa".MaPa.HBS1.RefPos,

                               PLACES_ON_X := "ModulDa".MaPa.HBS1.NoOf_Places_X,

                               PLACES_ON_Y := "ModulDa".MaPa.HBS1.NoOf_Places_Y,

                               GAP_FACTOR_X := "ModulDa".MaPa.HBS1.Gap.X,

                               GAP_FACTOR_Y := "ModulDa".MaPa.HBS1.Gap.Y,

                               TARGET_POS := "ModulDa".MaPa.HBS1.PlacingPos);

            #Distance_Xaxis_HBS1 := ABS(IN := "DI OUT P03".G120C_X.DRV.Support.ActPos - "ModulDa".MaPa.HBS1.PlacingPos.X);

            // M304 > HBS2

            #ExecuteCoordinate(INDEX_POS := "DI OUT P03".M304_Box_Data.Trgt_Storage.Place,

                               REF_POS := "ModulDa".MaPa.HBS2.RefPos,

                               PLACES_ON_X := "ModulDa".MaPa.HBS2.NoOf_Places_X,

                               PLACES_ON_Y := "ModulDa".MaPa.HBS2.NoOf_Places_Y,

                               GAP_FACTOR_X := "ModulDa".MaPa.HBS2.Gap.X,

                               GAP_FACTOR_Y := "ModulDa".MaPa.HBS2.Gap.Y,

                               TARGET_POS := "ModulDa".MaPa.HBS2.PlacingPos);

            #Distance_Xaxis_HBS2 := ABS(IN := "DI OUT P03".G120C_X.DRV.Support.ActPos - "ModulDa".MaPa.HBS2.PlacingPos.X);

            IF #Distance_Xaxis_HBS2 < #Distance_Xaxis_HBS1 THEN

                // M304 > HBS2

                #CurrentStoragePlace := "DI OUT P03".M304_Box_Data.Trgt_Storage.Place;

                "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := - "ModulDa".MaPa.HBS2.Gap.Z * "DI OUT P03".M304_Box_Data.Trgt_Storage.Depth;

                "DI OUT P03".G120C_Z.DRV.Support.SetVelo := "DI OUT P03".Manual.G120C_Z.TchInVelo_1;

                "DI OUT P03".HBS2.RdyToTakeIn_FrmNC := TRUE;

                IF "DI OUT P03".M304_Box_Data.Info.SizeTyp = 1 THEN

                    "DI OUT P03".M304_Box_Data.Info.SmalBox := TRUE;

                ELSIF "DI OUT P03".M304_Box_Data.Info.SizeTyp = 2 THEN

                    "DI OUT P03".M304_Box_Data.Info.LargeBox := TRUE;

                ELSE

                    #SSM.S."1_FAULT_00_15".%X1 := TRUE;

                END_IF;

            ELSIF #Distance_Xaxis_HBS1 <= #Distance_Xaxis_HBS2 THEN

                // M302 > HBS1

                #CurrentStoragePlace := "DI OUT P03".HBS2_Box_Data.Trgt_Storage.Place;

                "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := "ModulDa".MaPa.HBS1.Gap.Z * "DI OUT P03".HBS2_Box_Data.Trgt_Storage.Depth;

                "DI OUT P03".G120C_Z.DRV.Support.SetVelo := "DI OUT P03".Manual.G120C_Z.TchInVelo_1;

                "DI OUT P03".HBS1.RdyToTakeIn_FrmNC := TRUE;

                IF "DI OUT P03".M302_Box_Data.Info.SizeTyp = 1 THEN

                    "DI OUT P03".M302_Box_Data.Info.SmalBox := TRUE;

                ELSIF "DI OUT P03".M302_Box_Data.Info.SizeTyp = 2 THEN

                    "DI OUT P03".M302_Box_Data.Info.LargeBox := TRUE;

                ELSE

                    #SSM.S."1_FAULT_00_15".%X1 := TRUE;

                END_IF;

            END_IF;

        ELSE

            // Move STC to TargetPos M302 > HBS1

            IF "DI OUT P03".HBS1.RdyToTakeIn_FrmNC THEN

                "POS REACHED"(START := #SSM.S.steplo OR NOT #SSM.S.stepa,

                              TARGET_POS := "ModulDa".MaPa.HBS1.PlacingPos,

                              VELO_X := "DI OUT P03".Manual.G120C_X.TchInVelo_1,

                              VELO_Y := "DI OUT P03".Manual.G120C_Y.TchInVelo_1,

                              ENABLE_X := "DI OUT P03".G120C_X.DRV.Support.Epos_Enabled,

                              ENABLE_Y := "DI OUT P03".G120C_Y.DRV.Support.Epos_Enabled,

                              WINDOW_RANGE := 1.0,

                              MOV_TO_POS_X => "DI OUT P03".G120C_X.DRV.Support.Cmd_MovAbso,

                              MOV_TO_POS_Y => "DI OUT P03".G120C_Y.DRV.Support.Cmd_MovAbso,

                              TARGET_REACHED => "DI MAIN P03".M00.SEQ1_Busy);

                "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := "DI OUT P03".G120C_Z.DRV.Support.Epos_Enabled

                AND "E03 GapCntrl HBS1" AND "DI MAIN P03".M00.SEQ1_Busy AND ("E03 M302 LimS21" OR #SSM.S.c1.done) AND #SSM.S.stepa;

                // G120C_Z MovAbso towing arm towards extended pos. HBS1

                IF "DI OUT P03".G120C_Z.DRV.Support.InPos AND NOT ("E03 G120C_Z MiddleCntrl" OR #SSM.S.c1.done) THEN

                    "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := FALSE;

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

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

                    "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := 0.0;

                    // G120C_Z MovAbso towing arm towards middle pos. 0.0   

                ELSIF "DI OUT P03".G120C_Z.DRV.Support.InPos AND "E03 G120C_Z MiddleCntrl" THEN

                    "DI MAIN P03".M00.SEQ1_Done := #BoxCommissionDone_HSB1;

                END_IF;

                // Move STC to TargetPos M304 > HBS2      

            ELSIF "DI OUT P03".HBS2.RdyToTakeIn_FrmNC THEN

                "POS REACHED"(START := #SSM.S.steplo OR NOT #SSM.S.stepa,

                              TARGET_POS := "ModulDa".MaPa.HBS2.PlacingPos,

                              VELO_X := "DI OUT P03".Manual.G120C_X.TchInVelo_1,

                              VELO_Y := "DI OUT P03".Manual.G120C_Y.TchInVelo_1,

                              ENABLE_X := "DI OUT P03".G120C_X.DRV.Support.Epos_Enabled,

                              ENABLE_Y := "DI OUT P03".G120C_Y.DRV.Support.Epos_Enabled,

                              WINDOW_RANGE := 1.0,

                              MOV_TO_POS_X => "DI OUT P03".G120C_X.DRV.Support.Cmd_MovAbso,

                              MOV_TO_POS_Y => "DI OUT P03".G120C_Y.DRV.Support.Cmd_MovAbso,

                              TARGET_REACHED => "DI MAIN P03".M00.SEQ1_Busy);

                "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := "DI OUT P03".G120C_Z.DRV.Support.Epos_Enabled

                AND "E03 GapCntrl HBS2" AND "DI MAIN P03".M00.SEQ1_Busy AND ("E03 M305 LimS52" OR #SSM.S.c1.done) AND #SSM.S.stepa;

                // G120C_Z MovAbso towing arm towards extended pos. HBS2

                IF "DI OUT P03".G120C_Z.DRV.Support.InPos AND NOT ("E03 G120C_Z MiddleCntrl" OR #SSM.S.c1.done) THEN

                    "DI OUT P03".G120C_Z.DRV.Support.Cmd_MovAbso := FALSE;

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

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

                    "DI OUT P03".G120C_Z.DRV.MC_MoveAbsolute.Position := 0.0;

                    // G120C_Z MovAbso towing arm towards middle pos. 0.0   

                ELSIF "DI OUT P03".G120C_Z.DRV.Support.InPos AND "E03 G120C_Z MiddleCntrl" THEN

                    "DI MAIN P03".M00.SEQ1_Done := #BoxCommissionDone_HSB2;

                END_IF;

            END_IF;

        END_IF;

 

FB52 SEQ1 2/3

 

back..

read more..

 

Home

 

Erfahrung

 

Referenzen

 

Sondermaschinen

 

MSR-Maschinen

 

SPS-Programmierung

 

Visualisierung HMI

 

Elektro CAD

 

Leistungsprofil

 

Personalia

 

SW-Development

 

Dokumentation

 

 

 

Impressum & DSGVO