Browse Source

add coxm api
chage picosmart api

zhongyongming 1 year ago
parent
commit
0841f1a16b

+ 2 - 2
Bin/x64/Debug/Config/ProData/HardwareConfig.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData PathName="HardwareConfig.xml" ID="1">
-  <Member RegName="SemControllerName" Value="OffLine" ImageInputSources="SE" />
-  <Member RegName="EDSName" Value="OffLine" DelayQuantify="false" WeightPercentageToAtomicPercentage="false" />
+  <Member RegName="SemControllerName" Value="Coxm" ImageInputSources="SE" />
+  <Member RegName="EDSName" Value="Coxm" DelayQuantify="false" WeightPercentageToAtomicPercentage="false" />
   <Member RegName="BrukerDllVersion" Version="Bruker.API.Esprit64.dll" />
   <Member RegName="FEIIP" Value="127.0.0.1" />
   <Member RegName="FEIPORT" Value="7321" />

+ 2 - 1
OTSIncAMeasureApp/1-OTSMeasure/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -65,7 +65,8 @@ namespace OTSModelSharp
             m_ScanHardwareMgr = ScanController.GetScanController();
             var ifautoid = m_Sample.GetMsrParams().GetXRayParam().IfAutoId;
             var knownelements = m_Sample.GetMsrParams().GetXRayParam().AnalysisElements;
-            m_EDSController = EDSController.GetEDSController(imgwidth,imgheight,expC,ifautoid,knownelements);
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            m_EDSController = EDSController.GetEDSController(deviceType, imgwidth,imgheight,expC,ifautoid,knownelements);
             m_listHoleBSEImg = new CHoleBSEImgsList();
             m_Sample = a_pSample;
             m_ifAquireClearParticleImage = FileHelper.GetIfAquireClearParticleImage();

+ 2 - 1
OTSIncAMeasureApp/1-OTSMeasure/Measure/4-ReMeasure/SmplMeasureReMeasure.cs

@@ -54,7 +54,8 @@ namespace OTSMeasureApp._0_OTSModel.Measure._4_ReMeasure
             var imgheight = m_Sample.GetMsrParams().GetImageScanParam().GetImageResolutionSize().cy;
             var ifautoid = m_Sample.GetMsrParams().GetXRayParam().IfAutoId;
             var knownelements = m_Sample.GetMsrParams().GetXRayParam().AnalysisElements;
-            eds = EDSController.GetEDSController(imgwidth, imgheight, expC, ifautoid, knownelements);
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            eds = EDSController.GetEDSController(deviceType,imgwidth, imgheight, expC, ifautoid, knownelements);
 
             //eds = EDSController.GetEDSController(imgwidth,imgheight,expC);
             return a_pBSEImg.GetImageDataPtr();

+ 4 - 2
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -1455,7 +1455,8 @@ namespace OTSMeasureApp
             var expC = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().GetAnalyExpCount();
             var ifautoid = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().IfAutoId;
             var knownelements = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().AnalysisElements;
-            IEDSController m_EDSHardwareMgr = EDSController.GetEDSController(m_iWidth, m_iHeight, expC,ifautoid,knownelements);
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            IEDSController m_EDSHardwareMgr = EDSController.GetEDSController(deviceType, m_iWidth, m_iHeight, expC,ifautoid,knownelements);
 
             //1.连接电镜
             if (m_EDSHardwareMgr.Connect())
@@ -1562,7 +1563,8 @@ namespace OTSMeasureApp
             var expC = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().GetAnalyExpCount();
             var ifautoid = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().IfAutoId;
             var knownelements = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().AnalysisElements;
-            var eds = EDSController.GetEDSController(m_iWidth, m_iHeight, expC,ifautoid,knownelements);
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            var eds = EDSController.GetEDSController(deviceType,m_iWidth, m_iHeight, expC,ifautoid,knownelements);
             var mode = m_MeasureAppForm.m_ProjRstData.GetWorkingSample().GetMsrParams().GetXRayParam().GetScanMode();
             var part = new COTSParticleClr();
             part.SetXRayPos(new Point(dMouseImgX, dMouseImgY));

+ 2 - 1
OTSIncAMeasureApp/BaseFunctionTest.cs

