Browse Source

测量优化,修改PT沉积参数

gsp 4 years ago
parent
commit
5e33f9e043

+ 22 - 0
HOZProject/App.config

@@ -149,6 +149,28 @@
 
       <add key="RemoteELYPath" value="\\192.168.1.101\Carl Zeiss\SmartFIB\API\Drop\"/>
       <add key="RemoteMLFPath" value="\\192.168.1.101\Carl Zeiss\SmartSEM\User\Service\"/>
+
+
+      <!--add by sun 2020-12-15 增加不同样品扫描速度参数,每类样品3种扫描速度-->
+      <!--0类样品 正常情况下默认扫描速度-->
+      <add key="ScanSpeedNormal_0" value="CMD_SCANRATE4"/>
+      <!--对焦拍照扫描速度-->
+      <add key="ScanSpeedFocus_0" value="CMD_SCANRATE5"/>
+      <!--高倍拍照扫描速度-->
+      <add key="ScanSpeedHigh_0" value="CMD_SCANRATE7"/>
+      <!--1类样品 正常情况下默认扫描速度-->
+      <add key="ScanSpeedNormal_1" value="CMD_SCANRATE4"/>
+      <!--对焦拍照扫描速度-->
+      <add key="ScanSpeedFocus_1" value="CMD_SCANRATE5"/>
+      <!--高倍拍照扫描速度-->
+      <add key="ScanSpeedHigh_1" value="CMD_SCANRATE7"/>
+      <!--2类样品 正常情况下默认扫描速度-->
+      <add key="ScanSpeedNormal_2" value="CMD_SCANRATE4"/>
+      <!--对焦拍照扫描速度-->
+      <add key="ScanSpeedFocus_2" value="CMD_SCANRATE5"/>
+      <!--高倍拍照扫描速度-->
+      <add key="ScanSpeedHigh_2" value="CMD_SCANRATE7"/>
+      <!--add by sun 2020-12-15 增加不同样品扫描速度参数,每类样品3种扫描速度 end-->
       
     </appSettings>
 </configuration>

+ 6 - 0
HOZProject/FormHOZMain.cs

@@ -209,6 +209,12 @@ namespace HOZProject
                 //Z轴移动距离
                 m_MeasureFile.MParam.ZDistance= Convert.ToSingle(ConfigurationManager.AppSettings["ZDistance"]);
 
+                //add by sun 2020-12-15 增加不同样品扫描速度参数
+                m_MeasureFile.MParam.ScanSpeedNormal = Convert.ToString(ConfigurationManager.AppSettings["ScanSpeedNormal_"+ m_MeasureFile.MParam.SampleName]);
+                m_MeasureFile.MParam.ScanSpeedFocus = Convert.ToString(ConfigurationManager.AppSettings["ScanSpeedFocus_" + m_MeasureFile.MParam.SampleName]);
+                m_MeasureFile.MParam.ScanSpeedHigh = Convert.ToString(ConfigurationManager.AppSettings["ScanSpeedHigh_" + m_MeasureFile.MParam.SampleName]);
+                //add by sun 2020-12-15 增加不同样品扫描速度参数 end
+
                 m_Ms.InitMeas(m_MeasureFile);
                 //注册事件
                 m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage);

+ 92 - 11
HOZProject/UserControls/UControl_Init.Designer.cs

@@ -115,6 +115,12 @@
             this.label23 = new System.Windows.Forms.Label();
             this.cbbEDSV = new System.Windows.Forms.ComboBox();
             this.cbbEDSA = new System.Windows.Forms.ComboBox();
+            this.tbScanSpeedNormal = new System.Windows.Forms.TextBox();
+            this.label24 = new System.Windows.Forms.Label();
+            this.label25 = new System.Windows.Forms.Label();
+            this.label26 = new System.Windows.Forms.Label();
+            this.tbScanSpeedFocus = new System.Windows.Forms.TextBox();
+            this.tbScanSpeedHigh = new System.Windows.Forms.TextBox();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbDelWLZ)).BeginInit();
@@ -147,7 +153,7 @@
             this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(769, 33);
+            this.panel1.Size = new System.Drawing.Size(770, 33);
             this.panel1.TabIndex = 3;
             // 
             // pbClose
@@ -157,7 +163,7 @@
             this.pbClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbClose.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pbClose.Dock = System.Windows.Forms.DockStyle.Right;
