|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FB32 SEQ1 P01 : SEQ1 Syringe pick & place |
|
|
|
Netzwerk 1: Pre-Setting IF "HMI KEY".P01.GLB.F9_Open_SafetyDoor AND "DI OUT P01".C101.FB_HP AND "DI MAIN GLB".M00.AutoCmpltMa_run AND NOT #OpenSftyGate_REg THEN #OpenSftyGate := NOT #OpenSftyGate; END_IF; #OpenSftyGate_REg := "HMI KEY".P01.GLB.F9_Open_SafetyDoor; "DI MAIN P01".M00.RdyToStart := NOT "DI MAIN P01".M00.HomPosRun AND "DI MAIN GLB".M00.HomPosSR AND "DI MAIN GLB".M00.AutoCmpltMa_run; IF NOT "DI MAIN P01".M00.RdyToStart THEN #OpenSftyGate := FALSE; END_IF; |
|
|
|
Netzwerk 2: Define last step #SSM(LAST_STEP := 20); |
|
|
|
Netzwerk 3: Step Switching Mechanism (SSM) CASE #SSM.S.stepact OF 0: // Waiting for SEQ1 to start "DI MAIN P01".to_P02_Feeding.Request := "DI MAIN P01".M00.SEQ1_Busy := FALSE; #SSM.S.stepd := #SSM.S.steps;
1: // M100 vacuum gripper pump WP "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.BufferMode := 2; "DI OUT P01".M100.DRV.CmdExe_WP := "HMI KEY".P01.M100.F12_Enable_WP; #SSM.S.stepd := "E00 M100 FdB";
2: // Demand to refill syringe plate: IF no demand, go to S11 IF NOT #OpenSftyGate THEN #SSM.S.stepnew := 12; #SSM.S.stepd := TRUE; ELSE #SSM.S.stepd := TRUE; END_IF;
3: // RP2D MoveLinearAbsolute: P0 Park position IF #SSM.S.stepfc THEN "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveWork; "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 AND #OpenSftyGate; "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;
4: // Open safety gate IF #SSM.S.stepfc THEN "DI MAIN GLB".M00.AutoCmpltMa_run := FALSE; ELSIF NOT "HMI KEY".P01.GLB.F10_Open_SafetyDoor_HMI AND "E01 OpnSftyGate CH1" AND "E01 OpnSftyGate CH2" AND NOT "Main_Safety_RTG1_DB".FB_SAFE_GLB.E00_SFDOOR_P01_Q THEN #SSM.S.stepd := "HMI KEY".P01.GLB.F10_Open_SafetyDoor_HMI := NOT ("Main_Safety_RTG1_DB".FB_SAFE_GLB.E00_SFDOOR_P01.IN1 OR "Main_Safety_RTG1_DB".FB_SAFE_GLB.E00_SFDOOR_P01.IN2); ELSIF "HMI KEY".P01.GLB.F10_Open_SafetyDoor_HMI AND "Main_Safety_RTG1_DB".FB_SAFE_GLB.E00_SFDOOR_P01_Q THEN #SSM.S.stepd := TRUE; END_IF;
5: // C101 push pull cylinder WP "HMI KEY".P01.GLB.F10_Open_SafetyDoor_HMI := "DI OUT P01".C101.VLV_OC.CmdExe_HP := FALSE; "DI OUT P01".C101.VLV_OC.CmdExe_WP := "HMI KEY".P01.C101.F12_Enable_WP; #SSM.S.stepd := "DI OUT P01".C101.FB_WP;
6: // RP2D MoveLinearAbsolute towards: P11 Refill plate above IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 11; "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;
7: // RP2D MoveLinearAbsolute downwards: P10 Refill plate pick IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 10; "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 "DI OUT P01".V100.FB_WP AND "DI OUT P01".C100.FB_HP AND "E01 V100 SyringeOn"; "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; "DI OUT P01".V100.VLV_O.CmdExe_WP := "HMI KEY".P01.V100.F12_Enable_WP AND "DI OUT P01".RP2D.DRV.Support.InPos; END_IF;
8: // RP2D MoveLinearAbsolute upwards: P11 Refill plate above IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 11; "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;
9: // 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.F11_Enable_HP; #SSM.S.stepd := "DI OUT P01".C101.FB_HP;
10: // RP2D MoveLinearAbsolute downwards: P7 Output conveyor place IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 7; "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 "DI OUT P01".V100.FB_HP AND NOT "E01 V100 SyringeOn"; "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; "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; "DI OUT P01".V100.VLV_O.CmdExe_WP := NOT "DI OUT P01".RP2D.DRV.Support.InPos; END_IF;
11: // RP2D MoveLinearAbsolute upwards: P8 Output conveyor above IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 8; "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;
12: // RP2D MoveLinearAbsolute towards: P3 Input conveyor start above IF #SSM.S.stepfc THEN "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveWork; "HMI KEY".TargetValues.Position := 3; "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; "DI MAIN P01".to_P02_Feeding.Request := TRUE; // mc240823 ELSE #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.InPos AND NOT #SSM.S.steplo AND "DI MAIN P02".to_P01_Handling.Request; "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;
13: // RP2D MoveLinearAbsolute downwards: P4 Input conveyor pick IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 4; "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; "DI MAIN P01".to_P02_Feeding.Request := "DI MAIN P01".M00.SEQ1_Busy := TRUE; ELSE #SSM.S.stepd := "DI OUT P01".RP2D.DRV.Support.InPos AND "DI MAIN P02".to_P01_Handling.EnabledToMove 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;
14: // C100 swivelling vakuum gripper WP, C100 vacuum gripper (RP2D) WP "DI OUT P01".C100.VLV_OC.CmdExe_HP := FALSE; "DI OUT P01".C100.VLV_OC.CmdExe_WP := "HMI KEY".P01.C100.F12_Enable_WP;
"DI OUT P01".V100.VLV_O.CmdExe_HP := FALSE; "DI OUT P01".V100.VLV_O.CmdExe_WP := "HMI KEY".P01.V100.F12_Enable_WP AND "DI OUT P01".C100.FB_WP;
#SSM.S.c1.start := "DI OUT P01".V100.FB_WP AND "E01 V100 SyringeOn" AND "DI MAIN P02".to_P01_Handling.Request; #SSM.S.c1.set := 15; #SSM.S.stepd := #SSM.S.c1.done;
15: // RP2D MoveLinearAbsolute slow upwards: P5 Input conveyor above IF #SSM.S.stepfc THEN "HMI KEY".TargetValues.Position := 5; "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; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveSlow; #SSM.S.c1.set := 7; ELSE // C100 swivelling vakuum gripper HP "DI OUT P01".C100.VLV_OC.CmdExe_WP := FALSE; "DI OUT P01".C100.VLV_OC.CmdExe_HP := "HMI KEY".P01.C100.F11_Enable_HP; #SSM.S.c1.start := "DI MAIN P01".to_P02_Feeding.EnabledToMove := "DI OUT P01".RP2D.DRV.Support.InPos AND "DI OUT P01".C100.FB_HP; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND NOT #SSM.S.c1.done AND #SSM.S.stepa; IF #SSM.S.c1.done THEN #SSM.S.stepd := "DI MAIN P02".to_P01_Handling.Done; END_IF; END_IF;
16: // RP2D MoveLinearAbsolute towards: P6 Output conveyor above IF #SSM.S.stepfc THEN #SSM.S.c1.start := TRUE; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Velocity := "HMI KEY".TargetValues.RP2D.MoveWork; "HMI KEY".TargetValues.Position := 6; "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.MC_MoveLinearAbsolute.Active 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.c1.done AND #SSM.S.stepa; END_IF;
17: // RP2D MoveLinearAbsolute downwards: P7 Output conveyor place IF #SSM.S.stepfc THEN #SSM.S.c1.start := TRUE; "HMI KEY".TargetValues.Position := 7; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.TransParameter[1] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].TransParameter; "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.stepllo; "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;
18: // V100 vacuum gripper (RP2D) HP, Query demand open safety gate "DI OUT P01".V100.VLV_O.CmdExe_WP := FALSE; #SSM.S.stepd := "DI OUT P01".V100.FB_HP AND NOT "E01 V100 SyringeOn"; IF #SSM.S.stepd AND #OpenSftyGate THEN #SSM.S.stepnew := 2; "DI MAIN P01".M00.SEQ1_Busy := FALSE; END_IF;
19: // RP2D MoveLinearAbsolute upwards: P8 Output conveyor above IF #SSM.S.stepfc THEN "DI MAIN P01".to_P02_Feeding.Request := FALSE; #SSM.S.c1.start := "DI MAIN P01".to_P02_Feeding.Done := TRUE; "HMI KEY".TargetValues.Position := 8; "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.MC_MoveLinearAbsolute.Active AND NOT #SSM.S.steplo; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND #SSM.S.c1.done AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_IF;
20: // RP2D MoveLinearAbsolute towards: P9 Input conveyor above IF #SSM.S.stepfc THEN #SSM.S.c1.start := TRUE; "HMI KEY".TargetValues.Position := 9; "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.TransParameter[1] := "HMI KEY".TargetValues.RP2D_P["HMI KEY".TargetValues.Position].TransParameter; "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; "DI MAIN P01".M00.SEQ1_Busy := FALSE; ELSIF "DI OUT P01".RP2D.DRV.MC_MoveLinearAbsolute.Active AND NOT #SSM.S.steplo THEN "DI MAIN P01".M00.ProductCounter.GoodParts := "DI MAIN P01".M00.ProductCounter.GoodParts + 1; // number of pick & place #SSM.S.stepd := TRUE; #SSM.S.stepnew := 13; #RunTimeCountr := 0; END_IF; "DI OUT P01".RP2D.DRV.Support.Cmd_MoveLinearAbsolute := "DI OUT P01".RP2D.DRV.Support.Kinematics_Enabled AND #SSM.S.c1.done AND NOT #SSM.S.stepd AND #SSM.S.stepa; END_CASE; |
|