Selaa lähdekoodia

更新取SEM工作电压函数。完善测量线程程序。

@wang_qi0307 5 vuotta sitten
vanhempi
commit
db5b28e1a6

+ 8 - 8
HOZProject/App.config

@@ -24,24 +24,24 @@
       <!--FIB使用的ELY文件-->
       <add key="FIB_ELYFile" value=""/>
       <!--拉直操作需要的放大倍数-->
-      <add key="Stretch_Magnification" value=""/>
+      <add key="Stretch_Magnification" value="100"/>
       <!--定位切割位置的放大倍数-->
-      <add key="Location_Magnification" value=""/>
+      <add key="Location_Magnification" value="100"/>
       <!--定位切割位置的工作电压-->
-      <add key="Location_Voltage" value=""/>
+      <add key="Location_Voltage" value="2000"/>
       <!--拍照的放大倍数-->
-      <add key="Photograph_Magnification" value=""/>
+      <add key="Photograph_Magnification" value="100"/>
       <!--拍照的工作电压-->
-      <add key="Photograph_Voltage" value=""/>
+      <add key="Photograph_Voltage" value="2500"/>
       <!--校正角度选择-->
-      <add key="Correction_Angle" value=""/>
+      <add key="Correction_Angle" value="54"/>
       <!--样品类型-->
       <add key="SampleName" value=""/>
       <!--厂商-->
       <add key="Firms" value=""/>
       <!--是否仅拍照-->
-      <add key="Is_Photograph" value=""/>
+      <add key="Is_Photograph" value="True"/>
       <!--是否PT沉积-->
-      <add key="PT_Depostion" value=""/>
+      <add key="PT_Depostion" value="False"/>
     </appSettings>
 </configuration>

+ 255 - 199
HOZProject/FormUnitControl.Designer.cs

@@ -28,11 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint1 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(65D, 65D);
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint(65D, 65D);
             this.btnGrabImage = new System.Windows.Forms.Button();
             this.btnenlargeGet = new System.Windows.Forms.Button();
             this.btnWriteXml = new System.Windows.Forms.Button();
@@ -270,25 +270,29 @@
             this.btnReadConfig = new System.Windows.Forms.Button();
             this.btnCreateConfig = new System.Windows.Forms.Button();
             this.tabPage4 = new System.Windows.Forms.TabPage();
-            this.lblPs1 = new System.Windows.Forms.Label();
-            this.btnPsFile = new System.Windows.Forms.Button();
-            this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
-            this.label68 = new System.Windows.Forms.Label();
-            this.label70 = new System.Windows.Forms.Label();
-            this.label72 = new System.Windows.Forms.Label();
-            this.label74 = new System.Windows.Forms.Label();
-            this.label76 = new System.Windows.Forms.Label();
-            this.label78 = new System.Windows.Forms.Label();
-            this.txtsample1x = new System.Windows.Forms.TextBox();
-            this.txtsample1y = new System.Windows.Forms.TextBox();
-            this.txty = new System.Windows.Forms.TextBox();
-            this.txtx = new System.Windows.Forms.TextBox();
+            this.btn60 = new System.Windows.Forms.Button();
+            this.btn45 = new System.Windows.Forms.Button();
+            this.btn30 = new System.Windows.Forms.Button();
+            this.btnrect = new System.Windows.Forms.Button();
             this.txtdistance = new System.Windows.Forms.TextBox();
             this.txtarray = new System.Windows.Forms.TextBox();
-            this.btnrect = new System.Windows.Forms.Button();
-            this.btn30 = new System.Windows.Forms.Button();
-            this.btn45 = new System.Windows.Forms.Button();
-            this.btn60 = new System.Windows.Forms.Button();
+            this.txty = new System.Windows.Forms.TextBox();
+            this.txtx = new System.Windows.Forms.TextBox();
+            this.txtsample1y = new System.Windows.Forms.TextBox();
+            this.txtsample1x = new System.Windows.Forms.TextBox();
+            this.label76 = new System.Windows.Forms.Label();
+            this.label78 = new System.Windows.Forms.Label();
+            this.label74 = new System.Windows.Forms.Label();
+            this.label72 = new System.Windows.Forms.Label();
+            this.label70 = new System.Windows.Forms.Label();
+            this.label68 = new System.Windows.Forms.Label();
+            this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.lblPs1 = new System.Windows.Forms.Label();
+            this.btnPsFile = new System.Windows.Forms.Button();
+            this.button1 = new System.Windows.Forms.Button();
+            this.txtVoltage = new System.Windows.Forms.TextBox();
+            this.button2 = new System.Windows.Forms.Button();
+            this.label67 = new System.Windows.Forms.Label();
             this.panelControl.SuspendLayout();
             this.panelSEM.SuspendLayout();
             this.panelFIB.SuspendLayout();
