Commit 3979adf6 刘韬

入料口放料后用视觉检测是否放入

1 个父辈 137a720d
...@@ -230,7 +230,9 @@ namespace DeviceLibrary ...@@ -230,7 +230,9 @@ namespace DeviceLibrary
public static TestStorePointPort GetTestStorePointPort(string posname) { public static TestStorePointPort GetTestStorePointPort(string posname) {
TestStorePointPort testStorePointPort; TestStorePointPort testStorePointPort;
if (Regex.IsMatch(posname, "^S[A-G]")) if (posname.StartsWith("L"))
testStorePointPort = TestStorePointPort.入口;
else if (Regex.IsMatch(posname, "^S[A-G]"))
testStorePointPort= TestStorePointPort.上层左侧; testStorePointPort= TestStorePointPort.上层左侧;
else if (Regex.IsMatch(posname, "^S[H-N][1-6]$")) else if (Regex.IsMatch(posname, "^S[H-N][1-6]$"))
testStorePointPort = TestStorePointPort.下层左侧; testStorePointPort = TestStorePointPort.下层左侧;
......
...@@ -381,15 +381,35 @@ namespace DeviceLibrary ...@@ -381,15 +381,35 @@ namespace DeviceLibrary
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd))
{ } { }
} }
if (OutStoreJobList.Count==0) StoreMoveInfo.NextMoveStep(MoveStep.StoreIn10);
StoreMoveInfo.NewMove(MoveStep.StoreIn01); StoreMoveInfo.log($"入库完成,开始检查库位");
else
StoreMoveInfo.NewMove(MoveStep.Wait);
StoreMoveInfo.log($"入库完成");
CameraPointTest.GetThingStoreName(TestStorePointPort.入口); CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
} }
break; break;
case MoveStep.StoreIn10:
var posid = StoreMoveInfo.MoveParam.PosID;//SA1
List<string> ol = new List<string>();
TestStorePointPort tspp = CameraPointTest.GetTestStorePointPort(posid);
ol = CameraPointTest.GetThingStoreName(tspp);
StoreMoveInfo.log($"检测到有料库位,{tspp}: {string.Join(",", ol)}");
if (ol.Contains(posid))
{
StoreMoveInfo.log("入库成功");
}
else
{
Msg.add(string.Format("No material detected at storage location {0} – please check.", posid), MsgLevel.alarm);
StoreMoveInfo.log("入库失败,请检查库位:" + posid);
}
if (OutStoreJobList.Count == 0)
StoreMoveInfo.NewMove(MoveStep.StoreIn01);
else
StoreMoveInfo.NewMove(MoveStep.Wait);
break;
case MoveStep.StoreOut10: case MoveStep.StoreOut10:
if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Out_Drawer_Lock).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Out_Drawer_Lock).Equals(IO_VALUE.HIGH))
{ {
......
...@@ -60,6 +60,7 @@ namespace DeviceLibrary ...@@ -60,6 +60,7 @@ namespace DeviceLibrary
StoreIn07, StoreIn07,
StoreIn08, StoreIn08,
StoreIn09, StoreIn09,
StoreIn10,
StoreOut10, //出库 StoreOut10, //出库
StoreOut10_1, StoreOut10_1,
StoreOut_NGPre, StoreOut_NGPre,
......
...@@ -31,6 +31,6 @@ using System.Runtime.InteropServices; ...@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
// //
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.2.0")]
//[assembly: AssemblyVersion("1.0.*")] //[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!