SEQ334 P01 : Programme Choice 2 process pallet sector 1

[hit  <- on your browser to return]

 

 

 

Network 1: Call actual SSM

#SSM(STEP_PLS := "HMI KEY".P01.GLB.F17_StepPls,

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

     GOTO_STEP := FALSE,

     GOTO_STEP_NO := 0,

     LAST_STEP := 16);

 IF "DI MAIN GLB".M00.CmpltMaOFF_Imp THEN

     #SSM.S.stepin := FALSE;

 END_IF;

 "DI MAIN P01".SEQ1.SSM.S.stepin := #SSM.S.stepin;

 

 

 

Network 2: Pre-Setting

"DI MAIN P01".SEQ1.Support.stepd := #SSM.S.stepd;

 

 

 

Network 3: CASE-Function corresponds to actual SSM

CASE #SSM.S.stepact OF

    0: // Waiting for SEQ to start

        "DI MAIN P01".to_P02_Pallet.Request := #SSM.S.stepa AND NOT #Done AND "DI OUT P02".M32_Pallet_Data.Pallet_Code <> 16#0000_0000;

        #SSM.S.stepd := #SSM.S.steps AND "DI MAIN P02".to_P01_Pallet.ReadyToGo AND "DI MAIN P01".to_P02_Pallet.Request;

       

    1: // V90_A/V90_B MovAbso towards start position, V23Y6/V23Y7 suction valve WP, V28Y12/V28Y34 drive cylinder WP

        IF #SSM.S.stepfc THEN

            "DI MAIN P01".MoDA.RunTimeCntr_seq1 := 0;

            #Ref_StartPos.X := "DI OUT P02".M32_Pallet_Data.Pallet_Ref_Pos_X; // 0.0

            #Ref_StartPos.Y := "DI OUT P02".M32_Pallet_Data.Pallet_Ref_Pos_Y; // 57.5

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.CirclePlane := 2;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.DynamicAdaption :=

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.DynamicAdaption := 0;

            IF "DI OUT P02".M32_Pallet_Data.WorkPiece_1.NumOfWorkPieces = 0 THEN

                #Done := TRUE;

                RETURN;

            END_IF;

            #MaxParts := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.NumOfWorkPieces;

            "HMI KEY".Message.Index_Position := "HMI KEY".Message.Index_Position + 1;

            #ExecuteCoodinate(INDEX_POS := "HMI KEY".Message.Index_Position,

                              REF_POS := #Ref_StartPos,

                              PLACES_ON_X := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.PalletPlaceOn_X,

                              PLACES_ON_Y := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.PalletPlaceOn_Y,

                              GAP_FACTOR_X := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Gap_X,

                              GAP_FACTOR_Y := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Gap_Y,

                              TARGET_POS := #TrgtPos);

            "DI OUT P01".S210_Z.DRV.Support.SetVelo := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.RapidVelo_Z;

            "DI OUT P01".S210_Z.DRV.MC_MoveAbsolute.Position := 200.0;

            "DI OUT P01".V90_A.DRV.Support.SetVelo := "HMI KEY".SetPointComp_A[0].RapidVelo;

            "DI OUT P01".V90_A.DRV.MC_MoveAbsolute.Position := "HMI KEY".SetPointComp_A[0].Position;

            "DI OUT P01".V90_B.DRV.Support.SetVelo := "HMI KEY".SetPointComp_B[0].RapidVelo;

            "DI OUT P01".V90_B.DRV.MC_MoveAbsolute.Position := "HMI KEY".SetPointComp_B[0].Position;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := FALSE;

        ELSE

            #tmp_V90_A_inpos := "DI OUT P01".V90_A.DRV.Support.InPos AND NOT #SSM.S.steplo;

            #tmp_V90_B_inpos := "DI OUT P01".V90_B.DRV.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".V23Y6.CmdExe_WP := "HMI KEY".P01.V23Y6.F12_Enable_WP AND NOT #tmp_V90_A_inpos AND #SSM.S.stepa;

            "DI OUT P01".V23Y7.CmdExe_WP := "HMI KEY".P01.V23Y7.F12_Enable_WP AND NOT #tmp_V90_B_inpos AND #SSM.S.stepa;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_WP := "HMI KEY".P01.V28Y12.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.MC_MoveAbsolute.Busy AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_WP := "HMI KEY".P01.V28Y34.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.MC_MoveAbsolute.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".V90_A.DRV.Support.Epos_Enabled AND NOT #tmp_V90_A_inpos AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".V90_B.DRV.Support.Epos_Enabled AND NOT #tmp_V90_B_inpos AND #SSM.S.stepa;

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

                             TARGET_POS := #TrgtPos,

                             VELO_X := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.RapidVelo_X,

                             VELO_Y := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.RapidVelo_Y,

                             ENABLE_X := "DI OUT P01".S120_X.DRV.Support.Epos_Enabled,

                             ENABLE_Y := "DI OUT P01".S120_Y.DRV.Support.Epos_Enabled,

                             WINDOW_RANGE := 0.1,

                             MOV_TO_POS_X => "DI OUT P01".S120_X.DRV.Support.Cmd_MoveAbsolute,

                             MOV_TO_POS_Y => "DI OUT P01".S120_Y.DRV.Support.Cmd_MoveAbsolute,

                             TARGET_REACHED => #SSM.S.c1.start);

            #SSM.S.stepd := #SSM.S.c1.done AND "DI OUT P01".S210_Z.DRV.Support.InPos AND #tmp_V90_A_inpos AND #tmp_V90_B_inpos;

            "DI OUT P01".S210_Z.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".S210_Z.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        END_IF;

       

    2: // S210Z MoveAbolute towards WorkPos (downward)

        IF #SSM.S.stepfc THEN

            "DI OUT P01".S210_Z.DRV.Support.SetVelo := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.WorkVelo_Z;

            "DI OUT P01".S210_Z.DRV.MC_MoveAbsolute.Position := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.WorkPos_Z;

        ELSE

            #SSM.S.stepd := "DI OUT P01".S210_Z.DRV.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".S210_Z.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".S210_Z.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        END_IF;

       

    3: // CARTESIAN_3D MoveLinearRelative distance "01_MovLinRela_ab" y(-40.53) gasketting on

        IF #SSM.S.stepfc THEN

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_WP := "DI OUT P01".V28Y34.VLV_OC.CmdExe_WP := FALSE;

            "DI OUT P01".V90_A.DRV.Support.SetVelo := "HMI KEY".SetPointComp_A[0].WorkVelo;

            "DI OUT P01".V90_B.DRV.Support.SetVelo := "HMI KEY".SetPointComp_B[0].WorkVelo * "HMI KEY".SetPointComp_B[0].MixingRatio / "HMI KEY".SetPointComp_A[0].MixingRatio;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := 0.0;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."01_MovRela_ab".Y;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    4: // CARTESIAN_3D MoveLinearRelative distance "02_MovLinRela_bc" x(209.19)

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."02_MovRela_bc".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := 0.0;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    5: // CARTESIAN_3D MoveCircularRelative AuxPoint "03_MovCirRela_cd" yArc(28.27 270.0°)CirMod_1,AuxPoint+Arc

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.AuxPoint[1] := 0.0;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.AuxPoint[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."03_MovRela_cd".AuxPoint[2];

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.Arc := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."03_MovRela_cd".Arc;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.CircMode := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."03_MovRela_cd".CircMode;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.PathChoice := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."03_MovRela_cd".PathChoice;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveCircularRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    6: // CARTESIAN_3D MoveLinearRelative distance "04_MovLinRela_de" y(209.19)

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := 0.0;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."04_MovRela_de".Y;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    7: // CARTESIAN_3D MoveLinearRelative distance "05_MovLinRela_ef" x(-209.19)

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."05_MovRela_ef".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := 0.0;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    8: // CARTESIAN_3D MoveCircularRelative "06_MovCirRela_fg" y(-28.27 270.0°)CirMod_1, AuxPoint+Arc

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.AuxPoint[1] := 0.0;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.AuxPoint[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."06_MovRela_fg".AuxPoint[2];

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.Arc := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."06_MovRela_fg".Arc;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.CircMode := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."06_MovRela_fg".CircMode;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveCircularRelative.PathChoice := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."06_MovRela_fg".PathChoice;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveCircularRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

        END_IF;

       

    9: // CARTESIAN_3D MoveLinearRelative distance "07_MovLinRela_gh" y(-134.61)

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := 0.0;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."07_MovRela_gh".Y;

        ELSE

            #SSM.S.stepllo := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

            #SSM.S.stepd := #SSM.S.stepllo AND "DI OUT P01".V90_A.DRV.Support.LampOFF AND "DI OUT P01".V90_B.DRV.Support.LampOFF;

        END_IF;

       

    10: // CARTESIAN_3D MoveLinearRelative distance "08_MovLinRela_hi" xy(26.98 -48.89) gasketting off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."08_MovRela_hi".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."08_MovRela_hi".Y;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        END_IF;

       

    11: // CARTESIAN_3D MoveLinearRelative distance "09_MovLinRela_ij" xy(184.68 186.57) gasketting on/off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."09_MovRela_ij".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."09_MovRela_ij".Y;

        ELSE

            #SSM.S.stepllo := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

            #SSM.S.stepd := #SSM.S.stepllo AND "DI OUT P01".V90_A.DRV.Support.LampOFF AND "DI OUT P01".V90_B.DRV.Support.LampOFF;

        END_IF;

       

    12: // CARTESIAN_3D MoveLinearRelaRelative distance "10_MovLinRela_jk" xy(-37.39 -148.34) gasketting off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."10_MovRela_jk".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."10_MovRela_jk".Y;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        END_IF;

       

    13: // CARTESIAN_3D MoveLinearRelative distance "11_MovLinRela_kl" xy(-41.12 43.00) gasketting on/off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."11_MovRela_kl".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."11_MovRela_kl".Y;

        ELSE

            #SSM.S.stepllo := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

            #SSM.S.stepd := #SSM.S.stepllo AND "DI OUT P01".V90_A.DRV.Support.LampOFF AND "DI OUT P01".V90_B.DRV.Support.LampOFF;

        END_IF;

       

    14: // CARTESIAN_3D MoveLinearRelative distance "12_MovLinRela_lm" xy(-26.89 26.89) stop gasketting off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."12_MovRela_lm".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."12_MovRela_lm".Y;

        ELSE

            #SSM.S.stepd := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;

        END_IF;

       

    15: // CARTESIAN_3D MoveLinearRelative distance "13_MovLinRela_mn" xy(-43.00 44.00) start gasketting on/off

        IF #SSM.S.stepfc THEN

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Velocity := "DI OUT P02".M32_Pallet_Data.WorkPiece_1.Velocity_3D;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[1] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."13_MovRela_mn".X;

            "DI OUT P01".CARTESIAN_3D.KIN.MC_MoveLinearRelative.Distance[2] := "DI OUT P02".M32_Pallet_Data.WorkPiece_1."13_MovRela_mn".Y;

        ELSE

            #SSM.S.stepllo := "DI OUT P01".CARTESIAN_3D.KIN.Support.InPos AND NOT #SSM.S.steplo;

            "DI OUT P01".CARTESIAN_3D.KIN.Support.Cmd_MoveLinearRelative := "DI OUT P01".CARTESIAN_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            // (gasketting on)

            "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_A.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.V90_B.F12_Enable_WP AND "DI OUT P01".CARTESIAN_3D.KIN.Support.Busy AND NOT #SSM.S.stepllo AND #SSM.S.stepa;

            "DI OUT P01".V23Y4.CmdExe_WP := "HMI KEY".P01.V23Y4.F12_Enable_WP AND "DI OUT P01".V90_A.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V23Y5.CmdExe_WP := "HMI KEY".P01.V23Y5.F12_Enable_WP AND "DI OUT P01".V90_B.DRV.Support.Cmd_MoveJogWP;

            "DI OUT P01".V28Y12.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y12.F11_Enable_HP AND #SSM.S.stepa;

            "DI OUT P01".V28Y34.VLV_OC.CmdExe_HP := "HMI KEY".P01.V28Y34.F11_Enable_HP AND #SSM.S.stepa;

            #SSM.S.stepd := #SSM.S.stepllo AND "DI OUT P01".V90_A.DRV.Support.LampOFF AND "DI OUT P01".V90_B.DRV.Support.LampOFF;

        END_IF;

       

    16: // Query ending sector 1 if necessary

        IF #SSM.S.stepfc THEN

            "DI MAIN P01".M00.ProductCounter.GoodProducts := "DI MAIN P01".M00.ProductCounter.GoodProducts + 1;

        ELSIF "HMI KEY".Message.Index_Position >= #MaxParts THEN

            #Done := TRUE;

        ELSE

            #SSM.S.stepnew := 1;

            #SSM.S.stepd := TRUE;

        END_IF;

END_CASE;