领胜LDS 键盘AOI检测项目
xcd
2020-07-02 a332decd68d6d8bb5678d8ec95e6c65e0ccf9f33
src/Bro.Device.GTSCard/GTSCardDriver.cs
@@ -153,7 +153,7 @@
        /// </summary>
        /// <param name="item">运动对象</param>
        /// <returns>运动控制+停止判断</returns>
        public bool MoveToPoint(IOperationConfig opConfig)
        public ResponseMessage MoveToPoint(IOperationConfig opConfig)
        {
            bool resultOK = false;
            var gtsOperationConfig = opConfig as GTSCardOperationConfig;
@@ -172,7 +172,8 @@
            Task.WaitAll(taskList.ToArray());
            resultOK = taskList.All(u => u.GetAwaiter().GetResult());
            return resultOK;
            //return resultOK;
            throw new NotImplementedException();
        }
        /// <summary>
@@ -702,13 +703,13 @@
                {
                    IONum = index,
                    Value = (inValue & (1 << index)) == 0 ? 1 : 0,
                    Model = IOModel.In
                    IOType = IOType.In
                };
                IOItem outItem = new IOItem()
                {
                    IONum = index,
                    Value = (outValue & (1 << index)) == 0 ? 1 : 0,
                    Model = IOModel.Out
                    IOType = IOType.Out
                };
                result.Add(inItem);
                result.Add(outItem);
@@ -779,7 +780,7 @@
            foreach (var replyIOData in monitorSet.ReplyIODatas)
            {
                //写入IO输出
                if (replyIOData.Model == IOModel.Out)
                if (replyIOData.IOType == IOType.Out)
                {
                    GTSCardAPI.GT_SetDoBit((short)IConfig.CardNum, GTSCardAPI.MC_GPI, (short)replyIOData.IONum, (short)replyIOData.Value);
                }
@@ -796,7 +797,7 @@
            {
                MotionCardWarningSet warningSet = wSet as MotionCardWarningSet;
                bool isOn = ((tempNew.FirstOrDefault(u => u.IONum == warningSet.TriggerIndex && u.Model == warningSet.WarningIOModel)?.Value >> warningSet.TriggerIndex) & 1) == (warningSet.TriggerValue ? 1 : 0);
                bool isOn = ((tempNew.FirstOrDefault(u => u.IONum == warningSet.TriggerIndex && u.IOType == warningSet.WarningIOModel)?.Value >> warningSet.TriggerIndex) & 1) == (warningSet.TriggerValue ? 1 : 0);
                if (warningSet.CurrentStatus != isOn)
                {