@@ -1112,6 +1116,10 @@
             // 
             // panelSEM
             // 
+            this.panelSEM.Controls.Add(this.button1);
+            this.panelSEM.Controls.Add(this.txtVoltage);
+            this.panelSEM.Controls.Add(this.button2);
+            this.panelSEM.Controls.Add(this.label67);
             this.panelSEM.Controls.Add(this.btnScanRotationSetOn);
             this.panelSEM.Controls.Add(this.btnTiltAngleSetOn);
             this.panelSEM.Controls.Add(this.panelFIB);
@@ -3038,111 +3046,105 @@
             this.tabPage4.Text = "自动计算坐标";
             this.tabPage4.UseVisualStyleBackColor = true;
             // 
-            // lblPs1
+            // btn60
             // 
-            this.lblPs1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.lblPs1.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.lblPs1.ForeColor = System.Drawing.Color.Blue;
-            this.lblPs1.Location = new System.Drawing.Point(229, 22);
-            this.lblPs1.Name = "lblPs1";
-            this.lblPs1.Size = new System.Drawing.Size(107, 38);
-            this.lblPs1.TabIndex = 0;
-            this.lblPs1.Text = "0,0";
-            this.lblPs1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            this.btn60.Location = new System.Drawing.Point(476, 201);
+            this.btn60.Name = "btn60";
+            this.btn60.Size = new System.Drawing.Size(81, 38);
+            this.btn60.TabIndex = 76;
+            this.btn60.Text = "60度";
+            this.btn60.UseVisualStyleBackColor = true;
+            this.btn60.Click += new System.EventHandler(this.btn60_Click);
             // 
-            // btnPsFile
+            // btn45
             // 
-            this.btnPsFile.Location = new System.Drawing.Point(32, 22);
-            this.btnPsFile.Name = "btnPsFile";
-            this.btnPsFile.Size = new System.Drawing.Size(127, 38);
-            this.btnPsFile.TabIndex = 1;
-            this.btnPsFile.Text = "打开位置文件";
-            this.btnPsFile.UseVisualStyleBackColor = true;
-            this.btnPsFile.Click += new System.EventHandler(this.btnPsFile_Click);
+            this.btn45.Location = new System.Drawing.Point(476, 148);
+            this.btn45.Name = "btn45";
+            this.btn45.Size = new System.Drawing.Size(81, 38);
+            this.btn45.TabIndex = 75;
+            this.btn45.Text = "45度";
+            this.btn45.UseVisualStyleBackColor = true;
+            this.btn45.Click += new System.EventHandler(this.btn45_Click);
             // 
-            // chart1
+            // btn30
             // 