-            this.pbClose.Location = new System.Drawing.Point(735, 0);
+            this.pbClose.Location = new System.Drawing.Point(736, 0);
             this.pbClose.Name = "pbClose";
             this.pbClose.Size = new System.Drawing.Size(32, 31);
             this.pbClose.TabIndex = 106;
@@ -610,7 +616,7 @@
             this.pbDelWLZ.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWLZ.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWLZ.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWLZ.Location = new System.Drawing.Point(659, 210);
+            this.pbDelWLZ.Location = new System.Drawing.Point(660, 210);
             this.pbDelWLZ.Name = "pbDelWLZ";
             this.pbDelWLZ.Size = new System.Drawing.Size(25, 21);
             this.pbDelWLZ.TabIndex = 111;
@@ -623,7 +629,7 @@
             this.pbDelWQGD.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWQGD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWQGD.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWQGD.Location = new System.Drawing.Point(331, 235);
+            this.pbDelWQGD.Location = new System.Drawing.Point(332, 235);
             this.pbDelWQGD.Name = "pbDelWQGD";
             this.pbDelWQGD.Size = new System.Drawing.Size(25, 21);
             this.pbDelWQGD.TabIndex = 110;
@@ -636,7 +642,7 @@
             this.pbWQGFDel.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbWQGFDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbWQGFDel.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbWQGFDel.Location = new System.Drawing.Point(659, 235);
+            this.pbWQGFDel.Location = new System.Drawing.Point(660, 235);
             this.pbWQGFDel.Name = "pbWQGFDel";
             this.pbWQGFDel.Size = new System.Drawing.Size(25, 21);
             this.pbWQGFDel.TabIndex = 109;
@@ -649,7 +655,7 @@
             this.pbDelWPZD.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWPZD.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWPZD.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWPZD.Location = new System.Drawing.Point(331, 260);
+            this.pbDelWPZD.Location = new System.Drawing.Point(332, 260);
             this.pbDelWPZD.Name = "pbDelWPZD";
             this.pbDelWPZD.Size = new System.Drawing.Size(25, 21);
             this.pbDelWPZD.TabIndex = 108;
@@ -662,7 +668,7 @@
             this.pbDelWPZF.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWPZF.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWPZF.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWPZF.Location = new System.Drawing.Point(659, 260);
+            this.pbDelWPZF.Location = new System.Drawing.Point(660, 260);
             this.pbDelWPZF.Name = "pbDelWPZF";
             this.pbDelWPZF.Size = new System.Drawing.Size(25, 21);
             this.pbDelWPZF.TabIndex = 107;
@@ -675,7 +681,7 @@
             this.pbDelWYP.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWYP.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWYP.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWYP.Location = new System.Drawing.Point(331, 186);
+            this.pbDelWYP.Location = new System.Drawing.Point(332, 186);
             this.pbDelWYP.Name = "pbDelWYP";
             this.pbDelWYP.Size = new System.Drawing.Size(25, 21);
             this.pbDelWYP.TabIndex = 106;
@@ -688,7 +694,7 @@
             this.pbDelWCS.BackgroundImage = global::HOZProject.Properties.Resources.exit_2_;
             this.pbDelWCS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbDelWCS.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pbDelWCS.Location = new System.Drawing.Point(659, 185);
+            this.pbDelWCS.Location = new System.Drawing.Point(660, 185);
             this.pbDelWCS.Name = "pbDelWCS";
             this.pbDelWCS.Size = new System.Drawing.Size(25, 21);
             this.pbDelWCS.TabIndex = 105;
@@ -700,7 +706,7 @@
             this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             this.panel2.Controls.Add(this.btnSaveDefalutPara);
             this.panel2.Controls.Add(this.btnCreateConfig);
-            this.panel2.Location = new System.Drawing.Point(0, 552);
+            this.panel2.Location = new System.Drawing.Point(0, 576);
             this.panel2.Name = "panel2";
             this.panel2.Size = new System.Drawing.Size(769, 49);
             this.panel2.TabIndex = 124;
@@ -1139,12 +1145,81 @@
             this.cbbEDSA.Size = new System.Drawing.Size(155, 25);
             this.cbbEDSA.TabIndex = 149;
             // 
