public void ToSpeed(int axis, 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_AxisOn(card, a).Verify(); N.GT_ClrSts(card, a, 1).Verify(); N.GT_PrfJog(card, a).Verify(); Api.TJogPrm param; N.GT_GetJogPrm(card, a, out param).Verify(); param.acc = acc_ms; param.dec = acc_ms; N.GT_SetJogPrm(card, a, ref param).Verify(); N.GT_SetVel(card, a, pls_ms).Verify(); N.GT_Update(card, a.Mask).Verify(); }