public override void MoveLinearXY(AxesBase axes, MLengthSpeed speed) { Millimeters mmSpeed = new Millimeters(speed); try { double xPos = (axes.ChildArray[0] as RealAxis).TargetPosition; double yPos = (axes.ChildArray[1] as RealAxis).TargetPosition; double zPos = (axes.ChildArray[2] as RealAxis).TargetPosition; double rPos = (axes.ChildArray[3] as RealAxis).TargetPosition; double percent = mmSpeed; lock (this) { string cmd = string.Format("MOVE P,{0:F2} {1:F2} {2:F2} {3:F2} 0.0 0.0 {4},S={5:F2}", xPos, yPos, zPos, rPos, this.AxesMoveMode, percent); SendCommand(cmd); string ret = WaitForCommand(); CheckOKReplied("MOVE P", ret, "RUN"); ret = WaitForCommand(30000); CheckOKReplied("WaitMoveDone", ret, "END"); } lock (this) { OnUpdateCurrentPositions(); } } catch (Exception ex) { //U.LogAlarmPopup(ex, "MoveLinearXY Command fail {0}", this.Nickname); throw new MCoreExceptionPopup(ex, "MoveLinearXY Command fail {0}", this.Nickname); } }
/// <summary> /// Move the axis to an absolute position (stored in CommandedPosition) /// </summary> /// <param name="axes"></param> /// <param name="speed"></param> public virtual void MoveLinearXY(AxesBase axes, MLengthSpeed speed) { // Simulation }