Browse Source

Merge branch 'EDS' into zjx

# Conflicts:
#	HOZProject/FormHOZMain.Designer.cs
zhangjiaxin 4 years ago
parent
commit
4cbf8639d9

+ 4 - 4
DBManager/MeasureDB.cs

@@ -42,7 +42,7 @@ namespace DBManager
             string savePath = m_measureFile.FilePath;
             //数据库名称
             string dbFileName = "MeasureDB.db";
-            path = savePath +"//"+ dbFileName;
+            path = savePath + dbFileName;
 
             //if (File.Exists(path))
             //{
@@ -314,12 +314,12 @@ namespace DBManager
 
                     sql = "INSERT INTO AreaPosition(XrayID, AID, SegNum, SegID, X, Y, Length) values ("
                        + XrayId.ToString() + ","
-                       + (-1).ToString() + ","
+                       + PointsId.ToString() + ","
                        + (-1).ToString() + ","
                        + (-1).ToString() + ","
                        + X.ToString() + ","
                        + Y.ToString() + ","
-                       + (-1).ToString() + ")";
+                       + (0).ToString() + ")";
 
                     command = new SQLiteCommand(sql, m_db);
                     command.ExecuteNonQuery();
@@ -387,7 +387,7 @@ namespace DBManager
 
                     sql = "INSERT INTO AreaPosition(XrayID, AID, SegNum, SegID, X, Y, Length) values ("
                        + XrayId.ToString() + ","
-                       + AreaId.ToString() + ","
+                       + PointsId.ToString() + ","
                        + listSeg.Count.ToString() + ","
                        + i.ToString() + ","
                        + seg.X.ToString() + ","

+ 8 - 18
ExtenderControl/Extender.cs

@@ -1146,6 +1146,7 @@ namespace Extender
         private byte[] m_ImageBit = null;
         private long m_nImageWidth = 0;
         private long m_nImageHeight = 0;
+        private double m_dImagePixelsize = 0;//it will be initialized when we get an image from the EDS.
         bool m_bAcquistionDone = false;
         private Bitmap m_Bitmap = null;
 
@@ -1185,7 +1186,7 @@ namespace Extender
         {
             IElectronImage electronImage = e.Value[0];
 
-            if (!ReadImageData(electronImage, out m_ImageBit, out m_nImageWidth, out m_nImageHeight))
+            if (!ReadImageData(electronImage, out m_ImageBit, out m_nImageWidth, out m_nImageHeight,out m_dImagePixelsize))
             {
                 MessageBox.Show("图像采集完成,获取图像像素失败!");
             }
@@ -1197,10 +1198,11 @@ namespace Extender
         }
 
 
-        bool ReadImageData(IElectronImage a_electronImage, out Byte[] a_pImageBits, out long a_nImageHeight, out long a_nImageWidth)
+        bool ReadImageData(IElectronImage a_electronImage, out Byte[] a_pImageBits, out long a_nImageHeight, out long a_nImageWidth,out double a_nPixelSize)
         {
             a_nImageHeight = 0;
             a_nImageWidth = 0;
+            a_nPixelSize = 0;
             a_pImageBits = null;
 
             if (a_electronImage == null)
@@ -1210,6 +1212,7 @@ namespace Extender
 
             a_nImageHeight = a_electronImage.Height;
             a_nImageWidth = a_electronImage.Width;
+            a_nPixelSize = a_electronImage.PixelSize;
 
             int nBytesPerPixel = a_electronImage.BytesPerPixel;
             long nImageSize = a_nImageHeight * a_nImageWidth;
@@ -1519,25 +1522,12 @@ namespace Extender
             EdSpectrumSettings.EdSettings.EnergyRange = 20;
             EdSpectrumSettings.EdSettings.NumberOfChannels = 4096;
 
-            EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreateFullFieldRegion(1.0 / 1024.0);
+            //EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreateFullFieldRegion(1.0 / 1024.0);
         }
 
         void SetPointAcquistionRegion(double a_nX, double a_nY)
         {
-            //Chord chord = new Chord(a_nX, a_nY, 1);
-            //List < Chord > chords = new List < Chord> ();
-            //chords.Add(chord);
-
-            //ChordList chordsList = null;
-            //if (m_nImageWidth != 0)
-            //{
-            //    chordsList = new ChordList(chords, 1 / (double)m_nImageWidth);
-            //}
-            //else
-            //{
-            //    chordsList = new ChordList(chords, 1 / 1024.0);
-            //}
-            //EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreateChordListRegion(chordsList);
+            
             EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreatePointRegion(new System.Windows.Point(a_nX, a_nY));
         }
 
@@ -1719,7 +1709,7 @@ namespace Extender
            
             SetXrayAcquisitionParam(ref dMilliSecondsTime);
           
-            SetPointAcquistionRegion(x, y);
+            SetPointAcquistionRegion(x*m_dImagePixelsize, y*m_dImagePixelsize);
             NLog.Logger log = NLog.LogManager.GetCurrentClassLogger();
             log.Info("开始XrayStartAcquisition:t="+dMilliSecondsTime.ToString()+"pos="+"("+x.ToString()+","+y.ToString()+")");
 

+ 209 - 0
HOZProject.exe.config

