|
@@ -10,9 +10,9 @@ using System.Threading;
|
|
|
|
|
|
namespace SmartSEMControl
|
|
|
{
|
|
|
- public class SmartSEM
|
|
|
+ public class SmartSEM : SEMControl
|
|
|
{
|
|
|
- #region 参数
|
|
|
+ #region 模拟参数
|
|
|
//放大缩小
|
|
|
private String AP_MAG = "AP_MAG";
|
|
|
//焦距
|
|
@@ -27,6 +27,10 @@ namespace SmartSEMControl
|
|
|
private String AP_STIG_Y = "AP_STIG_Y";
|
|
|
//角度补偿
|
|
|
private String AP_TILT_ANGLE = "AP_TILT_ANGLE";
|
|
|
+ //SEM移动X
|
|
|
+ private String AP_BEAMSHIFT_X = "AP_BEAMSHIFT_X";
|
|
|
+ //SEM移动Y
|
|
|
+ private String AP_BEAMSHIFT_Y = "AP_BEAMSHIFT_Y";
|
|
|
//X轴移动到
|
|
|
private String AP_STAGE_GOTO_X = "AP_STAGE_GOTO_X";
|
|
|
//Y轴移动到
|
|
@@ -57,6 +61,13 @@ namespace SmartSEMControl
|
|
|
private String AP_STAGE_AT_M = "AP_STAGE_AT_M";
|
|
|
#endregion
|
|
|
|
|
|
+ #region 数字参数
|
|
|
+ //Scan Rotate开关
|
|
|
+ private String DP_SCAN_ROT = "DP_SCAN_ROT";
|
|
|
+ //取消电子束校正
|
|
|
+ private String DP_TILT_CORRECTION = "DP_TILT_CORRECTION";
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 命令
|
|
|
//开启电压
|
|
|
private String CMD_BEAM_ON = "CMD_BEAM_ON";
|
|
@@ -70,6 +81,13 @@ namespace SmartSEMControl
|
|
|
private long lrt = 0;
|
|
|
#endregion
|
|
|
|
|
|
+ #region 构造函数
|
|
|
+ public SmartSEM()
|
|
|
+ {
|
|
|
+ Init();
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 设备初始化
|
|
|
/// <summary>
|
|
|
/// 设备初始化
|
|
@@ -77,11 +95,11 @@ namespace SmartSEMControl
|
|
|
/// <returns>return:true or false</returns>
|
|
|
public Boolean Init()
|
|
|
{
|
|
|
-#if ROMOTE
|
|
|
- lrt = CZEMApi.InitialiseRemoting();
|
|
|
-#else
|
|
|
- lrt = CZEMApi.Initialise("");
|
|
|
-#endif
|
|
|
+ #if ROMOTE
|
|
|
+ lrt = CZEMApi.InitialiseRemoting();
|
|
|
+ #else
|
|
|
+ lrt = CZEMApi.Initialise("");
|
|
|
+ #endif
|
|
|
if (lrt != 0)
|
|
|
{
|
|
|
m_bInitialised = false;
|
|
@@ -93,9 +111,9 @@ namespace SmartSEMControl
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 设备远程初始化
|
|
|
+ #region 设备远程初始化
|
|
|
/// <summary>
|
|
|
/// 设备远程初始化
|
|
|
/// </summary>
|
|
@@ -114,14 +132,14 @@ namespace SmartSEMControl
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 关闭设备
|
|
|
+ #region 关闭设备
|
|
|
/// <summary>
|
|
|
/// 关闭设备
|
|
|
/// </summary>
|
|
|
/// <returns>true or false</returns>
|
|
|
- public Boolean UnInit()
|
|
|
+ public Boolean Dispose()
|
|
|
{
|
|
|
if (m_bInitialised)
|
|
|
{
|
|
@@ -141,9 +159,9 @@ namespace SmartSEMControl
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 读参数函数
|
|
|
+ #region 读参数函数
|
|
|
private Boolean ReadParams(String str_param, ref float value)
|
|
|
{
|
|
|
if (m_bInitialised)
|
|
@@ -165,9 +183,9 @@ namespace SmartSEMControl
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 写参数函数
|
|
|
+ #region 写模拟参数函数
|
|
|
private Boolean WriteParams(String str_param, float value)
|
|
|
{
|
|
|
if (m_bInitialised)
|
|
@@ -211,9 +229,29 @@ namespace SmartSEMControl
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 执行命令
|
|
|
+ #region 写数字参数函数
|
|
|
+ private Boolean WriteDataParams(String str_param, float value)
|
|
|
+ {
|
|
|
+ if (m_bInitialised)
|
|
|
+ {
|
|
|
+ object varFloat = new VariantWrapper(value);
|
|
|
+ lrt = CZEMApi.Set(str_param, ref varFloat);// set value
|
|
|
+ if (lrt != 0)
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 执行命令
|
|
|
private Boolean ExecuteCmd(String cmd)
|
|
|
{
|
|
|
if (m_bInitialised)
|
|
@@ -233,67 +271,53 @@ namespace SmartSEMControl
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 放大缩小
|
|
|
- /// <summary>
|
|
|
- /// 读取缩放倍数
|
|
|
- /// </summary>
|
|
|
- /// <returns>true:float or false:NaN</returns>
|
|
|
- public float GetMagnification()
|
|
|
+ #region 缩放
|
|
|
+ public float Magnification
|
|
|
{
|
|
|
- float ret = 0;
|
|
|
- if (ReadParams(AP_MAG, ref ret))
|
|
|
+ get
|
|
|
{
|
|
|
- return ret;
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(AP_MAG, ref ret))
|
|
|
+ {
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return float.NaN;
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+ set
|
|
|
{
|
|
|
- return float.NaN;
|
|
|
+ WriteParams(AP_MAG, value);
|
|
|
}
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 设置缩放倍数
|
|
|
- /// </summary>
|
|
|
- /// <param name="set">倍数</param>
|
|
|
- /// <returns>true or false</returns>
|
|
|
- public Boolean SetMagnification(float set)
|
|
|
- {
|
|
|
- return WriteParams(AP_MAG, set);
|
|
|
- }
|
|
|
-#endregion
|
|
|
-
|
|
|
-#region 焦距
|
|
|
- /// <summary>
|
|
|
- /// 读取工作距离
|
|
|
- /// </summary>
|
|
|
- /// <returns>true:float or false:NaN</returns>
|
|
|
- public float GetWorkingDistance()
|
|
|
+ #region 焦距
|
|
|
+ public float WorkingDistance
|
|
|
{
|
|
|
- float ret = 0;
|
|
|
- if (ReadParams(AP_WD, ref ret))
|
|
|
+ get
|
|
|
{
|
|
|
- return ret;
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(AP_WD, ref ret))
|
|
|
+ {
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return float.NaN;
|
|
|
+ }
|
|
|
}
|
|
|
- else
|
|
|
+ set
|
|
|
{
|
|
|
- return float.NaN;
|
|
|
+ WriteParams(AP_WD, value);
|
|
|
}
|
|
|
}
|
|
|
+ #endregion
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 设置焦距
|
|
|
- /// </summary>
|
|
|
- /// <param name="set">焦距</param>
|
|
|
- /// <returns>true or false</returns>
|
|
|
- public Boolean SetWorkingDistance(float set)
|
|
|
- {
|
|
|
- return WriteParams(AP_WD, set);
|
|
|
- }
|
|
|
-#endregion
|
|
|
-
|
|
|
-#region 亮度
|
|
|
+ #region 亮度
|
|
|
/// <summary>
|
|
|
/// 读取亮度
|
|
|
/// </summary>
|
|
@@ -320,9 +344,9 @@ namespace SmartSEMControl
|
|
|
{
|
|
|
return WriteParams(AP_BRIGHTNESS, set);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 对比度
|
|
|
+ #region 对比度
|
|
|
/// <summary>
|
|
|
/// 读取对比度
|
|
|
/// </summary>
|
|
@@ -349,9 +373,9 @@ namespace SmartSEMControl
|
|
|
{
|
|
|
return WriteParams(AP_CONTRAST, set);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 消像散
|
|
|
+ #region 消像散
|
|
|
/// <summary>
|
|
|
/// 读取消像散X
|
|
|
/// </summary>
|
|
@@ -405,9 +429,9 @@ namespace SmartSEMControl
|
|
|
{
|
|
|
return WriteParams(AP_STIG_Y, set);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 角度补偿
|
|
|
+ #region 角度补偿
|
|
|
/// <summary>
|
|
|
/// 读取角度补偿
|
|
|
/// </summary>
|
|
@@ -434,9 +458,9 @@ namespace SmartSEMControl
|
|
|
{
|
|
|
return WriteParams(AP_TILT_ANGLE, set);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 抓取图像
|
|
|
+ #region 抓取图像
|
|
|
/// <summary>
|
|
|
/// 抓取图像
|
|
|
/// </summary>
|
|
@@ -460,9 +484,65 @@ namespace SmartSEMControl
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region SEM移动接口
|
|
|
+ /// <summary>
|
|
|
+ /// 获取SEM移动接口X
|
|
|
+ /// </summary>
|
|
|
+ /// <returns>true:float or false:NaN</returns>
|
|
|
+ public float GetBeamShiftX()
|
|
|
+ {
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(AP_BEAMSHIFT_X, ref ret))
|
|
|
+ {
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return float.NaN;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取SEM移动接口Y
|
|
|
+ /// </summary>
|
|
|
+ /// <returns>true:float or false:NaN</returns>
|
|
|
+ public float GetBeamShiftY()
|
|
|
+ {
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(AP_BEAMSHIFT_Y, ref ret))
|
|
|
+ {
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return float.NaN;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 设置SEM移动接口X
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="set">X坐标</param>
|
|
|
+ /// <returns>true or false</returns>
|
|
|
+ public Boolean SetBeamShiftX(float set)
|
|
|
+ {
|
|
|
+ return WriteParams(AP_BEAMSHIFT_X, set);
|
|
|
+ }
|
|
|
|
|
|
-#region SEM移动接口
|
|
|
+ /// <summary>
|
|
|
+ /// 设置SEM移动接口Y
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="set">X坐标</param>
|
|
|
+ /// <returns>true or false</returns>
|
|
|
+ public Boolean SetBeamShiftY(float set)
|
|
|
+ {
|
|
|
+ return WriteParams(AP_BEAMSHIFT_Y, set);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 样品台移动接口
|
|
|
/// <summary>
|
|
|
/// 返回样品台坐标数组
|
|
|
/// </summary>
|
|
@@ -499,7 +579,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 X轴
|
|
|
+ /// 样品台位置 X轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtX()
|
|
@@ -516,7 +596,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 Y轴
|
|
|
+ /// 样品台位置 Y轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtY()
|
|
@@ -533,7 +613,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 Z轴
|
|
|
+ /// 样品台位置 Z轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtZ()
|
|
@@ -550,7 +630,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 T轴
|
|
|
+ /// 样品台位置 T轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtT()
|
|
@@ -567,7 +647,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 R轴
|
|
|
+ /// 样品台位置 R轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtR()
|
|
@@ -584,7 +664,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 M轴
|
|
|
+ /// 样品台位置 M轴
|
|
|
/// </summary>
|
|
|
/// <returns>true:float or false:NaN</returns>
|
|
|
public float GetStageAtM()
|
|
@@ -601,7 +681,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 X轴
|
|
|
+ /// 样品台位置 X轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">X轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -611,7 +691,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 Y轴
|
|
|
+ /// 样品台位置 Y轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">Y轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -621,7 +701,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 Z轴
|
|
|
+ /// 样品台位置 Z轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">Y轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -631,7 +711,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 T轴
|
|
|
+ /// 样品台位置 T轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">Y轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -641,7 +721,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 R轴
|
|
|
+ /// 样品台位置 R轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">Y轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -651,7 +731,7 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// SEM位置 M轴
|
|
|
+ /// 样品台位置 M轴
|
|
|
/// </summary>
|
|
|
/// <param name="set">M轴移动坐标</param>
|
|
|
/// <returns></returns>
|
|
@@ -659,9 +739,9 @@ namespace SmartSEMControl
|
|
|
{
|
|
|
return WriteParams(AP_STAGE_GOTO_M, set);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region Scan Rotate角度接口
|
|
|
+ #region Scan Rotate角度接口
|
|
|
/// <summary>
|
|
|
/// 获取Scan Rotate角度接口
|
|
|
/// </summary>
|
|
@@ -686,11 +766,13 @@ namespace SmartSEMControl
|
|
|
/// <returns>true or false</returns>
|
|
|
public Boolean SetScanRotation(float set)
|
|
|
{
|
|
|
+ WriteDataParams(DP_SCAN_ROT, 1);
|
|
|
return WriteParams(AP_SCANROTATION, set);
|
|
|
+ WriteDataParams(DP_SCAN_ROT, 0);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 像素读取PixelSize
|
|
|
+ #region 像素读取PixelSize
|
|
|
/// <summary>
|
|
|
/// 获取Pixel Size 接口,只读
|
|
|
/// </summary>
|
|
@@ -707,20 +789,50 @@ namespace SmartSEMControl
|
|
|
return float.NaN;
|
|
|
}
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 电子束校正设置
|
|
|
+ /// <summary>
|
|
|
+ /// 读取电子束校正状态
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public float GetTiltCorrection()
|
|
|
+ {
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(DP_TILT_CORRECTION, ref ret))
|
|
|
+ {
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return float.NaN;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-#region 开启电压
|
|
|
+ /// <summary>
|
|
|
+ /// 设置电子束校正状态
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="set"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public Boolean SetTiltCorrection(float set)
|
|
|
+ {
|
|
|
+ return WriteDataParams(DP_TILT_CORRECTION, set);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 开启电压
|
|
|
public Boolean CmdOpenVoltage()
|
|
|
{
|
|
|
return ExecuteCmd(CMD_BEAM_ON);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
|
|
|
-#region 关闭电压
|
|
|
+ #region 关闭电压
|
|
|
public Boolean CmdCloseVoltage()
|
|
|
{
|
|
|
return ExecuteCmd(CMD_EHT_OFF);
|
|
|
}
|
|
|
-#endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
}
|