public Func <double> GetPos(string axis) { return(fun(() => { var temp = Ch.GetFPosition(Axis.Values.ElementAt(Axis[axis]), Ch.ACSC_SYNCHRONOUS, ref pWait); return Ch.GetFPosition(Axis.Values.ElementAt(Axis[axis]), Ch.ACSC_SYNCHRONOUS, ref pWait); })); }
public Action <double, double> WaitEps(string axis) { return(act((double targetPos, double epsilon) => { System.Threading.Thread.Sleep(300); while (true) { double error = Math.Abs(targetPos - Ch.GetFPosition(Axis[axis], Ch.ACSC_SYNCHRONOUS, ref pWait)); if (error < epsilon) { break; } } })); }