@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
+    </startup>
+    <appSettings>
+        <add key="Firm" value="Noah-BOE,LG,SDC,Ocean-BOE,N-BOE" />
+        <add key="Sample_Type" value="0,1,2,3,4,5" />
+        <add key="WPZD" value="100,200,300,2500,2000,5000" />
+        <add key="WPZF" value="100,200,300,2000,5000" />
+        <add key="WQGD" value="100,200,300,2000,5000" />
+        <add key="WQGF" value="100,200,300,1500,500" />
+        <add key="WLZ" value="100,200,300,1500,500" />
+        <add key="WFIB" value="100,200,300,1500" />
+        <add key="TemplateFilePath" value="D:\HOZ1.0\TemplateFilePath" />
+        <add key="PT_ELYFile" value="\\192.168.1.101\fib auto\FIB Recipe\AA Hole\1-01waigelizhu-pt.ely" />
+        <add key="FIB_ELYFile" value="\\192.168.1.101\fib auto\FIB Recipe\pad Bending\4-pad bending.ely" />
+        <add key="Stretch_Magnification" value="200" />
+        <add key="Location_Magnification" value="200" />
+        <add key="Location_Voltage" value="2000" />
+        <add key="Photograph_Magnification" value="2000" />
+        <add key="Photograph_Voltage" value="2000" />
+        <add key="Correction_Angle" value="36" />
+        <add key="SampleName" value="2" />
+        <add key="Firms" value="Noah-BOE" />
+        <add key="Is_Title" value="True" />
+        <add key="Is_Photograph" value="False" />
+        <add key="PT_Depostion" value="False" />
+        <add key="Is_EDS" value="True" />
+        <add key="EDS_Z" value="37.241" />
+        <add key="EDS_V" value="7000" />
+        <add key="EDS_A" value="0.5" />
+        <add key="EDS_XrayMode" value="0" />
+        <add key="FIB_Magnification" value="0" />
+        <add key="ZDistance" value="5" />
+        <add key="FH_Magnification" value="1500" />
+        <add key="FH_Voltage" value="3000" />
+        <add key="Is_FIBDo" value="True" />
+        <add key="Is_FIBAutoBc" value="True" />
+        <add key="FIBB" value="50" />
+        <add key="FIBC" value="50" />
+        <add key="MagComp" value="True" />
+        <add key="MagRange1" value="0" />
+        <add key="MagRange2" value="0" />
+        <add key="MagRange3" value="3" />
+        <add key="MagCompX1" value="11" />
+        <add key="MagCompX2" value="12" />
+        <add key="MagCompX3" value="13" />
+        <add key="MagCompY1" value="21" />
+        <add key="MagCompY2" value="22" />
+        <add key="MagCompY3" value="23" />
+        <add key="ScanRotCur" value="1" />
+        <add key="PixelSize_Y_Cur" value="1.236" />
+        <add key="Focus_Mode" value="2" />
+        <add key="Hand_Intervene" value="2" />
+        <add key="WebServerIP" value="127.0.0.1" />
+        <add key="WebServerPort" value="8009" />
+        <add key="WebServerUrl" value="FIB_degree_recognize,FIB_cal_cut_location,FIB_verify,FIB_cut_center_location,FIB_sharpness,FIB_sharpness,FIB_degree_recognize_trap,FIB_measure_location,FIB_measure_parameter,FIB_EDS_points,FIB_EDS_lines,FIB_EDS_areas" />
+        <add key="Focus_UP" value="3000" />
+        <add key="Focus_Down" value="4000" />
+        <add key="Focus_Step" value="1000" />
+        <add key="Focus_Range" value="50" />
+        <add key="Focus_FStep" value="50" />
+        <add key="FIB_UP" value="300" />
+        <add key="FIB_Down" value="300" />
+        <add key="FIB_Step" value="100" />
+        <add key="FIB_Range" value="150" />
+        <add key="FIB_FStep" value="50" />
+        <add key="StigX_UP" value="-1000" />
+        <add key="StigX_Down" value="1000" />
+        <add key="StigX_Step" value="1000" />
+        <add key="StigX_Range" value="1000" />
+        <add key="StigX_FStep" value="50" />
+        <add key="StigY_UP" value="-1000" />
+        <add key="StigY_Down" value="1000" />
+        <add key="StigY_Step" value="1000" />
+        <add key="StigY_Range" value="1000" />
+        <add key="StigY_FStep" value="50" />
+        <add key="distance" value="30" />
+        <add key="rag" value="4" />
+        <add key="X_min" value="0" />
+        <add key="X_max" value="0.13" />
+        <add key="Y_min" value="0" />
+        <add key="Y_max" value="0.13" />
+        <add key="Z_min" value="0" />
+        <add key="Z_max" value="0.05" />
+        <add key="T_min" value="-4" />
+        <add key="T_max" value="70" />
+        <add key="R_min" value="-380" />
+        <add key="R_max" value="380" />
+        <add key="M_min" value="0" />
+        <add key="M_max" value="0.012" />
+        <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 key="ScanSpeedNormal_0" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_0" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_0" value="CMD_SCANRATE7" />
+        <add key="ScanSpeedNormal_1" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_1" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_1" value="CMD_SCANRATE7" />
+        <add key="ScanSpeedNormal_2" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_2" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_2" value="CMD_SCANRATE7" />
+        <add key="ScanSpeedNormal_3" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_3" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_3" value="CMD_SCANRATE7" />
+		
+		<add key="ScanSpeedNormal_4" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_4" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_4" value="CMD_SCANRATE7" />
+		<add key="ScanSpeedNormal_5" value="CMD_SCANRATE4" />
+        <add key="ScanSpeedFocus_5" value="CMD_SCANRATE5" />
+        <add key="ScanSpeedHigh_5" value="CMD_SCANRATE7" />
+		
+        <add key="IsCutingForDebug" value="true" />
+        <add key="IsonlyEDSForDebug" value="true" />
+        <add key="VendorType0" value="Ocean-BOE" />
+        <add key="VendorType1" value="Ocean-BOE" />
+        <add key="VendorType2" value="Ocean-BOE" />
+        <add key="VendorType3" value="Noah-BOE" />		
+		 <add key="VendorType4" value="Ocean-BOE" />
+        <add key="VendorType5" value="Noah-BOE" />
+		
+        <add key="CorrectionType0" value="截面观测" />
+        <add key="CorrectionType1" value="截面观测" />
+        <add key="CorrectionType2" value="截面观测" />
+        <add key="CorrectionType3" value="截面观测" />
+		<add key="CorrectionType4" value="截面观测" />
+        <add key="CorrectionType5" value="截面观测" />
+		
+        <add key="StraightenTimesType0" value="1500" />
+        <add key="StraightenTimesType1" value="300" />
+        <add key="StraightenTimesType2" value="200" />
+        <add key="StraightenTimesType3" value="500" />
+		<add key="StraightenTimesType4" value="500" />
+        <add key="StraightenTimesType5" value="500" />
+		
+        <add key="PositioningVoltageeType0" value="2000" />
+        <add key="PositioningVoltageeType1" value="2000" />
+        <add key="PositioningVoltageeType2" value="2000" />
+        <add key="PositioningVoltageeType3" value="5000" />
+		<add key="PositioningVoltageeType4" value="5000" />
+        <add key="PositioningVoltageeType5" value="5000" />
+		
+        <add key="PositioningTimesType0" value="1500" />
+        <add key="PositioningTimesType1" value="300" />
+        <add key="PositioningTimesType2" value="200" />
+        <add key="PositioningTimesType3" value="500" />
+		<add key="PositioningTimesType4" value="500" />
+        <add key="PositioningTimesType5" value="500" />
+		
+        <add key="PhotoVoltageeType0" value="2000" />
+        <add key="PhotoVoltageeType1" value="2000" />
+        <add key="PhotoVoltageeType2" value="2000" />
+        <add key="PhotoVoltageeType3" value="5000" />
+		<add key="PhotoVoltageeType4" value="5000" />
+        <add key="PhotoVoltageeType5" value="5000" />
+		
+        <add key="PhotoTimesType0" value="2000" />
+        <add key="PhotoTimesType1" value="2000" />
+        <add key="PhotoTimesType2" value="2000" />
+        <add key="PhotoTimesType3" value="5000" />
+		<add key="PhotoTimesType4" value="5000" />
+        <add key="PhotoTimesType5" value="5000" />
+		
+        <add key="ScanRotateType0" value="1" />
+        <add key="ScanRotateType1" value="1" />
+        <add key="ScanRotateType2" value="1" />
+        <add key="ScanRotateType3" value="1" />
+		<add key="ScanRotateType4" value="1" />
+        <add key="ScanRotateType5" value="1" />
+		
+        <add key="PixelSizeType0" value="1.236" />
+        <add key="PixelSizeType1" value="1.236" />
+        <add key="PixelSizeType2" value="1.236" />
+        <add key="PixelSizeType3" value="1.236" />
+		<add key="PixelSizeType4" value="1.236" />
+        <add key="PixelSizeType5" value="1.236" />
+		
+        <add key="SEMAxis_ZType0" value="37.241" />
+        <add key="SEMAxis_ZType1" value="37.241" />
+        <add key="SEMAxis_ZType2" value="37.241" />
+        <add key="SEMAxis_ZType3" value="37.241" />
+		<add key="SEMAxis_ZType4" value="37.241" />
+        <add key="SEMAxis_ZType5" value="37.241" />
+		
+        <add key="SEMVoltageeType0" value="7000" />
+        <add key="SEMVoltageeType1" value="7000" />
+        <add key="SEMVoltageeType2" value="7000" />
+        <add key="SEMVoltageeType3" value="7000" />
+		<add key="SEMVoltageeType4" value="5000" />
+        <add key="SEMVoltageeType5" value="5000" />
+		
+        <add key="SEMCurrentType0" value="0.5" />
+        <add key="SEMCurrentType1" value="0.5" />
+        <add key="SEMCurrentType2" value="0.5" />
+        <add key="SEMCurrentType3" value="0.5" />
+		<add key="SEMCurrentType4" value="0.2" />
+        <add key="SEMCurrentType5" value="0.2" />
+    </appSettings>
+  <runtime>
+    <assemblyBinding xmlns=" urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
+        <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="10.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 3 - 0
HOZProject/FormHOZMain.Designer.cs

