private double TouchAndFindPressureSensor(double touchPointHeight, int timeoutSec = 120) { double needleHeight = 0; //Max down 0.5mm touchPointHeight -= 0.5; _mc.MoveToTarget(MotorZ, touchPointHeight); var stopwatch = new Stopwatch(); stopwatch.Start(); do { //if (_mc.IsMoving(MotorZ) == false) //{ // _mc.MoveToTargetRelative(MotorZ, -0.1); // if (GetPosition(MotorZ)<=touchPointHeight) // { // throw new Exception("Find needle height timeout, maybe need to lower sensor: " + _coordinateId); // } //} if (GetPressureValue() > NeedleTouchPressure) { _mc.Stop(MotorZ); Delay(800); needleHeight = _mc.GetPosition(MotorZ) + NeedleOnZHeightCompensation; SetSpeed(1); _mc.MoveToTargetRelativeTillEnd(MotorZ, 2); return(needleHeight); } if (stopwatch.ElapsedMilliseconds > timeoutSec * 1000) { throw new Exception("Find needle height timeout, maybe need to lower sensor: " + _coordinateId); } } while (true); }
public void DescendOneLayer() { _mc.MoveToTargetRelativeTillEnd(MotorTray, -TrayLayerHeight); }
/// <summary> /// Correct direction counter clockwise /// </summary> /// <param name="relativeAngle"></param> /// <param name="mode"></param> /// <param name="action"></param> public void CorrectAngle(double relativeAngle, MoveModeAMotor mode, ActionType action = ActionType.Load) { _mc.MoveToTargetRelativeTillEnd(MotorA, relativeAngle); }
public void Turns() { _mc.MoveToTargetRelativeTillEnd(TableMotor, FixtureAngle); TurnsTableData(); }
public void RiseZALittleAndDown() { _mc.MoveToTargetRelativeTillEnd(MotorZ, 3); _mc.MoveToTargetRelativeTillEnd(MotorZ, -3.3); }