|
|
|
@ -255,8 +255,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
{
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
//读取PLC应答字为2时,上位机清空写入的入库内容
|
|
|
|
@ -275,11 +274,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
}
|
|
|
|
|
Thread.Sleep(500);
|
|
|
|
|
} while (isFlag);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"仓库{appConfig.shellStoreCode};PLC未连接");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -309,8 +304,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_plc.readInt32ByAddress(plcConfig.in_liner_answer) == 1)
|
|
|
|
|
{
|
|
|
|
@ -332,11 +326,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
result = 2;
|
|
|
|
|
logHelper.PlcLog("内胆应答字为2,下发新任务plc未就绪");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"仓库{taskInfo.storeCode};PLC未连接");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -366,8 +356,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
//读取PLC应答字为2时,上位机清空写入的入库内容
|
|
|
|
@ -392,11 +381,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
} while (isFlag);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"仓库{appConfig.linerStoreCode};PLC未连接");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -429,8 +414,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
{
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
//读取PLC入库任务完成
|
|
|
|
@ -447,11 +431,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
} while (isFlag);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"仓库{appConfig.shellStoreCode};PLC未连接");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -481,8 +461,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
IPlc _plc = _plcDictionary[appConfig.linerStoreCode];
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
//读取PLC入库任务完成
|
|
|
|
@ -500,11 +479,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
Thread.Sleep(1000);
|
|
|
|
|
} while (isFlag);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
logHelper.Info($"仓库{appConfig.linerStoreCode};PLC未连接");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -666,12 +641,11 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
spaceInfo.spaceStock = _plc.readInt32ByAddress(spaceAddress.onStore);
|
|
|
|
|
spaceInfo.onRouteAmount = _plc.readInt32ByAddress(spaceAddress.onRoute);
|
|
|
|
|
// spaceInfo.spaceStatus = _plc.readInt32ByAddress(spaceAddress.spaceStatus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return spaceInfo;
|
|
|
|
@ -690,8 +664,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
|
|
|
|
|
if (_plc != null)
|
|
|
|
|
{
|
|
|
|
|
if (_plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var spaceStock = _plc.readInt32ByAddress(spaceAddress.onStore);
|
|
|
|
|
var onRouteAmount = _plc.readInt32ByAddress(spaceAddress.onRoute);
|
|
|
|
|
|
|
|
|
@ -705,7 +678,7 @@ namespace Aucma.Scada.Business
|
|
|
|
|
_plc.writeInt32ByAddress(spaceAddress.onRoute, onRouteAmount + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|