@@ -186,6 +186,7 @@
             this.listmsg.TabIndex = 18;
             this.listmsg.Visible = false;
             // 
+        
             // plSEM
             // 
             this.plSEM.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
@@ -297,6 +298,7 @@
             this.pbPause.BackgroundImage = global::HOZProject.Properties.Resources.Report;
             this.pbPause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbPause.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbPause.Location = new System.Drawing.Point(475, 5);
             this.pbPause.Location = new System.Drawing.Point(445, 4);
             this.pbPause.Name = "pbPause";
             this.pbPause.Size = new System.Drawing.Size(68, 71);
@@ -412,6 +414,7 @@
             this.pbOpen.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pbOpen.BackgroundImage")));
             this.pbOpen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
             this.pbOpen.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.pbOpen.Location = new System.Drawing.Point(5, 2);
             this.pbOpen.Location = new System.Drawing.Point(5, 4);
             this.pbOpen.Name = "pbOpen";
             this.pbOpen.Size = new System.Drawing.Size(68, 71);

+ 54 - 32
HOZProject/FormHOZMain.cs

@@ -1073,68 +1073,90 @@ namespace HOZProject
                 m_MeasureFile.MParam.CorrectionType1 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType1"]);
                 m_MeasureFile.MParam.CorrectionType2 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType2"]);
                 m_MeasureFile.MParam.CorrectionType3 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType3"]);