+            // tbScanSpeedNormal
+            // 
+            this.tbScanSpeedNormal.Location = new System.Drawing.Point(140, 548);
+            this.tbScanSpeedNormal.Name = "tbScanSpeedNormal";
+            this.tbScanSpeedNormal.Size = new System.Drawing.Size(100, 27);
+            this.tbScanSpeedNormal.TabIndex = 155;
+            this.tbScanSpeedNormal.Text = "4";
+            this.tbScanSpeedNormal.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.tbScanSpeedNormal.Visible = false;
+            // 
+            // label24
+            // 
+            this.label24.AutoSize = true;
+            this.label24.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label24.Location = new System.Drawing.Point(495, 548);
+            this.label24.Name = "label24";
+            this.label24.Size = new System.Drawing.Size(146, 23);
+            this.label24.TabIndex = 154;
+            this.label24.Text = "高倍拍照扫描速度";
+            this.label24.Visible = false;
+            // 
+            // label25
+            // 
+            this.label25.AutoSize = true;
+            this.label25.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label25.Location = new System.Drawing.Point(43, 551);
+            this.label25.Name = "label25";
+            this.label25.Size = new System.Drawing.Size(112, 23);
+            this.label25.TabIndex = 150;
+            this.label25.Text = "正常扫描速度";
+            this.label25.Visible = false;
+            // 
+            // label26
+            // 
+            this.label26.AutoSize = true;
+            this.label26.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label26.Location = new System.Drawing.Point(270, 548);
+            this.label26.Name = "label26";
+            this.label26.Size = new System.Drawing.Size(112, 23);
+            this.label26.TabIndex = 153;
+            this.label26.Text = "对焦扫描速度";
+            this.label26.Visible = false;
+            // 
+            // tbScanSpeedFocus
+            // 
+            this.tbScanSpeedFocus.Location = new System.Drawing.Point(377, 545);
+            this.tbScanSpeedFocus.Name = "tbScanSpeedFocus";
+            this.tbScanSpeedFocus.Size = new System.Drawing.Size(100, 27);
+            this.tbScanSpeedFocus.TabIndex = 151;
+            this.tbScanSpeedFocus.Text = "5";
+            this.tbScanSpeedFocus.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.tbScanSpeedFocus.Visible = false;
+            // 
+            // tbScanSpeedHigh
+            // 
+            this.tbScanSpeedHigh.Location = new System.Drawing.Point(627, 545);
+            this.tbScanSpeedHigh.Name = "tbScanSpeedHigh";
+            this.tbScanSpeedHigh.Size = new System.Drawing.Size(100, 27);
+            this.tbScanSpeedHigh.TabIndex = 152;
+            this.tbScanSpeedHigh.Text = "7";
+            this.tbScanSpeedHigh.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.tbScanSpeedHigh.Visible = false;
+            // 
             // UControl_Init
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
             this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.Controls.Add(this.tbScanSpeedHigh);
+            this.Controls.Add(this.tbScanSpeedFocus);
+            this.Controls.Add(this.tbScanSpeedNormal);
+            this.Controls.Add(this.label24);
+            this.Controls.Add(this.label25);
+            this.Controls.Add(this.label26);
             this.Controls.Add(this.cbbEDSA);
             this.Controls.Add(this.cbbEDSV);
             this.Controls.Add(this.label22);
@@ -1230,7 +1305,7 @@
             this.Font = new System.Drawing.Font("宋体", 10F);
             this.ForeColor = System.Drawing.SystemColors.WindowText;
             this.Name = "UControl_Init";
-            this.Size = new System.Drawing.Size(769, 604);
+            this.Size = new System.Drawing.Size(770, 627);
             this.Load += new System.EventHandler(this.UControl_Init_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
@@ -1335,5 +1410,11 @@
         private System.Windows.Forms.Label label23;
         private System.Windows.Forms.ComboBox cbbEDSV;
         private System.Windows.Forms.ComboBox cbbEDSA;
+        private System.Windows.Forms.TextBox tbScanSpeedNormal;
+        private System.Windows.Forms.Label label24;
+        private System.Windows.Forms.Label label25;
+        private System.Windows.Forms.Label label26;
+        private System.Windows.Forms.TextBox tbScanSpeedFocus;
+        private System.Windows.Forms.TextBox tbScanSpeedHigh;
     }
 }

+ 31 - 0
MeasureData/MeasureParam.cs

@@ -381,8 +381,33 @@ namespace MeasureData
 
         //能谱参数
 
