public static bool DetetectInsideStationCheck(RegistryRobotJourney rrj) { // xác định vùng đặt biệt trước khi bắt đầu frontline if (rrj.traffic.HasRobotUnityinArea("C1", rrj.robot) || rrj.traffic.HasRobotUnityinArea("C2", rrj.robot) || rrj.traffic.HasRobotUnityinArea("C3", rrj.robot) || rrj.traffic.HasRobotUnityinArea("C4", rrj.robot) || rrj.traffic.HasRobotUnityinArea("C5", rrj.robot) || rrj.traffic.HasRobotUnityinArea("READY", rrj.robot)) { // Robot được gửi lệnh Stop if (StationCheckInSpecialZone(rrj)) { rrj.robot.SetSpeedRegZone(RobotSpeedLevel.ROBOT_SPEED_NORMAL, false); return(false); } else { rrj.robot.SetSpeedRegZone(RobotSpeedLevel.ROBOT_SPEED_STOP, true); ReleaseAll(rrj.robot); return(true); } } else { // Robot van toc bình thuong rrj.robot.SetSpeedRegZone(RobotSpeedLevel.ROBOT_SPEED_NORMAL, false); ReleaseAll(rrj.robot); return(true); } }
public static bool DetectRelease(RegistryRobotJourney rrj) { // xác định khu vực release String destOP = rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.MAIN_ZONE); switch (destOP) { case "OUTER": String startplace = rrj.traffic.DetermineArea(rrj.startPoint, TypeZone.MAIN_ZONE); if (startplace.Equals("VIM")) { // release khi robot vào vùng OUTER if (rrj.traffic.HasRobotUnityinArea("OUTER", rrj.robot)) { ReleaseAll(rrj.robot); // rrj.robot.ShowText("RELEASED ROBOT IN REGISTER LIST OF SEPCIAL ZONE FROM VIM -> OUTER"); return(true); } } break; case "VIM": // xác định vùng đến cuối trong VIM. String endPointName = rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.OPZS); if (rrj.traffic.HasRobotUnityinArea(endPointName, rrj.robot)) { ReleaseAll(rrj.robot); // rrj.robot.ShowText("RELEASED ROBOT IN REGISTER LIST OF SEPCIAL ZONE" + endPointName); return(true); } break; } return(false); }
public void Start(MachineToReturn state = MachineToReturn.MACRET_SELECT_BEHAVIOR_ONZONE) { robot.orderItem = null; errorCode = ErrorCode.RUN_OK; robot.robotTag = RobotStatus.WORKING; robot.ProcedureAs = ProcedureControlAssign.PRO_MACHINE_TO_RETURN; StateMachineToReturn = state; ProMachineToReturn = new Thread(this.Procedure); ProRun = true; ProRunStopW = true; //robot.prioritLevel.OnAuthorizedPriorityProcedure = false; order.startTimeProcedure = DateTime.Now; registryRobotJourney = new RegistryRobotJourney(); registryRobotJourney.robot = robot; registryRobotJourney.traffic = Traffic; ProMachineToReturn.Start(this); }
public void Start(BufferToGate state = BufferToGate.BUFGATE_SELECT_BEHAVIOR_ONZONE) { robot.bayId = -1; errorCode = ErrorCode.RUN_OK; robot.robotTag = RobotStatus.WORKING; robot.ProcedureAs = ProcedureControlAssign.PRO_BUFFER_TO_GATE; StateBufferToGate = state; ProBufferToGate = new Thread(this.Procedure); ProRun = true; ProRunStopW = true; //robot.prioritLevel.OnAuthorizedPriorityProcedure = false; order.startTimeProcedure = DateTime.Now; registryRobotJourney = new RegistryRobotJourney(); registryRobotJourney.robot = robot; registryRobotJourney.traffic = Traffic; ProBufferToGate.Start(this); }
public void Start(BufferToBuffer state = BufferToBuffer.BUFTOBUF_SELECT_BEHAVIOR_ONZONE_BUFFER_A) { robot.bayId = -1; robot.bayIdReg = false; errorCode = ErrorCode.RUN_OK; robot.robotTag = RobotStatus.WORKING; robot.ProcedureAs = ProcedureControlAssign.PRO_BUFFER_TO_BUFFER; StateBufferToBuffer = state; Task ProBuferToMachine = new Task(() => this.Procedure(this)); procedureStatus = ProcedureStatus.PROC_ALIVE; ProRun = true; ProRunStopW = true; //robot.prioritLevel.OnAuthorizedPriorityProcedure = false; order.startTimeProcedure = DateTime.Now; registryRobotJourney = new RegistryRobotJourney(); registryRobotJourney.robot = robot; registryRobotJourney.traffic = Traffic; ProBuferToMachine.Start(); }
public static bool StationCheckInSpecialZone(RegistryRobotJourney rrj) { // vì "OUTER" có kiều là Main_Zone, nhưng vùng khac co kieu là OPZS String startZone = rrj.traffic.DetermineArea(rrj.startPoint, TypeZone.MAIN_ZONE).Equals("OUTER") ? "OUTER" : rrj.traffic.DetermineArea(rrj.startPoint, TypeZone.OPZS); String endZone = rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.MAIN_ZONE).Equals("OUTER") ? "OUTER" : rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.OPZS); rrj.robot.StartPointName = startZone; rrj.robot.EndPointName = endZone; #region READY -> GATE, OUTER if (startZone.Equals("READY") && endZone.Equals("GATE")) { return(Reg_checkinReady_G12(rrj.robot, rrj.traffic)); } if (startZone.Equals("READY") && endZone.Equals("OUTER")) { return(Reg_checkinReady_ReadyandOuter(rrj.robot, rrj.traffic)); } #endregion #region OUTER (C1) -> READY , GATE, ELEVATOR, GATE3, VIM if (startZone.Equals("OUTER") && endZone.Equals("GATE")) { return(Reg_checkinC1_GATE(rrj.robot, rrj.traffic)); } // OUTER->READY if (startZone.Equals("OUTER") && endZone.Equals("READY")) { return(Reg_checkinC1_Ready(rrj.robot, rrj.traffic)); } #endregion #region ANY_PLACE -> MERZ if (endZone.Equals("MERZ")) { return(Reg_checkinMerz(rrj.robot, rrj.traffic)); } #endregion return(false); }
public void Start(ForkLift state = ForkLift.FORBUF_GET_FRONTLINE) { errorCode = ErrorCode.RUN_OK; robot.robotTag = RobotStatus.WORKING; robot.ProcedureAs = ProcedureControlAssign.PRO_FORKLIFT_TO_BUFFER; robot.bayId = -1; robot.bayIdReg = false; robot.robotBahaviorAtGate = RobotBahaviorAtReadyGate.GOING_INSIDE_GATE; StateForkLift = state; Task ProForkLift = new Task(() => this.Procedure(this)); procedureStatus = ProcedureStatus.PROC_ALIVE; ProRun = true; ProRunStopW = true; //robot.prioritLevel.OnAuthorizedPriorityProcedure = false; robot.robotRegistryToWorkingZone.onRobotwillCheckInsideGate = true; order.startTimeProcedure = DateTime.Now; registryRobotJourney = new RegistryRobotJourney(); registryRobotJourney.robot = robot; registryRobotJourney.traffic = Traffic; ProForkLift.Start(); }
public void Start(RobotGoToReady state = RobotGoToReady.ROBREA_SELECT_BEHAVIOR_ONZONE) { order = new OrderItem(); order.typeReq = TyeRequest.TYPEREQUEST_GOTO_READY; errorCode = ErrorCode.RUN_OK; robot.robotTag = RobotStatus.WORKING; robot.ProcedureAs = ProcedureControlAssign.PRO_READY; StateRobotGoToReady = state; ProRobotToReady = new Thread(this.Procedure); procedureCode = ProcedureCode.PROC_CODE_ROBOT_TO_READY; ProRun = true; //robot.prioritLevel.OnAuthorizedPriorityProcedure = false; order.startTimeProcedure = DateTime.Now; points.PointCheckIn = null; points.PointFrontLine = GetFrontLineChargeStation(); points.PointOfCharger = GetPointOfCharger(); registryRobotJourney = new RegistryRobotJourney(); registryRobotJourney.robot = robot; registryRobotJourney.traffic = Traffic; ProRobotToReady.Start(this); cntOrderItem = 0; robot.bayId = -1; }
public static bool StationCheckInSpecialZone(RegistryRobotJourney rrj) { // vì "OUTER" có kiều là Main_Zone, nhưng vùng khac co kieu là OPZS String startZone = rrj.traffic.DetermineArea(rrj.startPoint, TypeZone.MAIN_ZONE).Equals("OUTER") ? "OUTER" : rrj.traffic.DetermineArea(rrj.startPoint, TypeZone.OPZS); String endZone = rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.MAIN_ZONE).Equals("OUTER") ? "OUTER" : rrj.traffic.DetermineArea(rrj.endPoint, TypeZone.OPZS); rrj.robot.StartPointName = startZone; rrj.robot.EndPointName = endZone; #region READY -> GATE12, ELEVATOR, GATE3, VIM if (startZone.Equals("READY") && endZone.Equals("GATE12")) { return(Reg_checkinReady_G12(rrj.robot, rrj.traffic)); } if (startZone.Equals("READY") && endZone.Equals("ELEVATOR")) { return(Reg_checkinReady__ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("READY") && endZone.Equals("VIM-BTLCAP")) { return(Reg_checkinReady__ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("READY") && endZone.Equals("GATE3")) { return(Reg_checkinReady_G3(rrj.robot, rrj.traffic)); } if (startZone.Equals("READY") && endZone.Equals("OUTER")) { return(Reg_checkinReady_ReadyandOuter(rrj.robot, rrj.traffic)); } #endregion #region OUTER (C1) -> READY , GATE12, ELEVATOR, GATE3, VIM // OUTER->GATE3 if (startZone.Equals("OUTER") && endZone.Equals("GATE3")) { return(Reg_checkinC1_G3(rrj.robot, rrj.traffic)); } // OUTER->ELEVATOR && VIM if (startZone.Equals("OUTER") && endZone.Equals("ELEVATOR")) { return(Reg_checkinC1_ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("OUTER") && endZone.Equals("VIM-BTLCAP")) { return(Reg_checkinC1_ElevatorAndVIM(rrj.robot, rrj.traffic)); } // OUTER->GATE12 if (startZone.Equals("OUTER") && endZone.Equals("GATE12")) { return(Reg_checkinC1_Gate12(rrj.robot, rrj.traffic)); } // OUTER->READY if (startZone.Equals("OUTER") && endZone.Equals("READY")) { return(Reg_checkinC1_Ready(rrj.robot, rrj.traffic)); } #endregion #region VIM (C2) -> READY , GATE12, ELEVATOR, VIM, GATE3 if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("GATE12")) { return(Reg_checkinC2_G12(rrj.robot, rrj.traffic)); } // VIM->ELEVATOR && VIM if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("ELEVATOR")) { return(Reg_checkinC2_ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("VIM-BTLCAP")) { return(Reg_checkinC2_ElevatorAndVIM(rrj.robot, rrj.traffic)); } // VIM->READY && OUTER if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("READY")) { return(Reg_checkinC2_Ready(rrj.robot, rrj.traffic)); } if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("OUTER")) { return(Reg_checkinC2_Outer(rrj.robot, rrj.traffic)); } if (startZone.Equals("VIM-BTLCAP") && endZone.Equals("GATE3")) { return(Reg_checkinC2_G3(rrj.robot, rrj.traffic)); } #endregion #region GATE12 (C3) -> READY, ELEVATOR, VIM , GATE3 if (startZone.Equals("GATE12") && endZone.Equals("GATE3")) { return(Reg_checkinGate12_Gate3(rrj.robot, rrj.traffic)); } // GATE12->ELEVATOR && VIM if (startZone.Equals("GATE12") && endZone.Equals("ELEVATOR")) { return(Reg_checkinGate12_ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("GATE12") && endZone.Equals("VIM-BTLCAP")) { return(Reg_checkinGate12_ElevatorAndVIM(rrj.robot, rrj.traffic)); } // GATE12->READY && OUTER if (startZone.Equals("GATE12") && endZone.Equals("READY")) { return(Reg_checkinGate12_ReadyAndOuter(rrj.robot, rrj.traffic)); } if (startZone.Equals("GATE12") && endZone.Equals("OUTER")) { return(Reg_checkinGate12_ReadyAndOuter(rrj.robot, rrj.traffic)); } #endregion #region GATE3 (C4) -> READY, ELEVATOR, VIM , GATE12 // GATE3->ELEVATOR && VIM if (startZone.Equals("GATE3") && endZone.Equals("ELEVATOR")) { return(Reg_checkinGate3_ElevatorAndVIM(rrj.robot, rrj.traffic)); } if (startZone.Equals("GATE3") && endZone.Equals("VIM-BTLCAP")) { return(Reg_checkinGate3_ElevatorAndVIM(rrj.robot, rrj.traffic)); } // GATE3->READY && OUTER if (startZone.Equals("GATE3") && endZone.Equals("READY")) { return(Reg_checkinGate3_ReadyAndOuter(rrj.robot, rrj.traffic)); } if (startZone.Equals("GATE3") && endZone.Equals("OUTER")) { return(Reg_checkinGate3_ReadyAndOuter(rrj.robot, rrj.traffic)); } if (startZone.Equals("GATE3") && endZone.Equals("GATE12")) { return(Reg_checkinGate3_Gate12(rrj.robot, rrj.traffic)); } #endregion #region ELEVATOR (C5) -> READY, GATE12, GATE3 if (startZone.Equals("ELEVATOR") && endZone.Equals("GATE12")) { return(Reg_checkinElevator_Gate12(rrj.robot, rrj.traffic)); } // ELEVATOR->READY && OUTER if (startZone.Equals("ELEVATOR") && endZone.Equals("READY")) { return(Reg_checkinElevator_ReadyAndOuter(rrj.robot, rrj.traffic)); } if (startZone.Equals("ELEVATOR") && endZone.Equals("OUTER")) { return(Reg_checkinElevator_ReadyAndOuter(rrj.robot, rrj.traffic)); } if (startZone.Equals("ELEVATOR") && endZone.Equals("GATE3")) { return(Reg_checkinElevator_Gate3(rrj.robot, rrj.traffic)); } #endregion return(false); }