Commit 0b925597 LN

增加点料测试按钮

1 个父辈 a3f88ef6
......@@ -49,6 +49,7 @@
<add key ="NeedPrintLabel" value ="0"/>
<!--XRay射线最后一次使用时间-->
<add key ="XRay_Data" value ="2020-6-2"/>
<add key ="ThresholdValue" value ="30"/>
</appSettings>
<log4net>
......
......@@ -67,6 +67,9 @@
<Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="CountImage">
<HintPath>..\..\dll\X-Ray\CountImage.dll</HintPath>
</Reference>
<Reference Include="DeviceLib">
<HintPath>..\..\dll\DeviceLib.dll</HintPath>
</Reference>
......
......@@ -43,6 +43,7 @@ namespace OnlineStore.AutoCountClient
lblData.Text = "最后使用时间:" + ConfigAppSettings.GetValue(Setting_Init.XRay_Data);
lblLastS.Text = equipBean.LastXRayState;
lblName.Text = equipBean.Name;
numTh.Value = equipBean.ThresholdValue;
IsLoad = true;
}
......@@ -415,6 +416,35 @@ namespace OnlineStore.AutoCountClient
string fileName = equipBean.CapImage();
MessageBox.Show("获取图片完成:" + fileName);
}
private void btnWorkTest_Click(object sender, EventArgs e)
{
LogUtil.info(equipBean.Name + "用户点击 点料测试 ");
btnWorkTest.Enabled = false;
try
{
txtResult.Text = "点料中...";
int th =(int) numTh.Value;
int outCount = 0;
equipBean.countImage.GetCount(th, out outCount);
txtResult.Text = outCount.ToString();
LogUtil.info(equipBean.Name + "用户点击 点料测试["+ th + "] 结果:"+outCount);
}
catch (Exception ex)
{
LogUtil.error("点料测试出错:" + ex.ToString());
}
btnWorkTest.Enabled = true;
}
private void btnSaveTh_Click(object sender, EventArgs e)
{
int th = (int)numTh.Value;
ConfigAppSettings.SaveValue(Setting_Init.ThresholdValue, th);
equipBean.ThresholdValue = th;
MessageBox.Show("保存阈值["+th+"]成功!");
LogUtil.info( "用户点击:保存阈值[" + th + "]成功!");
}
}
}
......
......@@ -81,5 +81,7 @@ namespace OnlineStore.Common
public static string NeedPrintLabel = "NeedPrintLabel";
public static string XRay_Data = "XRay_Data";
public static string ThresholdValue = "ThresholdValue";
}
}
......@@ -209,7 +209,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IB22_LocationDown))
{
MoveInfo.NextMoveStep(StepEnum.IB23_ShelfOut);
MoveInfo.TimeOutSeconds = 30;
MoveInfo.TimeOutSeconds = 40;
MoveInfo.OneWaitCanEndStep = true;
WorkLog("上料完成 :通知agv来取料串,等待料串离开");
AgvClient.NeedLeave(AgvName, CurrShelfId, ClientLevel.High);
......
......@@ -31,6 +31,8 @@ namespace OnlineStore.DeviceLibrary
public string LastXRayState = "未知";
public bool InXWork = false;
public int ThresholdValue = ConfigAppSettings.GetIntValue(Setting_Init.ThresholdValue);
private string path_XRAY = Application.StartupPath + @"\XRAY\";
private string path1_tif = Application.StartupPath + @"\XRAY\tif";
private string path2_png = Application.StartupPath + @"\XRAY\png";
......
......@@ -335,9 +335,9 @@ namespace OnlineStore.DeviceLibrary
xRay.Stop();
}
int count = 99999;
countImage.GetCount(out count);
countImage.GetCount(ThresholdValue, out count);
InXWork = false;
WorkLog("点料:获取点料结果【" + count + "】,保存并上传结果");
WorkLog("点料:获取点料结果["+ThresholdValue+"]=【" + count + "】,保存并上传结果");
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!