예제 #1
0
        protected override Parser.Result Evaluate(string data, ref int from)
        {
            var list = Utils.GetFunctionArgs(data, ref from, ParaCnt);

            uint.TryParse(list[0], out uint arg1);
            uint.TryParse(list[1], out uint arg2);
            double dRst = PM.GetValue(arg1, arg2);

            Interpreter.Instance.AppendOutput("Position(" + arg1.ToString() + "," + arg2.ToString() + ")");
            return(new Parser.Result(dRst));
        }
예제 #2
0
        protected override Parser.Result Evaluate(string data, ref int from)
        {
            var list = Utils.GetFunctionArgs(data, ref from, ParaCnt);

            uint.TryParse(list[0], out uint arg1);
            uint.TryParse(list[1], out uint arg2);
            double dPos = PM.GetValue(arg1, arg2);

            if (!Constants.CHECK)
            {
                SM.MTR.GoAbsRun((int)arg1, dPos);
            }
            Interpreter.Instance.AppendOutput("MoveMotr(" + arg1.ToString() + ", " + dPos.ToString() + ")");
            return(new Parser.Result());
        }