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

修复 当线速度=0, FeedbackHeat 判断稳定性会出错

parent a3140dc9
......@@ -674,16 +674,23 @@ namespace FLY.FeedbackRenZiJia.Server
DateTime htime = lcThickHeat.HTime;
double filmLength = lcThickHeat.FilmLength;
double filmVelocity = lcThickHeat.FilmVelocity;
if (filmVelocity < 2)
{
//速度太慢,没生产
lcThickHeat.IsStable = false;
return;
}
//TODO
if (lcThickHeat.RCnt < 1)
{
//刚开机,肯定不稳定
lcThickHeat.IsStable = false;
return;
}
else
{
lcThickHeat.IsStable = time > (htime + TimeSpan.FromSeconds(Delay) + TimeSpan.FromMinutes(filmLength / filmVelocity));
}
}
/// <summary>
......@@ -710,8 +717,15 @@ namespace FLY.FeedbackRenZiJia.Server
if (invalid_cnt > NBolts / 2)//有一半数据都是无效的
return;
if (filmVelocity < 2) {
//速度太慢,异常
return;
}
if (filmLength < 1)
{
//膜距离太短,异常
return;
}
HeatChanged.ITEM heat = mHeatChanged.mItem.Last();
var lcThickHeat = new Lc_ThickHeat()
{
......
......@@ -1479,8 +1479,13 @@ namespace FLY.Thick.Blowing.Server
if (frameinfo.scandata_id == null)
{
if (frameinfo.renZiJiaDataEventArgs.FilmVelocity < 2) {
//异常
continue;
}
//添加数据
var lc_scandata = Lc_AutoMapperProfile.Mapper.Map<Lc_ScanData>(frameinfo.renZiJiaDataEventArgs);
historyDb.AddScanData(lc_scandata);
frameinfo.scandata_id = lc_scandata.ID;
renZiJiaDataEventArgs = frameinfo.renZiJiaDataEventArgs;
......
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