CMeasure.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. using System.Collections.Generic;
  2. using OTSDataType;
  3. using System;
  4. using System.Drawing;
  5. using static OTSDataType.otsdataconst;
  6. using OTSModelSharp.ImageProcess;
  7. using OTSModelSharp.ServiceCenter;
  8. using System.Threading;
  9. namespace OTSModelSharp
  10. {
  11. // enum and struct used for send message to App
  12. public enum ENUM_MSG_TYPE
  13. {
  14. MTHREADSTATUS = 1001,
  15. MSAMPLESTATUS = 1002,
  16. MSAMPLERESULT = 1003
  17. };
  18. public enum MSAMPLE_RET
  19. {
  20. BSE_DATA = 0,
  21. FIELD_DATA = 1,
  22. START_MSR_FIELD = 2
  23. };
  24. public struct SMSR_COMPLETE_DATA
  25. {
  26. public OTS_MSR_THREAD_STATUS MsrStatus;
  27. public string csMsrStartTime;
  28. public int iMsrCompleteSampleCount;
  29. public int iMsrCompleteFieldCount;
  30. public int iParticleCount;
  31. public TimeSpan MsrUsedTime;
  32. public string csMsrEndTime;
  33. };
  34. public struct STMThreadStatus
  35. {
  36. public OTS_MSR_THREAD_STATUS iMsrStatu; //OTS_MSR_THREAD_STATUS
  37. public string csMsrStartTime; //MSR_START_TIME
  38. public string csMsrEndTime; //MSR_END_TIME
  39. public SMSR_COMPLETE_DATA SMsrCompleteData;
  40. };
  41. public struct STMSampleStatus
  42. {
  43. public OTS_MSR_SAMPLE_STATUS iMsrSampleStatu; //OTS_MSR_SAMPLE_STATUS
  44. public string cSampleName;
  45. public string csSampleMsrStartTime;
  46. public List<PointF> BCompleteFieldList;
  47. };
  48. public struct STMSampleResultData
  49. {
  50. public MSAMPLE_RET iRetDataType; //ENUM_MEASURE_SAMPLE_RESULT
  51. public struct RBSEDATA
  52. {
  53. public System.Drawing.Point pos;
  54. public int iBSEDataHeight;
  55. public int iBSEDataWidth;
  56. public byte[] lpBSEData;
  57. };
  58. public struct SAMPLEFIELDDATA
  59. {
  60. public System.Drawing.Point FieldPos;
  61. public int iMeasureFieldCount;
  62. public int iCompleteFieldCount;
  63. public int iSParticleCount; // Field particle count
  64. public TimeSpan TUsedTime;
  65. };
  66. public struct StartToMsrField
  67. {
  68. public System.Drawing.Point FieldPos;
  69. };
  70. public RBSEDATA BSEData;
  71. public SAMPLEFIELDDATA SFieldData;
  72. public StartToMsrField SMsrField;
  73. };
  74. public struct ST_MSTMsg
  75. {
  76. public ENUM_MSG_TYPE iMsgType;
  77. public STMThreadStatus STMThreadStu;
  78. public STMSampleStatus STMSampleStu;
  79. public STMSampleResultData STMSampleRetData;
  80. };
  81. public class CMeasure
  82. {
  83. private const string UNTITLED_FILE_NAME = "Untitled";
  84. public delegate void ProgressEventHandler(ST_MSTMsg msg);
  85. public event ProgressEventHandler ProgressEvent;
  86. COTSMsrPrjResultData m_pProjData;
  87. List< COTSSample> m_listMeasurableSamples=new List<COTSSample>();
  88. string m_strWorkingFolder;
  89. readonly CMsrThreadStatus m_ThreadStatus;
  90. readonly ISemController m_SemController;
  91. protected static NLog.Logger loger = NLog.LogManager.GetCurrentClassLogger();
  92. public SortedDictionary<string, CSmplMeasure> mapSmplMsr = new SortedDictionary<string, CSmplMeasure>();//use this map to hold all the smplMeasure object
  93. public List<COTSSample> GetListMeasurableSamples()
  94. {
  95. return m_listMeasurableSamples;
  96. }
  97. public void SetListMeasurableSamples(List<COTSSample> value)
  98. {
  99. m_listMeasurableSamples = value;
  100. }
  101. public CMeasure()
  102. {
  103. m_strWorkingFolder = "";
  104. m_ThreadStatus = new CMsrThreadStatus();
  105. m_SemController = SemController.GetSEMController();
  106. }
  107. public COTSMsrPrjResultData GetProjResultData()
  108. {
  109. return m_pProjData;
  110. }
  111. public ISemController GetSEMController()
  112. {
  113. // get SEM, scanner and x-ray controller via hardware manager
  114. return m_SemController;
  115. }
  116. public CMsrThreadStatus GetMsrThreadStatus() { return m_ThreadStatus; }
  117. public void Init(COTSMsrPrjResultData a_pProjMgrFile)
  118. {
  119. m_pProjData = a_pProjMgrFile;
  120. SetListMeasurableSamples(a_pProjMgrFile.GetSampleList());
  121. return ;
  122. }
  123. void ThreadOver()
  124. {
  125. DateTime timeEnd = m_ThreadStatus.GetEndTime();
  126. ST_MSTMsg MsrMsg = new ST_MSTMsg
  127. {
  128. iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS
  129. };
  130. MsrMsg.STMThreadStu.iMsrStatu = m_ThreadStatus.GetStatus();
  131. MsrMsg.STMThreadStu.csMsrEndTime = timeEnd.ToString("yyyy-MM-dd HH:mm:ss");
  132. ProgressEvent(MsrMsg);
  133. if (MsrMsg.STMThreadStu.iMsrStatu == otsdataconst.OTS_MSR_THREAD_STATUS.FAILED || MsrMsg.STMThreadStu.iMsrStatu == otsdataconst.OTS_MSR_THREAD_STATUS.COMPLETED)
  134. {
  135. if (m_pProjData.GetGenParam().AutoBeamOff)
  136. {
  137. m_SemController.SetSemBeamCurrent(false); //true?
  138. }
  139. }
  140. }
  141. void ThreadOverWithoutDisConnect()
  142. {
  143. DateTime timeEnd = m_ThreadStatus.GetEndTime();
  144. ST_MSTMsg MsrMsg = new ST_MSTMsg();
  145. MsrMsg.iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS;
  146. MsrMsg.STMThreadStu.iMsrStatu = m_ThreadStatus.GetStatus();
  147. MsrMsg.STMThreadStu.csMsrEndTime = timeEnd.ToString("yyyy-MM-dd HH:mm:ss");
  148. ProgressEvent(MsrMsg);
  149. }
  150. void SetWorkingFolderStrAndSaveCurrentSettings()
  151. {
  152. // get project file pathname
  153. string strSettingFilePathName = m_pProjData.GetPathName();
  154. strSettingFilePathName.Trim();
  155. if (strSettingFilePathName == "")
  156. {
  157. loger .Error("SetWorkingFolderStr: project file pathname is an empty string");
  158. return ;
  159. }
  160. else if (strSettingFilePathName==UNTITLED_FILE_NAME)
  161. {
  162. loger .Error ("SetWorkingFolderStr: project file pathname is an invalid string");
  163. return ;
  164. }
  165. // working folder string
  166. m_strWorkingFolder = FileHelper.GetFolderName(strSettingFilePathName);
  167. m_pProjData.Save();
  168. return ;
  169. }
  170. public void SendMessageToMeasureApp(ST_MSTMsg msg)
  171. {
  172. ProgressEvent(msg);
  173. }
  174. public bool IsMeasureStopped()
  175. {
  176. return m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.STOPPED;
  177. }
  178. public bool IsMeasureRunning() { return m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.INPROCESS; }
  179. public bool IsMeasureFailed() { return m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.FAILED; }
  180. public bool IsMeasureCompleted() { return m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.COMPLETED; }
  181. public void DoMeasure()
  182. {
  183. // start measurement, creat thread measure status class, let the main thread know that measurement started
  184. m_ThreadStatus.SetStartTime(System.DateTime.Now);
  185. DateTime timeStart = m_ThreadStatus.GetStartTime();
  186. ST_MSTMsg MsgMsrStart = new ST_MSTMsg
  187. {
  188. iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS
  189. };
  190. MsgMsrStart.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.INPROCESS;
  191. MsgMsrStart.STMThreadStu.csMsrStartTime = timeStart.ToShortDateString();
  192. ProgressEvent (MsgMsrStart);
  193. loger.Info("Measurement started!");
  194. // connect hardware
  195. loger.Info("Connect SEM!");
  196. if (!m_SemController.Connect())
  197. {
  198. loger .Error("DoMeasure: failed to connect hardware.");
  199. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.FAILED);
  200. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  201. ThreadOver();
  202. return;
  203. }
  204. // set working directory which is the same directory of the setting file
  205. SetWorkingFolderStrAndSaveCurrentSettings();
  206. List <string > listMeasuredSamples = m_ThreadStatus.GetCompletedSamples();
  207. // got through measure list
  208. foreach (var pSample in GetListMeasurableSamples())
  209. {// check and break if stop button is clicked
  210. if (m_ThreadStatus.GetStatus()== OTS_MSR_THREAD_STATUS.STOPPED )
  211. {
  212. // stop button clicked
  213. loger .Info("DoMeasure: stop button is clicked.");
  214. // record end time
  215. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  216. ThreadOver();
  217. return;
  218. }
  219. if (m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.PAUSED)
  220. {
  221. // stop button clicked
  222. loger.Info("DoMeasure: stop button is clicked.");
  223. // record end time
  224. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  225. while (m_ThreadStatus.GetStatus() == OTS_MSR_THREAD_STATUS.PAUSED)
  226. {
  227. Thread.Sleep(300);
  228. }
  229. //return;
  230. }
  231. if (!pSample.GetSwitch())
  232. {
  233. continue;
  234. }
  235. var sta = pSample.GetMsrStatus().GetStatus();
  236. if (sta == OTS_MSR_SAMPLE_STATUS.SUCCESSED || sta == OTS_MSR_SAMPLE_STATUS.STOPPED)
  237. {
  238. continue;
  239. }
  240. CSmplMeasure pSmplMeasure;
  241. if (!mapSmplMsr.ContainsKey(pSample.GetName()))
  242. {// create a sample measure object for the sample
  243. switch (m_pProjData.m_systemTypeId)
  244. {
  245. case OTS_SysType_ID.IncA:
  246. pSmplMeasure = new CSmplMeasureInclution(m_strWorkingFolder, pSample);
  247. break;
  248. case OTS_SysType_ID.CleannessA:
  249. pSmplMeasure = new CSmplMeasureCleanliness(m_strWorkingFolder, pSample);
  250. break;
  251. default:
  252. pSmplMeasure = new CSmplMeasureInclution(m_strWorkingFolder, pSample);
  253. break;
  254. }
  255. // set measure thread
  256. pSmplMeasure.SetMsrThread(this);
  257. mapSmplMsr[pSample.GetName()] = pSmplMeasure;
  258. }
  259. else
  260. {
  261. pSmplMeasure = mapSmplMsr[pSample.GetName()];
  262. pSample.GetMsrStatus().SetStatus(OTS_MSR_SAMPLE_STATUS.INPROCESS);
  263. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.INPROCESS);
  264. }
  265. pSmplMeasure.DoMeasureForOneSample();
  266. // check if measurement is successful
  267. if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.PAUSED)
  268. {// record end time
  269. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.PAUSED);
  270. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  271. // update thread measure status class, let the main thread know that this sample measurement stopped
  272. ST_MSTMsg MsgSmpStop = new ST_MSTMsg();
  273. MsgSmpStop.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  274. MsgSmpStop.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.PAUSED;
  275. MsgSmpStop.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.PAUSED;
  276. MsgSmpStop.STMThreadStu.csMsrEndTime = DateTime.Now.ToShortDateString();
  277. MsgSmpStop.STMThreadStu.iMsrStatu = OTS_MSR_THREAD_STATUS.PAUSED;
  278. ProgressEvent(MsgSmpStop);
  279. ThreadOver();
  280. return;
  281. }else if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.STOPPED)
  282. {// record end time
  283. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.STOPPED);
  284. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  285. // update thread measure status class, let the main thread know that this sample measurement stopped
  286. ST_MSTMsg MsgSmpStop = new ST_MSTMsg();
  287. MsgSmpStop.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  288. MsgSmpStop.STMThreadStu.iMsrStatu= OTS_MSR_THREAD_STATUS.STOPPED;
  289. MsgSmpStop.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.STOPPED;
  290. MsgSmpStop.STMThreadStu.csMsrEndTime = DateTime .Now .ToShortDateString();
  291. MsgSmpStop.STMThreadStu.iMsrStatu= OTS_MSR_THREAD_STATUS.STOPPED;
  292. ProgressEvent(MsgSmpStop);
  293. ThreadOver();
  294. break;
  295. }
  296. else if (pSample.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.FAILED)
  297. {
  298. // measurement failed
  299. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.FAILED);
  300. // record end time
  301. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  302. // update thread measure status class, let the main thread know that this sample measurement failed
  303. ST_MSTMsg MsgSmpFailed=new ST_MSTMsg();
  304. MsgSmpFailed.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  305. MsgSmpFailed.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.FAILED;
  306. ProgressEvent(MsgSmpFailed);
  307. ThreadOver();
  308. return;
  309. }
  310. // update thread measure status class, let the main thread know that this sample measurement successes
  311. ST_MSTMsg MsgSmpSuccess = new ST_MSTMsg();
  312. MsgSmpSuccess.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  313. MsgSmpSuccess.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.SUCCESSED;
  314. ProgressEvent(MsgSmpSuccess);
  315. // continue to the next sample
  316. listMeasuredSamples.Add(pSample.GetName());
  317. }
  318. // measurement completed
  319. m_ThreadStatus.SetStatus(OTS_MSR_THREAD_STATUS.COMPLETED);
  320. // record end time
  321. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  322. ThreadOver();
  323. }
  324. // hole preview
  325. public void DoHolePreview()
  326. {
  327. // start measurement, creat thread measure status class, let the main thread know that measurement started
  328. // set measure status to in-process
  329. //record time
  330. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.START);
  331. DateTime timeStart = m_ThreadStatus.GetStartTime();
  332. ST_MSTMsg MsgMsrStart = new ST_MSTMsg();
  333. MsgMsrStart.iMsgType = ENUM_MSG_TYPE.MTHREADSTATUS;
  334. MsgMsrStart.STMThreadStu.iMsrStatu =OTS_MSR_THREAD_STATUS.INPROCESS;
  335. SendMessageToMeasureApp(MsgMsrStart);
  336. // connect hardware
  337. if (!m_SemController.Connect())
  338. {
  339. // failed to connect hardware
  340. SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS.FAILED);
  341. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  342. ThreadOverWithoutDisConnect();
  343. }
  344. var a_pMeasureArea = m_pProjData.GetWorkingSample().GetMsrDomain();
  345. COTSSample pSampleHole = CreateHoleSample(a_pMeasureArea);
  346. var sample = m_pProjData.GetWorkingSample();
  347. // create a sample measure object for the sample
  348. CSmplMeasure pSmplMeasure = new CSmplMeasure(m_strWorkingFolder, sample);
  349. // set measure thread
  350. pSmplMeasure.SetMsrThread(this);
  351. // update thread measure status class, let the main thread know that this sample measurement starts
  352. // set working folder string
  353. pSmplMeasure.SetSample(sample);
  354. pSmplMeasure.SetHolePreviewSample(pSampleHole);
  355. pSmplMeasure.SetWorkingFolder(m_strWorkingFolder);
  356. // do measure
  357. pSmplMeasure.DoHolePreview();
  358. // check if measurement is successful
  359. if (pSampleHole.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.STOPPED)
  360. {
  361. // record end time
  362. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  363. // measurement stopped
  364. SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS.STOPPED);
  365. // update thread measure status class, let the main thread know that this sample measurement stopped
  366. ST_MSTMsg MsgSmpStop = new ST_MSTMsg();
  367. MsgSmpStop.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  368. MsgSmpStop.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.STOPPED;
  369. SendMessageToMeasureApp(MsgSmpStop);
  370. ThreadOverWithoutDisConnect();
  371. return;
  372. }
  373. else if (pSampleHole.GetMsrStatus().GetStatus() == OTS_MSR_SAMPLE_STATUS.FAILED)
  374. {
  375. // measurement failed
  376. SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS.FAILED);
  377. // record end time
  378. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  379. // update thread measure status class, let the main thread know that this sample measurement failed
  380. ST_MSTMsg MsgSmpFailed = new ST_MSTMsg();
  381. MsgSmpFailed.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  382. MsgSmpFailed.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.FAILED;
  383. SendMessageToMeasureApp(MsgSmpFailed);
  384. ThreadOverWithoutDisConnect();
  385. return;
  386. }
  387. // record end time
  388. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  389. // update thread measure status class, let the main thread know that this sample measurement successes
  390. ST_MSTMsg MsgSmpSuccess = new ST_MSTMsg();
  391. MsgSmpSuccess.iMsgType = ENUM_MSG_TYPE.MSAMPLESTATUS;
  392. MsgSmpSuccess.STMSampleStu.iMsrSampleStatu = OTS_MSR_SAMPLE_STATUS.SUCCESSED;
  393. SendMessageToMeasureApp(MsgSmpSuccess);
  394. // measurement completed
  395. SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS.COMPLETED);
  396. // record end time
  397. m_ThreadStatus.ComputeTime(OTS_THREAD_TIME_TYPE.STOPPED);
  398. ThreadOverWithoutDisConnect();
  399. }
  400. public COTSSample CreateHoleSample(CDomain a_pMsrArea)
  401. {
  402. COTSSample pHoleSample = new COTSSample();
  403. pHoleSample.SetMsrDomain(a_pMsrArea);
  404. // get min magnification
  405. CSEMStageData pSEMStageData = m_pProjData.GetSEMStageData();
  406. double dMinMag = pSEMStageData.GetMinMag();
  407. // get scan field size 100
  408. int nScanFieldSize100 = pSEMStageData.GetScanFieldSize100();
  409. // get working distance
  410. double dWorkingDistance = 0.0;
  411. if (!GetSEMWorkingDistanceFromHW(ref dWorkingDistance))
  412. {
  413. return null;
  414. }
  415. CSEMDataMsr poSEMDataMsr = new CSEMDataMsr();
  416. poSEMDataMsr.SetScanFieldSize100(nScanFieldSize100);
  417. poSEMDataMsr.SetWorkingDistance(dWorkingDistance);
  418. poSEMDataMsr.SetMagnification(dMinMag);
  419. pHoleSample.SetSEMDataMsr(poSEMDataMsr);
  420. // Set image scan param
  421. COTSImgScanPrm poImageScanParam = new COTSImgScanPrm();
  422. poImageScanParam.SetStopMode(((int)OTS_MEASURE_STOP_MODE.CoverMode).ToString());
  423. poImageScanParam.SetStartImageMode(OTS_GET_IMAGE_MODE.FROM_CENTER);
  424. poImageScanParam.SetScanImageSpeed(OTS_IMAGE_SCANSPEED_OPTIONS.low);
  425. //poImageScanParam.SetImagePixelSize(OTS_FIVE_TIES_OPTIONS.TIE1);
  426. CSampleParam poMsrParams = pHoleSample.GetMsrParams();
  427. poImageScanParam.SetImageResulotion(GetListMeasurableSamples()[0].GetMsrParams().GetImageScanParam().GetImageResulotion());//由于各样品分辨率应该一致,故此处没有读取选取的特定样品孔样品
  428. poMsrParams.SetImageScanParam(poImageScanParam);
  429. pHoleSample.SetMsrParams(poMsrParams);
  430. return pHoleSample;
  431. }
  432. public bool GetSEMWorkingDistanceFromHW(ref double a_dWorkingDistance)
  433. {
  434. m_SemController.GetWorkingDistance(ref a_dWorkingDistance);
  435. return true;
  436. }
  437. // measure status
  438. public void SetMsrLoopStatus(otsdataconst.OTS_MSR_THREAD_STATUS a_nMsrLoopStatus)
  439. {
  440. m_ThreadStatus.SetStatus( a_nMsrLoopStatus);
  441. }
  442. }
  443. }