-            chartArea1.AxisX.IntervalAutoMode = System.Windows.Forms.DataVisualization.Charting.IntervalAutoMode.VariableCount;
-            chartArea1.AxisX.MajorGrid.Enabled = false;
-            chartArea1.AxisX.Maximum = 130D;
-            chartArea1.AxisX.Minimum = 0D;
-            chartArea1.AxisY.MajorGrid.Enabled = false;
-            chartArea1.AxisY.Maximum = 130D;
-            chartArea1.AxisY.Minimum = 0D;
-            chartArea1.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
-            chartArea1.Name = "ChartArea1";
-            chartArea1.Position.Auto = false;
-            chartArea1.Position.Height = 94F;
-            chartArea1.Position.Width = 94F;
-            this.chart1.ChartAreas.Add(chartArea1);
-            legend1.Enabled = false;
-            legend1.Name = "Legend1";
-            this.chart1.Legends.Add(legend1);
-            this.chart1.Location = new System.Drawing.Point(667, 6);
-            this.chart1.Name = "chart1";
-            series1.ChartArea = "ChartArea1";
-            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
-            series1.IsValueShownAsLabel = true;
-            series1.Legend = "Legend1";
-            series1.MarkerBorderColor = System.Drawing.Color.Red;
-            series1.MarkerColor = System.Drawing.Color.White;
-            series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
-            series1.Name = "Series1";
-            series2.ChartArea = "ChartArea1";
-            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
-            series2.Legend = "Legend1";
-            series2.MarkerBorderColor = System.Drawing.Color.Black;
-            series2.MarkerColor = System.Drawing.Color.Black;
-            series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Square;
-            series2.Name = "Series2";
-            dataPoint1.MarkerBorderWidth = 3;
-            dataPoint1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Star4;
-            series2.Points.Add(dataPoint1);
-            this.chart1.Series.Add(series1);
-            this.chart1.Series.Add(series2);
-            this.chart1.Size = new System.Drawing.Size(590, 557);
-            this.chart1.TabIndex = 2;
-            this.chart1.Text = "chart1";
+            this.btn30.Location = new System.Drawing.Point(476, 96);
+            this.btn30.Name = "btn30";
+            this.btn30.Size = new System.Drawing.Size(81, 38);
+            this.btn30.TabIndex = 74;
+            this.btn30.Text = "30度";
+            this.btn30.UseVisualStyleBackColor = true;
+            this.btn30.Click += new System.EventHandler(this.btn30_Click);
             // 
-            // label68
+            // btnrect
             // 
-            this.label68.AutoSize = true;
-            this.label68.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label68.Location = new System.Drawing.Point(47, 209);
-            this.label68.Name = "label68";
-            this.label68.Size = new System.Drawing.Size(146, 27);
-            this.label68.TabIndex = 54;
-            this.label68.Text = "中心点X轴坐标";
+            this.btnrect.Location = new System.Drawing.Point(51, 472);
+            this.btnrect.Name = "btnrect";
+            this.btnrect.Size = new System.Drawing.Size(127, 38);
+            this.btnrect.TabIndex = 73;
+            this.btnrect.Text = "计算显示";
+            this.btnrect.UseVisualStyleBackColor = true;
+            this.btnrect.Click += new System.EventHandler(this.btnrect_Click);
             // 
-            // label70
+            // txtdistance
             // 
-            this.label70.AutoSize = true;
-            this.label70.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label70.Location = new System.Drawing.Point(47, 260);
-            this.label70.Name = "label70";
-            this.label70.Size = new System.Drawing.Size(145, 27);
-            this.label70.TabIndex = 56;
-            this.label70.Text = "中心点Y轴坐标";
+            this.txtdistance.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtdistance.Location = new System.Drawing.Point(307, 367);
+            this.txtdistance.Name = "txtdistance";
+            this.txtdistance.Size = new System.Drawing.Size(100, 28);
+            this.txtdistance.TabIndex = 72;
+            this.txtdistance.Text = "30";
+            this.txtdistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
-            // label72
+            // txtarray
             // 
-            this.label72.AutoSize = true;
-            this.label72.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label72.Location = new System.Drawing.Point(47, 314);
-            this.label72.Name = "label72";
-            this.label72.Size = new System.Drawing.Size(152, 27);
-            this.label72.TabIndex = 58;
-            this.label72.Text = "默认样品排列数";
+            this.txtarray.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtarray.Location = new System.Drawing.Point(307, 316);
+            this.txtarray.Name = "txtarray";
+            this.txtarray.Size = new System.Drawing.Size(100, 28);
+            this.txtarray.TabIndex = 71;
+            this.txtarray.Text = "4";
+            this.txtarray.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
-            // label74
+            // txty
             // 
