|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FB31 SET P01: Complete Restart |
|
|
|
Netzwerk 1: Query home position "DI MAIN P01".M00.HomPosIS := "Main_Safety_RTG1_DB".FB_SAFE_GLB.E00_SFDOOR_P01_Q AND "DI OUT P01".S210_A1.DRV.Support.HomeDone AND "DI OUT P01".S210_A2.DRV.Support.HomeDone AND "DI OUT P01".RP2D.DRV.Support.InPos AND "DI OUT P01".C100.FB_HP AND "DI OUT P01".C101.FB_HP AND "DI OUT P01".V100.FB_HP AND NOT "DI OUT P01".M100.FD_BACK; |
|
|
|
Netzwerk 2: Define last step #SSM(LAST_STEP := 11); |
|
|
|
Netzwerk 3: Step Switching Mechanism (SSM) CASE #SSM.S.stepact OF 0: // Waiting for SET to start #SSM.S.stepd := #SSM.S.steps;
1: // C100 swivelling vakuum gripper HP (RP2D) "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.BufferMode := 1; "DI OUT P01".C100.VLV_OC.CmdExe_WP := FALSE; "DI OUT P01".C100.VLV_OC.CmdExe_HP := "HMI KEY".P01.C100.F12_Enable_WP; #SSM.S.stepd := "DI OUT P01".C100.FB_HP;
2: // C101 pull push cylinder HP "DI OUT P01".C101.VLV_OC.CmdExe_WP := FALSE; "DI OUT P01".C101.VLV_OC.CmdExe_HP := "HMI KEY".P01.C101.F12_Enable_WP; #SSM.S.stepd := "DI OUT P01".C101.FB_HP;
3: // Move RP2D towards very top sensor IF "DI OUT P01".RP2D.DRV.Support.Status.z.Position < 705.5 THEN "DI OUT P01".S210_A1.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A1.MoveWork; "DI OUT P01".S210_A2.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A2.MoveWork; ELSE "DI OUT P01".S210_A1.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A1.MoveSlow; "DI OUT P01".S210_A2.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A2.MoveSlow; END_IF; IF NOT "E01 RP2D LimS_Top" THEN #SSM.S.stepd := TRUE; END_IF; "DI OUT P01".S210_A1.DRV.Support.Cmd_MoveJogHP := "HMI KEY".P01.S210_A1.F12_Enable_WP AND NOT #SSM.S.stepd AND #SSM.S.stepa; "DI OUT P01".S210_A2.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.S210_A2.F12_Enable_WP AND NOT #SSM.S.stepd AND #SSM.S.stepa;
4: // Move RP2D towards reference point left sensor IF "DI OUT P01".RP2D.DRV.Support.Status.x.Position > 3.0 THEN "DI OUT P01".S210_A1.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A1.MoveWork; "DI OUT P01".S210_A2.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A2.MoveWork; ELSE "DI OUT P01".S210_A1.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A1.MoveSlow; "DI OUT P01".S210_A2.DRV.Support.SetVelo := "HMI KEY".TargetValues.S210_A2.MoveSlow; END_IF; #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.Status.x.Position <= "DI OUT P01".RP2D.DRV.Support.WindowRange; "DI OUT P01".S210_A1.DRV.Support.Cmd_MoveJogHP := "HMI KEY".P01.S210_A1.F11_Enable_HP AND NOT #SSM.S.stepd AND #SSM.S.stepa; "DI OUT P01".S210_A2.DRV.Support.Cmd_MoveJogHP := "HMI KEY".P01.S210_A2.F11_Enable_HP AND NOT #SSM.S.stepd AND #SSM.S.stepa;
5: // Query S210_A1 axis home HomDone #SSM.S.c1.start := TRUE; #SSM.S.c1.set := 25; "HMI KEY".P01.S210_A1.F5_Set_Ref_Point := NOT "DI OUT P01".S210_A1.DRV.Support.HomeDone AND #SSM.S.c1.done; #SSM.S.stepd := "DI OUT P01".S210_A1.DRV.Support.HomeDone AND #SSM.S.c1.done;
6: // Query S210_A2 axis home HomDone #SSM.S.c1.start := TRUE; #SSM.S.c1.set := 25; "HMI KEY".P01.S210_A2.F5_Set_Ref_Point := NOT "DI OUT P01".S210_A2.DRV.Support.HomeDone AND #SSM.S.c1.done; #SSM.S.stepd := "DI OUT P01".S210_A2.DRV.Support.HomeDone AND #SSM.S.c1.done;
7: // RP2D MoveLinearAbsolute towards: P0 Park position IF #SSM.S.stepfc THEN "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.TransParameter[1] := 0; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveRapid; "HMI KEY".TargetValues.Position := 0; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[1] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].x; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[3] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].z; ELSE #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
8: // Query parts present IF NOT "E01 V100 SyringeOn" THEN "DI OUT P01".V100.VLV_O.CmdExe_WP := "DI OUT P01".M100.DRV.CmdExe_WP := FALSE; #SSM.S.stepnew := 11; #SSM.S.stepd := NOT ("E01 M100 VacuON" OR "DI OUT P01".M100.FD_BACK) AND "DI OUT P01".V100.FB_HP; ELSE #SSM.S.stepd := NOT #SSM.S.steplo; END_IF;
9: // RP2D MoveLinearAbsolute towards: P1 Bad parts place IF #SSM.S.stepfc THEN "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveWork; "HMI KEY".TargetValues.Position := 1; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[1] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].x; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[3] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].z; ELSE #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
10: // RP2D MoveLinearAbsolute towards: P2 ready to start IF #SSM.S.stepfc THEN "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveRapid; // mm/s "HMI KEY".TargetValues.Position := 2; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[1] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].x; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Position[3] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].z; ELSE "DI OUT P01".V100.VLV_O.CmdExe_WP := "DI OUT P01".M100.DRV.CmdExe_WP := FALSE; #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.InPos AND NOT ("E01 M100 VacuON" OR "DI OUT P01".M100.FD_BACK) AND NOT #SSM.S.steplo; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
11: // Query P01 home position "DI MAIN P01".M00.HomPosRun := NOT "DI MAIN P01".M00.HomPosIS OR #SSM.S.steplo; END_CASE; |
|