Beispiel #1
0
        public bool MoveAbsAsync(IPlatformPos pos, double[] vel = null)
        {
            if (!RunSafeCheck(Task == null ? SafeCheckType.Manual : SafeCheckType.Auto))
            {
                return(false);
            }

            return(Axis.MoveAbsAsync(Task, pos.Data(), vel ?? Vel));
        }
Beispiel #2
0
        public bool Jump(IPlatformPos pos, double jumpHeight = 0, double[] vel = null, int timeout = -1, bool checkLimit = true, double zLimit = 0d)
        {
            if (!RunSafeCheck(Task == null ? SafeCheckType.Manual : SafeCheckType.Auto))
            {
                return(false);
            }

            return(Axis.Jump(Task, pos.Data(), vel ?? Vel, jumpHeight, timeout, checkLimit, zLimit));
        }
Beispiel #3
0
        public bool MoveAbs(IPlatformPos pos, double[] vel = null, int timeout = -1, bool checkLimit = true)
        {
            if (!RunSafeCheck(Task == null ? SafeCheckType.Manual : SafeCheckType.Auto))
            {
                return(false);
            }

            return(Axis.MoveAbs(Task, pos.Data(), vel ?? Vel, timeout, checkLimit));
        }
Beispiel #4
0
        public bool MoveAbs(int i, IPlatformPos pos, int timeout = -1, bool checkLimit = true)
        {
            if (!RunSafeCheck(Task == null ? SafeCheckType.Manual : SafeCheckType.Auto, i))
            {
                return(false);
            }

            return(Axis[i] != null && Axis[i].MoveAbs(Task, pos.Data()[i], Axis[i].AxisSpeed, timeout, checkLimit));
        }
Beispiel #5
0
        public double DistanceTo(IPlatformPos pos)
        {
            if (pos is PosXYZU)
            {
                var oldPos = (PosXYZU)pos;
                var p      = (this - oldPos);
                return(Math.Sqrt(p.X * p.X + p.Y * p.Y + p.Z * p.Z + p.U * p.U));
            }

            throw new Exception("DistanceTo Pos Type Error");
        }
        public double DistanceTo(IPlatformPos pos)
        {
            if (pos is PosXYZUVW)
            {
                var xyz = (PosXYZUVW)pos;
                var p   = (this - xyz);
                return(Math.Sqrt(p.X * p.X + p.Y * p.Y + p.Z * p.Z + p.U * p.U + p.V * p.V + p.W * p.W));
            }

            throw new Exception("Pos Type Error");
        }
Beispiel #7
0
 public double DistanceTo(IPlatformPos pos)
 {
     throw new NotImplementedException();
 }