Commit 8e9f5898 张东亮

存储机构-打印移栽升降轴日志

1 个父辈 0da9290e
...@@ -36,12 +36,12 @@ PRO,0,抽屉内行数,Rows_In_Drawer,4,,,,,,,,,,,, ...@@ -36,12 +36,12 @@ PRO,0,抽屉内行数,Rows_In_Drawer,4,,,,,,,,,,,,
PRO,0,抽屉内列数,Cols_In_Drawer,20,,,,,,,,,,,, PRO,0,抽屉内列数,Cols_In_Drawer,20,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,行走机构视觉对位速度,MoveAxis_FindPosSpeed,20,,,,,,,,,,,, PRO,0,行走机构视觉对位速度,MoveAxis_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,升降轴视觉对位速度,UpdownAxis_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,拉取升降轴视觉对位速度,PullAxis_Updown_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,行走机构正极限位置,MoveAxis_PosLimit,20,,,,,,,,,,,, PRO,0,行走机构正极限位置,MoveAxis_PosLimit,20,,,,,,,,,,,,
PRO,0,行走机构负极限位置,MoveAxis_NegLimit,20,,,,,,,,,,,, PRO,0,行走机构负极限位置,MoveAxis_NegLimit,20,,,,,,,,,,,,
PRO,0,升降轴视觉对位速度,UpdownAxis_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,升降轴正极限位置,UpdownAxis_PosLimit,20,,,,,,,,,,,, PRO,0,升降轴正极限位置,UpdownAxis_PosLimit,20,,,,,,,,,,,,
PRO,0,升降轴负极限位置,UpdownAxis_NegLimit,20,,,,,,,,,,,, PRO,0,升降轴负极限位置,UpdownAxis_NegLimit,20,,,,,,,,,,,,
PRO,0,拉取升降轴视觉对位速度,PullAxis_Updown_FindPosSpeed,20,,,,,,,,,,,,
PRO,0,拉取升降轴正极限位置,PullAxis_Updown_PosLimit,20,,,,,,,,,,,, PRO,0,拉取升降轴正极限位置,PullAxis_Updown_PosLimit,20,,,,,,,,,,,,
PRO,0,拉取升降轴负极限位置,PullAxis_Updown_NegLimit,20,,,,,,,,,,,, PRO,0,拉取升降轴负极限位置,PullAxis_Updown_NegLimit,20,,,,,,,,,,,,
PRO,0,抓手检测得分阈值,TongsDetectThreshold,20,,,,,,,,,,,, PRO,0,抓手检测得分阈值,TongsDetectThreshold,20,,,,,,,,,,,,
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" /> <Compile Include="storeBean\boxBean\EyemLibDemo.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" /> <Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" /> <Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\boxBean\positionDebug\DrawerResult.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugManager.cs" /> <Compile Include="storeBean\boxBean\positionDebug\PositionDebugManager.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugResult.cs" /> <Compile Include="storeBean\boxBean\positionDebug\PositionDebugResult.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean.cs" /> <Compile Include="storeBean\inputBean\BatchMoveBean.cs" />
......
...@@ -303,6 +303,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -303,6 +303,13 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if(wait.AxisInfo.DeviceName.Equals("移栽升降轴"))
{
string deviceName = wait.AxisInfo.DeviceName;
short axisNo = wait.AxisInfo.GetAxisValue();
int outCount = AxisManager.instance.GetActualtPosition(deviceName, axisNo);
LogInfo($"移栽升降轴 目标位置:{wait.TargetPosition},当前位置:{outCount}");
}
wait.IsEnd = AxisBean.ACAxisMoveIsEnd(moveInfo, wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg); wait.IsEnd = AxisBean.ACAxisMoveIsEnd(moveInfo, wait.AxisInfo, wait.TargetPosition, wait.TargetSpeed, out msg);
} }
if (!msg.Equals("")) if (!msg.Equals(""))
......
...@@ -128,6 +128,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,6 +128,10 @@ namespace OnlineStore.DeviceLibrary
InitPosititionNumList(); InitPosititionNumList();
InitDrawInfos(); InitDrawInfos();
LoadCameraConfig(); LoadCameraConfig();
//库位测试
//InitPosDebugInfo();
//Test();
} }
void InitRowColumnSig() void InitRowColumnSig()
{ {
......
...@@ -162,7 +162,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -162,7 +162,7 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SI_02_ToBufferArea: case StepEnum.SI_02_ToBufferArea:
if (!InDoorCheck(MoveInfo.MoveParam)) if (!InDoorCheck(MoveInfo.MoveParam))
{ {
SetWarnMsg($" 存储机构-入库 {MoveInfo.SLog}:入口料盘无入库信息[barcode={MoveInfo.MoveParam.PosInfo.barcode},PosSide={MoveInfo.MoveParam.PosInfo.GetPosSide()}], 任务取消"); SetWarnMsg($"入库 {MoveInfo.SLog}:入口料盘无入库信息[barcode={MoveInfo.MoveParam.PosInfo.barcode},PosSide={MoveInfo.MoveParam.PosInfo.GetPosSide()}], 任务取消");
if (MoveInfo.MoveParam.PosInfoBack == null) if (MoveInfo.MoveParam.PosInfoBack == null)
{ {
LogInfo($"入库 {MoveInfo.SLog}:入口料盘因无入库信息且AB面料叉无料,结束入库"); LogInfo($"入库 {MoveInfo.SLog}:入口料盘因无入库信息且AB面料叉无料,结束入库");
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 抽屉调试结果
/// </summary>
public class DrawerResult
{
public string DrawerName { get; set; }
public int ResultCode { get; set; } = -1;
public List<PosDebugResult> PosResultList { get; set; }
public DrawerResult()
{
PosResultList = new List<PosDebugResult>();
}
}
}
...@@ -8,41 +8,105 @@ namespace OnlineStore.DeviceLibrary ...@@ -8,41 +8,105 @@ namespace OnlineStore.DeviceLibrary
{ {
public class PosDebugResultManager public class PosDebugResultManager
{ {
public static List<PosDebugResult> posResultList; public static List<DrawerResult> DrawerResults;
public static bool isInit = false; public static bool isInit = false;
static string filePath = Common.ConfigAppSettings.GetValue(Common.Setting_Init.ConfigPath_PosDebugInfo); static string filePath = Common.ConfigAppSettings.GetValue(Common.Setting_Init.ConfigPath_PosDebugInfo);
public static void Init(List<string> posNumList) public static void Init(List<string> posNumList)
{ {
if (!System.IO.File.Exists(filePath)) if (!System.IO.File.Exists(filePath))
{ {
posResultList = new List<PosDebugResult>(); DrawerResults = new List<DrawerResult>();
foreach (var item in posNumList) foreach (var item in posNumList)
{ {
posResultList.Add(new PosDebugResult() { Name = item }); DrawerResult res = DrawerResults.Find(s => s.DrawerName.Equals(item.Substring(0, 8)));
if (res == null)
{
res = new DrawerResult() { DrawerName = item.Substring(0, 8) };
res.PosResultList.Add(new PosDebugResult() { Name = item });
DrawerResults.Add(res);
}
else
{
res.PosResultList.Add(new PosDebugResult() { Name = item });
}
} }
} }
else else
{ {
string txt = System.IO.File.ReadAllText(filePath); string txt = System.IO.File.ReadAllText(filePath);
posResultList = Common.JsonHelper.DeserializeJsonToList<PosDebugResult>(txt); if (txt.Length == 0)
{
DrawerResults = new List<DrawerResult>();
foreach (var item in posNumList)
{
DrawerResult res = DrawerResults.Find(s => s.DrawerName.Equals(item.Substring(0, 8)));
if (res == null)
{
res = new DrawerResult() { DrawerName = item.Substring(0, 8) };
res.PosResultList.Add(new PosDebugResult() { Name = item });
}
else
{
res.PosResultList.Add(new PosDebugResult() { Name = item });
}
}
}
else
DrawerResults = Common.JsonHelper.DeserializeJsonToList<DrawerResult>(txt);
} }
isInit = true; isInit = true;
} }
/// <summary>
public static int GetResult(string name) /// 获取抽屉调试结果
/// </summary>
/// <param name="drawername"></param>
/// <returns></returns>
public static int GetDrawerResult(string drawername)
{ {
if (!isInit) if (!isInit)
return -1; return -1;
PosDebugResult debugResult = posResultList.Find(s => s.Name.Equals(name)); DrawerResult drawerResult = DrawerResults.Find(s => s.DrawerName.Equals(drawername));
return debugResult.ResCode; return drawerResult.ResultCode;
} }
public static void SetResult(string name,int code) public static void SetDrawerResult(string drawername, int code)
{ {
if (!isInit) if (!isInit)
return; return;
PosDebugResult debugResult = posResultList.Find(s => s.Name.Equals(name)); DrawerResult drawerResult = DrawerResults.Find(s => s.DrawerName.Equals(drawername));
debugResult.ResCode = code; drawerResult.ResultCode = code;
}
/// <summary>
/// 设置料格的状态
/// </summary>
/// <param name="drawername">抽屉名</param>
/// <param name="code">结果代码</param>
public static void SetGridResult(string name, int code)
{
DrawerResult drawerResult = DrawerResults.Find(s => s.DrawerName.Equals(name.Substring(0, 8)));
if (drawerResult != null)
{
PosDebugResult res = drawerResult.PosResultList.Find(s => s.Name.Equals(name));
if (res != null)
res.ResCode = code;
}
}
/// <summary>
/// 获取料格状态
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public static int GetGridResult(string name)
{
DrawerResult drawerResult = DrawerResults.Find(s => s.DrawerName.Equals(name.Substring(0, 8)));
if (drawerResult != null)
{
PosDebugResult res = drawerResult.PosResultList.Find(s => s.Name.Equals(name));
if (res != null)
return res.ResCode;
}
return -1;
} }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!