Browse Source

更新能谱json dll

gsp 4 years ago
parent
commit
c6235c903f

+ 6 - 2
DBManager/DBManager.csproj

@@ -41,6 +41,10 @@
     <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <HintPath>..\packages\EntityFramework.6.3.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
     </Reference>
+    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\Debug\Newtonsoft.Json.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Core" />
@@ -72,9 +76,9 @@
     <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\ExtenderControl\Extender.csproj">
+    <ProjectReference Include="..\ExtenderControl\HOZExtender.csproj">
       <Project>{f5092f52-1fbd-4882-bb9c-399809d87779}</Project>
-      <Name>Extender</Name>
+      <Name>HOZExtender</Name>
     </ProjectReference>
     <ProjectReference Include="..\MeasureData\MeasureData.csproj">
       <Project>{12617585-8d9a-4ad4-b6c4-6894a48cee9e}</Project>

+ 11 - 1
ExtenderControl/ExtenderInterface.cs

@@ -46,7 +46,16 @@ namespace Extender
                 return m_iExtender;
 
             }
-        } //属性,只能当前类创建         
+        } //属性,只能当前类创建 
+        ~ExtenderInterface()
+        {
+
+            if (m_iExtender!=null)
+            {
+                m_iExtender.CloseExtender();
+            }
+           
+        }
     }
 
     public class Segment
@@ -151,5 +160,6 @@ namespace Extender
 
         //面采集
         Boolean XrayAreaCollectiong(double dMilliSecondsTime, List<Segment> a_listChord, out long[] XrayData, out Dictionary<string, double> a_listElement);
+        void CloseExtender();
     }
 }

+ 6 - 2
ExtenderControl/Extender.csproj → ExtenderControl/HOZExtender.csproj

@@ -9,7 +9,7 @@
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Extender</RootNamespace>
-    <AssemblyName>Extender</AssemblyName>
+    <AssemblyName>HOZExtender</AssemblyName>
     <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
@@ -35,9 +35,13 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\Debug\Newtonsoft.Json.dll</HintPath>
+    </Reference>
     <Reference Include="OINA.Extender, Version=4.2.0.0, Culture=neutral, PublicKeyToken=5efad68c95e0364e, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files (x86)\Oxford Instruments NanoAnalysis\Extender\OINA.Extender.dll</HintPath>
+      <HintPath>..\bin\Debug\OINA.Extender.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />

+ 1 - 1
HOZ.sln

@@ -26,7 +26,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeasureData", "MeasureData\
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebManager", "WebManager\WebManager.csproj", "{00319B6F-FAD0-46B5-B76B-7164DC5CA0D5}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Extender", "ExtenderControl\Extender.csproj", "{F5092F52-1FBD-4882-BB9C-399809D87779}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HOZExtender", "ExtenderControl\HOZExtender.csproj", "{F5092F52-1FBD-4882-BB9C-399809D87779}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OxfordTest", "OxfordTest\OxfordTest.csproj", "{7566397D-632B-4939-8EB6-9AC620EE44F3}"
 EndProject

+ 4 - 0
HOZProject/App.config

@@ -181,6 +181,10 @@
       <!--add by sun 2020-12-17 增加调试时是否切割开关-->
       <add key="IsCutingForDebug" value="true"/>
       <!--add by sun 2020-12-17 增加调试时是否切割开关-->
+
+      <!--add by zjx 2020-12-18 为了测试只做能谱部分-->
+      <add key="IsonlyEDSForDebug" value="false"/>
+      <!--add by zjx 2020-12-18 为了测试只做能谱部分-->
       
     </appSettings>
 </configuration>

+ 4 - 0
HOZProject/FormHOZMain.cs

@@ -219,6 +219,10 @@ namespace HOZProject
                 m_MeasureFile.MParam.IsCutingForDebug = Convert.ToBoolean(ConfigurationManager.AppSettings["IsCutingForDebug"]);
                 //add by sun 2020-12-17 增加调试时是否切割开关 end
 
