start ocr after finish zero action
This commit was merged in pull request #1.
This commit is contained in:
@@ -290,7 +290,7 @@ namespace TetraPackOCR
|
||||
// 设置曝光
|
||||
using (IFloatParameter p = m_dev_cam_ocr.ParameterCollection[ParametrizeNameSet.ExposureTime])
|
||||
{
|
||||
p.SetValue(800000);
|
||||
p.SetValue(500000);
|
||||
}
|
||||
// 设置增益
|
||||
|
||||
@@ -1015,6 +1015,12 @@ namespace TetraPackOCR
|
||||
return;
|
||||
}
|
||||
|
||||
if (orderLoaded == false)
|
||||
{
|
||||
MessageBox.Show("未获取正确的订单编号!");
|
||||
return;
|
||||
}
|
||||
|
||||
InitLableColumn();
|
||||
|
||||
m_GotoZero = false;
|
||||
@@ -1032,8 +1038,9 @@ namespace TetraPackOCR
|
||||
m_dev_cam_det?.ExecuteSoftwareTrigger();
|
||||
list_Log.Clear();
|
||||
log.Info("手动触发开始");
|
||||
m_BeginOCR = true;
|
||||
}
|
||||
|
||||
private bool m_BeginOCR = false;
|
||||
private List<string> ExecelGetOcrText(string design, string layer)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
@@ -1830,8 +1837,26 @@ namespace TetraPackOCR
|
||||
mMatchingStr = Convert.ToInt32(mMatchingStrf);
|
||||
|
||||
log.Info("PC接收PLC数据:数据内容:" + mMatchingStr);
|
||||
if (m_BeginOCR == false && m_GotoZero == false)
|
||||
{
|
||||
NoticePLCCompleteOCR();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_GotoZero)
|
||||
{
|
||||
if (mMatchingStr == 2)
|
||||
{
|
||||
Thread.Sleep(3000);
|
||||
EnableStartDetect();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (NumberOfLanes + 1 == mMatchingStr)
|
||||
{
|
||||
Thread.Sleep(3000);
|
||||
EnableStartDetect();
|
||||
if (ocrAcc.Count == 0)
|
||||
return;
|
||||
@@ -1853,6 +1878,10 @@ namespace TetraPackOCR
|
||||
autorunFlag = check_Autorun.Checked;
|
||||
if (check_Autorun.Checked == false)
|
||||
{
|
||||
button1.Enabled = true;
|
||||
button1.BackColor = Color.LimeGreen;
|
||||
btn_StarDet_manual.Enabled = false;
|
||||
btn_StarDet_manual.BackColor = Color.LightGray;
|
||||
m_GotoZero = true;
|
||||
List<float> plcXY = new List<float>();
|
||||
plcXY.Add(1);
|
||||
|
||||
Reference in New Issue
Block a user