-                // add by zjx 2020-12-21 校正角度 end 
-                // add by zjx 2020-12-21 拉直操作放大倍数
-                m_MeasureFile.MParam.StraightenTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType0"]);
+            m_MeasureFile.MParam.CorrectionType4 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType4"]);
+            m_MeasureFile.MParam.CorrectionType5 = Convert.ToString(ConfigurationManager.AppSettings["CorrectionType5"]);
+            // add by zjx 2020-12-21 校正角度 end 
+            // add by zjx 2020-12-21 拉直操作放大倍数
+            m_MeasureFile.MParam.StraightenTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType0"]);
                 m_MeasureFile.MParam.StraightenTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType1"]);
                 m_MeasureFile.MParam.StraightenTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType2"]);
                 m_MeasureFile.MParam.StraightenTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType3"]);
-                // add by zjx 2020-12-21 拉直操作放大倍数 end
-                // add by zjx 2020-12-21 定位电压
-                m_MeasureFile.MParam.PositioningVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType0"]);
+            m_MeasureFile.MParam.StraightenTimesType4 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType4"]);
+            m_MeasureFile.MParam.StraightenTimesType5 = Convert.ToString(ConfigurationManager.AppSettings["StraightenTimesType5"]);
+            // add by zjx 2020-12-21 拉直操作放大倍数 end
+            // add by zjx 2020-12-21 定位电压
+            m_MeasureFile.MParam.PositioningVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType0"]);
                 m_MeasureFile.MParam.PositioningVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType1"]);
                 m_MeasureFile.MParam.PositioningVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType2"]);
                 m_MeasureFile.MParam.PositioningVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType3"]);
-                // add by zjx 2020-12-21 定位电压 end
-                // add by zjx 2020-12-21 定位放大倍数
-                m_MeasureFile.MParam.PositioningTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType0"]);
+            m_MeasureFile.MParam.PositioningVoltageeType4 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType4"]);
+            m_MeasureFile.MParam.PositioningVoltageeType5 = Convert.ToString(ConfigurationManager.AppSettings["PositioningVoltageeType5"]);
+            // add by zjx 2020-12-21 定位电压 end
+            // add by zjx 2020-12-21 定位放大倍数
+            m_MeasureFile.MParam.PositioningTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType0"]);
                 m_MeasureFile.MParam.PositioningTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType1"]);
                 m_MeasureFile.MParam.PositioningTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType2"]);
                 m_MeasureFile.MParam.PositioningTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType3"]);
-                // add by zjx 2020-12-21 定位放大倍数 end
-                // add by zjx 2020-12-21 拍照电压
-                m_MeasureFile.MParam.PhotoVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType0"]);
+            m_MeasureFile.MParam.PositioningTimesType4 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType4"]);
+            m_MeasureFile.MParam.PositioningTimesType5 = Convert.ToString(ConfigurationManager.AppSettings["PositioningTimesType5"]);
+            // add by zjx 2020-12-21 定位放大倍数 end
+            // add by zjx 2020-12-21 拍照电压
+            m_MeasureFile.MParam.PhotoVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType0"]);
                 m_MeasureFile.MParam.PhotoVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType1"]);
                 m_MeasureFile.MParam.PhotoVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType2"]);
                 m_MeasureFile.MParam.PhotoVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType3"]);
-                // add by zjx 2020-12-21 拍照电压 end
-                // add by zjx 2020-12-21 拍照放大倍数
-                m_MeasureFile.MParam.PhotoTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType0"]);
+            m_MeasureFile.MParam.PhotoVoltageeType4 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType4"]);
+            m_MeasureFile.MParam.PhotoVoltageeType5 = Convert.ToString(ConfigurationManager.AppSettings["PhotoVoltageeType5"]);
+            // add by zjx 2020-12-21 拍照电压 end
+            // add by zjx 2020-12-21 拍照放大倍数
+            m_MeasureFile.MParam.PhotoTimesType0 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType0"]);
                 m_MeasureFile.MParam.PhotoTimesType1 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType1"]);
                 m_MeasureFile.MParam.PhotoTimesType2 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType2"]);
                 m_MeasureFile.MParam.PhotoTimesType3 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType3"]);
-                // add by zjx 2020-12-21 拍照放大倍数 end
-                // add by zjx 2020-12-21 ScanRotate修正参数
-                m_MeasureFile.MParam.ScanRotateType0 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType0"]);
+            m_MeasureFile.MParam.PhotoTimesType4 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType4"]);
+            m_MeasureFile.MParam.PhotoTimesType5 = Convert.ToString(ConfigurationManager.AppSettings["PhotoTimesType5"]);
+            // add by zjx 2020-12-21 拍照放大倍数 end
+            // add by zjx 2020-12-21 ScanRotate修正参数
+            m_MeasureFile.MParam.ScanRotateType0 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType0"]);
                 m_MeasureFile.MParam.ScanRotateType1 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType1"]);
                 m_MeasureFile.MParam.ScanRotateType2 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType2"]);
                 m_MeasureFile.MParam.ScanRotateType3 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType3"]);
