public void Setup() { MotorX = _mc.MotorLX; MotorY = _mc.MotorLY; MotorZ = _mc.MotorLZ; MotorA = _mc.MotorLRotateLoad; LoadTray = new Tray() { RowCount = 4, ColumneCount = 12, XOffset = 15.0, YOffset = 15.0, CurrentPart = new Part() { CapturePos = GetCapturePosition(CaptureId.LTrayPickTop), TargetPose = new Pose() { }, }, BaseCapturePosition = GetCapturePosition(CaptureId.LTrayPickTop), YIncreaseDirection = 1, }; ResetPreparation(); }
/// <summary> /// Motor setup and tray info setup. /// </summary> public void Setup() { MotorX = _mc.MotorVX; MotorY = _mc.MotorVY; MotorZ = _mc.MotorVZ; MotorA = _mc.MotorVRotateLoad; MotorAUnload = _mc.MotorVRotateUnload; LoadTray = new Tray() { RowCount = 5, ColumneCount = 5, XOffset = 18.5, YOffset = 18.5, BaseCapturePosition = GetCapturePosition(CaptureId.VTrayPickTop), CurrentPart = new Part() { CapturePos = GetCapturePosition(CaptureId.VTrayPickTop), TargetPose = new Pose(), }, YIncreaseDirection = -1, }; UnloadTray = new Tray() { RowCount = 5, ColumneCount = 5, XOffset = 18.5, YOffset = 18.5, BaseCapturePosition = GetCapturePosition(CaptureId.VTrayPlaceTop), CurrentPart = new Part() { CapturePos = GetCapturePosition(CaptureId.VTrayPickTop), TargetPose = new Pose(), }, }; //Set as a simulate mode. var tempState = VisionSimulateMode; VisionSimulateMode = true; UnloadTray.CurrentPart.TargetPose = GetVisionResult(UnloadTray.CurrentPart.CapturePos); VisionSimulateMode = tempState; UnloadTray.TrayHeight = UnloadTrayHeight; Preparation = Helper.DummyAsyncTask(); ChangeLoadTray = Helper.DummyAsyncTask(); ChangeUnloadTray = Helper.DummyAsyncTask(); }