public void Operate(int axis, int length) { Operate(axis, length, (int)AxisSet.GetSpeed(axis)); }
public bool Operate(int axis, int length, int speed, bool isContinue) { if (CanOperate(axis) || isContinue) { decimal resolution = AxisSet.GetResolution(axis); if (Contra.StepLength != 0 && !IsMove(axis)) { if (!CheckSoftLimit(axis, length, Contra.StepLength)) { return(false); } CtrlCard.Sym_RelativeMove(axis, (int)((length > 0 ? Contra.StepLength : (0 - Contra.StepLength)) * resolution), speed, (int)AxisSet.GetSpeed(axis), (double)Contra.AddSpeedTime); form.isM21 = false; form.isEndM21 = false; moveState = 0; } else if (!IsMove(axis)) { if (!CheckSoftLimit(axis, length, length)) { return(false); } CtrlCard.Sym_RelativeMove(axis, length, Contra.StartSpeed, speed, Contra.AddSpeedTime); form.isM21 = false; form.isEndM21 = false; moveState = 0; } isOperate = true; return(true); } return(false); }
public bool Operate(int axis, int length, int speed, bool isContinue) { if (CanOperate(axis) || isContinue) { if (Contra.StepLength != 0 && !IsMove(axis)) { CtrlCard.Sym_RelativeMove(axis, length > 0 ? Contra.StepLength : (0 - Contra.StepLength), speed, (int)AxisSet.GetSpeed(axis), (double)Contra.AddSpeedTime); } else if (!IsMove(axis)) { CtrlCard.Sym_RelativeMove(axis, length, Contra.StartSpeed, speed, Contra.AddSpeedTime); } isOperate = true; return(true); } return(false); }