-                // add by zjx 2020-12-21 ScanRotate修正参数 end
-                // add by zjx 2020-12-21 Y轴方向PixelSize修正值
-                m_MeasureFile.MParam.PixelSizeType0 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType0"]);
+            m_MeasureFile.MParam.ScanRotateType4 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType4"]);
+            m_MeasureFile.MParam.ScanRotateType5 = Convert.ToString(ConfigurationManager.AppSettings["ScanRotateType5"]);
+            // add by zjx 2020-12-21 ScanRotate修正参数 end
+            // add by zjx 2020-12-21 Y轴方向PixelSize修正值
+            m_MeasureFile.MParam.PixelSizeType0 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType0"]);
                 m_MeasureFile.MParam.PixelSizeType1 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType1"]);
                 m_MeasureFile.MParam.PixelSizeType2 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType2"]);
                 m_MeasureFile.MParam.PixelSizeType3 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType3"]);
-                // add by zjx 2020-12-21 Y轴方向PixelSize修正值 end
-                // add by zjx 2020-12-21 能谱Z轴移动位置
-                m_MeasureFile.MParam.SEMAxis_ZType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType0"]);
+            m_MeasureFile.MParam.PixelSizeType4 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType4"]);
+            m_MeasureFile.MParam.PixelSizeType5 = Convert.ToString(ConfigurationManager.AppSettings["PixelSizeType5"]);
+            // add by zjx 2020-12-21 Y轴方向PixelSize修正值 end
+            // add by zjx 2020-12-21 能谱Z轴移动位置
+            m_MeasureFile.MParam.SEMAxis_ZType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType0"]);
                 m_MeasureFile.MParam.SEMAxis_ZType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType1"]);
                 m_MeasureFile.MParam.SEMAxis_ZType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType2"]);
                 m_MeasureFile.MParam.SEMAxis_ZType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType3"]);
-                // add by zjx 2020-12-21 能谱Z轴移动位置 end
-                // add by zjx 2020-12-21 能谱电压值
-                m_MeasureFile.MParam.SEMVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType0"]);
+            m_MeasureFile.MParam.SEMAxis_ZType4 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType4"]);
+            m_MeasureFile.MParam.SEMAxis_ZType5 = Convert.ToString(ConfigurationManager.AppSettings["SEMAxis_ZType5"]);
+            // add by zjx 2020-12-21 能谱Z轴移动位置 end
+            // add by zjx 2020-12-21 能谱电压值
+            m_MeasureFile.MParam.SEMVoltageeType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType0"]);
                 m_MeasureFile.MParam.SEMVoltageeType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType1"]);
                 m_MeasureFile.MParam.SEMVoltageeType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType2"]);
                 m_MeasureFile.MParam.SEMVoltageeType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType3"]);
-                // add by zjx 2020-12-21 能谱电压值 end
-                // add by zjx 2020-12-21 能谱电流值
-                m_MeasureFile.MParam.SEMCurrentType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType0"]);
+            m_MeasureFile.MParam.SEMVoltageeType4 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType4"]);
+            m_MeasureFile.MParam.SEMVoltageeType5 = Convert.ToString(ConfigurationManager.AppSettings["SEMVoltageeType5"]);
+            // add by zjx 2020-12-21 能谱电压值 end
+            // add by zjx 2020-12-21 能谱电流值
+            m_MeasureFile.MParam.SEMCurrentType0 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType0"]);
                 m_MeasureFile.MParam.SEMCurrentType1 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType1"]);
                 m_MeasureFile.MParam.SEMCurrentType2 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType2"]);
                 m_MeasureFile.MParam.SEMCurrentType3 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType3"]);
-                // add by zjx 2020-12-21 能谱电流值 end
-                #endregion
+            m_MeasureFile.MParam.SEMCurrentType4 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType4"]);
+            m_MeasureFile.MParam.SEMCurrentType5 = Convert.ToString(ConfigurationManager.AppSettings["SEMCurrentType5"]);
+            // add by zjx 2020-12-21 能谱电流值 end
+            #endregion
         }
 
    

+ 26 - 0
HOZProject/UserControls/UControl_Init.cs

@@ -1617,6 +1617,32 @@ namespace HOZProject
                 cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType3;//能谱电流值
                 label27.Text = "3-DDIC";
             }
+            else
+                        if (cbbWYP.Text == "4")
+            {
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType3;//厂商
+                cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType4;//拉直放大倍数
+                cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType4;//定位电压
+                cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType4;//定位放大倍数
+                cbbWPZD.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoVoltageeType4;//拍照电压
+                cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType4;//拍照放大倍数
+                cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType4;//能谱电压值
+                cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType4;//能谱电流值
+                label27.Text = "4-射频IC-1";
+            }
+            else
+                        if (cbbWYP.Text == "5")
+            {
+                //cbbWCS.Text = FormHOZMainObject.m_MeasureFile.MParam.VendorType3;//厂商
+                cbbWLZ.Text = FormHOZMainObject.m_MeasureFile.MParam.StraightenTimesType5;//拉直放大倍数
+                cbbWQGD.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningVoltageeType5;//定位电压
+                cbbWQGF.Text = FormHOZMainObject.m_MeasureFile.MParam.PositioningTimesType5;//定位放大倍数
+                cbbWPZD.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoVoltageeType5;//拍照电压
+                cbbWPZF.Text = FormHOZMainObject.m_MeasureFile.MParam.PhotoTimesType5;//拍照放大倍数
+                cbbEDSV.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMVoltageeType5;//能谱电压值
+                cbbEDSA.Text = FormHOZMainObject.m_MeasureFile.MParam.SEMCurrentType5;//能谱电流值
+                label27.Text = "5-射频IC-1";
+            }
         }
     }
 }

+ 146 - 1
MeasureData/MeasureParam.cs

@@ -452,6 +452,18 @@ namespace MeasureData
             get { return this.m_VendorType3; }
             set { this.m_VendorType3 = value; }
         }
