Bläddra i källkod

add setbeamcurrent and setbeamblank feature into sysmgr system

CXS 3 år sedan
förälder
incheckning
7c0b0312ce

+ 10 - 2
OTSCPP/OTSClrInterface/ControlClr/OTSControlFunExport.h

@@ -193,12 +193,20 @@ namespace OTSCLRINTERFACE
 			return bRev;
 		}
 
-		bool SetSemBeamBlank(long a_nBeamBlank)
+		bool SetSemBeamBlank(bool a_nBeamBlank)
 		{
 			BOOL bRev = m_pSem->SetBeamBlank(a_nBeamBlank);
 			return bRev;
 		}
-
+		bool SetSemBeamCurrent(bool a_nBeamCurrent)
+		{
+			bool bRev = true;
+			
+			bRev = m_pSem->SetBeamBlank(a_nBeamCurrent);
+		
+			
+			return bRev;
+		}
 
 		//»ñµÃÁÁ¶È
 		bool GetSemBrightness(double% a_dBrightness)

+ 24 - 0
OTSCPP/OTSControl/Bruker/OTSSEMBruker.cpp

@@ -109,7 +109,31 @@ namespace OTSController {
 		// ok, return TRUE
 		return TRUE;
 	}
+	// set beam blank
+	BOOL COTSSEMBruker::SetBeamCurrent(BOOL a_nBeamCurrent)
+	{
+		// m_pBrukerImplPtr check
+		ASSERT(m_pBrukerImplPtr);
+		if (!m_pBrukerImplPtr)
+		{
+			LogErrorTrace(__FILE__, __LINE__, _T("COTSSEMBruker::SetBeamBlank: m_pBrukerImplPtr is invalid."));
+			return FALSE;
+		}
 
+		// turn Bean off if a_nBeamBlank > 0
+		if (a_nBeamCurrent )
+		{
+			if (!m_pBrukerImplPtr->SwitchSEMOff(FALSE,TRUE , FALSE))
+			{
+				// failed to call SwitchSEMOff method
+				LogErrorTrace(__FILE__, __LINE__, _T("COTSSEMBruker::SetBeamBlank : failed to call SwitchSEMOff method."));
+				return FALSE;
+			}
+		}
+
+		// ok, return TRUE
+		return TRUE;
+	}
 	// brightness
 	BOOL COTSSEMBruker::GetBrightness(double& a_dBrightness)
 	{

+ 7 - 2
OTSCPP/OTSControl/Bruker/OTSSEMBruker.h

@@ -22,8 +22,7 @@ namespace OTSController {
 		virtual BOOL Disconnect(void) override;
 
 
-		virtual BOOL GetBeamBlank(long& a_nBeamBlank) override { return TRUE; }
-		virtual BOOL SetBeamBlank(long a_nBeamBlank) override;
+		
 
 		virtual BOOL GetBrightness(double& a_dBrightness) override;
 		virtual BOOL SetBrightness(double a_dBrightness) override;
@@ -46,6 +45,12 @@ namespace OTSController {
 		virtual BOOL GetHTOnOff(BOOL& a_bHTValue) override { return TRUE; }
 		virtual BOOL SetHTOnOff(BOOL a_bHTValue) override;		// note: a_bHTValue is FALSE will turn HT off
 
+		virtual BOOL GetBeamBlank(long& a_nBeamBlank) override { return TRUE; }
+		virtual BOOL SetBeamBlank(long a_nBeamBlank) override;
+
+		
+		virtual BOOL SetBeamCurrent(BOOL a_nBeamBlank) override;
+
 		virtual BOOL GetPositionXY(double& a_dPositionX, double& a_dPositionY, double& a_dPositionR) override;
 		virtual BOOL SetPositionXY(double a_dPositionX, double a_dPositionY, double a_dPositionR) override;
 		virtual BOOL SetPositionXY(double a_dPositionX, double a_dPositionY) override;

+ 3 - 0
OTSCPP/OTSControl/OTSSemBase.h

@@ -82,6 +82,9 @@ namespace OTSController {
 		virtual BOOL GetHTOnOff(BOOL& a_bHTValue) = 0;
 		virtual BOOL SetHTOnOff(BOOL a_bHTValue) = 0;
 
+		virtual BOOL SetBeamCurrent(BOOL a_bValue) = 0;//bvalue=true
+
+	
 		// spot size
 		virtual BOOL GetSpotSize(double& a_dSpotSize) = 0;
 		virtual BOOL SetSpotSize(double a_dSpotSize) = 0;

+ 22 - 4
OTSCPP/OTSControl/Oxford/OTSSEMOxford.cpp

@@ -83,7 +83,7 @@ namespace OTSController {
 			return FALSE;
 		}
 
-		if (a_nBeamBlank < 0 || a_nBeamBlank >= 3)
+		/*if (a_nBeamBlank < 0 || a_nBeamBlank >= 3)
 		{
 			return FALSE;
 		}
@@ -96,16 +96,34 @@ namespace OTSController {
 		if (!m_oxfordImpl->SetBeamOn(TRUE))
 		{
 			return FALSE;
-		}
+		}*/
 
-		if (a_nBeamBlank == 2)
+		if (a_nBeamBlank == 0)
 		{
-			return m_oxfordImpl->SetBeamBlank(TRUE);
+			return m_oxfordImpl->SetBeamBlank(FALSE);
 		}
 
 		return TRUE;
 	}
+	BOOL COTSSEMOxford::SetBeamCurrent(BOOL a_nBeamCurrent)
+	{
+		ASSERT(m_oxfordImpl);
+		if (!m_oxfordImpl)
+		{
+			return FALSE;
+		}
 
+		
+
+		if (!a_nBeamCurrent)
+		{
+			return m_oxfordImpl->SetBeamOn(FALSE);
+		}
+
+		
+
+		return TRUE;
+	}
 	BOOL COTSSEMOxford::GetPositionXY(double& a_dPositionX, double& a_dPositionY, double& /*a_dPositionR*/)
 	{
 		// controller checking

+ 2 - 0
OTSCPP/OTSControl/Oxford/OTSSEMOxford.h

@@ -57,6 +57,8 @@ namespace OTSController {
 		virtual BOOL GetHTOnOff(BOOL& /*a_bHTValue*/) override { return TRUE; }
 		virtual BOOL SetHTOnOff(BOOL /*a_bHTValue*/) override { return true; }
 
+		virtual BOOL SetBeamCurrent(BOOL a_nBeamBlank) override;
+
 		virtual BOOL GetPositionXY(double& a_dPositionX, double& a_dPositionY, double& a_dPositionR) override;
 		virtual BOOL SetPositionXY(double a_dPositionX, double a_dPositionY, double a_dPositionR) override;
 		virtual BOOL SetPositionXY(double a_dPositionX, double a_dPositionY) override;

+ 1 - 0
OTSCPP/OTSControl/Simulate/OTSSemSim.h

@@ -22,6 +22,7 @@ namespace OTSController {
 
 		virtual BOOL GetBeamBlank(long& a_nBeamBlank) override { a_nBeamBlank = m_nBeamBlank; return TRUE; }
 		virtual BOOL SetBeamBlank(long a_nBeamBlank) override { m_nBeamBlank = a_nBeamBlank; return TRUE; }
+		virtual BOOL SetBeamCurrent(BOOL a_nBeamCurrent) override { return TRUE; };
 
 		virtual BOOL GetBrightness(double& a_dBrightness) override { a_dBrightness = m_dBrightness; return TRUE; }
 		virtual BOOL SetBrightness(double a_dBrightness) override { m_dBrightness = a_dBrightness; return TRUE; }

+ 7 - 287
OTSSysMgrApp/OTSSystemManagerForms.cs

@@ -20,8 +20,6 @@ namespace OTSSysMgrApp
         //获取XML 路径
         static string xmlFilePath = string.Empty;// System.Configuration.ConfigurationManager.ConnectionStrings["XMLFilePath"].ConnectionString;
         //日志路径
-        static string LogPath = string.Empty;//System.Configuration.ConfigurationManager.ConnectionStrings["LogPath"].ConnectionString;
-        static string LogAppPath = string.Empty;//System.Configuration.ConfigurationManager.ConnectionStrings["LogAppPath"].ConnectionString;
         static string XMLFileName = string.Empty;//System.Configuration.ConfigurationManager.ConnectionStrings["XMLFileName"].ConnectionString;
         static string DLLXMLFileName = string.Empty;//System.Configuration.ConfigurationManager.ConnectionStrings["DLLXMLFileName"].ConnectionString;
         //设置日志路径
@@ -31,7 +29,6 @@ namespace OTSSysMgrApp
         OTSSysMgrTools.Language lan;
         //国际化存储信息
         Hashtable table;
-        //static string  message1, message2, message3, message4 ,message5 , message6 ,message7 , message8, message9, message10;
         #endregion
 
         #region 构造函数
@@ -41,9 +38,6 @@ namespace OTSSysMgrApp
             {
                 //获取XML 路径
                 xmlFilePath = System.Configuration.ConfigurationManager.ConnectionStrings["XMLFilePath"].ConnectionString;
-                //日志路径
-                LogPath = System.Configuration.ConfigurationManager.ConnectionStrings["LogPath"].ConnectionString;
-                LogAppPath = System.Configuration.ConfigurationManager.ConnectionStrings["LogAppPath"].ConnectionString;
                 XMLFileName = System.Configuration.ConfigurationManager.ConnectionStrings["XMLFileName"].ConnectionString;
                 DLLXMLFileName = System.Configuration.ConfigurationManager.ConnectionStrings["DLLXMLFileName"].ConnectionString;
                
@@ -143,20 +137,7 @@ namespace OTSSysMgrApp
 
             try
             {
-                //判断是否注册与日期是否有效
-                //if (!IsValidLicense(ref message))
-                //{
-                //    tabHardwareSet.Parent = null;
-                //}
-                //else
-                //{
-                    //获取已存在的注册信息
-                    //tbLComupterName.Text = GetLicenseInfo("ComupterName");
-                    //tbLHardwareID.Text = GetLicenseInfo("HardwareID");
-                    //tbOTSProduct.Text = GetLicenseInfo("OTSProduct");
-                    //tbPassType.Text = GetLicenseInfo("PassType");
-                    //tbExpireDate.Text = Convert.ToDateTime(GetLicenseInfo("ExpireDate")).ToString("yyyy-MM-dd");
-                    //显示硬件Tab菜单
+   
                     tabHardwareSet.Parent = tabControl1;
                 //}
             }
@@ -204,25 +185,7 @@ namespace OTSSysMgrApp
                             SaveSetting(Name, Value);
                         }
                     }
-                    //遍历tabHardwareSet标签中所有的ComboBox控件 
-                    //foreach (Control control in this.tabLicenseSet.Controls)
-                    //{
-                    //    //判断类型名称
-                    //    if (control is ComboBox)
-                    //    {
-                    //        //获取节点名称与节点参数值
-                    //        Name = (control as ComboBox).Name.Substring(2);
-                    //        Value = (control as ComboBox).Text;
-                    //        SaveSetting(Name, Value);
-                    //    }
-                    //    if (control is TextBox)
-                    //    {
-                    //        //获取节点名称与节点参数值
-                    //        Name = (control as TextBox).Name.Substring(2);
-                    //        Value = (control as TextBox).Text;
-                    //        SaveSetting(Name, Value);
-                    //    }
-                    //}
+
                 }
                 else
                 {
@@ -565,168 +528,10 @@ namespace OTSSysMgrApp
         }
        
       
-        #region 判断当前License信息是否正确
-        //public static bool IsValidLicense(ref string MessageInfo)
-        //{
-        //    if (fun == null)
-        //    {
-        //        fun = new COTSLicMgrClr();
-        //    }
-        //    if (otsInfoClr == null)
-        //    {
-        //        otsInfoClr = new COTSLicenseInfoClr();
-        //    }
-        //    //if (cfunClass == null)
-        //    //{
-        //    //    cfunClass = new NSLogFunExport.CFunExportClass();
-        //    //}
-        //    //实例化C++对象 从选择文件对话框中 选择Lsk文件
-        //    //1.检查通行证是否合法
-        //    //计算机名称
-        //    string ComupterName = GetLicenseInfo("ComupterName");
-        //    //硬件ID
-        //    string HardwareID = GetLicenseInfo("HardwareID");
-        //    //OTS产品
-        //    int OTSProduct = Convert.ToInt32(GetLicenseInfo("OTSProduct") == "OTSIncA" ? 0 : 1);
-        //    //通行证类型
-        //    int PassType = Convert.ToInt32(GetLicenseInfo("PassType") == "Online" ? 0 : 1);
-        //    //有效期
-        //    DateTime ExpireDate = Convert.ToDateTime(GetLicenseInfo("ExpireDate")!=""? GetLicenseInfo("ExpireDate"):DateTime.Now.ToString());
-        //    //判断查询参数
-        //    otsInfoClr.SetComputerNickName(ComupterName);
-        //    otsInfoClr.SetMachineId(HardwareID);
-        //    otsInfoClr.SetPackId(OTSProduct);
-        //    otsInfoClr.SetLicType(PassType);
-        //    otsInfoClr.SetExpireDate(ExpireDate);
-        //    int nResult = 0;
-        //    bool bResult = fun.IsValidLicense(OTSProduct, otsInfoClr, ref nResult, true, true);
-        //    if (bResult)
-        //    {
-        //        //2.将通行证写入指定的路径
-        //        bool CreateResult = fun.CreateLicenseFile(otsInfoClr);
-        //        if (CreateResult)
-        //        {
-        //            return true;
-        //        }
-        //        return false;
-        //    }
-        //    else
-        //    {
-               
-        //        MessageInfo = message1;
-        //        switch (nResult)
-        //        {
-        //            case 0:
-        //                MessageInfo += message2;
-        //                break;
-        //            case 1:
-        //                MessageInfo += message3;
-        //                break;
-        //            case 2:
-        //                MessageInfo += message4;
-        //                break;
-        //            case 3:
-        //                MessageInfo += message5;
-        //                break;
-        //            case 4:
-        //                MessageInfo += message6;
-        //                break;
-        //            case 5:
-        //                MessageInfo += message7;
-        //                break;
-        //            case 6:
-        //                MessageInfo += message8;
-        //                break;
-        //        }
-        //        return false;
-        //    }
-        //}
-        #endregion
+     
 
-        #region 获取License参数
-        /// <summary>
-        /// 获取并显示 Licanse参数
-        /// </summary>
-        //public void OpenLicenseDialog()
-        //{
-        //    try
-        //    {
-        //        fun = new OTSINTERFACE.COTSLicMgrClr();
-        //        string str = fun.GetMachineId();
-        //        //获取电脑ID
-        //        string MachineId = fun.GetMachineId();
-        //        //实例化C++对象
-        //        otsInfoClr = new OTSINTERFACE.COTSLicenseInfoClr();
-        //        //设置电脑ID
-        //        otsInfoClr.SetMachineId(MachineId);
-        //        bool a_bAdd = false;
-        //        bool a_bRequest = true;
-        //        //弹出通行证窗体
-        //        bool result = fun.ShowEditDialogExport(otsInfoClr, a_bAdd, a_bRequest);
-        //        if (result)
-        //        {
-        //            return;
-        //        }
-        //    }
-        //    catch (Exception)
-        //    {
-
-        //    }
-        //    finally
-        //    {
-        //        fun.FreePointer();
-        //        otsInfoClr.FreePointer();
-        //    }
-        //}
 
-        /// <summary>
-        /// 获取电脑名称
-        /// </summary>
-        public string GetComupterName()
-        {
-            return "";
-        }
-        /// <summary>
-        /// 获取硬件ID
-        /// </summary>
-        public string GetHardwareID()
-        {
-            return "";
-        }
 
-        /// <summary>
-        /// 项目
-        /// </summary>
-        public string GetOTSProduct()
-        {
-            //OTSIncA=0
-            //OtsPartA=1
-            return "";
-        }
-        /// <summary>
-        /// 通行证种类
-        /// </summary>
-        public string GetPassType()
-        {
-            //Online = 0,
-            //Offline = 1,
-            return "";
-        }
-        /// <summary>
-        /// 时间
-        /// </summary>
-        public string GetExpireDate()
-        {
-            return "";
-        }
-        /// <summary>
-        /// 显示通行证信息
-        /// </summary>
-        public void ShowLicenseInfo()
-        {
-
-        }
-        #endregion
 
         private void OTSSystemManagerForms_FormClosing(object sender, FormClosingEventArgs e)
         {
@@ -820,68 +625,8 @@ namespace OTSSysMgrApp
                 SaveSelectVersionInfo();
             }
         }
-        /// <summary>
-        /// 判断是否注册与日期是否有效
-        /// </summary>
-        /// <returns></returns>
-        public static bool ExistsLicenseInfo(ref string message)
-        {
-            try
-            {
-                //计算机名称
-                string tbLComupterName = GetLicenseInfo("ComupterName");
-                //硬件ID
-                string tbLHardwareID = GetLicenseInfo("HardwareID");
-                //OTS产品
-                string tbOTSProduct = GetLicenseInfo("OTSProduct");
-                //通行证类型
-                string tbPassType = GetLicenseInfo("PassType");
-                //有效期
-                string tbExpireDate = GetLicenseInfo("ExpireDate");
-
-                if (string.IsNullOrEmpty(tbLComupterName) || string.IsNullOrEmpty(tbLHardwareID) || string.IsNullOrEmpty(tbOTSProduct) || string.IsNullOrEmpty(tbPassType) || string.IsNullOrEmpty(tbExpireDate))
-                {
-                   
-                    //message = message9;
-                    return false;
-                }
-                else
-                {
-                    try
-                    {
-                        string ExpireDate = Convert.ToDateTime(tbExpireDate).ToString("yyyy-MM-dd 23:59:59");
-                        DateTime dtExpireDate = Convert.ToDateTime(ExpireDate);
-                        DateTime dtCurrent = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
-                        if (dtCurrent > dtExpireDate)
-                        {
-                            ////message = message10;
-                            return false;
-                        }
-                    }
-                    catch (Exception ex)
-                    {
-                        log.Error("OTSSystemManagerForms_ExistsLicenseInfo:" + ex.ToString() + "");
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                log.Error("OTSSystemManagerForms_ExistsLicenseInfo:" + ex.ToString() + "");
-            }
-            return true;
-        }
-        public static string GetLicenseInfo(string NodeName)
-        {
-            try
-            {
-                return XMLOperationClass.GetXMLInformations(NodeName);
-            }
-            catch (Exception ex)
-            {
-                log.Error("OTSSystemManagerForms_GetLicenseInfo:" + ex.ToString() + "");
-                return "";
-            }
-        }
+ 
+      
 
         private void btnRemove_Click(object sender, EventArgs e)
         {
@@ -895,37 +640,12 @@ namespace OTSSysMgrApp
                 SaveSetting("OTSProduct", "");
                 SaveSetting("PassType", "");
                 SaveSetting("ExpireDate", "");
-                //清空文本框信息
-                //tbLComupterName.Text = string.Empty;
-                //tbLHardwareID.Text = string.Empty;
-                //tbOTSProduct.Text = string.Empty;
-                //tbPassType.Text = string.Empty;
-                //tbExpireDate.Text = string.Empty;
-                //显示硬件Tab菜单
+               
                 tabHardwareSet.Parent = null;
             }
         }
 
-        //private void cbbLanguage_SelectedIndexChanged(object sender, EventArgs e)
-        //{
-        //    //获取combobox的值
-        //   string Global = cbbLanguage.SelectedItem.ToString();
-        //    Global = Global.Trim();
-
-        //    if (Global.IndexOf("-") == 0)
-        //    {
-        //        return;
-        //    }
-        //    else
-        //    {
-
-        //        Global = Global.Substring(Global.IndexOf("[") + 1, 2);
-        //    }
-           
-        //    WriteDefaultLanguage(Global);
-        //    //国际化
-        //    OTSSysMgrTools.Language lan1 = new OTSSysMgrTools.Language(this);
-        //}
+     
 
         //修改默认语言 
         public static void WriteDefaultLanguage(string lang)

+ 12 - 12
OTSSysMgrApp/SemTestForms.Designer.cs

@@ -31,6 +31,7 @@
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SemTestForms));
             this.BtnConnect = new System.Windows.Forms.Button();
             this.gbGetMethods = new System.Windows.Forms.GroupBox();
+            this.label17 = new System.Windows.Forms.Label();
             this.cbHT = new System.Windows.Forms.CheckBox();
             this.tbSemScanFieldY = new System.Windows.Forms.TextBox();
             this.btnHT = new System.Windows.Forms.Button();
@@ -123,7 +124,6 @@
             this.bVoltageStatus = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
             this.button2 = new System.Windows.Forms.Button();
-            this.label17 = new System.Windows.Forms.Label();
             this.gbGetMethods.SuspendLayout();
             this.gbSetMethods.SuspendLayout();
             this.SuspendLayout();
@@ -193,6 +193,15 @@
             this.gbGetMethods.TabStop = false;
             this.gbGetMethods.Text = "获取参数";
             // 
+            // label17
+            // 
+            this.label17.AutoSize = true;
+            this.label17.Location = new System.Drawing.Point(285, 28);
+            this.label17.Name = "label17";
+            this.label17.Size = new System.Drawing.Size(14, 13);
+            this.label17.TabIndex = 47;
+            this.label17.Text = "Z";
+            // 
             // cbHT
             // 
             this.cbHT.AutoSize = true;
@@ -1159,7 +1168,7 @@
             this.bVoltageClose.Name = "bVoltageClose";
             this.bVoltageClose.Size = new System.Drawing.Size(87, 36);
             this.bVoltageClose.TabIndex = 10;
-            this.bVoltageClose.Text = "关闭电压";
+            this.bVoltageClose.Text = "BeamCurrent";
             this.bVoltageClose.UseVisualStyleBackColor = true;
             this.bVoltageClose.Click += new System.EventHandler(this.bVoltageClose_Click);
             // 
@@ -1170,7 +1179,7 @@
             this.bVoltageStatus.Name = "bVoltageStatus";
             this.bVoltageStatus.Size = new System.Drawing.Size(98, 36);
             this.bVoltageStatus.TabIndex = 11;
-            this.bVoltageStatus.Text = "电压状态";
+            this.bVoltageStatus.Text = "BeamBlank";
             this.bVoltageStatus.UseVisualStyleBackColor = true;
             this.bVoltageStatus.Click += new System.EventHandler(this.bVoltageStatus_Click);
             // 
@@ -1194,15 +1203,6 @@
             this.button2.UseVisualStyleBackColor = true;
             this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
-            // label17
-            // 
-            this.label17.AutoSize = true;
-            this.label17.Location = new System.Drawing.Point(285, 28);
-            this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(14, 13);
-            this.label17.TabIndex = 47;
-            this.label17.Text = "Z";
-            // 
             // SemTestForms
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

+ 13 - 10
OTSSysMgrApp/SemTestForms.cs

@@ -25,7 +25,7 @@ namespace OTSSysMgrApp
         //获取XML 路径
         static string xmlFilePath = System.Configuration.ConfigurationManager.ConnectionStrings["XMLFilePath"].ConnectionString;
         //日志路径
-        static string LogPath = System.Configuration.ConfigurationManager.ConnectionStrings["LogPath"].ConnectionString;
+        //static string LogPath = System.Configuration.ConfigurationManager.ConnectionStrings["LogPath"].ConnectionString;
 
         static NLog.Logger log = NLog.LogManager.GetCurrentClassLogger();
         //电镜设置对象
@@ -696,7 +696,7 @@ namespace OTSSysMgrApp
         {
             try
             {
-                int a_nBeamBlank = 0;
+                bool a_nBeamBlank = false;
                 //判断是否为空与类型
                 if (!IsNull(tbSBeamBlank))
                 {
@@ -709,7 +709,7 @@ namespace OTSSysMgrApp
                     return;
                 }
                 //获取参数与设置参数
-                a_nBeamBlank = Convert.ToInt32(tbSBeamBlank.Text);
+                a_nBeamBlank = Convert.ToBoolean(tbSBeamBlank.Text);
                 bool result = cfun.SetSemBeamBlank(a_nBeamBlank);
                 if (result)
                 {
@@ -1302,17 +1302,20 @@ namespace OTSSysMgrApp
 
         private void bVoltageClose_Click(object sender, EventArgs e)
         {
-            bool a_HTValue = false;
-            bool result = cfun.SetSemHTOnOff(a_HTValue);
-            MessageBox.Show("Whether the shutdown voltage was successful:" + Convert.ToBoolean(result).ToString());
+            bool a_HTValue = true;
+            bool result = cfun.SetSemBeamCurrent(a_HTValue);
+            //bool result = cfun.SetSemBeamBlank(a_HTValue);
+            //bool result = cfun.SetSemHTOnOff(a_HTValue);
+            //MessageBox.Show("Whether the shutdown voltage was successful:" + Convert.ToBoolean(result).ToString());
         }
 
         private void bVoltageStatus_Click(object sender, EventArgs e)
         {
-            //连接电镜 关闭电压
-            bool a_HTValue = false;
-            bool result = cfun.GetSemHTOnOff(ref a_HTValue);
-            MessageBox.Show("The current state of the voltage:" + Convert.ToBoolean(a_HTValue).ToString());
+            bool a_HTValue = true;
+            //bool result = cfun.SetSemBeamCurrent(a_HTValue);
+            bool result = cfun.SetSemBeamBlank(a_HTValue);
+            //bool result = cfun.SetSemHTOnOff(a_HTValue);
+            //MessageBox.Show("Whether the shutdown voltage was successful:" + Convert.ToBoolean(result).ToString());
         }
 
         private void button1_Click(object sender, EventArgs e)

+ 1 - 1
OTSSysMgrTools/Imagepro.cs

@@ -132,7 +132,7 @@ namespace OTSSysMgrTools
                     return 0;
                 }
                 //设置参数
-                if (!cfun.SetSemBeamBlank(0))
+                if (!cfun.SetSemBeamBlank(false))
                 {
                     cfun.SetSemScanMode(a_oldMode);
                     return 0;