Commit 9f6cc492 LN

增加循环出库功能

1 个父辈 4d82f08e
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
<!--最多识别多少个二维码--> <!--最多识别多少个二维码-->
<add key ="QRCodeCount" value ="1"/> <add key ="QRCodeCount" value ="1"/>
<add key ="OpenCycleOut" value ="1"/> <add key ="OpenCycleOut" value ="1"/>
<!--IO模块是否主动上传-->
<add key ="AIOAutoUpload" value ="1"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -239,4 +239,9 @@ PositionNum,Priority,Height,Width,StoreID,SupportBatch,MiddleAxis_Position_P2,Up ...@@ -239,4 +239,9 @@ PositionNum,Priority,Height,Width,StoreID,SupportBatch,MiddleAxis_Position_P2,Up
20191112: 20191112:
增加循环出库功能,展会需要。 增加循环出库功能,展会需要。
增加配置
<add key ="OpenCycleOut" value ="1"/>
增加IO模块主动上传设置。
<!--IO模块是否主动上传-->
<add key ="AIOAutoUpload" value ="1"/>
...@@ -102,5 +102,6 @@ namespace OnlineStore.Common ...@@ -102,5 +102,6 @@ namespace OnlineStore.Common
public static string QRCodeCount = "QRCodeCount"; public static string QRCodeCount = "QRCodeCount";
public static string OpenCycleOut = "OpenCycleOut"; public static string OpenCycleOut = "OpenCycleOut";
public static string AIOAutoUpload = "AIOAutoUpload";
} }
} }
...@@ -75,6 +75,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,6 +75,7 @@ namespace OnlineStore.DeviceLibrary
public void ConnectionIP(string ioIp) public void ConnectionIP(string ioIp)
{ {
bool autoUpload = ConfigAppSettings.GetIntValue(Setting_Init.AIOAutoUpload).Equals(1);
AIOBOX aioBox = null; AIOBOX aioBox = null;
if (AIOMap.ContainsKey(ioIp)) if (AIOMap.ContainsKey(ioIp))
{ {
...@@ -118,7 +119,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -118,7 +119,14 @@ namespace OnlineStore.DeviceLibrary
aioBox.SetInput(Asa.IOModule.Box_Type.DI, DILength); aioBox.SetInput(Asa.IOModule.Box_Type.DI, DILength);
aioBox.SetOutput(Asa.IOModule.Box_Type.DO, DOLength); aioBox.SetOutput(Asa.IOModule.Box_Type.DO, DOLength);
if (autoUpload)
{
aioBox.AutoReadInput(true);
}
else
{
aioBox.AutoReadInput(true, DIMS); aioBox.AutoReadInput(true, DIMS);
}
aioBox.AutoReadOutput(true, DOMS); aioBox.AutoReadOutput(true, DOMS);
aioBox.LogOut = true; aioBox.LogOut = true;
...@@ -133,6 +141,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,6 +141,7 @@ namespace OnlineStore.DeviceLibrary
{ {
bool result = aioBox.Connect(); bool result = aioBox.Connect();
if (result) if (result)
{ {
LogUtil.info("第【" + i + "】次连接 " + logName + " 成功:" + aioBox.ErrInfo); LogUtil.info("第【" + i + "】次连接 " + logName + " 成功:" + aioBox.ErrInfo);
Thread.Sleep(10); Thread.Sleep(10);
......
...@@ -1247,17 +1247,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1247,17 +1247,7 @@ namespace OnlineStore.DeviceLibrary
Reset(false); Reset(false);
} }
} }
//else if (CurrInOutCount >= this.Config.Box_ResetMCount)
//{
// if (storeRunStatus < StoreRunStatus.Runing || StoreMove.MoveType == StoreMoveType.InStore || StoreMove.MoveType == StoreMoveType.OutStore)
// {
// LogUtil.info(LOGGER, StoreName + "已经累计出入库" + CurrInOutCount + "次,当时当前正在忙碌中暂不复位旋转轴");
// }
// else
// {
// LogUtil.info(LOGGER, StoreName + "已经累计出入库" + CurrInOutCount + "次,需要复位一下旋转轴");
// }
//}
else if (waitOutStoreList.Count > 0 && CanStarInOut()) else if (waitOutStoreList.Count > 0 && CanStarInOut())
{ {
FixtureCodeInfo currInOutFixture = null; FixtureCodeInfo currInOutFixture = null;
......
...@@ -1243,9 +1243,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -1243,9 +1243,9 @@ namespace OnlineStore.DeviceLibrary
if (CycleOut&& storeMoveType.Equals(StoreMoveType.OutStore)) if (CycleOut&& storeMoveType.Equals(StoreMoveType.OutStore))
{ {
AutomaticBaiting.ClearOutStoreInfo(); AutomaticBaiting.ClearOutStoreInfo();
FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "CCC", CyclePosId); FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "", CyclePosId);
AddWaitOutInfo(currInOutFixture); AddWaitOutInfo(currInOutFixture);
LogUtil.info("循环出库结束,将库位号【" + CyclePosId + "】加入出库等待中"); LogUtil.info("循环出库结束,将库位号【" + currInOutFixture.ToStr() + "】加入出库等待中");
} }
} }
catch (Exception ex) catch (Exception ex)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!