+        private String m_VendorType4;
+        public String VendorType4
+        {
+            get { return this.m_VendorType4; }
+            set { this.m_VendorType4 = value; }
+        }
+        private String m_VendorType5;
+        public String VendorType5
+        {
+            get { return this.m_VendorType5; }
+            set { this.m_VendorType5 = value; }
+        }
         #endregion
         // add by zjx 2020-12-20 厂商名字 end
 
@@ -481,6 +493,18 @@ namespace MeasureData
             get { return this.m_CorrectionType3; }
             set { this.m_CorrectionType3 = value; }
         }
+        private String m_CorrectionType4;
+        public String CorrectionType4
+        {
+            get { return this.m_CorrectionType4; }
+            set { this.m_CorrectionType4 = value; }
+        }
+        private String m_CorrectionType5;
+        public String CorrectionType5
+        {
+            get { return this.m_CorrectionType5; }
+            set { this.m_CorrectionType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 校正角度 end
 
@@ -510,6 +534,19 @@ namespace MeasureData
             get { return this.m_StraightenTimesType3; }
             set { this.m_StraightenTimesType3 = value; }
         }
+        private String m_StraightenTimesType4;
+        public String StraightenTimesType4
+        {
+            get { return this.m_StraightenTimesType4; }
+            set { this.m_StraightenTimesType4 = value; }
+        }
+        private String m_StraightenTimesType5;
+        public String StraightenTimesType5
+        {
+            get { return this.m_StraightenTimesType5; }
+            set { this.m_StraightenTimesType5 = value; }
+        }
+
         #endregion
         //add by zjx 2020-12-20 拉直操作放大倍数 end 
 
@@ -539,6 +576,18 @@ namespace MeasureData
             get { return this.m_PositioningVoltageeType3; }
             set { this.m_PositioningVoltageeType3 = value; }
         }
