public int GetEncoderCurrPos(int encChn, out double pos) { pos = 0; if (!IsOpen) { return((int)ErrorDef.NotOpen); } if (encChn < 0 || encChn >= EncoderChannels) { throw new ArgumentOutOfRangeException("ResetTriggedCount(encChn ,...) fialed By:encChn = " + encChn + " is outof range:0~" + (EncoderChannels - 1)); } if (0 != HTM.GetTrigCurPos(devIndexes[encChn], out pos)) { return((int)ErrorDef.InvokeFailed); } return((int)ErrorDef.Success); }