领胜LDS 键盘AOI检测项目
wells.liu
2020-07-03 b83a01eec16b236d099dcea3e7a5051c8cae9c6c
src/Bro.Device.GTSCard/GTSCardDriver.cs
@@ -23,7 +23,7 @@
        // 异常事件
        public Action<Exception> OnExceptionRaised;
        public GTSCardInitialConfig IConfig
        public GTSCardInitialConfig IIConfig
        {
            get
            {
@@ -77,7 +77,10 @@
        public override ResponseMessage Run(IOperationConfig config)
        {
            throw new NotImplementedException();
            ResponseMessage responseMessage = new ResponseMessage();
            return responseMessage;
        }
        #endregion
@@ -707,13 +710,13 @@
                {
                    IONum = index,
                    Value = (inValue & (1 << index)) == 0 ? 1 : 0,
                    IOType = IOType.In
                    IOType = IOType.INPUT
                };
                IOItem outItem = new IOItem()
                {
                    IONum = index,
                    Value = (outValue & (1 << index)) == 0 ? 1 : 0,
                    IOType = IOType.Out
                    IOType = IOType.OUTPUT
                };
                result.Add(inItem);
                result.Add(outItem);
@@ -784,7 +787,7 @@
            foreach (var replyIOData in monitorSet.ReplyIODatas)
            {
                //写入IO输出
                if (replyIOData.IOType == IOType.Out)
                if (replyIOData.IOType == IOType.OUTPUT)
                {
                    GTSCardAPI.GT_SetDoBit((short)IConfig.CardNum, GTSCardAPI.MC_GPI, (short)replyIOData.IONum, (short)replyIOData.Value);
                }
@@ -840,7 +843,7 @@
                        //    return tempNew[index].Value;
                        //}).ToList();
                        ExcuteMonitorInvok(DateTime.Now, monitorSet.InvokeDevice, this, monitorSet);
                        ExcuteMonitorInvok(DateTime.Now, monitorSet.InvokeDevice, this, monitorSet, OnMethodInvoked);
                    }
                }
            });