@@ -82,7 +82,8 @@ namespace OTSMeasureApp
             List<CElementChemistryClr> eles = new List<CElementChemistryClr>();
            
             part.SetXRayPos(new Point(20, 20));
-            var eds = EDSController.GetEDSController(1024,768,5000,true,"");
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            var eds = EDSController.GetEDSController(deviceType,1024, 768,5000,true,"");
             List<COTSParticleClr> parts = new List<COTSParticleClr>();
             parts.Add(part);
             uint[] xrayData=new uint[2000];

+ 2 - 3
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -213,10 +213,9 @@
     <Prefer32Bit>true</Prefer32Bit>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="CoxmApi, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86">
+    <Reference Include="CoxmApi, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\COXM\20240911_OTS_DLL\Coxmapi\Source\CLR\CoxmApiCLR\Release\CoxmApi.dll</HintPath>
-      <Private>False</Private>
+      <HintPath>ServiceCenter\CoxmSem\dll_release\CoxmApi.dll</HintPath>
     </Reference>
     <Reference Include="FEIApiControl">
       <HintPath>..\OpenDll\FEIAPI\FEIApiControl.dll</HintPath>

+ 5 - 4
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/EDSController.cs

@@ -22,9 +22,9 @@ namespace OTSModelSharp.ServiceCenter
 
        
 
-        public static IEDSController GetEDSController(int imgwidth,int imgheight,int expectCount,bool ifautoid,string knownelements)
+        public static IEDSController GetEDSController(string deviceType,int imgwidth,int imgheight,int expectCount,bool ifautoid,string knownelements)
         {
-            string deviceType = FileHelper.GetXMLInformations("EDSName");
+           // string deviceType = FileHelper.GetXMLInformations("EDSName");
          
             if (edsctrl == null)
             {
@@ -55,11 +55,12 @@ namespace OTSModelSharp.ServiceCenter
                 }
                 else if (deviceType == "PicoSmart")
                 {
-                    edsctrl = new PicoSmartEDSController(deviceType, expectCount, ifautoid, knownelements);
+                    //edsctrl = new PicoSmartEDSController(deviceType, expectCount, ifautoid, knownelements);
+                    edsctrl = new PicoSmartEDSController(deviceType,  imgwidth,  imgheight, expectCount, ifautoid, knownelements);
                 }
                 else if (deviceType == "Coxm")
                 {
-                    edsctrl = new CoxmEDSController( imgwidth,  imgheight, expectCount, ifautoid, knownelements);
+                    edsctrl = new CoxmEDSController(deviceType, imgwidth,  imgheight, expectCount, ifautoid, knownelements);
                 }
                 edsctrl.SetResolution(imgwidth, imgheight);
 

+ 14 - 0
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/ScanController.cs

@@ -5,6 +5,7 @@ using OTSCLRINTERFACE;
 
 using OTSDataType;
 using OTSMeasureApp.ServiceCenter;
+using OTSMeasureApp.ServiceCenter.Coxm;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
@@ -61,6 +62,19 @@ namespace OTSModelSharp.ServiceCenter
 
                     }
                 }
