|
@@ -0,0 +1,100 @@
|
|
|
+
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Drawing;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+
|
|
|
+namespace ServiceInterface
|
|
|
+{
|
|
|
+ public class SemController
|
|
|
+ {
|
|
|
+ public static NSOTSController.COTSControlFunExport hw=null;
|
|
|
+
|
|
|
+ public SemController()
|
|
|
+ {
|
|
|
+ if (hw == null)
|
|
|
+ {
|
|
|
+ hw = new NSOTSController.COTSControlFunExport();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool Connect()
|
|
|
+ {
|
|
|
+
|
|
|
+ if (hw.IsConnected())
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ { //和电镜建立通讯连接
|
|
|
+ return hw.ConncetSem();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool DisConnect()
|
|
|
+ {
|
|
|
+
|
|
|
+ return hw.DisconnectSem();
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool GetMagnification(ref double a_dMagnification)
|
|
|
+ {
|
|
|
+ return hw.GetSemMagnification(ref a_dMagnification);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool GetScanFieldSize(ref double dScanFieldSizeX, ref double dScanFieldSizeY)
|
|
|
+ {
|
|
|
+ return hw.GetSemScanFieldSize(ref dScanFieldSizeX, ref dScanFieldSizeY);
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool GetSemPositionXY(ref double a_dPositionX, ref double a_dPositionY, ref double a_dPositionR)
|
|
|
+ {
|
|
|
+ return hw.GetSemPositionXY(ref a_dPositionX, ref a_dPositionY, ref a_dPositionR);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public bool GetWorkingDistance(ref double a_distance)
|
|
|
+ {
|
|
|
+ return hw.GetSemWorkingDistance(ref a_distance);
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool IsConnected()
|
|
|
+ {
|
|
|
+ //return true;
|
|
|
+ return hw.IsConnected();
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool MoveSEMToPoint(Point poi, double rotation)
|
|
|
+ {
|
|
|
+ return hw.MoveSEMToPoint(poi.X, poi.Y, rotation);
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool SetMagnification(double a_dMagnification)
|
|
|
+ {
|
|
|
+ //hw.SetMagnification(a_dMagnification);
|
|
|
+ hw.SetSemMagnification(a_dMagnification);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool SetScanExternal(bool b)
|
|
|
+ {
|
|
|
+ //int seValue = b ? 1 : 0;
|
|
|
+ return hw.SetSemScanExternal(b);
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool SetWorkingDistance(double a_distance)
|
|
|
+ {
|
|
|
+ return hw.SetSemWorkingDistance(a_distance);
|
|
|
+ }
|
|
|
+
|
|
|
+ public NSOTSController.COTSControlFunExport GetHardwareInterface()
|
|
|
+ {
|
|
|
+ return hw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|