FB32 SEQ1 P01 : Articulated Arm |
|
|
|
Network 1: Pre-Setting "DI MAIN P01".M00.RdyToStart := "DI MAIN GLB".M00.HomPosSR AND "DI MAIN GLB".M00.AutoCmpltMa_run; |
|
|
|
Network 2: Define last step #SSM(LAST_STEP := 20); |
|
|
|
Network 3: Step Switching Mechanism (SSM) CASE #SSM.S.stepact OF 0: // Waiting for SEQ to start "DI MAIN P01".M00.SEQ1_Busy := FALSE; IF #SSM.S.steps THEN #SSM.S.stepd := "DI MAIN P01".M00.RdyToStart; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.CoordSystem := 0; #RunTimeCounter := 0; "DI OUT P01".CAM_DISC.CAM.MC_MeasuringInput.MeasuredValue1 := "DI OUT P01".CAM_DISC.CAM.MC_MeasuringInput.MeasuredValue2 := 0.0; END_IF;
1: // G120_M MoveAbsolute Mold_OnCarrier_End_Recording_xy into "CAM DAT XY" IF #SSM.S.stepfc THEN "DI MAIN P01".M00.SEQ1_Busy := TRUE; "DI OUT P01".G120_M.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Middle; "DI OUT P01".G120_M.DRV.MC_MoveAbsolute.Position := "HMI KEY".CamDisc_Machine.Mold_OnCarrier_End_Recording_xy; ELSE #SSM.S.stepd := "DI OUT P01".G120_M.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".G120_M.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120_M.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
2: // G120C_S MoveAbsolute towards "CAM DAT XY".PointToCopy[1].y IF #SSM.S.stepfc THEN "DI OUT P01".G120C_S.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Middle; "DI OUT P01".G120C_S.DRV.MC_MoveAbsolute.Position := "HMI KEY".CamDisc_Machine.Mold_onCarrier_StartSpraying_y := "CAM DAT XY".PointToCopy[1].y; ELSE #SSM.S.stepd := "DI OUT P01".G120C_S.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".G120C_S.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120C_S.DRV.Support.Epos_Enabled AND "DI OUT P01".COPY_CAM.CAM.Support.ReadyTo_ReStart AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
3: // COPY_CAM Data from "CAM DAT XY" to "Cam_1" #SSM.S.stepd := "DI OUT P01".COPY_CAM.CAM.Support.ReadyTo_ReStart; "DI OUT P01".COPY_CAM.CAM.Support.Cmd_CopyCam := "HMI KEY".P01.CAM_COPY.F12_Enable_WP AND NOT (#SSM.S.stepd OR #SSM.S.steplo);
4: // G120_M + G120C_S CAM_DISC with Y101 start synchronously mold spraying IF #SSM.S.stepfc THEN "DI OUT P01".G120_M.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Middle; END_IF; #SSM.S.stepd := "DI OUT P01".CAM_DISC.CAM.MC_OutputCam.Busy; "DI OUT P01".G120_M.DRV.Support.Cmd_MoveJogWP := "HMI KEY".P01.G120_M.F12_Enable_WP AND NOT #SSM.S.stepd AND #SSM.S.stepa; "DI OUT P01".Y101.VLV_O.CmdExe_WP := "HMI KEY".P01.Y101.F12_Enable_WP AND "DI OUT P01".G120_M.DRV.Support.Cmd_MoveJogWP AND "DI OUT P01".CAM_DISC.CAM.MC_CamIn.InSync;
5: // G120_M + G120C_S MoveAbsolut towards Mold_onCarrier_PlacingPos IF #SSM.S.stepfc THEN "DI OUT P01".G120_M.DRV.Support.SetVelo := "DI OUT P01".G120C_S.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Fast; "DI OUT P01".G120_M.DRV.MC_MoveAbsolute.Position := "HMI KEY".CamDisc_Machine.Mold_onCarrier_PlacingPos_x; "DI OUT P01".G120C_S.DRV.MC_MoveAbsolute.Position := "HMI KEY".CamDisc_Machine.Mold_onCarrier_PlacingPos_y; ELSE #SSM.S.stepd := "DI OUT P01".G120_M.DRV.Support.InPos AND "DI OUT P01".G120C_S.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".G120_M.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120_M.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; "DI OUT P01".G120C_S.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120C_S.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
6: // SCARA_3D MoveDirect towards Pos[2] PickUp above IF #SSM.S.stepfc THEN #Pos_No := 2; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.TransParameter[1] := 0.0; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.VelocityFactor := "HMI KEY".SetValues.SCARA_3D_VelocityFactor_Middle; // 0.07 ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
7: // SCARA_3D MoveDirect towards Pos[1] PickUp below IF #SSM.S.stepfc THEN #Pos_No := 1; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.VelocityFactor := "HMI KEY".SetValues.SCARA_3D_VelocityFactor_Slow; // 0.02 #SSM.S.c1.start := TRUE; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Active AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
8: // SCARA_3D Cmd_GroupStop waiting for E01 SCARA StopDistace done #SSM.S.stepd := "DI OUT P01".S120_M1.DRV.Support.LampOFF AND "DI OUT P01".S120_M2.DRV.Support.LampOFF AND "DI OUT P01".S210_M4.DRV.Support.LampOFF AND "DI OUT P01".SCARA_3D.KIN.MC_GroupStop.Done AND "E01 SCARA StopDistace"; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_GroupStop := "E01 SCARA StopDistace" AND NOT #SSM.S.stepd AND #SSM.S.stepa;
9: // Waiting for Message.T201_PEW_Heating_Temperature_Reached "DI OUT P01".Y100.VLV_O.CmdExe_WP := "HMI KEY".P01.Y100.F12_Enable_WP AND "HMI KEY".Message.T201_PEW_Heating_Temperature_Reached AND "E01 SCARA StopDistace"; #SSM.S.stepd := "DI OUT P01".Y100.FB_WP AND "E01 S214 VaccumOn";
10: // SCARA_3D MoveDirect towards Pos[2] Pick above IF #SSM.S.stepfc THEN #Pos_No := 2; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.VelocityFactor := "HMI KEY".SetValues.SCARA_3D_VelocityFactor_Middle; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.InPos AND NOT #SSM.S.steplo AND "E01 SCARA StopDistace"; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
11: // SCARA_3D MoveDirect towards Pos[3] Pick above left IF #SSM.S.stepfc THEN #Pos_No := 3; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.TransParameter[1] := 326.0; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.InPos AND NOT #SSM.S.steplo AND "E01 SCARA StopDistace"; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
12: // SCARA_3D MoveDirect towards Pos[4] Pick above middle IF #SSM.S.stepfc THEN #Pos_No := 4; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; #SSM.S.c1.start := TRUE; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Active AND NOT #SSM.S.steplo AND "E01 SCARA StopDistace"; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
13: // SCARA_3D MoveDirect towards Pos[5] Pick above right IF #SSM.S.stepfc THEN #Pos_No := 5; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; #SSM.S.c1.start := TRUE; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Active AND NOT #SSM.S.steplo AND "E01 SCARA StopDistace"; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
14: // SCARA_3D MoveDirect towards Pos[6] Place down right IF #SSM.S.stepfc THEN #Pos_No := 6; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.VelocityFactor := "HMI KEY".SetValues.SCARA_3D_VelocityFactor_Slow; ELSE #SSM.S.stepllo := "DI OUT P01".SCARA_3D.KIN.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepllo AND #SSM.S.stepa; "DI OUT P01".Y100.VLV_O.CmdExe_WP := NOT #SSM.S.stepllo; #SSM.S.stepd := "DI OUT P01".Y100.FB_HP AND NOT ("E01 S214 VaccumOn" OR "E01 SCARA StopDistace"); END_IF;
15: // G120_M MoveAbsolute towards MoldingPos IF #SSM.S.stepfc THEN "DI OUT P01".G120_M.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Slow; "DI OUT P01".G120_M.DRV.MC_MoveAbsolute.Position := "HMI KEY".Traversing_Range.Length; ELSE #SSM.S.stepd := "DI OUT P01".G120_M.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".G120_M.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120_M.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
16: // SCARA_3D MoveDirect towards Pos[5] above right IF #SSM.S.stepfc THEN "DI MAIN P01".M00.SEQ1_DoWP1 := TRUE; "DI MAIN P01".M00.ProductCounter.GoodParts := "DI MAIN P01".M00.ProductCounter.GoodParts + 1; #Pos_No := 5; #SSM.S.c1.start := TRUE; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.VelocityFactor := "HMI KEY".SetValues.SCARA_3D_VelocityFactor_Middle; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.Active AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
17: // SCARA_3D MoveDirect towards Pos[4] above middle IF #SSM.S.stepfc THEN #Pos_No := 4; #SSM.S.c1.start := TRUE; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.Active AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
18: // SCARA_3D MoveDirect towards Pos[3] above left IF #SSM.S.stepfc THEN #Pos_No := 3; "DI OUT P01".SCARA_3D.KIN.MC_MoveDirectAbsolute.Position := "HMI KEY".MoveDirectPos[#Pos_No].WCS; ELSE #SSM.S.stepd := "DI OUT P01".SCARA_3D.KIN.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".SCARA_3D.KIN.Support.Cmd_MoveDirect_Absolute := "DI OUT P01".SCARA_3D.KIN.Support.KINpos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
19: // G120_M MoveAbsolut towards start position IF #SSM.S.stepfc THEN "DI OUT P01".G120_M.DRV.Support.SetVelo := "HMI KEY".SetValues.Linear_Axis_Fast; "DI OUT P01".G120_M.DRV.MC_MoveAbsolute.Position := 0.0; ELSE #SSM.S.stepd := "DI OUT P01".G120_M.DRV.Support.InPos AND NOT #SSM.S.steplo; "DI OUT P01".G120_M.DRV.Support.Cmd_MoveAbsolute := "DI OUT P01".G120_M.DRV.Support.Epos_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
20: // Position correction S210_M4 MoveRelative towards Pos=0.0 IF #SSM.S.stepfc THEN "DI OUT P01".S210_M4.DRV.Support.SetVelo := "HMI KEY".SetValues.Rotary_Axis_Slow; IF "DI OUT P01".SCARA_3D.KIN.Support.TcpInWcs.a.Postion > 0.0 THEN "DI OUT P01".S210_M4.DRV.MC_MoveRelative.Distance := - "DI OUT P01".SCARA_3D.KIN.Support.TcpInWcs.a.Postion; ELSE "DI OUT P01".S210_M4.DRV.MC_MoveRelative.Distance := ABS("DI OUT P01".SCARA_3D.KIN.Support.TcpInWcs.a.Postion); END_IF; ELSE "DI MAIN P01".M00.SEQ1_Done := "DI OUT P01".S210_M4.DRV.Support.InPos AND NOT (#SSM.S.steplo OR "DI MAIN P01".M00.SEQ1_DoWP1); "DI OUT P01".S210_M4.DRV.Support.Cmd_MoveRelative := "DI OUT P01".S210_M4.DRV.Support.Epos_Enabled AND NOT "DI MAIN P01".M00.SEQ1_Done AND #SSM.S.stepa; END_IF; END_CASE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|