+        private String m_PositioningVoltageeType4;
+        public String PositioningVoltageeType4
+        {
+            get { return this.m_PositioningVoltageeType4; }
+            set { this.m_PositioningVoltageeType4 = value; }
+        }
+        private String m_PositioningVoltageeType5;
+        public String PositioningVoltageeType5
+        {
+            get { return this.m_PositioningVoltageeType5; }
+            set { this.m_PositioningVoltageeType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的定位电压 end 
 
@@ -568,6 +617,18 @@ namespace MeasureData
             get { return this.m_PositioningTimesType3; }
             set { this.m_PositioningTimesType3 = value; }
         }
+        private String m_PositioningTimesType4;
+        public String PositioningTimesType4
+        {
+            get { return this.m_PositioningTimesType4; }
+            set { this.m_PositioningTimesType4 = value; }
+        }
+        private String m_PositioningTimesType5;
+        public String PositioningTimesType5
+        {
+            get { return this.m_PositioningTimesType5; }
+            set { this.m_PositioningTimesType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的定位放大倍数 end 
 
@@ -597,6 +658,18 @@ namespace MeasureData
             get { return this.m_PhotoVoltageeType3; }
             set { this.m_PhotoVoltageeType3 = value; }
         }
+        private String m_PhotoVoltageeType4;
+        public String PhotoVoltageeType4
+        {
+            get { return this.m_PhotoVoltageeType4; }
+            set { this.m_PhotoVoltageeType4 = value; }
+        }
+        private String m_PhotoVoltageeType5;
+        public String PhotoVoltageeType5
+        {
+            get { return this.m_PhotoVoltageeType5; }
+            set { this.m_PhotoVoltageeType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的拍照电压 end 
 
@@ -626,6 +699,18 @@ namespace MeasureData
             get { return this.m_PhotoTimesType3; }
             set { this.m_PhotoTimesType3 = value; }
         }
+        private String m_PhotoTimesType4;
+        public String PhotoTimesType4
+        {
+            get { return this.m_PhotoTimesType4; }
+            set { this.m_PhotoTimesType4 = value; }
+        }
+        private String m_PhotoTimesType5;
+        public String PhotoTimesType5
+        {
+            get { return this.m_PhotoTimesType5; }
+            set { this.m_PhotoTimesType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的拍照放大倍数 end 
 
@@ -655,6 +740,18 @@ namespace MeasureData
             get { return this.m_ScanRotateType3; }
             set { this.m_ScanRotateType3 = value; }
         }
+        private String m_ScanRotateType4;
+        public String ScanRotateType4
+        {
+            get { return this.m_ScanRotateType4; }
+            set { this.m_ScanRotateType4 = value; }
+        }
+        private String m_ScanRotateType5;
+        public String ScanRotateType5
+        {
+            get { return this.m_ScanRotateType5; }
+            set { this.m_ScanRotateType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的ScanRotate修正参数 end 
 
@@ -684,6 +781,18 @@ namespace MeasureData
             get { return this.m_PixelSizeType3; }
             set { this.m_PixelSizeType3 = value; }
         }
+        private String m_PixelSizeType4;
+        public String PixelSizeType4
+        {
+            get { return this.m_PixelSizeType4; }
+            set { this.m_PixelSizeType4 = value; }
+        }
+        private String m_PixelSizeType5;
+        public String PixelSizeType5
+        {
+            get { return this.m_PixelSizeType5; }
+            set { this.m_PixelSizeType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的Y轴方向PixelSize修正值 end 
 
@@ -713,6 +822,18 @@ namespace MeasureData
             get { return this.m_SEMAxis_ZType3; }
             set { this.m_SEMAxis_ZType3 = value; }
         }
+        private String m_SEMAxis_ZType4;
+        public String SEMAxis_ZType4
+        {
+            get { return this.m_SEMAxis_ZType4; }
+            set { this.m_SEMAxis_ZType4 = value; }
+        }
+        private String m_SEMAxis_ZType5;
+        public String SEMAxis_ZType5
+        {
+            get { return this.m_SEMAxis_ZType5; }
+            set { this.m_SEMAxis_ZType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的能谱Z轴移动位置 end 
 
@@ -742,6 +863,18 @@ namespace MeasureData
             get { return this.m_SEMVoltageeType3; }
             set { this.m_SEMVoltageeType3 = value; }
         }
+        private String m_SEMVoltageeType4;
+        public String SEMVoltageeType4
+        {
+            get { return this.m_SEMVoltageeType4; }
+            set { this.m_SEMVoltageeType4 = value; }
+        }
+        private String m_SEMVoltageeType5;
+        public String SEMVoltageeType5
+        {
+            get { return this.m_SEMVoltageeType5; }
+            set { this.m_SEMVoltageeType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的能谱电压值 end
 
@@ -771,11 +904,23 @@ namespace MeasureData
             get { return this.m_SEMCurrentType3; }
             set { this.m_SEMCurrentType3 = value; }
         }
+        private String m_SEMCurrentType4;
+        public String SEMCurrentType4
+        {
+            get { return this.m_SEMCurrentType4; }
+            set { this.m_SEMCurrentType4 = value; }
+        }
+        private String m_SEMCurrentType5;
+        public String SEMCurrentType5
+        {
+            get { return this.m_SEMCurrentType5; }
+            set { this.m_SEMCurrentType5 = value; }
+        }
         #endregion
         //add by zjx 2020-12-20 样品类型的能谱电流值 end
         #endregion
 
-       
+
 
 
         //构造函数

+ 2 - 2
MeasureThread/IMath.cs

@@ -10,11 +10,11 @@ namespace MeasureThread
 
         [XmlRpcMethod("autostigfocus")]//其中客户端的web方法名称即[ ]中的名称必须和服务端相同,否则会抛异常。
         [return: XmlRpcReturnValue(Description = "autostigfocus: 对焦;")]
-        string autofocusstig(int search_step, int iter_n, double wd_searh_factor, double stig_range, double iter_range_damping);
+        string autofocusstig(int search_step, int iter_n, double wd_searh_factor, double stig_range, double iter_range_damping,bool normalized);
 
         [XmlRpcMethod("autofocus")]
         [return: XmlRpcReturnValue(Description = "autofocus: 对焦;")]//注释写什么都可以。
-        string autofocus(int search_step, double wd_searh_factor, double retry, bool refine);
+        string autofocus(int search_step, double wd_searh_factor, double retry, bool refine,bool normalized);
     }
 
 }

+ 32 - 23
MeasureThread/Measure.cs

@@ -517,7 +517,7 @@ namespace MeasureThread
 
             if (MParam.EDS == true)
             {
-                log.Info("进行能谱分析", true);
+                log.Info("进行能谱分析,初始化Xray数据库", true);
                 Init_MeasDB();
             }
 
@@ -3481,10 +3481,19 @@ namespace MeasureThread
                 #region 执行蔡司自动对焦程序
                 //服务地址
                 string snumstr = @"http://192.168.1.101:8123";
+                bool normalized;
+                if (MParam.SampleName == "1")//第1大类代表3、4小类
+                {
+                    normalized = false;
+                }
+                else
+                {
+                    normalized = true;
+                }
                 // 调用方法;只对焦不消像散
                 if (Is_Stig)
                 {
-                    string focusstig = XmlRpcClient.autofocusstig(10, 3, 3, 3, 0.7, snumstr);
+                    string focusstig = XmlRpcClient.autofocusstig(10, 3, 3, 3, 0.7, snumstr,normalized);
                     if (focusstig != "success")
                     {
                         log.Error("对焦失败" + focusstig, false);
@@ -3493,7 +3502,7 @@ namespace MeasureThread
                 }
                 else
                 {
-                    string onlyfocus = XmlRpcClient.autofocus(10, 3, 3, true, snumstr);
+                    string onlyfocus = XmlRpcClient.autofocus(10, 3, 3, true, snumstr,normalized);
                     if (onlyfocus != "success")
                     {
                         return false;
@@ -5458,11 +5467,11 @@ namespace MeasureThread
         /// <summary>
         /// 做能谱分析
         /// </summary>
-        /// <param name="a_FieldID">分析点视场ID,索引号</param>
-        /// <param name="a_FieldName">分析点视场名称</param>
+        /// <param name="a_CutHoleID">分析点视场ID,索引号</param>
+        /// <param name="a_CutHoleName">分析点视场名称</param>
         /// <param name="a_FieldImagePositionID">分析点的视场位置ID,图像处理会返回多个Xray分析点,但我们这里只取第一个点所在的视场</param>
         /// <returns>成功或失败</returns>
-        public bool DoEDS(int a_FieldID, string a_FieldName, int a_FieldImagePositionID)
+        public bool DoEDS(int a_CutHoleID, string a_CutHoleName, int a_FieldImagePositionID)
         {
             try
             {
@@ -5518,7 +5527,7 @@ namespace MeasureThread
                             return false;
                         }
                         log.Info("返回 listPoints=" + listPoints.Count.ToString(), true);
-                        if (!m_MeasDB.InsertAnylysisField(a_FieldID, a_FieldName, EDS_path, listPoints.Count, listFeature.Count, a_FieldImagePositionID))
+                        if (!m_MeasDB.InsertAnylysisField(a_CutHoleID, a_CutHoleName, EDS_path, listPoints.Count, listFeature.Count, a_FieldImagePositionID))
                         {
                             log.Error("插入分析视场失败", false);
                         }
@@ -5532,16 +5541,8 @@ namespace MeasureThread
                         {
                             XrayData = new long[2000];
                             listElement = new Dictionary<string, double>();
-                            double realPointX, realPointY;
-
-
-
-                            double currentPixelSize = iSEM.GetPixelSize();
-
-                            log.Info("当前PixelSize:" + currentPixelSize.ToString());
-                            realPointX = Convert.ToDouble(pt.X * currentPixelSize);
-                            realPointY = pt.Y * currentPixelSize;
-                            if (iExtender.XrayPointCollecting(param.PointTime, realPointX, realPointY, out XrayData, out listElement))
+                          
+                            if (iExtender.XrayPointCollecting(param.PointTime, pt.X, pt.Y , out XrayData, out listElement))
                             {
                                 string ele = "";
                                 foreach (var s in listElement)
@@ -5552,7 +5553,7 @@ namespace MeasureThread
                                 //写入数据库
                                 m_nXrayId++;
                                 log.Info("点采集结束,写入数据库开始--" + m_nXrayId.ToString(), true);
-                                Boolean ret = m_MeasDB.InsertAPointXray(a_FieldID, m_nXrayId, pt.X, pt.Y, XrayData, listElement, a_FieldImagePositionID);
+                                Boolean ret = m_MeasDB.InsertAPointXray(a_CutHoleID, m_nXrayId, pt.X, pt.Y, XrayData, listElement, a_FieldImagePositionID);
                                 Thread.Sleep(1000);
                             }
 
@@ -5623,7 +5624,7 @@ namespace MeasureThread
                                 m_nXrayId++;
 
                                 AreasNo++;
-                                m_MeasDB.InsertAAreaXay(a_FieldID, m_nXrayId, AreasNo, listSeg, XrayData, listElement, a_FieldImagePositionID);
+                                m_MeasDB.InsertAAreaXay(a_CutHoleID, m_nXrayId, AreasNo, listSeg, XrayData, listElement, a_FieldImagePositionID);
 
 
 
@@ -5686,7 +5687,7 @@ namespace MeasureThread
                                 m_nXrayId++;
 
                                 AreasNo++;
-                                m_MeasDB.InsertAAreaXay(a_FieldID, m_nXrayId, AreasNo, listSeg, XrayData, listElement, a_FieldImagePositionID);
+                                m_MeasDB.InsertAAreaXay(a_CutHoleID, m_nXrayId, AreasNo, listSeg, XrayData, listElement, a_FieldImagePositionID);
                             }
                             else
                             {
@@ -6537,20 +6538,28 @@ namespace MeasureThread
             //这块应该做成参数!!! 暂时写死。类型3 则为 5000V 500pA
             bool mRet_VoltageFlag = false;
             bool mRet_ElecFlag = false;
-            if (MParam.SampleName != "3")
+            if (MParam.SampleName == "4" || MParam.SampleName == "5")
             {
-                mRet_VoltageFlag = iSEM.SetSEMVoltage(2000);
+                mRet_VoltageFlag = iSEM.SetSEMVoltage(5000);
                 Thread.Sleep(500);
                 mRet_ElecFlag = iSEM.SetSEMIPROBE(0.2F / 1000000000);
                 Thread.Sleep(500);
             }
-            else
+            else if (MParam.SampleName == "3")
             {
                 mRet_VoltageFlag = iSEM.SetSEMVoltage(5000);
                 Thread.Sleep(500);
                 mRet_ElecFlag = iSEM.SetSEMIPROBE(0.5F / 1000000000);
                 Thread.Sleep(500);
             }
+            else
+            {              
+
+                mRet_VoltageFlag = iSEM.SetSEMVoltage(2000);
+                Thread.Sleep(500);
+                mRet_ElecFlag = iSEM.SetSEMIPROBE(0.2F / 1000000000);
+                Thread.Sleep(500);
+            }
             if (!mRet_VoltageFlag) return false;
             if (!mRet_ElecFlag) return false;
             log.Info("测量线程:设置电压电流完成!", true);

+ 4 - 4
MeasureThread/XmlRpcClient.cs

@@ -30,12 +30,12 @@ namespace MeasureThread
         /// 对焦
         /// </summary>
         /// <returns></returns>
-        public static string autofocusstig(int search_step, int iter_n, double wd_searh_factor, double stig_range, double iter_range_damping, string urlstr)
+        public static string autofocusstig(int search_step, int iter_n, double wd_searh_factor, double stig_range, double iter_range_damping, string urlstr,bool normalized)
         {
             string xrs;
             //调取接口方法
             IMethod method = getInstance(urlstr);
-            xrs = method.autofocusstig( search_step, iter_n, wd_searh_factor, stig_range, iter_range_damping);
+            xrs = method.autofocusstig( search_step, iter_n, wd_searh_factor, stig_range, iter_range_damping,normalized);
 
             return xrs;
         }
@@ -43,12 +43,12 @@ namespace MeasureThread
         /// 对焦
         /// </summary>
         /// <returns></returns>
-        public static string autofocus(int search_step, double wd_searh_factor, double retry, bool refine, string urlstr)
+        public static string autofocus(int search_step, double wd_searh_factor, double retry, bool refine, string urlstr,bool normalized)
         {
             string xrs;
             //调取接口方法
             IMethod method = getInstance(urlstr);
-            xrs = method.autofocus( search_step,  wd_searh_factor,  retry,  refine);
+            xrs = method.autofocus( search_step,  wd_searh_factor,  retry,  refine,normalized);
 
             return xrs;
         }