-            this.label74.AutoSize = true;
-            this.label74.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label74.Location = new System.Drawing.Point(47, 367);
-            this.label74.Name = "label74";
-            this.label74.Size = new System.Drawing.Size(112, 27);
-            this.label74.TabIndex = 60;
-            this.label74.Text = "样品间距离";
+            this.txty.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txty.Location = new System.Drawing.Point(307, 262);
+            this.txty.Name = "txty";
+            this.txty.Size = new System.Drawing.Size(100, 28);
+            this.txty.TabIndex = 70;
+            this.txty.Text = "65";
+            this.txty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtx
+            // 
+            this.txtx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtx.Location = new System.Drawing.Point(307, 211);
+            this.txtx.Name = "txtx";
+            this.txtx.Size = new System.Drawing.Size(100, 28);
+            this.txtx.TabIndex = 69;
+            this.txtx.Text = "65";
+            this.txtx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtsample1y
+            // 
+            this.txtsample1y.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtsample1y.Location = new System.Drawing.Point(307, 154);
+            this.txtsample1y.Name = "txtsample1y";
+            this.txtsample1y.Size = new System.Drawing.Size(100, 28);
+            this.txtsample1y.TabIndex = 68;
+            this.txtsample1y.Text = "130";
+            this.txtsample1y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // txtsample1x
+            // 
+            this.txtsample1x.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtsample1x.Location = new System.Drawing.Point(307, 103);
+            this.txtsample1x.Name = "txtsample1x";
+            this.txtsample1x.Size = new System.Drawing.Size(100, 28);
+            this.txtsample1x.TabIndex = 67;
+            this.txtsample1x.Text = "0";
+            this.txtsample1x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // label76
             // 
@@ -3164,105 +3166,155 @@
             this.label78.TabIndex = 63;
             this.label78.Text = "样品1-X轴坐标";
             // 
-            // txtsample1x
-            // 
-            this.txtsample1x.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtsample1x.Location = new System.Drawing.Point(307, 103);
-            this.txtsample1x.Name = "txtsample1x";
-            this.txtsample1x.Size = new System.Drawing.Size(100, 28);
-            this.txtsample1x.TabIndex = 67;
-            this.txtsample1x.Text = "0";
-            this.txtsample1x.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // txtsample1y
-            // 
-            this.txtsample1y.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtsample1y.Location = new System.Drawing.Point(307, 154);
-            this.txtsample1y.Name = "txtsample1y";
-            this.txtsample1y.Size = new System.Drawing.Size(100, 28);
-            this.txtsample1y.TabIndex = 68;
-            this.txtsample1y.Text = "130";
-            this.txtsample1y.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
-            // 
-            // txty
-            // 
-            this.txty.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txty.Location = new System.Drawing.Point(307, 262);
-            this.txty.Name = "txty";
-            this.txty.Size = new System.Drawing.Size(100, 28);
-            this.txty.TabIndex = 70;
-            this.txty.Text = "65";
-            this.txty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label74
             // 
-            // txtx
+            this.label74.AutoSize = true;
+            this.label74.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label74.Location = new System.Drawing.Point(47, 367);
+            this.label74.Name = "label74";
+            this.label74.Size = new System.Drawing.Size(112, 27);
+            this.label74.TabIndex = 60;
+            this.label74.Text = "样品间距离";
             // 
-            this.txtx.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtx.Location = new System.Drawing.Point(307, 211);
-            this.txtx.Name = "txtx";
-            this.txtx.Size = new System.Drawing.Size(100, 28);
-            this.txtx.TabIndex = 69;
-            this.txtx.Text = "65";
-            this.txtx.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label72
             // 
-            // txtdistance
+            this.label72.AutoSize = true;
+            this.label72.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label72.Location = new System.Drawing.Point(47, 314);
+            this.label72.Name = "label72";
+            this.label72.Size = new System.Drawing.Size(152, 27);
+            this.label72.TabIndex = 58;
+            this.label72.Text = "默认样品排列数";
             // 
-            this.txtdistance.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtdistance.Location = new System.Drawing.Point(307, 367);
-            this.txtdistance.Name = "txtdistance";
-            this.txtdistance.Size = new System.Drawing.Size(100, 28);
-            this.txtdistance.TabIndex = 72;
-            this.txtdistance.Text = "30";
-            this.txtdistance.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label70
             // 
