Commit 8de4cb8c LN

增加工单号参数

1 个父辈 c6ab8b6a
......@@ -214,6 +214,7 @@ namespace OnlineStore.Common
/// </summary>
public static string plateH = "plateH";
public static string singleOut = "singleOut";
public static string hSerial = "hSerial";
/// <summary>
/// 料仓ID
/// </summary>
......
......@@ -638,7 +638,7 @@ namespace DeviceLibrary
WarnMsg = "";
if (plateH > 56)
plateH = 56;
JobInfo inStoreJob = new JobInfo(message, posId, plateW, plateH);
JobInfo inStoreJob = new JobInfo(message, posId, plateW, plateH,"");
RobotManage.mainMachine.StartInStore(inStoreJob);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!");
......@@ -707,19 +707,25 @@ namespace DeviceLibrary
string plateWStr = data[ParamDefine.plateW];
string plateHStr = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut];
string hSerialStr = data.ContainsKey(ParamDefine.hSerial) ? data[ParamDefine.hSerial] : "";
LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut);
LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut+ ",hSerial="+ hSerialStr);
char splitChar = '|';
string[] posIdArray = posIdStr.Split(splitChar);
string[] plateWArray = plateWStr.Split(splitChar);
string[] plateHArray = plateHStr.Split(splitChar);
string[] singleOutArray = singleOut.Split(splitChar);
string[] hSerialArray= hSerialStr.Split(splitChar);
int index = -1;
foreach (string posId in posIdArray)
{
index++;
int.TryParse(plateWArray[index], out int plateW);
int.TryParse(plateHArray[index], out int plateH);
string hSerial = hSerialStr;
if (hSerialArray.Length>=index) {
hSerial = hSerialArray[index];
}
bool isSingleOut = singleOutArray[index].ToLower().Equals("true");
//根据发送的posId获取位置列表
......@@ -734,7 +740,7 @@ namespace DeviceLibrary
else
{
if (isSingleOut)
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH);
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH, hSerial);
else
{
if (Setting_Init.SingleInOut_EnableSpecfiedSize)
......@@ -742,16 +748,16 @@ namespace DeviceLibrary
if (Setting_Init.SingleInOut_ReelHeight == plateH
&& Setting_Init.SingleInOut_ReelWidth == plateW)
{
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH);
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH, hSerial);
}
else
{
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH);
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH, hSerial);
}
}
else
{
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH);
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH, hSerial);
}
}
......
......@@ -80,13 +80,15 @@ namespace DeviceLibrary
this.PosId = posId;
this.plateH = 0;
this.plateW = 0;
this.hSerial = "";
}
public JobInfo(string wareNum, string posId, int platew, int plateh)
public JobInfo(string wareNum, string posId, int platew, int plateh,string hSerial="")
{
this.WareNum = wareNum;
this.PosId = posId;
this.plateW = platew;
this.plateH = plateh;
this.hSerial = hSerial;
}
/// <summary>
/// 夹具编码值(1-6)
......@@ -109,9 +111,14 @@ namespace DeviceLibrary
/// </summary>
public int plateH { get; set; }
/// <summary>
/// 工单号
/// </summary>
public string hSerial { get; set; }
public string ToStr()
{
return "TrayCode【" + TrayCode + "】,WareNum=【" + WareNum + "】,PosId=【" + PosId + "】,plateW=【" + plateW + "】,plateH=【" + plateH + "】";
return "TrayCode【" + TrayCode + "】,WareNum=【" + WareNum + "】,PosId=【" + PosId + "】,plateW=【" + plateW + "】,plateH=【" + plateH + "】,hSerial=【"+ hSerial + "】";
}
}
......
......@@ -82,6 +82,11 @@ namespace DeviceLibrary
/// </summary>
public string Batch { get; set; }
/// <summary>
/// 工单号
/// </summary>
public string hSerial { get; set; }
public int HeightPos = 0;
public ReelParam clone()
{
......
......@@ -787,7 +787,7 @@ namespace DeviceLibrary
if (pos != null)
{
LogUtil.info($"复位完成,校准库位出库:{pos.posid}");
RobotManage.mainMachine.AddSingleStoreTask(pos.posid, reelParam.PlateW, reelParam.PlateH);
RobotManage.mainMachine.AddSingleStoreTask(pos.posid, reelParam.PlateW, reelParam.PlateH, reelParam.hSerial);
RobotManage.ClearReelInFixPos();
CloseFlipDoor(StoreMoveInfo);
}
......
......@@ -54,6 +54,7 @@ namespace DeviceLibrary
ClampMoveInfo.MoveParam.PosID = jobInfo.PosId;
ClampMoveInfo.MoveParam.PlateH = jobInfo.plateH;
ClampMoveInfo.MoveParam.PlateW = jobInfo.plateW;
ClampMoveInfo.MoveParam.hSerial = jobInfo.hSerial;
ClampMoveInfo.NextMoveStep(MoveStep.WaitInStore);
ClampMoveInfo.log($"料盘等待入库:{ClampMoveInfo.MoveParam.ToStr()}");
return true;
......@@ -136,12 +137,19 @@ namespace DeviceLibrary
break;
case MoveStep.ReelClamp_GetHeight:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_07);
ClampMoveInfo.log($"取料夹爪下降到翻板门");
//if (ClampMoveInfo.MoveParam.IsNg)
var cappos = Config.Clamp_P3 - (ClampMoveInfo.MoveParam.PlateH - 8) * Config.Clamp_PoToMM;
ClampMoveInfo.log($"取料夹爪下降到翻板门, 位置:{cappos}");
ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//if (ClampMoveInfo.MoveParam.IsNg)
Clamp_Axis.AbsMove(ClampMoveInfo, cappos, Config.Clamp_P3_speed);
break;
case MoveStep.ReelClamp_07:
// ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_071);
// int p=Clamp_Axis.GetAclPosition();
// ClampMoveInfo.log($"取料机构已到达,当前位置:{p}, 等待1秒后夹爪释放");
// ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// break;
//case MoveStep.ReelClamp_071:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_08);
ClampMoveInfo.log($"取料夹爪释放");
CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
......
......@@ -20,9 +20,9 @@ namespace DeviceLibrary
{
}
public void AddOutStoreTask(string posId, int plateW, int plateH)
public void AddOutStoreTask(string posId, int plateW, int plateH,string hSerial ="")
{
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH);
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH, hSerial);
OutStoreJobList.Enqueue(jobInfo);
LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}");
}
......@@ -32,9 +32,9 @@ namespace DeviceLibrary
/// <param name="posId"></param>
/// <param name="plateW"></param>
/// <param name="plateH"></param>
public void AddSingleStoreTask(string posId, int plateW, int plateH)
public void AddSingleStoreTask(string posId, int plateW, int plateH,string hSerial="")
{
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH);
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH, hSerial);
OutSingleJobList.Enqueue(jobInfo);
LogUtil.info($"添加单盘出库任务队列: {posId},当前任务数量: {OutSingleJobList.Count}");
}
......@@ -92,6 +92,7 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam.PosID = jobInfo.PosId;
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.MoveParam.hSerial = jobInfo.hSerial;
StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.ngdoor_reel_out, "单盘出库");
StoreMoveInfo.log($"开始单盘出库任务:" + jobInfo.ToStr());
......@@ -124,6 +125,7 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam.PosID = jobInfo.PosId;
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.MoveParam.hSerial = jobInfo.hSerial;
StoreMoveInfo.log($"开始出库任务:" + jobInfo.ToStr());
ServerCM.storeStatus = StoreStatus.OutStoreExecute;
}
......
......@@ -97,6 +97,7 @@ namespace DeviceLibrary
ReelClamp_WaitGaugeHeight,
ReelClamp_GetHeight,
ReelClamp_07,
ReelClamp_071,
ReelClamp_08,
ReelClamp_09,
ReelClamp_10,
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!