+                // add by zjx 2020-12-18 为了测试只做能谱部分
+                m_MeasureFile.MParam.IsonlyEDSForDebug = Convert.ToBoolean(ConfigurationManager.AppSettings["IsonlyEDSForDebug"]);
+                // add by zjx 2020-12-18 为了测试只做能谱部分 end
+
                 m_Ms.InitMeas(m_MeasureFile);
                 //注册事件
                 m_Ms.SendThreadStatus += new ThreadStatusHandler(displayMessage);

+ 57 - 22
HOZProject/UnitControl.csproj

@@ -13,6 +13,21 @@
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <Deterministic>true</Deterministic>
     <TargetFrameworkProfile />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -188,28 +203,6 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\FileManager\FileManager.csproj">
-      <Project>{14c99f54-b3c2-47cf-adb3-e79fdd2d382f}</Project>
-      <Name>FileManager</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\MeasureData\MeasureData.csproj">
-      <Project>{12617585-8d9a-4ad4-b6c4-6894a48cee9e}</Project>
-      <Name>MeasureData</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\MeasureThread\MeasureThread.csproj">
-      <Project>{9a5851e4-73fd-48e1-876c-68bed40a0512}</Project>
-      <Name>MeasureThread</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\SmartSEMControl\SmartSEMControl.csproj">
-      <Project>{bf7f80b0-a6da-4470-a331-4c96057fc7fa}</Project>
-      <Name>SmartSEMControl</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\WebManager\WebManager.csproj">
-      <Project>{00319b6f-fad0-46b5-b76b-7164dc5ca0d5}</Project>
-      <Name>WebManager</Name>
-    </ProjectReference>
-  </ItemGroup>
   <ItemGroup>
     <None Include="Resources\exit_Gray.png" />
   </ItemGroup>
@@ -333,5 +326,47 @@
     <None Include="Resources\Start_Green.png" />
     <None Include="Resources\Stop_Red.png" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\DBManager\DBManager.csproj">
+      <Project>{5674dd32-3a9f-4d74-b177-a693a75a0255}</Project>
+      <Name>DBManager</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\ExtenderControl\HOZExtender.csproj">
+      <Project>{f5092f52-1fbd-4882-bb9c-399809d87779}</Project>
+      <Name>HOZExtender</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\FileManager\FileManager.csproj">
+      <Project>{14c99f54-b3c2-47cf-adb3-e79fdd2d382f}</Project>
+      <Name>FileManager</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\MeasureData\MeasureData.csproj">
+      <Project>{12617585-8d9a-4ad4-b6c4-6894a48cee9e}</Project>
+      <Name>MeasureData</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\MeasureThread\MeasureThread.csproj">
+      <Project>{9a5851e4-73fd-48e1-876c-68bed40a0512}</Project>
+      <Name>MeasureThread</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\SmartSEMControl\SmartSEMControl.csproj">
+      <Project>{bf7f80b0-a6da-4470-a331-4c96057fc7fa}</Project>
+      <Name>SmartSEMControl</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\WebManager\WebManager.csproj">
+      <Project>{00319b6f-fad0-46b5-b76b-7164dc5ca0d5}</Project>
+      <Name>WebManager</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.6.2 %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 10 - 0
MeasureData/MeasureParam.cs

@@ -35,6 +35,7 @@ namespace MeasureData
             set { this.is_Photograph = value; }
         }
 
+
         //是否有pt工序
         private Boolean m_pt;
         public Boolean PT
@@ -414,6 +415,15 @@ namespace MeasureData
         }
         //add by sun 2020-12-17 增加调试时是否切割开关 end
 
+        //add by zjx 2020-12-18 为了测试只做能谱部分
+        private bool m_IsonlyEDSForDebug;
+        public bool IsonlyEDSForDebug
+        {
+            get { return this.m_IsonlyEDSForDebug; }
+            set { this.m_IsonlyEDSForDebug = value; }
+        }
+        //add by zjx 2020-12-18 为了测试只做能谱部分 end
+
         #endregion
 
 

