瀏覽代碼

Merge branch 'Release2.7' of http://36.129.163.148:30080/gogsadmin/OTS into Release2.7

zhangjiaxin 2 年之前
父節點
當前提交
96f546894c

+ 9 - 2
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CMeasure.cs

@@ -174,8 +174,15 @@ namespace OTSModelSharp
         
             MsrMsg.STMThreadStu.csMsrEndTime = timeEnd.ToString("yyyy-MM-dd HH:mm:ss");
             ProgressEvent(MsrMsg);
-         
-         
+
+            if (MsrMsg.STMThreadStu.iMsrStatu == otsdataconst.OTS_MSR_THREAD_STATUS.FAILED || MsrMsg.STMThreadStu.iMsrStatu == otsdataconst.OTS_MSR_THREAD_STATUS.COMPLETED)
+            {
+
+                if (m_pProjData.GetGenParam().AutoBeamOff)
+                {
+                    m_SemController.SetSemBeamCurrentOff();
+                }
+            }
         }
         void ThreadOverWithoutDisConnect()
         {

+ 16 - 0
OTSIncAMeasureApp/ServiceCenter/SemController.cs

@@ -507,6 +507,22 @@ namespace OTSModelSharp.ServiceCenter
             }
         }
 
+        public bool SetSemBeamCurrentOff()
+        {
+            if (isFEI)
+            {
+                return ApiClass.SetBeamStateOff();
+            }
+            else
+            {
+                if (!hw.IsConnected())
+                {
+                    return false;
+                }
+                //int seValue = b ? 1 : 0;
+                return hw.SetSemBeamCurrent(true);
+            }
+        }
         public OTSCLRINTERFACE.COTSControlFunExport GetHardwareInterface()
         {
             if (!hw.IsConnected())