领胜LDS 键盘AOI检测项目
wells.liu
2020-07-11 cda7be2cd01f809f64cfb0e812d38034a456546c
src/Bro.M071.Process/M071Process_MotionCard.cs
@@ -125,7 +125,7 @@
        private void MotionCardSettingCheck()
        {
            IDevice device = DeviceCollection.FirstOrDefault(u => u is IMotionCard);
            if (device.InitialConfig is MotionCardInitialConfigBase iConfig)
            if (device?.InitialConfig is MotionCardInitialConfigBase iConfig)
            {
                outputCtrlCard = device as MotionCardBase;
@@ -213,7 +213,7 @@
            }
            MotionCardDefaultRun("Reset", ref opConfig, ref invokeDevice);
            //(invokeDevice as IMotionCard).Reset();
            (invokeDevice as MotionCardBase).ResetAlarm();
            RaisedAlarm("");
            MachineState = MachineState.Ready;
@@ -251,7 +251,8 @@
            }
        }
        [ProcessMethod("MotionCardOperationConfigCollection", "FullReset", "大复位操作", InvokeType.TestInvoke)]
        //[ProcessMethod("MotionCardOperationConfigCollection", "FullReset", "大复位操作", InvokeType.TestInvoke)]
        [ProcessMethod("MotionCardBase", "FullReset", "大复位操作", InvokeType.TestInvoke)]
        public ProcessResponse FullReset(IOperationConfig opConfig, IDevice invokeDevice, IDevice sourceDevice)
        {
            //if (opConfig == null)
@@ -302,7 +303,7 @@
        };
        MachineState _machineStateBeforePause = MachineState.Unknown;
        List<MachineState> _statesAllowPause = new List<MachineState>() { MachineState.Running, MachineState.Ready, MachineState.Pause };
        [ProcessMethod("", "PauseJob", "暂停流程", InvokeType.TestInvoke)]
        [ProcessMethod("", "SwitchJobStatus", "流程状态切换", InvokeType.TestInvoke)]
        public ProcessResponse SwitchJobStatus(IOperationConfig opConfig, IDevice invokeDevice, IDevice sourceDevice)
        {
            if (!_statesAllowPause.Contains(MachineState))
@@ -328,7 +329,7 @@
                if (!_pauseHandle.WaitResult)
                {
                    #region 板卡暂停动作
                    motionDevice.StateChange(DeviceState.DSPause);
                    motionDevice.SetImmediatePause();
                    #endregion
                    _pauseHandle.WaitHandle.Reset();
@@ -339,7 +340,7 @@
                else if (!_pauseHandle.WaitResult)
                {
                    #region 板卡恢复动作
                    motionDevice.StateChange(DeviceState.DSOpen);
                    motionDevice.ResetImmediatePause();
                    #endregion
                    _pauseHandle.WaitHandle.Set();
@@ -354,7 +355,7 @@
                    if (!_pauseHandle.WaitResult)
                    {
                        #region 板卡暂停动作
                        motionDevice.StateChange(DeviceState.DSPause);
                        motionDevice.SetImmediatePause();
                        #endregion
                        _pauseHandle.WaitHandle.Reset();
@@ -367,7 +368,7 @@
                    if (!_pauseHandle.WaitResult)
                    {
                        #region 板卡恢复动作
                        motionDevice.StateChange(DeviceState.DSOpen);
                        motionDevice.ResetImmediatePause();
                        #endregion
                        _pauseHandle.WaitHandle.Set();
@@ -553,7 +554,7 @@
        private void MotionCardDefaultRun(string methodCode, ref IOperationConfig opConfig, ref IDevice invokeDevice)
        {
            IMonitorSet monitorSet = null;
            if (opConfig == null)
            if (opConfig == null || !(opConfig is MotionCardOperationConfigBase))
            {
                monitorSet = Config.MonitorSetCollection.FirstOrDefault(u => u.MethodCode == methodCode);
                if (monitorSet == null)