Commit 83c2c13c LN

测高修改。

1 个父辈 030ca6f6
...@@ -533,7 +533,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -533,7 +533,8 @@ namespace OnlineStore.DeviceLibrary
{ {
EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis); EndMovePosition = ACServerManager.GetActualtPosition(StoreManager.Config.Batch_Axis);
} }
LastHeight = (int)Math.Ceiling(1F * (EndMovePosition - StartMovePosition) / AxisChangeValue); int cha = EndMovePosition - StartMovePosition;
LastHeight = (int)Math.Ceiling(1F * (cha) / AxisChangeValue);
int addHeight = 0; int addHeight = 0;
//如果检测信号未亮,极限亮了,需要补充高 //如果检测信号未亮,极限亮了,需要补充高
if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
...@@ -541,36 +542,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -541,36 +542,36 @@ namespace OnlineStore.DeviceLibrary
addHeight = StoreManager.Config.LastTrayAddHeight; addHeight = StoreManager.Config.LastTrayAddHeight;
} }
LastHeight += addHeight; LastHeight += addHeight;
string msg = Name + " 计算盘高:上升前【" + StartMovePosition + "】实时【" + EndMovePosition + "】补充【" + addHeight + "】计算后【" + LastHeight + "】"; string msg = Name + " 计算盘高:脉冲值 [" + EndMovePosition + "-" + StartMovePosition + "]=[" + cha + "] ,补充[" + addHeight + "]计算后[" + LastHeight + "]";
if (LastHeight < 0) if (LastHeight < 0)
{ {
LastHeight = StoreManager.Config.GetDefaultHeight(); LastHeight = StoreManager.Config.GetDefaultHeight();
} }
if (StoreManager.Config.Default_TrayWidth.Equals(7)) //if (StoreManager.Config.Default_TrayWidth.Equals(7))
{ //{
//高度=8的料盘容易被测成12的,判断如果计算的高度<12都认为是8mm, //高度=8的料盘容易被测成12的,判断如果计算的高度<12都认为是8mm,
if (LastHeight >= 20) //if (LastHeight >= 20)
{ //{
LastHeight = 24; // LastHeight = 24;
} //}
else if (LastHeight >= 12) //else if (LastHeight >= 12)
{ //{
LastHeight = 12; // LastHeight = 12;
} //}
else //else
{ //{
LastHeight = 8; // LastHeight = 8;
} //}
} //}
//else
//{
if (LastHeight <= 8) { LastHeight = 8; }
else else
{ {
if (LastHeight <= 8) { LastHeight = 8; } LastHeight = (int)Math.Floor(1F * LastHeight / 4) * 4;
else
{
LastHeight = (int)Math.Ceiling(1F * LastHeight / 4) * 4;
}
} }
LogUtil.info(msg+",归类为"+LastHeight); //}
LogUtil.info(msg + ",归类为" + LastHeight);
return LastHeight; return LastHeight;
} }
private static List<AutoStorePosition> AllPosList = null; private static List<AutoStorePosition> AllPosList = null;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!