Commit 580a219a LN

扫码增加总次数统计

1 个父辈 e4da2f0c
......@@ -82,14 +82,16 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg(Name + "启动失败:急停未开");
return false;
}
StationInfo_Move = new StationTrayInfo();
StationInfo_NG = new StationTrayInfo();
StationInfo_Scan = new StationTrayInfo();
mainTimer.Stop();
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
lineStatus = LineStatus.StoreOnline;
runStatus = LineRunStatus.HomeMoving;
MoveInfo.NewMove(LineMoveType.ReturnHome);
//启动时需要主动扫码一次
NewTypeScan(true);
StartReset();
if (isDebug)
{
......@@ -176,6 +178,19 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.DL_R_CylinderDown:
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH);
LogInfo(MoveInfo.MoveType + "完成,接驳台皮带线常转 ");
if (MoveInfo.MoveType.Equals(LineMoveType.ReturnHome))
{
//启动时,出口定位信号亮,需要主动扫码一次
if (IOValue(IO_Type.Location_Check3).Equals(IO_VALUE.HIGH))
{
LogUtil.info(Name + "启动时长皮带线定位信号亮,触发一次扫码");
NewTypeScan(true);
}
else
{
}
}
MoveEndS();
SecondMoveInfo.EndMove();
break;
......@@ -508,10 +523,19 @@ namespace OnlineStore.DeviceLibrary
{
LastCode = "";
StationInfo_Scan = new StationTrayInfo(IO_VALUE.HIGH, LastCode);
if (DeviceID.Equals(301))
{
if (Line3LastTrayP > Line3MaxPosition) { Line3LastTrayP = Line3MaxPosition; }
StationInfo_NG = new StationTrayInfo(StationInfo_Scan.TrayValue, StationInfo_Scan.CodeStr);
}
else
{
if (Line3LastTrayP > Line3MaxPosition - 1)
{
Line3LastTrayP = Line3MaxPosition - 1;
}
}
LogUtil.info(hengyiName + "扫码工位:开始扫码,IsInScanCode=" + IsInScanCode);
List<string> LastCodeList = CodeManager.CameraScan(Config.GetCameraList(), hengyiName);
if (LastCodeList.Count <= 0)
......
......@@ -112,6 +112,7 @@ namespace OnlineStore.DeviceLibrary
// }
// return bitm;
//}
private static int ScanCount = 0;
private static int codeCount = ConfigAppSettings.GetIntValue(Setting_Init.CodeCount);
[HandleProcessCorruptedStateExceptions]
public static List<string> CameraScan(List<string> cameraList, string deviceName, bool isSaveImg = false)
......@@ -133,7 +134,8 @@ namespace OnlineStore.DeviceLibrary
{
continue;
}
DateTime startTime = DateTime.Now;
ScanCount++;
DateTime startTime = DateTime.Now;
LogUtil.info(deviceName + " 【" + cameraName + "】开始取图片");
//using (Bitmap bitmap = GetCamerImage(cameraName))
//{
......@@ -179,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
{
// SaveImageToFile(deviceName, cameraName, bit);
}
LogUtil.info(deviceName + " 【" + cameraName + "】扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】:" + r);
LogUtil.info(deviceName + " 【" + cameraName + "】扫码完成【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】" + ScanCount + " :" + r);
}
catch (AccessViolationException e)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!