+                else if (semtype == "Coxm")
+                {
+                    var srcType = FileHelper.GetOxfordInputSourceType();
+                    scanctrl = new CoxmScanController();
+                    if (srcType == "SE")
+                    {
+
+                    }
+                    else if (srcType == "BSE")
+                    {
+
+                    }
+                }
                 else 
                 { 
                     scanctrl = new ScanController(semtype); 

+ 1 - 1
OTSIncAMeasureApp/ServiceCenter/CPP(Bruker)API/SemController.cs

@@ -39,7 +39,7 @@ namespace OTSModelSharp.ServiceCenter
                 }
                 else if (semtype == "Coxm")
                 {
-                   // sem = new CoxmSemController();
+                   sem = new CoxmSemController();
                 }
                 else             
                 {

+ 13 - 4
OTSIncAMeasureApp/ServiceCenter/CoxmSem/CoxmEDSController.cs

@@ -7,7 +7,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
-
+using NSDLL_CLR;
 namespace OTSMeasureApp.ServiceCenter.Coxm
 {
     class CoxmEDSController : IEDSController
@@ -16,12 +16,15 @@ namespace OTSMeasureApp.ServiceCenter.Coxm
         public static int imgwidth=800;
         public static int imgheight = 600;
         private IEDSController m_eds;
-       public CoxmEDSController(int imgwidth, int imgheight, int expectCount, bool ifautoid, string knownelements)
-            //(string deviceType, int expectcount, bool ifautoid, string knownelements)
+        static string eds_deviceType = "Bruker";//"Oxford"  "FEI"
+        NSRestClient m_coxm_api;
+        public CoxmEDSController(string deviceType, int imgwidth, int imgheight ,int expectcount, bool ifautoid, string knownelements)
+        //(string deviceType, int expectcount, bool ifautoid, string knownelements)
         {
             CoxmEDSController.imgwidth = imgwidth;
             CoxmEDSController.imgheight = imgheight;
-            m_eds = EDSController.GetEDSController( imgwidth,  imgheight,  expectCount,  ifautoid,  knownelements);
+            m_eds = EDSController.GetEDSController(eds_deviceType, imgwidth,  imgheight, expectcount,  ifautoid,  knownelements);
+            m_coxm_api = CoxmSemController.GetApiClassInstance();
         }
 
         public bool  CollectSpectrum(uint a_nXRayAQTime, ref uint[] a_XrayData)
@@ -31,6 +34,12 @@ namespace OTSMeasureApp.ServiceCenter.Coxm
 
         public bool  Connect()
         {
+            m_coxm_api.ServerConnect();
+            if(m_coxm_api.IsServerConnectStatus())
+            {
+                return false;
+            }
+            
             return m_eds.Connect();
         }
 

+ 2 - 1
OTSIncAMeasureApp/ServiceCenter/CoxmSem/CoxmSemController.cs

@@ -159,7 +159,8 @@ namespace OTSMeasureApp.ServiceCenter.Coxm
 
         public bool MoveSEMToPoint(double a_dPositionX, double a_dPositionY)
         {
-            return m_api.MoveStageX_YAndConform(a_dPositionX, a_dPositionY);
+            //return true;//test when no stage
+           return m_api.MoveStageX_YAndConform(a_dPositionX, a_dPositionY);
         }
 
         public bool SetMagnification(double a_dMagnification)

+ 89 - 0
OTSIncAMeasureApp/ServiceCenter/CoxmSem/dll_release/NSDLL.h

@@ -0,0 +1,89 @@
+#ifdef NSDLL_EXPORTS
+#define NSDLL_API	__declspec(dllexport)
+#else
+#define NSDLL_API	__declspec(dllimport)
+#endif
+
+
+#include <string>
+class NSDLL_API CNSRestClient
+{
+public:
+	CNSRestClient();
+	~CNSRestClient();	
+	bool ServerConnect();
+	bool ServerDisConnect();
+	bool IsServerConnectStatus();
+
+	
+	bool PostEGunOFF();
+	bool GetEGunStatus(bool& status);
+	
+	bool PostAccVoltage(int voltage);  // unit : [kv]
+	bool GetAccVoltage(int& voltage);  // unit : [kv]
+
+
+	
+	bool PostWD(double wd);
+	bool GetWD(double& wd);
+	bool PostMagnification(int mag);
+	bool GetMagnification(int& mag);
+
+	
+	bool GetImage_wait(std::string &outImage,int& w, int& h, int& b, UINT& dwelltime);
+
+	bool GetImage_realtime(std::string& outImage, int& w, int& h, int& b, UINT& dwelltime);
+
+
+	
+	
+	bool PostBrightness(int b);
+	bool GetBrightness(int& b);
+
+	bool PostContrast(int c);
+	bool GetContrast(int& c);
+
+
+	// STG - Stage Control	
+	bool GetSampleHeight(double& sampleheight);
+
+
+	bool GetStageALL(double& x, double& y, double& z, double& r, double& t);
+
+	bool PostStageX(double x);
+	bool GetStageX(double& x);
+
+	bool PostStageY(double y);
+	bool GetStageY(double& y);
+
+	bool PostStageZ(double z);
+	bool GetStageZ(double& z);
+
+	bool PostStageR(double r);
+	bool GetStageR(double& r);
+
+	bool PostStageT(double t);
+	bool GetStageT(double& t);	
+
+	bool MoveStageXAndConform(double x);
+	bool MoveStageYAndConform(double y);
+	bool MoveStageZAndConform(double z);
+	bool MoveStageRAndConform(double r);
+	bool MoveStageTAndConform(double t);
+	bool MoveStageX_YAndConform(double x,double y);
+
+
+
+	bool PostBeamBlank(bool onoff);  //onoff(ON : TRUE,  OFF : FALSE)
+	bool GetBeamBlankStatus(bool& onoff); //onoff(ON : TRUE,  OFF : FALSE)
+
+	bool PostExternalOn(bool onoff); //onoff(ON : TRUE,  OFF : FALSE)
+	bool GetExternalOn(bool& onoff); //onoff(ON : TRUE,  OFF : FALSE)
+
+private:
+	
+	bool GetImageProcess(std::string& outImage, int& w, int& h, int& b, UINT& dwelltime,int& AverageFilter);
+	bool ServerHealthCheck();	
+	int ThreadServerStatusCheck();
+	bool Connection(bool isConnect);
+};

+ 8 - 0
OTSIncAMeasureApp/ServiceCenter/PicoSmart/PicoSartScanController.cs

@@ -36,6 +36,14 @@ namespace OTSMeasureApp.ServiceCenter
         /// //red 0; fast 1; slow 2; slow2 3
         /// </summary>
         int scan_speed = 1;
+        public void set_image_w(int w)
+        {
+            imageWidth = w;
+        }
+        public void set_image_h(int h)
+        {
+            imageHeight= h;
+        }
         int get_image_type()
         {
             if (imageWidth == 640)

+ 19 - 1
OTSIncAMeasureApp/ServiceCenter/PicoSmart/PicoSmartApi_cshape.cs

@@ -424,7 +424,25 @@ namespace OTSMeasureApp.ServiceCenter
         {
              STOP_STAGE( m_api);
         }
-       
+        private int m_image_index = 0;
+        public void set_image_w(int resolutionWidth)//0 image  w 640;1 image w 1280;2 image w 2560
+        {
+            if (resolutionWidth == 640)
+            {
+                m_image_index=0;
+            }
+            else if (resolutionWidth == 1280)
+            {
+                m_image_index = 1;
+            }
+            else if (resolutionWidth == 2560)
+            {
+                m_image_index = 2;
+            }
+            m_image_index = 0;
+
+        }
+
         public void GET_IMAGE( uint dwDataType, int image_index, int chanel=3, int speed=0, int live=1)
         {
              GET_IMAGE( m_api,  dwDataType,  image_index,  chanel,  speed,  live);

+ 95 - 86
OTSIncAMeasureApp/ServiceCenter/PicoSmart/PicoSmartEDSController.cs

@@ -9,112 +9,121 @@ using System.Threading.Tasks;
 
 namespace OTSMeasureApp.ServiceCenter.PicoSmart
 {
-    class PicoSmartEDSController : EDSController
-    {
-        public PicoSmartEDSController(string deviceType, int expectcount, bool ifautoid, string knownelements) : base(deviceType, expectcount, ifautoid, knownelements)
-        {
-
-        }
-        //public PicoSmartApi_cshape m_api = null;
-
-        //private int AnalyExpCount = 100000;
-        //private string strResolution = "";
-        //private int width = 0;
-        //private int height = 0;
-        //public PicoSmartEDSController(int MaxCounts)
+    //class PicoSmartEDSController : EDSController
+    //{
+        //public PicoSmartEDSController(string deviceType, int expectcount, bool ifautoid, string knownelements) : base(deviceType, expectcount, ifautoid, knownelements)
         //{
-        //    m_api = PicoSmartSemController.GetApiClassInstance();
-        //    AnalyExpCount = MaxCounts;
-        //    Connect();
-        //}
 
-        //public bool  CollectSpectrum(uint a_nXRayAQTime, ref uint[] a_XrayData)
-        //{
-        //   return false;
         //}
 
-        //public bool  Connect()
-        //{
-
+        class PicoSmartEDSController : IEDSController
+        { 
+        public PicoSmartApi_cshape m_api = null;
+        private static string EdsDeviceType = "Bruker";
+        private IEDSController m_eds=null;
+        private int imgwidth=640 ;
+        private int  imgheight = 480;
+        public static void set_EdsDeviceType(string DeviceType)
+        {
+            EdsDeviceType=DeviceType;
+        }
+        private int AnalyExpCount = 100000;
+        private string strResolution = "";
+ 
+        public PicoSmartEDSController(string deviceType, int imgwidth, int imgheight, int expectcount, bool ifautoid, string knownelements)
+        {
+            m_api = PicoSmartSemController.GetApiClassInstance();
+            AnalyExpCount = expectcount;
+            Connect();
+            m_eds = EDSController.GetEDSController(EdsDeviceType, imgwidth, imgheight, expectcount, ifautoid, knownelements);
+            this.imgwidth = imgwidth;
+            this.imgheight = imgheight;
+            //加载能谱
 
-        //    string FEIIP = FileHelper.GetXMLInformations("FEIIP");
-        //    string FEIPORT = FileHelper.GetXMLInformations("FEIPORT");
-        //    if (FEIIP == "" || FEIPORT == "")
-        //    {
-        //        NLog.LogManager.GetCurrentClassLogger().Error("FEI电镜端口配置为空!");
-        //        return false;
-        //    }
-        //    m_api.set_ip(FEIIP);
-        //    m_api.set_port(int.Parse( FEIPORT));
-        //    if (m_api.isStart()==1)
-        //    {
-        //        return true;
-        //    }
-
-        //    if (m_api.start() == 1)
-        //        {
-        //            return true;
-        //        }
-        //    return false;
-        //}
+        }
 
-        //public EDSTYPE  GetEDSType()
-        //{
-        //    return EDSTYPE.PICOSMART;
-        //}
+        public bool CollectSpectrum(uint a_nXRayAQTime, ref uint[] a_XrayData)
+        {
+            return m_eds.CollectSpectrum(a_nXRayAQTime, ref a_XrayData);
+        }
 
-        //public int  GetExpectCount()
-        //{
-        //   return AnalyExpCount;
-        //}
+        public bool Connect()
+        {
 
-        //public bool  GetIfDelayQuantify()
-        //{
-        //  return false;
-        //}
 
-        //public bool  GetXRayByFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
-        //{
-        //   return false;
-        //}
+            string FEIIP = FileHelper.GetXMLInformations("FEIIP");
+            string FEIPORT = FileHelper.GetXMLInformations("FEIPORT");
+            if (FEIIP == "" || FEIPORT == "")
+            {
+                NLog.LogManager.GetCurrentClassLogger().Error("FEI电镜端口配置为空!");
+                return false;
+            }
+            m_api.set_ip(FEIIP);
+            m_api.set_port(int.Parse(FEIPORT));
+            if (m_api.isStart() == 1)
+            {
+                return true;
+            }
+
+            else if (m_api.start() == 1)
+            {
+                return true;
+            }
+            return false;
+        }
 
-        //public bool  GetXRayByParts(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
-        //{
-        //   return false;
-        //}
+        public EDSTYPE GetEDSType()
+        {
+            return EDSTYPE.COXM;
+        }
 
-        //public bool  QuantifyXrayByPart(COTSParticleClr part)
-        //{
-        //   return false;
-        //}
+        public int GetExpectCount()
+        {
+            return m_eds.GetExpectCount();
+        }
 
-        //public void  SetFilterKeyEleNames(List<string> KeyNameList)
-        //{
+        public bool GetIfDelayQuantify()
+        {
+            return m_eds.GetIfDelayQuantify();
+        }
 
-        //}
+        public bool GetXRayByFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
+        {
+            return m_eds.GetXRayByFeatures(a_listParticles, a_nXRayAQTime, a_bElementInfo);
+        }
 
-        //public void  SetResolution(int resolutionWidth, int resolutionHeight)
-        //{
+        public bool GetXRayByParts(List<COTSParticleClr> a_listParticles, uint a_nXRayAQTime, bool a_bElementInfo)
+        {
+            return m_eds.GetXRayByParts(a_listParticles, a_nXRayAQTime, a_bElementInfo);
+        }
 
-        //}
+        public bool QuantifyXrayByPart(COTSParticleClr part)
+        {
+            return m_eds.QuantifyXrayByPart(part);
+        }
 
-        //bool IEDSController.GetXRayByExpandFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
-        //{
-        //    return true;
-        //}
+        public void SetFilterKeyEleNames(List<string> KeyNameList)
+        {
+            m_eds.SetFilterKeyEleNames(KeyNameList);
+        }
 
-        //private bool SetAnalyExpCount(int MaxCounts)
-        //{
+        public void SetResolution(int resolutionWidth, int resolutionHeight)
+        {
+            imgwidth = resolutionWidth;
+            imgheight = resolutionHeight;
+            m_eds.SetResolution(resolutionWidth, resolutionHeight);
+        }
 
-        //    AnalyExpCount = MaxCounts;
+        bool IEDSController.GetXRayByExpandFeatures(List<COTSParticleClr> a_listParticles, double a_nXRayAQTime, bool a_bElementInfo)
+        {
+            return m_eds.GetXRayByExpandFeatures(a_listParticles, a_nXRayAQTime, a_bElementInfo);
+        }
 
 
-        //    return true;
-        //}
 
-        //void IEDSController.SetQuantifiCationParam(bool IfAutoId, string knownElements)
-        //{
-        //    //throw new NotImplementedException();
-        //}
+        void IEDSController.SetQuantifiCationParam(bool IfAutoId, string knownElements)
+        {
+            m_eds.SetQuantifiCationParam(IfAutoId, knownElements);
+        }
     }
 }

+ 8 - 6
OTSSysMgrApp/ControllerSettingForm.cs

@@ -47,7 +47,8 @@ namespace OTSSysMgrApp
         public ControllerSettingForm()
         {
             InitializeComponent();
-            m_EDSHardwareMgr = EDSController.GetEDSController(Convert.ToInt32(tbRWidth.Text), Convert.ToInt32(tbRHeight.Text), 5000,true,"");
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            m_EDSHardwareMgr = EDSController.GetEDSController(deviceType, Convert.ToInt32(tbRWidth.Text), Convert.ToInt32(tbRHeight.Text), 5000,true,"");
 
             lan = new Language(this);
             table = lan.GetNameTable(this.Name);
@@ -145,7 +146,8 @@ namespace OTSSysMgrApp
             InitXRayData();
             int width = Convert.ToInt32(tbRWidth.Text);
             int height = Convert.ToInt32(tbRHeight.Text);
-            m_EDSHardwareMgr = EDSController.GetEDSController(width, height, 5000,true,"");
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            m_EDSHardwareMgr = EDSController.GetEDSController(deviceType, width, height, 5000,true,"");
 
             cb_Xdirection.Items.Add("LEFT_TOWARD");
             cb_Xdirection.Items.Add("RIGHT_TOWARD");
@@ -1025,9 +1027,9 @@ namespace OTSSysMgrApp
         }
         public bool GetXRayBySingleFeature(uint a_nXRayAQTime, COTSFeatureClr fea, ref uint[] a_XrayData, ref string ele, bool a_bElementInfo)
         {
-           
 
-            var eds = EDSController.GetEDSController(Convert.ToInt32(tbRWidth.Text),Convert.ToInt32(tbRHeight.Text),5000,true,"");
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            var eds = EDSController.GetEDSController(deviceType, Convert.ToInt32(tbRWidth.Text),Convert.ToInt32(tbRHeight.Text),5000,true,"");
             var part = new COTSParticleClr();
             part.SetFeature(fea);
             var parts = new List<COTSParticleClr>();
@@ -1166,9 +1168,9 @@ namespace OTSSysMgrApp
         }
         public bool GetXRayElements(uint a_nXRayAQTime, ref uint[] a_XrayData, ref ValueType a_nElementNum, ref string a_strResult)
         {
-            
 
-            var eds = EDSController.GetEDSController(Convert.ToInt32(tbRWidth.Text), Convert.ToInt32(tbRHeight.Text), 5000,true,"");
+            string deviceType = FileHelper.GetXMLInformations("EDSName");
+            var eds = EDSController.GetEDSController(deviceType, Convert.ToInt32(tbRWidth.Text), Convert.ToInt32(tbRHeight.Text), 5000,true,"");
             var part = new COTSParticleClr();
             var pos = new Point(10, 10);
             part.SetXRayPos(pos);