|
|
|
@ -621,16 +621,13 @@ namespace SlnMesnac.WCS.WCS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (task.TaskStatus == 4) //agv已经退出接驳位
|
|
|
|
else if (task.TaskStatus == 4) //agv已经退出接驳位,wcs把 线体忙碌状态改为0,接驳位到位信号 复位写0,出接驳位信号 0,清空RFID、机台号
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (workShop2Plc == null || !workShop2Plc.IsConnected)
|
|
|
|
if (workShop2Plc == null || !workShop2Plc.IsConnected)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Plc(DateTime.Now + "2#PLC未连接,请检查网络!");
|
|
|
|
_logger.Plc(DateTime.Now + "2#PLC未连接,请检查网络!");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//判断二次生成补空箱任务
|
|
|
|
|
|
|
|
CreateSecondSuppleSmallPallet();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sqlSugarClient.AsTenant().BeginTran();
|
|
|
|
sqlSugarClient.AsTenant().BeginTran();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -1286,7 +1283,7 @@ namespace SlnMesnac.WCS.WCS
|
|
|
|
int totalTaskCount = sqlSugarClient.Queryable<WcsTask>().Count();
|
|
|
|
int totalTaskCount = sqlSugarClient.Queryable<WcsTask>().Count();
|
|
|
|
int work2EmptyAmount = workShop2Plc.readInt16ByAddress(StaticData.GetPlcAddress("2#缓存链条线库存数"));
|
|
|
|
int work2EmptyAmount = workShop2Plc.readInt16ByAddress(StaticData.GetPlcAddress("2#缓存链条线库存数"));
|
|
|
|
int work2LineBusyFlag = workShop2Plc.readInt16ByAddress(StaticData.GetPlcAddress("2#缓存空箱线体状态"));
|
|
|
|
int work2LineBusyFlag = workShop2Plc.readInt16ByAddress(StaticData.GetPlcAddress("2#缓存空箱线体状态"));
|
|
|
|
if (work3EmptyAmount < 2 && totalTaskCount < 3 && suppleTaskCount == 1 && work2LineBusyFlag == 0 && work2EmptyAmount > 0)
|
|
|
|
if (work3EmptyAmount == 0 && totalTaskCount < 3 && suppleTaskCount == 1 && work2LineBusyFlag == 0 && work2EmptyAmount > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
workShop2Plc.writeInt16ByAddress(StaticData.GetPlcAddress("2#缓存空箱线体状态"), 1);
|
|
|
|
workShop2Plc.writeInt16ByAddress(StaticData.GetPlcAddress("2#缓存空箱线体状态"), 1);
|
|
|
|
WcsTask task = new WcsTask();
|
|
|
|
WcsTask task = new WcsTask();
|
|
|
|
|