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); } }
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); } }
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); }
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); }