Beispiel #1
0
        public bool JobMove(short Axis, double dAcc, double dDec, double dVel)
        {
            if (Axis < 8 && Axis > -1)
            {
                lock (lockObj)
                {
                    ushort iDir = 0;

                    LTDMC.dmc_set_profile(usCardNo, (ushort)Axis, 0.0, Math.Abs(dVel), dAcc, dDec, 0);
                    if (dVel < 0)
                    {
                        iDir = 0;
                    }
                    else
                    {
                        iDir = 1;
                    }
                    LTDMC.dmc_vmove(usCardNo, (ushort)Axis, iDir);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
 public bool ReferPosMove(short axis, double dAcc, double dDec, double dSpeed, double pos)
 {
     if (axis < 8 && axis > -1)
     {
         lock (lockObj)
         {
             LTDMC.dmc_set_profile(usCardNo, (ushort)axis, 0.0, dSpeed, dAcc, dDec, 0);
             LTDMC.dmc_pmove(usCardNo, (ushort)axis, (int)pos, 0);
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
 public bool StartSearchLimit(short axis, double dAcc, double dDec, double dCatchSpeed)
 {
     lock (lockObj)
     {
         ushort iDir = 0;
         double dVel = Math.Abs(dCatchSpeed);
         LTDMC.dmc_set_profile(usCardNo, (ushort)axis, 0.0, dVel, dAcc, dDec, 0);
         if (dCatchSpeed < 0)
         {
             iDir = 0;
         }
         else
         {
             iDir = 1;
         }
         LTDMC.dmc_vmove(usCardNo, (ushort)axis, iDir);
     }
     return(true);
 }
Beispiel #4
0
 public bool StartSearchHome(short axis, double dAcc, double dDec, double dHomeSpd)
 {
     lock (lockObj)
     {
         ushort iDir = 0;
         double dVel = Math.Abs(dHomeSpd);
         LTDMC.dmc_set_profile(usCardNo, (ushort)axis, 0.0, dVel, dAcc, dDec, 0);
         if (dHomeSpd < 0)
         {
             iDir = 0;
         }
         else
         {
             iDir = 1;
         }
         LTDMC.dmc_set_homemode(usCardNo, (ushort)axis, iDir, dVel, 2, 0);
         LTDMC.dmc_home_move(usCardNo, (ushort)axis);
     }
     return(true);
 }