|
@@ -273,49 +273,63 @@ namespace SmartSEMControl
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region 缩放
|
|
|
- public float Magnification
|
|
|
+ #region 放大缩小
|
|
|
+ /// <summary>
|
|
|
+ /// 读取缩放倍数
|
|
|
+ /// </summary>
|
|
|
+ /// <returns>true:float or false:NaN</returns>
|
|
|
+ public float GetMagnification()
|
|
|
{
|
|
|
- get
|
|
|
+ float ret = 0;
|
|
|
+ if(ReadParams(AP_MAG, ref ret))
|
|
|
{
|
|
|
- float ret = 0;
|
|
|
- if (ReadParams(AP_MAG, ref ret))
|
|
|
- {
|
|
|
- return ret;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return float.NaN;
|
|
|
- }
|
|
|
+ return ret;
|
|
|
}
|
|
|
- set
|
|
|
+ else
|
|
|
{
|
|
|
- WriteParams(AP_MAG, value);
|
|
|
+ return float.NaN;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 设置缩放倍数
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="set">倍数</param>
|
|
|
+ /// <returns>true or false</returns>
|
|
|
+ public Boolean SetMagnification(float set)
|
|
|
+ {
|
|
|
+ return WriteParams(AP_MAG, set);
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 焦距
|
|
|
- public float WorkingDistance
|
|
|
+ /// <summary>
|
|
|
+ /// 读取工作距离
|
|
|
+ /// </summary>
|
|
|
+ /// <returns>true:float or false:NaN</returns>
|
|
|
+ public float GetWorkingDistance()
|
|
|
{
|
|
|
- get
|
|
|
+ float ret = 0;
|
|
|
+ if (ReadParams(AP_WD, ref ret))
|
|
|
{
|
|
|
- float ret = 0;
|
|
|
- if (ReadParams(AP_WD, ref ret))
|
|
|
- {
|
|
|
- return ret;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return float.NaN;
|
|
|
- }
|
|
|
+ return ret;
|
|
|
}
|
|
|
- set
|
|
|
+ else
|
|
|
{
|
|
|
- WriteParams(AP_WD, value);
|
|
|
+ return float.NaN;
|
|
|
}
|
|
|
}
|
|
|
- #endregion
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 设置焦距
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="set">焦距</param>
|
|
|
+ /// <returns>true or false</returns>
|
|
|
+ public Boolean SetWorkingDistance(float set)
|
|
|
+ {
|
|
|
+ return WriteParams(AP_WD, set);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
|
|
|
#region 亮度
|
|
|
/// <summary>
|
|
@@ -766,9 +780,11 @@ 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);
|
|
|
+ Boolean ret = false;
|
|
|
+ ret = WriteDataParams(DP_SCAN_ROT, 1);
|
|
|
+ ret = WriteParams(AP_SCANROTATION, set);
|
|
|
+ ret = WriteDataParams(DP_SCAN_ROT, 0);
|
|
|
+ return ret;
|
|
|
}
|
|
|
#endregion
|
|
|
|