Commit c5d98bb6 authored by 潘栩锋's avatar 潘栩锋 🚴

删除多余的

parent 69b2a004
...@@ -25,22 +25,9 @@ namespace FLY.Thick.Base.Common ...@@ -25,22 +25,9 @@ namespace FLY.Thick.Base.Common
} }
#region BASE #region BASE
/// <summary> /// <summary>
/// /// AD 值经过 曲线转换的 测量值
/// </summary>
public int Thick {
get {
if (double.IsNaN(Thk))
{
return Misc.MyBase.NULL_VALUE;
}
else {
return (int)(Thk * 100);
}
}
}
/// <summary>
///
/// </summary> /// </summary>
public double Thk { get; set; } = 100.23; public double Thk { get; set; } = 100.23;
...@@ -49,23 +36,11 @@ namespace FLY.Thick.Base.Common ...@@ -49,23 +36,11 @@ namespace FLY.Thick.Base.Common
/// </summary> /// </summary>
public int Position { get; set; } public int Position { get; set; }
/// <summary>
/// 分区序号
/// </summary>
public int BoltIndex { get; set; }
/// <summary>
/// 分区号
/// </summary>
public int BoltNo
{
get { return BoltIndex + FirstBoltNo; }
}
/// <summary> /// <summary>
/// AD值 /// AD值
/// </summary> /// </summary>
public int AD { get; set; } = 12345; public int AD { get; set; } = 12345;
/// <summary> /// <summary>
/// 最大AD值 /// 最大AD值
/// </summary> /// </summary>
...@@ -149,21 +124,6 @@ namespace FLY.Thick.Base.Common ...@@ -149,21 +124,6 @@ namespace FLY.Thick.Base.Common
#endregion #endregion
#region BOLTMAP 分区信息
/// <summary>
/// 总分区数
/// </summary>
public int NBolts { get; set; } = 50;
/// <summary>
/// 开始分区号
/// </summary>
public int FirstBoltNo { get; set; }
#endregion
#region INotifyPropertyChanged 成员 #region INotifyPropertyChanged 成员
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
......
...@@ -125,8 +125,7 @@ namespace FLY.Thick.Base.Server ...@@ -125,8 +125,7 @@ namespace FLY.Thick.Base.Server
} }
else if (e.PropertyName == nameof(flyAd.Position2)) else if (e.PropertyName == nameof(flyAd.Position2))
{ {
double filmPos = Pos2ToFilmPos(flyAd.Position2); FilmPosition = Pos2ToFilmPos(flyAd.Position2);
FilmPosition = filmPos;
} }
} }
...@@ -292,6 +291,24 @@ namespace FLY.Thick.Base.Server ...@@ -292,6 +291,24 @@ namespace FLY.Thick.Base.Server
#endregion #endregion
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public void SyncSysTime()
{
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, false);
//1秒后,复位同步信号
PollModule.Current.Poll_Config(PollModule.POLL_CONFIG.ADD,
() => {
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, true);
},
TimeSpan.FromSeconds(1), true, false, this, MARKNO_SYNC_HIGH, true);
}
/// <summary> /// <summary>
/// 设置膜位置为某值 /// 设置膜位置为某值
/// </summary> /// </summary>
...@@ -302,31 +319,16 @@ namespace FLY.Thick.Base.Server ...@@ -302,31 +319,16 @@ namespace FLY.Thick.Base.Server
{ {
reset_pos2 = flyAd.Position2; reset_pos2 = flyAd.Position2;
reset_filmPos = filmPos; reset_filmPos = filmPos;
FilmPosition = Pos2ToFilmPos(flyAd.Position2);
} }
else else
{ {
RCnt = 0; RCnt = 0;
BaseFilmPosition = filmPos; BaseFilmPosition = filmPos;
}
FilmPosition = filmPos; FilmPosition = filmPos;
} }
/// <summary>
/// 让同步信号输出 1到0 1秒后, 0到1
/// </summary>
public void SyncSysTime()
{
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, false);
//1秒后,复位同步信号
PollModule.Current.Poll_Config(PollModule.POLL_CONFIG.ADD,
() => {
flyAd.SetOutputBit(FlyADIODefine.Instance.OutNo_Sync, true);
},
TimeSpan.FromSeconds(1), true, false, this, MARKNO_SYNC_HIGH, true);
} }
/// <summary> /// <summary>
/// 设置膜位置为某值; 同步服务器调用的 /// 设置膜位置为某值; 同步服务器调用的
/// </summary> /// </summary>
...@@ -350,15 +352,17 @@ namespace FLY.Thick.Base.Server ...@@ -350,15 +352,17 @@ namespace FLY.Thick.Base.Server
{ {
reset_pos2 = flyAd.Position2; reset_pos2 = flyAd.Position2;
} }
FilmPosition = Pos2ToFilmPos(flyAd.Position2);
} }
else else
{ {
RCnt = 0; RCnt = 0;
BaseFilmPosition = filmPos; BaseFilmPosition = filmPos;
}
FilmPosition = filmPos; FilmPosition = filmPos;
} }
}
double Pos2ToFilmPos(int pos2) double Pos2ToFilmPos(int pos2)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment