@ -70,25 +70,25 @@ namespace SlnMesnac.WCS.WCS
#region 3#车间补四宫格空箱流程---监听3#1号光电状态
//bool signal1 = workShop3Plc.readBoolByAddress(StaticData.GetPlcAddress("3#大料箱进料为空")) ;
//if (signal1 )
// {
// CreateSupplementBigPalletTask();
// }
bool signal1 = workShop3Plc . readBoolByAddress ( StaticData . GetPlcAddress ( "3#大料箱进料为空" ) ) ;
if ( signal1 )
{
CreateSupplementBigPalletTask ( ) ;
}
#endregion 3#车间补四宫格空箱流程---监听3#1号光电状态
#region 从下料点到1-16机台送料任务--或者1-12移库任务 --监听3#2号光电状态
//bool getBigFlag = workShop3Plc.readBoolByAddress(StaticData.GetPlcAddress("3#大料箱agv取料通知")) ;
//string machineCodeS = workShop3Plc.readInt16ByAddress(StaticData.GetPlcAddress("3#四宫格下料点机台号")).ToString() ;
//string rfidS = workShop3Plc.readStringByAddress(StaticData.GetPlcAddress("3#四宫格下料点RFID号"), 12).Replace("\0", "") ;
//int amount = workShop3Plc.readInt16ByAddress(StaticData.GetPlcAddress("3#四宫格下料点数量")) ;
bool getBigFlag = workShop3Plc . readBoolByAddress ( StaticData . GetPlcAddress ( "3#大料箱agv取料通知" ) ) ;
string machineCodeS = workShop3Plc . readInt16ByAddress ( StaticData . GetPlcAddress ( "3#四宫格下料点机台号" ) ) . ToString ( ) ;
string rfidS = workShop3Plc . readStringByAddress ( StaticData . GetPlcAddress ( "3#四宫格下料点RFID号" ) , 12 ) . Replace ( "\0" , "" ) ;
int amount = workShop3Plc . readInt16ByAddress ( StaticData . GetPlcAddress ( "3#四宫格下料点数量" ) ) ;
//if (getBigFlag && machineCodeS != "0" && rfidS.Contains("SH") )
// {
// CreatDeliverWorkShop3Task(machineCodeS, rfidS, amount);
// }
if ( getBigFlag & & machineCodeS ! = "0" & & rfidS . Contains ( "SH" ) )
{
CreatDeliverWorkShop3Task ( machineCodeS , rfidS , amount ) ;
}
#endregion 从下料点到1-16机台送料任务--或者1-12移库任务 --监听3#2号光电状态
@ -393,7 +393,7 @@ namespace SlnMesnac.WCS.WCS
{
string sql = "SELECT wbl.* FROM wms_base_location wbl join wms_pallet_info wpi on wbl.container_code = wpi.pallet_info_code where wbl.container_code is not null and wbl.container_code!='' and wbl.location_status=0 and wbl.machineid<=12 and wpi.amount=0" ;
List < WmsBaseLocation > emptyLocations = sqlSugarClient . Ado . SqlQuery < WmsBaseLocation > ( sql ) . OrderBy Descending ( x = > x . MachineId ) . ToList ( ) ;
List < WmsBaseLocation > emptyLocations = sqlSugarClient . Ado . SqlQuery < WmsBaseLocation > ( sql ) . OrderBy ( x = > x . MachineId ) . ToList ( ) ;
if ( emptyLocations . Count = = 0 )
{
_logger . Info ( "暂时没有可用空托盘库位" ) ;
@ -902,7 +902,7 @@ namespace SlnMesnac.WCS.WCS
bool hasMoveTask = sqlSugarClient . Queryable < WcsTask > ( ) . Any ( it = > it . TaskType = = StaticTaskType . MoveLocationTask & & it . TaskStatus < 3 ) ;
if ( hasMoveTask )
{
_logger . Error ( $"目标库位无空位置,正在执行移库任务,暂时不生成送料任务,请等待...." ) ;
_logger . Info ( $"目标库位无空位置,正在执行移库任务,暂时不生成送料任务,请等待...." ) ;
return null ;
}