+ 27 - 5
MeasureThread/Measure.cs

@@ -1956,6 +1956,7 @@ namespace MeasureThread
             //add by sun 2020-12-17 解决3大类样品FIB下亮度过白导致无法识别问题
             float m_TempBrightness = 50.0f;
             float m_TempContrast = 30.0f;
+         
             if (m_measureFile.MParam.SampleName == "3")
             {
                 m_TempBrightness = 50f;
@@ -2211,7 +2212,7 @@ namespace MeasureThread
                     //add by sun 2020-12-16 解决第5/6类样品 6000倍对焦不好问题
                     if ( m_measureFile.MParam.SampleName == "3")
                     {
-                        iSEM.SetReduced(402, 128, 400, 256);
+                        iSEM.SetReduced(402, 128, 480, 450);
                     }else
                     {
                         iSEM.SetReduced(402, 128, 340, 256);
@@ -2226,6 +2227,7 @@ namespace MeasureThread
                     cycle_time = iSEM.GetCycleTime();
                     Thread.Sleep(100 + Convert.ToInt32(cycle_time));
 
+                    
 
                     //放大到6000倍
                     iSEM.SetMagnification(magMax / 2);
@@ -2241,6 +2243,15 @@ namespace MeasureThread
                     }
                     LogManager.AddHardwareLog("========测量线程:开始自动聚焦--6000倍!", true);
 
+                    if (m_measureFile.MParam.SampleName == "3")
+                    {
+                        //add by zjx 2020-12-18 修改亮度对比度 50 29 更成 50 30
+                        iSEM.SetBrightness(50.0f); //50.0f
+                        Thread.Sleep(200);
+                        iSEM.SetContrast(30.0f); //30.0f
+                        Thread.Sleep(200);
+                        //add by zjx 2020-12-18 修改亮度对比度 50 29 更成 50 30 end
+                    }
 
                     //自动对焦
                     if (!ImageFocus1(true))
@@ -2596,8 +2607,11 @@ namespace MeasureThread
         //第一个孔的测试过程
         public bool FirstHole()
         {
-            //add by sun 2020-12-17 不同样品电压、电流不一致,应设置灵活。123456类电压2000V电流200pA,7类5000V 500pA,能谱 7000V 500pA 
-            LogManager.AddHardwareLog("测量线程:第一孔=====设置拍照电压 123456类电压2000V电流200pA,7类5000V 500pA,能谱 7000V 500pA  目前是第 " + m_measureFile.MParam.SampleName + " 类!", true);
+            // add by zjx 2020-12-18 为了测试只做能谱部分
+            if (m_measureFile.MParam.IsonlyEDSForDebug == true)
+            {
+                //add by sun 2020-12-17 不同样品电压、电流不一致,应设置灵活。123456类电压2000V电流200pA,7类5000V 500pA,能谱 7000V 500pA 
+                LogManager.AddHardwareLog("测量线程:第一孔=====设置拍照电压 123456类电压2000V电流200pA,7类5000V 500pA,能谱 7000V 500pA  目前是第 " + m_measureFile.MParam.SampleName + " 类!", true);
             if (!SetVoltageAndIPROBE())
             {
                 LogManager.AddHardwareLog("测量线程:第一孔=====设置电压电流失败!目前是第 " + m_measureFile.MParam.SampleName + " 类!", true);
@@ -2777,7 +2791,8 @@ namespace MeasureThread
                 SendMsg("1-40");
                 LogManager.AddHardwareLog("测量线程:第一个孔的测试过程-18.自动层高分析结束!", true);
             }
-            
+            }
+            //add by zjx 2020-12-18 为了测试只做能谱部分 end
             //19.能谱分析
             if (m_measureFile.MParam.EDS)
             {
@@ -3172,6 +3187,12 @@ namespace MeasureThread
                 m_TempBrightness = 48.0f;
                 m_TempContrast = 29.0f;
             }
+            //add by sun 2020-12-18 解决1类样品拉直太白造成无法拉直问题
+            if (m_measureFile.MParam.SampleName == "1")
+            {
+                m_TempBrightness = 50.0f;
+                m_TempContrast = 29.0f;
+            }
             //add by sun 2020-12-17 解决3大类样品FIB下亮度过白导致无法识别问题    
             iSEM.SetAutoVideoOff();
             Thread.Sleep(200);
@@ -5701,7 +5722,7 @@ namespace MeasureThread
         #region 能谱所有参数
         //全局只有一个Extender
         static ExtenderInterface factoryExtender = ExtenderInterface.Instance;
-        IExtenderControl iExtender = factoryExtender.IExtender;
+        IExtenderControl iExtender;
         MeasureDB m_MeasDB = null;
         int m_nXrayId = 0;
         const String ImageNameEDS = @"EDSImage.tif"; //EDS能谱图片
@@ -5720,6 +5741,7 @@ namespace MeasureThread
         {
             try
             {
+                iExtender = factoryExtender.IExtender;
                 //XrayID记录
                 LogManager.AddHardwareLog("程序进入EDS测量!", true);
 

+ 2 - 2
MeasureThread/MeasureThread.csproj

@@ -80,9 +80,9 @@
       <Project>{5674dd32-3a9f-4d74-b177-a693a75a0255}</Project>
       <Name>DBManager</Name>
     </ProjectReference>
-    <ProjectReference Include="..\ExtenderControl\Extender.csproj">
+    <ProjectReference Include="..\ExtenderControl\HOZExtender.csproj">
       <Project>{f5092f52-1fbd-4882-bb9c-399809d87779}</Project>
-      <Name>Extender</Name>
+      <Name>HOZExtender</Name>
     </ProjectReference>
     <ProjectReference Include="..\FileManager\FileManager.csproj">
       <Project>{14c99f54-b3c2-47cf-adb3-e79fdd2d382f}</Project>

+ 2 - 2
OxfordTest/OxfordTest.csproj

@@ -109,9 +109,9 @@
       <Project>{5674dd32-3a9f-4d74-b177-a693a75a0255}</Project>
       <Name>DBManager</Name>
     </ProjectReference>
-    <ProjectReference Include="..\ExtenderControl\Extender.csproj">
+    <ProjectReference Include="..\ExtenderControl\HOZExtender.csproj">
       <Project>{f5092f52-1fbd-4882-bb9c-399809d87779}</Project>
-      <Name>Extender</Name>
+      <Name>HOZExtender</Name>
     </ProjectReference>
     <ProjectReference Include="..\MeasureData\MeasureData.csproj">
       <Project>{12617585-8d9a-4ad4-b6c4-6894a48cee9e}</Project>

BIN
WebManager/Newtonsoft.Json.dll


+ 4 - 7
WebManager/WebManager.csproj

@@ -35,9 +35,9 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\Newtonsoft.Json.dll</HintPath>
+      <HintPath>..\bin\Debug\dll\NewtonSoft12\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
@@ -54,17 +54,14 @@
     <Compile Include="WebResult.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <Content Include="Newtonsoft.Json.dll" />
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\DBManager\DBManager.csproj">
       <Project>{5674dd32-3a9f-4d74-b177-a693a75a0255}</Project>
       <Name>DBManager</Name>
     </ProjectReference>
-    <ProjectReference Include="..\ExtenderControl\Extender.csproj">
+    <ProjectReference Include="..\ExtenderControl\HOZExtender.csproj">
       <Project>{f5092f52-1fbd-4882-bb9c-399809d87779}</Project>
-      <Name>Extender</Name>
+      <Name>HOZExtender</Name>
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>