public void Locate(int axis, double position, double speed, double taccel_sec, double tdecel_sec) { var pls_ms = speed / 1000.0; var acc_ms = speed / taccel_sec / (1000.0 * 1000.0); var dec_ms = speed / tdecel_sec / (1000.0 * 1000.0); var a = Axis.Of(axis); N.GT_ClrSts(card, a, 1).Verify(); N.GT_AxisOn(card, a).Verify(); N.GT_PrfTrap(card, a).Verify(); Api.TTrapPrm param; N.GT_GetTrapPrm(card, a, out param).Verify(); param.velStart = 0; param.acc = acc_ms; param.dec = dec_ms; N.GT_SetTrapPrm(card, a, ref param).Verify(); N.GT_SetPos(card, a, position.Round()).Verify(); N.GT_SetVel(card, a, pls_ms).Verify(); N.GT_Update(card, a.Mask).Verify(); }