public static extern AsuMotionError AsuMotionSetDifferentialOutputMapping(IntPtr AsuMotion, byte[] FunSel, AsuMotionBitMaskType NegMask);
Exemple #2
0
        /// <summary>
        /// 配置运动卡差分输出的信号映射
        /// 返回3 成功;
        /// 返回4 失败
        /// </summary>
        /// <param name="handle">设备句柄</param>
        /// <param name="FunSel">映射号数组,共16个元素,其值得设定将反应16个差分输出的内容</param>
        /// <param name="NegMask">设定16个差分输出口是否反向输出</param>
        /// <returns></returns>
        public static int AsuMotion_SetDifferentialOutputMapping(IntPtr handle, byte[] FunSel, AsuMotionBitMaskType NegMask)
        {
            AsuMotionError ret = AsuMotionSetDifferentialOutputMapping(handle, FunSel, NegMask);

            switch (ret)
            {
            case AsuMotionError.AsuMotion_True:
                LogHelper.WriteLog("配置运动卡差分输出的信号映射 成功");
                return(3);

            default:
                LogHelper.WriteLog("配置运动卡差分输出的信号映射 失败" + "---" + AsuMotion_GetErrorMessage(4));
                return(4);     // AsuMotion_False
            }
        }