Commit 3aae5c39 张东亮

添加校准库位缓存、出入库状态上报逻辑修改

1 个父辈 0445b5a6
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\DLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
......
...@@ -96,5 +96,7 @@ namespace OnlineStore.Common ...@@ -96,5 +96,7 @@ namespace OnlineStore.Common
public static MyConfig<int> CameraScan_QRCodeCount = 3; public static MyConfig<int> CameraScan_QRCodeCount = 3;
[MyConfigComment("二维码扫码超时毫秒")] [MyConfigComment("二维码扫码超时毫秒")]
public static MyConfig<int> CameraScan_CodeTimeOut = 3000; public static MyConfig<int> CameraScan_CodeTimeOut = 3000;
[MyConfigComment("校准库位料盘缓存")]
public static MyConfig<string> FixBuffInfo = "";
} }
} }
...@@ -34,26 +34,26 @@ ...@@ -34,26 +34,26 @@
<ItemGroup> <ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\DLL\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\CodeLibrary.dll</HintPath> <HintPath>..\DLL\CodeLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\ConfigHelper.dll</HintPath> <HintPath>..\DLL\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> <Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\halcondotnet.dll</HintPath> <HintPath>..\DLL\halcondotnet.dll</HintPath>
</Reference> </Reference>
<Reference Include="HuichuanLibrary"> <Reference Include="HuichuanLibrary">
<HintPath>..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath> <HintPath>..\DLL\HuichuanLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64"> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\log4net.dll</HintPath> <HintPath>..\DLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath> <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web" /> <Reference Include="System.Web" />
......
...@@ -124,8 +124,14 @@ namespace DeviceLibrary ...@@ -124,8 +124,14 @@ namespace DeviceLibrary
Operation operation = getLineBoxStatus(); Operation operation = getLineBoxStatus();
if (!string.IsNullOrEmpty(posid)) if (!string.IsNullOrEmpty(posid))
operation.boxStatus[StoreID].data.Add(ParamDefine.posId, posid); operation.boxStatus[StoreID].data.Add(ParamDefine.posId, posid);
operation.boxStatus[StoreID].status = (int)storeStatus; if (storeStatus == StoreStatus.OutStoreEnd ||
storeStatus == StoreStatus.OutStoreBoxEnd ||
storeStatus == StoreStatus.InStoreEnd)
{
}
else
operation.boxStatus[StoreID].status = (int)storeStatus;
LogUtil.info(JsonHelper.SerializeObject(operation)); LogUtil.info(JsonHelper.SerializeObject(operation));
if (RobotManage.InoutDebugMode) if (RobotManage.InoutDebugMode)
...@@ -145,13 +151,16 @@ namespace DeviceLibrary ...@@ -145,13 +151,16 @@ namespace DeviceLibrary
LogUtil.info($"SendStoreState success,posid:{posid}, storeStatus:{storeStatus}"); LogUtil.info($"SendStoreState success,posid:{posid}, storeStatus:{storeStatus}");
ResultProcess(resultOperation); ResultProcess(resultOperation);
if (storeStatus == StoreStatus.OutStoreEnd || //if (storeStatus == StoreStatus.OutStoreEnd ||
storeStatus == StoreStatus.OutStoreBoxEnd || // storeStatus == StoreStatus.OutStoreBoxEnd ||
storeStatus == StoreStatus.InStoreEnd) // storeStatus == StoreStatus.InStoreEnd)
//{
// this.storeStatus = StoreStatus.StoreOnline;
//}
if (RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.StringOut_Released)
{ {
this.storeStatus = StoreStatus.StoreOnline; this.storeStatus = StoreStatus.StoreOnline;
} }
} }
return true; return true;
} }
......
...@@ -248,6 +248,7 @@ namespace DeviceLibrary ...@@ -248,6 +248,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreFIX04: case MoveStep.StoreFIX04:
MoveInfo.NextMoveStep(MoveStep.StoreFIX05); MoveInfo.NextMoveStep(MoveStep.StoreFIX05);
RobotManage.PutReelInFixPos(MoveInfo.MoveParam);
Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PL, Config.Comp_P2_speed); Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PL, Config.Comp_P2_speed);
UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed/2); UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed/2);
MoveInfo.log($"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"); MoveInfo.log($"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}");
...@@ -260,6 +261,7 @@ namespace DeviceLibrary ...@@ -260,6 +261,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS10: case MoveStep.StoreTS10:
MoveInfo.NextMoveStep(MoveStep.StoreTS11); MoveInfo.NextMoveStep(MoveStep.StoreTS11);
RobotManage.ClearReelInFixPos();
Middle_Axis.AbsMove(MoveInfo, To.Middle_P2, Config.Middle_P2_speed); Middle_Axis.AbsMove(MoveInfo, To.Middle_P2, Config.Middle_P2_speed);
MoveInfo.log($"{storeMoveType}:行走机构到达目的地:{To.Middle_P2}"); MoveInfo.log($"{storeMoveType}:行走机构到达目的地:{To.Middle_P2}");
UpDown_Axis.AbsMove(MoveInfo, To.UpDown_PH, Config.UpDown_P1_speed); UpDown_Axis.AbsMove(MoveInfo, To.UpDown_PH, Config.UpDown_P1_speed);
......
...@@ -180,6 +180,34 @@ namespace DeviceLibrary ...@@ -180,6 +180,34 @@ namespace DeviceLibrary
else else
LogUtil.info("用户取消忽略安全光栅"); LogUtil.info("用户取消忽略安全光栅");
} }
#region 校准库位缓存
public static bool HasReelInFixPos(out ReelParam reelParam)
{
reelParam = null;
try
{
string fix = ConfigHelper.Config.Get(Setting_Init.FixBuffInfo, "");
if (!string.IsNullOrEmpty(fix))
{
reelParam = JsonHelper.DeserializeJsonToObject<ReelParam>(fix);
return true;
}
}
catch (Exception e)
{
LogUtil.error("解析校准库位缓存异常", e);
}
return false;
}
public static void PutReelInFixPos(ReelParam reelParam)
{
ConfigHelper.Config.Set(Setting_Init.FixBuffInfo, JsonHelper.SerializeObject(reelParam));
}
public static void ClearReelInFixPos()
{
ConfigHelper.Config.Set(Setting_Init.FixBuffInfo, "");
}
#endregion
} }
public enum StoreType { public enum StoreType {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\DLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -43,15 +43,15 @@ ...@@ -43,15 +43,15 @@
<ItemGroup> <ItemGroup>
<Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="CodeLibrary, Version=1.0.8406.19246, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\CodeLibrary.dll</HintPath> <HintPath>..\DLL\CodeLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\ConfigHelper.dll</HintPath> <HintPath>..\DLL\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64"> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\SO1069MIMO_PLUS\DLL\log4net.dll</HintPath> <HintPath>..\DLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!