+        #region add by sun 2020-12-15 增加不同样品扫描速度参数
+        //正常情况下默认扫描速度
+        private String m_ScanSpeedNormal;
+        public String ScanSpeedNormal
+        {
+            get { return this.m_ScanSpeedNormal; }
+            set { this.m_ScanSpeedNormal = value; }
+        }
+        //对焦拍照扫描速度
+        private String m_ScanSpeedFocus;
+        public String ScanSpeedFocus
+        {
+            get { return this.m_ScanSpeedFocus; }
+            set { this.m_ScanSpeedFocus = value; }
+        }
+        //高倍拍照扫描速度
+        private String m_ScanSpeedHigh;
+        public String ScanSpeedHigh
+        {
+            get { return this.m_ScanSpeedHigh; }
+            set { this.m_ScanSpeedHigh = value; }
+        }
+        #endregion add by sun 2020-12-15 增加不同样品扫描速度参数end
+
         #endregion
 
+
         //构造函数
         public MeasureParam()
         {
@@ -432,6 +457,12 @@ namespace MeasureData
             this.fMagCompY4 = 0;
             this.ScanRotCor = 1;
             this.PixelSizeCor = 1;
+            //add by sun 2020-12-15 增加不同样品扫描速度参数
+            this.ScanSpeedNormal = "CMD_SCANRATE4";
+            this.ScanSpeedFocus = "CMD_SCANRATE5";
+            this.ScanSpeedHigh = "CMD_SCANRATE7";
+            //add by sun 2020-12-15 增加不同样品扫描速度参数 end
+
         }
 
         //XML文件保存测量参数

+ 15 - 15
MeasureThread/Measure.cs

@@ -1267,7 +1267,7 @@ namespace MeasureThread
                             XmlAttributeCollection attributeCol = xns.Attributes;
                             double width = Convert.ToDouble(attributeCol.GetNamedItem("width").Value) / 2.0;
                             //因为ELY文件里的矩形高就是负值,所以在下面的Y值加上这个值就好。
-                            double height = Convert.ToDouble(attributeCol.GetNamedItem("height").Value) / 2.0;
+                            double height = Convert.ToDouble(attributeCol.GetNamedItem("height").Value) / 1.5;
                             //遍历自己点属性
                             foreach (XmlAttribute attri in attributeCol)
                             {
@@ -2375,7 +2375,7 @@ namespace MeasureThread
                             iSEM.SetBrightness(currentBright + 2);
                             Thread.Sleep(200);
 
-                            iSEM.SetContrast(currentContrast + 3);
+                            iSEM.SetContrast(currentContrast + 2);//modify by sun 2020-12-16 黄工觉得太亮
                             Thread.Sleep(200);
                         }
                         #endregion
@@ -2550,7 +2550,7 @@ namespace MeasureThread
                 }
             }
 
-            // 疑问 by sun:2类样品不需要拉直
+            // by sun:2是5/6类样品不需要拉直
             if (m_measureFile.MParam.SampleName != "2")
             {
                 LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-拉直操作开始!", true);
@@ -2600,16 +2600,16 @@ namespace MeasureThread
             }
 
             //14.自动控制FIB切割    del by sun 2020-12-15 temp            
-            if (m_measureFile.MParam.Is_Photograph == false)
-            {
-                LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-14.自动控制FIB切割开始!", true);
-                if (!FIBCross())
-                {
-                    LogManager.AddHardwareLog("测量线程报错:自动控制FIB切割失败。", false);
-                    return false;
-                }
-                LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-14.自动控制FIB切割结束!", true);
-            }            
+            //if (m_measureFile.MParam.Is_Photograph == false)
+            //{
+            //    LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-14.自动控制FIB切割开始!", true);
+            //    if (!FIBCross())
+            //    {
+            //        LogManager.AddHardwareLog("测量线程报错:自动控制FIB切割失败。", false);
+            //        return false;
+            //    }
+            //    LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-14.自动控制FIB切割结束!", true);
+            //}            
             //del by sun 2020-12-15 temp end
             //判断是否停止进程
             if (key_stop)
@@ -3041,7 +3041,7 @@ namespace MeasureThread
             }
 
             //1、自动对焦
-            LogManager.AddHardwareLog("测量线程报错:拉直操作前自动对焦", true);
+            LogManager.AddHardwareLog("测量线程报错:拉直操作前自动对焦开始", true);
             iSEM.SetReduced(402, 128, 340, 256);
             Thread.Sleep(200);
             //add by sun 2020-12-15
@@ -6316,7 +6316,7 @@ namespace MeasureThread
                     iSEM.SetBrightness(currentBright + 2);
                     Thread.Sleep(200);
 
-                    iSEM.SetContrast(currentContrast + 3);
+                    iSEM.SetContrast(currentContrast + 2);//modify by sun 2020-12-16 黄工觉得太亮
                     Thread.Sleep(200);
 
                     #endregion