-            // txtarray
+            this.label70.AutoSize = true;
+            this.label70.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label70.Location = new System.Drawing.Point(47, 260);
+            this.label70.Name = "label70";
+            this.label70.Size = new System.Drawing.Size(145, 27);
+            this.label70.TabIndex = 56;
+            this.label70.Text = "中心点Y轴坐标";
             // 
-            this.txtarray.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.txtarray.Location = new System.Drawing.Point(307, 316);
-            this.txtarray.Name = "txtarray";
-            this.txtarray.Size = new System.Drawing.Size(100, 28);
-            this.txtarray.TabIndex = 71;
-            this.txtarray.Text = "4";
-            this.txtarray.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // label68
             // 
-            // btnrect
+            this.label68.AutoSize = true;
+            this.label68.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label68.Location = new System.Drawing.Point(47, 209);
+            this.label68.Name = "label68";
+            this.label68.Size = new System.Drawing.Size(146, 27);
+            this.label68.TabIndex = 54;
+            this.label68.Text = "中心点X轴坐标";
             // 
-            this.btnrect.Location = new System.Drawing.Point(51, 472);
-            this.btnrect.Name = "btnrect";
-            this.btnrect.Size = new System.Drawing.Size(127, 38);
-            this.btnrect.TabIndex = 73;
-            this.btnrect.Text = "计算显示";
-            this.btnrect.UseVisualStyleBackColor = true;
-            this.btnrect.Click += new System.EventHandler(this.btnrect_Click);
+            // chart1
             // 
-            // btn30
+            chartArea2.AxisX.IntervalAutoMode = System.Windows.Forms.DataVisualization.Charting.IntervalAutoMode.VariableCount;
+            chartArea2.AxisX.MajorGrid.Enabled = false;
+            chartArea2.AxisX.Maximum = 130D;
+            chartArea2.AxisX.Minimum = 0D;
+            chartArea2.AxisY.MajorGrid.Enabled = false;
+            chartArea2.AxisY.Maximum = 130D;
+            chartArea2.AxisY.Minimum = 0D;
+            chartArea2.BorderDashStyle = System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
+            chartArea2.Name = "ChartArea1";
+            chartArea2.Position.Auto = false;
+            chartArea2.Position.Height = 94F;
+            chartArea2.Position.Width = 94F;
+            this.chart1.ChartAreas.Add(chartArea2);
+            legend2.Enabled = false;
+            legend2.Name = "Legend1";
+            this.chart1.Legends.Add(legend2);
+            this.chart1.Location = new System.Drawing.Point(667, 6);
+            this.chart1.Name = "chart1";
+            series3.ChartArea = "ChartArea1";
+            series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+            series3.IsValueShownAsLabel = true;
+            series3.Legend = "Legend1";
+            series3.MarkerBorderColor = System.Drawing.Color.Red;
+            series3.MarkerColor = System.Drawing.Color.White;
+            series3.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
+            series3.Name = "Series1";
+            series4.ChartArea = "ChartArea1";
+            series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
+            series4.Legend = "Legend1";
+            series4.MarkerBorderColor = System.Drawing.Color.Black;
+            series4.MarkerColor = System.Drawing.Color.Black;
+            series4.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Square;
+            series4.Name = "Series2";
+            dataPoint2.MarkerBorderWidth = 3;
+            dataPoint2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Star4;
+            series4.Points.Add(dataPoint2);
+            this.chart1.Series.Add(series3);
+            this.chart1.Series.Add(series4);
+            this.chart1.Size = new System.Drawing.Size(590, 557);
+            this.chart1.TabIndex = 2;
+            this.chart1.Text = "chart1";
             // 
-            this.btn30.Location = new System.Drawing.Point(476, 96);
-            this.btn30.Name = "btn30";
-            this.btn30.Size = new System.Drawing.Size(81, 38);
-            this.btn30.TabIndex = 74;
-            this.btn30.Text = "30度";
-            this.btn30.UseVisualStyleBackColor = true;
-            this.btn30.Click += new System.EventHandler(this.btn30_Click);
+            // lblPs1
             // 
