コード例 #1
0
        public bool JobMove(short sAxis, double dAcc, double dDec, double dVel)
        {
            if (Enum.IsDefined(typeof(DefaultAxis), sAxis))
            {
                lock (lockObj)
                {
                    ushort iDir = 0;

                    LTDMC.dmc_set_profile(iCardIndex, (ushort)sAxis, 0.0, Math.Abs(dVel), dAcc, dDec, 0);
                    if (dVel < 0)
                    {
                        iDir = 0;
                    }
                    else
                    {
                        iDir = 1;
                    }
                    LTDMC.dmc_vmove(iCardIndex, (ushort)sAxis, iDir);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
 public bool ReferPosMove(short sAxis, double dAcc, double dDec, double dSpeed, double pos)
 {
     if (Enum.IsDefined(typeof(DefaultAxis), sAxis))
     {
         lock (lockObj)
         {
             LTDMC.dmc_set_profile(iCardIndex, (ushort)sAxis, 0.0, dSpeed, dAcc, dDec, 0);
             LTDMC.dmc_pmove(iCardIndex, (ushort)sAxis, (int)pos, 0);
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #3
0
 public bool StartSearchLimit(short sAxis, double dAcc, double dDec, double dCatchSpeed)
 {
     lock (lockObj)
     {
         ushort iDir = 0;
         double dVel = Math.Abs(dCatchSpeed);
         LTDMC.dmc_set_profile(iCardIndex, (ushort)sAxis, 0.0, dVel, dAcc, dDec, 0);
         if (dCatchSpeed < 0)
         {
             iDir = 0;
         }
         else
         {
             iDir = 1;
         }
         LTDMC.dmc_vmove(iCardIndex, (ushort)sAxis, iDir);
     }
     return(true);
 }
コード例 #4
0
 public bool StartSearchHome(short sAxis, double dAcc, double dDec, double dHomeSpd)
 {
     lock (lockObj)
     {
         ushort iDir = 0;
         double dVel = Math.Abs(dHomeSpd);
         LTDMC.dmc_set_profile(iCardIndex, (ushort)sAxis, 0.0, dVel, dAcc, dDec, 0);
         if (dHomeSpd < 0)
         {
             iDir = 0;
         }
         else
         {
             iDir = 1;
         }
         LTDMC.dmc_set_homemode(iCardIndex, (ushort)sAxis, iDir, dVel, 2, 0);
         LTDMC.dmc_home_move(iCardIndex, (ushort)sAxis);
     }
     return(true);
 }