



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FB32 SEQ1 P01 : Manual operation |
|
|
|
|
|
Network 1: Pre-Setting "DI MAIN P01".M00.ReadyToStart := "DI MAIN P01".M00.HomePosition_IS AND "DI MAIN GLB".M00.AutomaticEntirePlant_run; |
|
|
|
|
|
Network 2: Define last step #SSM(LAST_STEP := 15); |
|
|
|
|
|
Network 3: Step Switching Mechanism (SSM) CASE #SSM.S.stepact OF 0: // Waiting for SEQ to start "DI OUT P01".CAMERA.Recording.Done := "DI MAIN P01".M00.SEQ1_Busy := FALSE; "DI MAIN P01".to_P02.Gearbox_A_Request := "DI MAIN P01".to_P02.Gearbox_B_Request := "DI MAIN P01".to_P02.Gearbox_C_Request := "DI MAIN P01".M00.ReadyToStart; #SSM.S.stepd := #SSM.S.steps AND "DI MAIN P01".M00.ReadyToStart AND "DI MAIN P02".to_P01.Gearbox_A_EnabledToRun AND "DI MAIN P02".to_P01.Gearbox_B_EnabledToRun AND "DI MAIN P02".to_P01.Gearbox_C_EnabledToRun;
1: // Waiting for CAMERA.Recording.Done IF #SSM.S.stepfc THEN IF "HMI KEY".Plantinfo_P01.Gearbox_Assembly_Done THEN "HMI KEY".Plantinfo_P01.Gearbox_Assembly_Done := FALSE; #Current_Gearwheel_A := #Current_Gearwheel_B := #Current_Gearwheel_C := 0; "DI MAIN P01".M00.ProductCounter.GoodParts := 0; END_IF; "DI MAIN P01".M00.SEQ1_Busy := TRUE; "DI MAIN P01".M00.ProductCounter.TotalParts := #Gearbox_A_Totalwheels + #Gearbox_B_Totalwheels + #Gearbox_C_Totalwheels; "DI OUT P01".G120.DRV.Support.SetVelocity := "HMI KEY".Plantinfo_P01.Articulated_Arm.Velocity_Fast; #RunTimeCounter := 0; ELSE "DI OUT P01".G120.DRV.Support.MoveJogWP := "HMI KEY".P01.G120.F12_Enable_WP AND #SSM.S.stepa; #SSM.S.stepd := "DI OUT P01".CAMERA.Recording.Done; "DI OUT P01".CAMERA.CmdExe_ON := NOT #SSM.S.stepd AND "DI OUT P01".G120.DRV.Support.LampON AND "DI OUT P01".TRACK_CONVEYOR.DRV.MC_MeasuringInput.Execute; END_IF;
2: // Calculated_Pos Gearbox A, B, or C IF #SSM.S.stepfc THEN IF "DI OUT P01".CAMERA.Recording.Product_A THEN "HMI KEY".Plantinfo_P01.Gearbox_A.Gearwheel_Code := "DI OUT P01".CAMERA.Recording.CEA_code; #Current_Gearwheel_A += 1; #Current_Gearwheel_A := LIMIT(MN := 1, IN := #Current_Gearwheel_A, MX := #Gearbox_A_Totalwheels); #Gearbox_A_Next_Pos := "HMI KEY".Plantinfo_P01.Articulated_Arm.Gearbox_A_WCS[#Current_Gearwheel_A]; ELSIF "DI OUT P01".CAMERA.Recording.Product_B THEN "HMI KEY".Plantinfo_P01.Gearbox_B.Gearwheel_Code := "DI OUT P01".CAMERA.Recording.CEA_code; #Current_Gearwheel_B += 1; #Current_Gearwheel_B := LIMIT(MN := 1, IN := #Current_Gearwheel_B, MX := #Gearbox_B_Totalwheels); #Gearbox_B_Next_Pos := "HMI KEY".Plantinfo_P01.Articulated_Arm.Gearbox_B_WCS[#Current_Gearwheel_B]; ELSIF "DI OUT P01".CAMERA.Recording.Product_C THEN "HMI KEY".Plantinfo_P01.Gearbox_C.Gearwheel_Code := "DI OUT P01".CAMERA.Recording.CEA_code; #Current_Gearwheel_C += 1; #Current_Gearwheel_C := LIMIT(MN := 1, IN := #Current_Gearwheel_C, MX := #Gearbox_C_Totalwheels); #Gearbox_C_Next_Pos := "HMI KEY".Plantinfo_P01.Articulated_Arm.GearBox_C_WCS[#Current_Gearwheel_C]; END_IF; ELSE #SSM.S.stepd := NOT #SSM.S.steplo; END_IF;
3: // ROBOT MoveLinearAbsolut towards Pick-up position WCS-UP IF #SSM.S.stepfc THEN "DI OUT P01".TRACK_CONVEYOR.DRV.Support.Enable_ReMeasuring := TRUE; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.CoordSystem := 0; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.BufferMode := 1; "DI OUT P01".TRACK_CONVEYOR.DRV.MC_TrackConveyorBelt.ConveyorBeltOrigin := "HMI KEY".Plantinfo_P01.ConveyorBeltOrigin; "DI OUT P01".TRACK_CONVEYOR.DRV.Support.Measuring_Shift_Distance := "HMI KEY".Plantinfo_P01.Measuring_Shift_Distance; "DI OUT P01".TRACK_CONVEYOR.DRV.Support.Measuring_Offset := "DI OUT P01".CAMERA.Recording_Axis[1] + "HMI KEY".Plantinfo_P01.Object_Offset; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[1] := "DI OUT P01".TRACK_CONVEYOR.DRV.Support.Measuring_Offset + "HMI KEY".Plantinfo_P01.Measuring_Shift_Distance; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[2] := "DI OUT P01".CAMERA.Recording_Axis[2] + "DI OUT P01".TRACK_CONVEYOR.DRV.MC_TrackConveyorBelt.ConveyorBeltOrigin.y; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[3] := "DI OUT P01".TRACK_CONVEYOR.DRV.MC_TrackConveyorBelt.ConveyorBeltOrigin.z + "HMI KEY".Plantinfo_P01.FollowToPickUp.Distance_to_Belt; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[4] := "DI OUT P01".CAMERA.Recording_Axis[4]; ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
4: // G120C Move objekt towards Delta Picker Pick-up positon WCS-UP IF ABS("DI OUT P01".G120.DRV.Support.ActualPosition - "DI OUT P01".TRACK_CONVEYOR.DRV.Support.InitialObjectPosition_x) < "HMI KEY".Plantinfo_P01.Window THEN #SSM.S.stepd := TRUE; END_IF;
5: // MC_TrackConveyorBelt.Execute IF #SSM.S.stepfc THEN "DI OUT P01".TRACK_CONVEYOR.DRV.MC_TrackConveyorBelt.Execute := TRUE; ELSE #SSM.S.stepd := "DI OUT P01".TRACK_CONVEYOR.DRV.MC_TrackConveyorBelt.Done; END_IF;
6: // ROBOT MoveLinearAbsolute.Active synchron DOWN OCS1 IF #SSM.S.stepfc THEN #SSM.S.c1.start := TRUE; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.DynamicAdaption := 0; // no adaption "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.DynamicAdaption := 0; // no adaption "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.CoordSystem := 1; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[2] := "DI OUT P01".CAMERA.Recording_Axis[2]; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[3] := "HMI KEY".Plantinfo_P01.FollowToPickUp.Bottom_Level; // 20.0 at OCS1 ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Active AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; END_IF;
7: // ROBOT MoveLinearAbsolute.Active synchron FOLLOW OCS1 IF #SSM.S.stepfc THEN #SSM.S.c1.start := TRUE; "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[1] += "HMI KEY".Plantinfo_P01.FollowToPickUp.Gearwheel; // +120.0 ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Active AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa AND #SSM.S.c1.done; "DI OUT P01".Y100.VLV_O.Execute_WP := "HMI KEY".P01.Y100.F12_Enable_WP; END_IF;
8: // ROBOT MoveLinearAbsolute synchron UP OCS IF #SSM.S.stepfc THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position[3] += "HMI KEY".Plantinfo_P01.FollowToPickUp.Distance_to_Belt; ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
9: // ROBOT MoveLinearAbsolute towards Pallet A B or C *** IF #SSM.S.stepfc THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.CoordSystem := 0; IF "DI OUT P01".CAMERA.Recording.Product_A THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position := #Gearbox_A_Next_Pos.Axis; ELSIF "DI OUT P01".CAMERA.Recording.Product_B THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position := #Gearbox_B_Next_Pos.Axis; ELSE "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position := #Gearbox_C_Next_Pos.Axis; END_IF; END_IF; #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa;
10: // ROBOT MoveLinearRelative DOWN at Gearbox A, B or C in WCS IF #SSM.S.stepfc THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Velocity := "HMI KEY".Plantinfo_P01.Articulated_Arm.Velocity_Middle; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[1] := 0.0; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[2] := 0.0; IF "DI OUT P01".CAMERA.Recording.Product_A THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := - "HMI KEY".Plantinfo_P01.Gearbox_A.Distance_to_Belt; ELSIF "DI OUT P01".CAMERA.Recording.Product_B THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := - "HMI KEY".Plantinfo_P01.Gearbox_B.Distance_to_Belt; ELSE "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := - "HMI KEY".Plantinfo_P01.Gearbox_C.Distance_to_Belt; END_IF; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[4] := 0.0; ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearRelative := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
11: // Y100 Packaging Gripper PLACE "DI OUT P01".Y100.VLV_O.Execute_WP := FALSE; #SSM.S.stepd := "DI OUT P01".Y100.FEEDBACK_HP;
12: // ROBOT MoveLinearRelative UP at Gearbox A, B or C in WCS IF #SSM.S.stepfc THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Velocity := "HMI KEY".Plantinfo_P01.Articulated_Arm.Velocity_Fast; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[1] := 0.0; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[2] := 0.0; IF "DI OUT P01".CAMERA.Recording.Product_A THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := "HMI KEY".Plantinfo_P01.Gearbox_A.Distance_to_Belt; ELSIF "DI OUT P01".CAMERA.Recording.Product_B THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := "HMI KEY".Plantinfo_P01.Gearbox_B.Distance_to_Belt; ELSE "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[3] := "HMI KEY".Plantinfo_P01.Gearbox_C.Distance_to_Belt; END_IF; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[4] := 0.0; "DI OUT P01".ROBOT.DRV.MC_MoveLinearRelative.Distance[4] := 0.0; ELSE #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND NOT #SSM.S.steplo; "DI OUT P01".ROBOT.DRV.Support.MoveLinearRelative := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
13: // Query Product_Packaging_Done Pallet A, B, or C IF #SSM.S.stepfc THEN #SSM.S.c1.set := 20; "DI MAIN P01".M00.ProductCounter.GoodParts += 1; IF "DI OUT P01".CAMERA.Recording.Product_A THEN IF #Current_Gearwheel_A >= #Gearbox_A_Totalwheels THEN "DI MAIN P01".to_P02.Gearbox_A_Done := TRUE; END_IF; ELSIF "DI OUT P01".CAMERA.Recording.Product_B THEN IF #Current_Gearwheel_B >= #Gearbox_B_Totalwheels THEN "DI MAIN P01".to_P02.Gearbox_B_Done := TRUE; END_IF; ELSE IF #Current_Gearwheel_C >= #Gearbox_C_Totalwheels THEN "DI MAIN P01".to_P02.Gearbox_C_Done := TRUE; END_IF; END_IF; END_IF; IF "DI MAIN P01".to_P02.Gearbox_A_Done AND "DI MAIN P01".to_P02.Gearbox_B_Done AND "DI MAIN P01".to_P02.Gearbox_C_Done THEN "DI OUT P01".G120.DRV.Support.MoveJogWP := FALSE; #SSM.S.stepd := "DI OUT P01".G120.DRV.Support.LampOFF; END_IF;
#SSM.S.c1.start := "DI OUT P01".G120.DRV.Support.LampON AND NOT #SSM.S.steplo; IF #SSM.S.c1.done THEN #SSM.S.stepnew := 0; #SSM.S.stepd := TRUE; END_IF;
14: // ROBOT MoveLinearAbsolut towards base position IF #SSM.S.stepfc THEN "DI OUT P01".ROBOT.DRV.MC_MoveLinearAbsolute.Position := "HMI KEY".Plantinfo_P01.Articulated_Arm.HomePos_WCS.Axis; ELSE "HMI KEY".Plantinfo_P01.Gearbox_Assembly_Done := #SSM.S.stepd := "DI OUT P01".ROBOT.DRV.Support.InPosition AND "DI MAIN P02".to_P01.Gearbox_A_ReadyToEnd AND "DI MAIN P02".to_P01.Gearbox_B_ReadyToEnd AND "DI MAIN P02".to_P01.Gearbox_C_ReadyToEnd; "DI OUT P01".ROBOT.DRV.Support.MoveLinearAbsolute := "DI OUT P01".ROBOT.DRV.Support.KINEMATICS_Enabled AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
15: // Query End Sorting Product Packaging IF "HMI KEY".Plantinfo_P01.Gearbox_Assembly_Done AND NOT ("DI MAIN P02".to_P01.Gearbox_A_ReadyToEnd OR "DI MAIN P02".to_P01.Gearbox_B_ReadyToEnd OR "DI MAIN P02".to_P01.Gearbox_C_ReadyToEnd) THEN "DI MAIN P01".to_P02.Gearbox_A_Done := "DI MAIN P01".to_P02.Gearbox_B_Done := "DI MAIN P01".to_P02.Gearbox_C_Done := FALSE; IF "HMI KEY".P00.GLB.F6_OM_RUN_DOWN_ON THEN "HMI KEY".P00.GLB.F6_OM_RUN_DOWN_ON := "DI MAIN P02".M00.SEQ1_Done := "DI MAIN P01".M00.SEQ1_Done := TRUE; ELSE #SSM.S.stepd := TRUE; END_IF; END_IF; END_CASE; |
|