-            // btn45
+            this.lblPs1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.lblPs1.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lblPs1.ForeColor = System.Drawing.Color.Blue;
+            this.lblPs1.Location = new System.Drawing.Point(229, 22);
+            this.lblPs1.Name = "lblPs1";
+            this.lblPs1.Size = new System.Drawing.Size(107, 38);
+            this.lblPs1.TabIndex = 0;
+            this.lblPs1.Text = "0,0";
+            this.lblPs1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
-            this.btn45.Location = new System.Drawing.Point(476, 148);
-            this.btn45.Name = "btn45";
-            this.btn45.Size = new System.Drawing.Size(81, 38);
-            this.btn45.TabIndex = 75;
-            this.btn45.Text = "45度";
-            this.btn45.UseVisualStyleBackColor = true;
-            this.btn45.Click += new System.EventHandler(this.btn45_Click);
+            // btnPsFile
             // 
-            // btn60
+            this.btnPsFile.Location = new System.Drawing.Point(32, 22);
+            this.btnPsFile.Name = "btnPsFile";
+            this.btnPsFile.Size = new System.Drawing.Size(127, 38);
+            this.btnPsFile.TabIndex = 1;
+            this.btnPsFile.Text = "打开位置文件";
+            this.btnPsFile.UseVisualStyleBackColor = true;
+            this.btnPsFile.Click += new System.EventHandler(this.btnPsFile_Click);
             // 
-            this.btn60.Location = new System.Drawing.Point(476, 201);
-            this.btn60.Name = "btn60";
-            this.btn60.Size = new System.Drawing.Size(81, 38);
-            this.btn60.TabIndex = 76;
-            this.btn60.Text = "60度";
-            this.btn60.UseVisualStyleBackColor = true;
-            this.btn60.Click += new System.EventHandler(this.btn60_Click);
+            // button1
+            // 
+            this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button1.Location = new System.Drawing.Point(693, 365);
+            this.button1.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(54, 34);
+            this.button1.TabIndex = 97;
+            this.button1.Text = "写";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // txtVoltage
+            // 
+            this.txtVoltage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.txtVoltage.Location = new System.Drawing.Point(551, 367);
+            this.txtVoltage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.txtVoltage.Name = "txtVoltage";
+            this.txtVoltage.Size = new System.Drawing.Size(85, 30);
+            this.txtVoltage.TabIndex = 96;
+            this.txtVoltage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // button2
+            // 
+            this.button2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button2.Location = new System.Drawing.Point(640, 365);
+            this.button2.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(54, 34);
+            this.button2.TabIndex = 94;
+            this.button2.Text = "读";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // label67
+            // 
+            this.label67.AutoSize = true;
+            this.label67.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label67.Location = new System.Drawing.Point(469, 369);
+            this.label67.Name = "label67";
+            this.label67.Size = new System.Drawing.Size(72, 27);
+            this.label67.TabIndex = 95;
+            this.label67.Text = "电压:";
             // 
             // FormUnitControl
             // 
@@ -3553,6 +3605,10 @@
         private System.Windows.Forms.Button btn60;
         private System.Windows.Forms.Button btn45;
         private System.Windows.Forms.Button btn30;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.TextBox txtVoltage;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Label label67;
     }
 }
 

+ 25 - 0
HOZProject/FormUnitControl.cs

@@ -1617,5 +1617,30 @@ namespace HOZProject
             txtsample1y.Text = "108.3";
             btnrect_Click(null, null);
         }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            float ret = iSEM.GetSEMVoltage();
+            if (float.IsNaN(ret))
+            {
+                txtVoltage.Text = "NaN";
+                txtVoltage.Enabled = false;
+                button2.Enabled = false;
+            }
+            else
+            {
+                txtVoltage.Text = ret.ToString();
+                button2.Enabled = true;
+            }
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            float set = 0;
+            if (float.TryParse(txtVoltage.Text, out set))
+            {
+                iSEM.SetSEMVoltage(set);
+            }
+        }
     }
 }

+ 26 - 14
MeasureThread/Measure.cs

@@ -43,23 +43,16 @@ namespace MeasureThread
         }
         private DateTime m_time;
 
-        public int Step_Code
+        public String Step_Code
         {
             get { return step_Code; }
             set { step_Code = value; }
         }
-        private int step_Code;
+        private String step_Code;
 
         //图片信息
         public class PictureInformation
         {
-            public Boolean Is_Picture
-            {
-                get { return is_Picture; }
-                set { is_Picture = value; }
-            }
-            private Boolean is_Picture;
-
             public String Picture_FullPath
             {
                 get { return picture_FullPath; }
@@ -309,17 +302,22 @@ namespace MeasureThread
                 private int state;
             }
         }
+        //图像信息实例类
+        public ImageInformation Image_Information
+        {
+            get { return image_Information; }
+            set { image_Information = value; }
+        }
+        private ImageInformation image_Information;
 
         public ThreadStatusEventArgs(string a_State)
         {
             this.m_state = a_State;
             picture_Information = new PictureInformation();
+            image_Information = new ImageInformation();
         }
     }
 
-
-
-
     public class CutHolesStatusEventArgs
     {
         public string State
@@ -451,10 +449,24 @@ namespace MeasureThread
             return true;
         }
 
-        public void SendMsg(string a_StrMsg)
+        public void SendMsg(string step_code)
         {
-            ThreadStatusEventArgs arg = new ThreadStatusEventArgs(a_StrMsg);
+            ThreadStatusEventArgs arg = new ThreadStatusEventArgs(step_code);
             arg.Time = DateTime.Now;
+            switch(step_code)
+            {
+                //拍照
+                case "1-3":
+                    //电压、放大倍数、工作距离、位置信息、图片路径
+                    arg.Picture_Information.Work_Voltage = iSEM.GetSEMVoltage();
+                    arg.Picture_Information.Work_Status = "SEM";
+                    arg.Picture_Information.Work_Distance = iSEM.GetWorkingDistance();
+                    arg.Picture_Information.Magnification = iSEM.GetMagnification();
+                    break;
+                case "1-1":
+
+                    break;
+            }
             SendThreadStatus(this, arg);
         }
         public void SendCutHoleMsg(string a_state, string a_holeName)

+ 4 - 0
SmartSEMControl/HardwareInterface.cs

@@ -79,6 +79,10 @@ namespace SmartSEMControl
         Boolean SetAutoVideoContrast();
         Boolean SetAutoVideoBrightnessAndContrast();
 
+        //SEM电压
+        float GetSEMVoltage();
+        Boolean SetSEMVoltage(float set);
+
         //消像散
         float GetAstigmatismX();
         float GetAstigmatismY();

+ 36 - 0
SmartSEMControl/SmartSEM.cs

@@ -178,6 +178,9 @@ namespace SmartSEMControl
         private readonly String AP_FIB_BEAM_SHIFT_X = "AP_FIB_BEAM_SHIFT_X";
         //FIB光束移动Y
         private readonly String AP_FIB_BEAM_SHIFT_Y = "AP_FIB_BEAM_SHIFT_Y";
+
+        //SEM电压
+        private readonly String AP_MANUALKV = "AP_MANUALKV";
         #endregion
 
         #region 数字参数
@@ -923,6 +926,39 @@ namespace SmartSEMControl
         }
         #endregion
 
+        #region SEM电压
+        /// <summary>
+        /// 读取电压
+        /// </summary>
+        /// <returns>true:float or false:NaN</returns>
+        public float GetSEMVoltage()
+        {
+            float ret = 0;
+            if (ReadParams(AP_MANUALKV, ref ret))
+            {
+                LogManager.AddHardwareLog("SEM_Voltage " + ret.ToString() + " Success!", true);
+                return ret;
+            }
+            else
+            {
+                LogManager.AddHardwareLog("SEM_Voltage Faild!", false);
+                return float.NaN;
+            }
+        }
+
+        /// <summary>
+        /// 设置电压
+        /// </summary>
+        /// <param name="set">电压</param>
+        /// <returns>true or false</returns>
+        public Boolean SetSEMVoltage(float set)
+        {
+            Boolean ret = WriteParams(AP_MANUALKV, set);
+            LogManager.AddHardwareLog("SetSEMVoltage = " + set.ToString(), ret);
+            return ret;
+        }
+        #endregion
+
         #region 抓取图像
         /// <summary>
         /// 抓取图像