Commit 8e2fb2ea LN

出料修改

1 个父辈 ccc9f6e5
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnOutStopDown = new System.Windows.Forms.Button();
this.btnSwStop = new System.Windows.Forms.Button(); this.btnSwStop = new System.Windows.Forms.Button();
this.btnFLStop1 = new System.Windows.Forms.Button(); this.btnFLStop1 = new System.Windows.Forms.Button();
this.btnFLStop2Down = new System.Windows.Forms.Button(); this.btnFLStop2Down = new System.Windows.Forms.Button();
...@@ -97,7 +98,6 @@ ...@@ -97,7 +98,6 @@
this.chbMoveStop = new System.Windows.Forms.CheckBox(); this.chbMoveStop = new System.Windows.Forms.CheckBox();
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.btnScan = new System.Windows.Forms.Button(); this.btnScan = new System.Windows.Forms.Button();
this.btnOutStopDown = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -362,6 +362,19 @@ ...@@ -362,6 +362,19 @@
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
// //
// btnOutStopDown
//
this.btnOutStopDown.BackColor = System.Drawing.Color.White;
this.btnOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStopDown.Location = new System.Drawing.Point(168, 179);
this.btnOutStopDown.Name = "btnOutStopDown";
this.btnOutStopDown.Size = new System.Drawing.Size(153, 34);
this.btnOutStopDown.TabIndex = 272;
this.btnOutStopDown.Text = "SL出料阻挡下降";
this.btnOutStopDown.UseVisualStyleBackColor = false;
this.btnOutStopDown.Click += new System.EventHandler(this.btnOutStopDown_Click);
//
// btnSwStop // btnSwStop
// //
this.btnSwStop.BackColor = System.Drawing.Color.White; this.btnSwStop.BackColor = System.Drawing.Color.White;
...@@ -628,9 +641,9 @@ ...@@ -628,9 +641,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red; this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(406, 110); this.lblThisSta.Location = new System.Drawing.Point(406, 77);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(720, 109); this.lblThisSta.Size = new System.Drawing.Size(720, 155);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
...@@ -734,7 +747,7 @@ ...@@ -734,7 +747,7 @@
this.lblwidth.AutoSize = true; this.lblwidth.AutoSize = true;
this.lblwidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblwidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblwidth.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblwidth.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblwidth.Location = new System.Drawing.Point(248, 78); this.lblwidth.Location = new System.Drawing.Point(417, 52);
this.lblwidth.Name = "lblwidth"; this.lblwidth.Name = "lblwidth";
this.lblwidth.Size = new System.Drawing.Size(92, 17); this.lblwidth.Size = new System.Drawing.Size(92, 17);
this.lblwidth.TabIndex = 279; this.lblwidth.TabIndex = 279;
...@@ -756,7 +769,7 @@ ...@@ -756,7 +769,7 @@
this.lblAgvInfo.AutoSize = true; this.lblAgvInfo.AutoSize = true;
this.lblAgvInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblAgvInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAgvInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblAgvInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblAgvInfo.Location = new System.Drawing.Point(248, 25); this.lblAgvInfo.Location = new System.Drawing.Point(417, 25);
this.lblAgvInfo.Name = "lblAgvInfo"; this.lblAgvInfo.Name = "lblAgvInfo";
this.lblAgvInfo.Size = new System.Drawing.Size(61, 17); this.lblAgvInfo.Size = new System.Drawing.Size(61, 17);
this.lblAgvInfo.TabIndex = 276; this.lblAgvInfo.TabIndex = 276;
...@@ -769,7 +782,7 @@ ...@@ -769,7 +782,7 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green; this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(406, 220); this.lblInstoreList.Location = new System.Drawing.Point(406, 258);
this.lblInstoreList.Name = "lblInstoreList"; this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(720, 109); this.lblInstoreList.Size = new System.Drawing.Size(720, 109);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
...@@ -1194,19 +1207,6 @@ ...@@ -1194,19 +1207,6 @@
this.btnScan.UseVisualStyleBackColor = false; this.btnScan.UseVisualStyleBackColor = false;
this.btnScan.Click += new System.EventHandler(this.btnScan_Click); this.btnScan.Click += new System.EventHandler(this.btnScan_Click);
// //
// btnOutStopDown
//
this.btnOutStopDown.BackColor = System.Drawing.Color.White;
this.btnOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOutStopDown.Location = new System.Drawing.Point(168, 179);
this.btnOutStopDown.Name = "btnOutStopDown";
this.btnOutStopDown.Size = new System.Drawing.Size(153, 34);
this.btnOutStopDown.TabIndex = 272;
this.btnOutStopDown.Text = "SL出料阻挡下降";
this.btnOutStopDown.UseVisualStyleBackColor = false;
this.btnOutStopDown.Click += new System.EventHandler(this.btnOutStopDown_Click);
//
// FrmFeedingEquip // FrmFeedingEquip
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......
...@@ -379,18 +379,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -379,18 +379,19 @@ namespace OnlineStore.DeviceLibrary
} }
public virtual string GetMoveStr() public virtual string GetMoveStr()
{ {
string msg = ""; string msg = "";
int tLength = 15; int tLength = 10;
msg += "runStatus:".PadRight(tLength, ' ') + runStatus + "\n"; msg += "runS:" + runStatus + "\n";
msg += "lineStatus:".PadRight(tLength, ' ') + lineStatus + "\n"; msg += "runS:"+ lineStatus + "\n";
msg += "MoveType:".PadRight(tLength, ' ') + MoveInfo.MoveType + "\n"; msg += "MoveT:"+ MoveInfo.MoveType + "\n";
msg += "MoveStep:".PadRight(tLength, ' ') + MoveInfo.SLog + "\n"; msg += "MoveS:"+ MoveInfo.SLog + "\n";
msg += "Line1-Move:".PadRight(tLength, ' ') + TrayLine1.MoveInfo.MoveType +" " + TrayLine1.MoveInfo.MoveStep + "\n"; msg += "L1-M:"+ TrayLine1.MoveInfo.MoveType +" " + TrayLine1.MoveInfo.MoveStep + "\n";
msg += "Line2-Move:".PadRight(tLength, ' ') + TrayLine2.MoveInfo.MoveType + " " + TrayLine2.MoveInfo.MoveStep + "\n"; msg += "L2-M:"+ TrayLine2.MoveInfo.MoveType + " " + TrayLine2.MoveInfo.MoveStep + "\n";
msg += "LastTrayP:".PadRight(tLength, ' ') + TrayLine1.LastTrayPosition+" " + TrayLine2.LastTrayPosition + " " + Line3LastTrayP + " " + "\n"; msg += "LastTP:"+ TrayLine1.LastTrayPosition+" " + TrayLine2.LastTrayPosition + " " + Line3LastTrayP + " " + "\n";
msg += "IsInRun:".PadRight(tLength, ' ') + TrayLine1.IsInTurn() + " " + TrayLine2.IsInTurn() + " " +Line3Turn.InTurn + " " +"\n"; msg += "LIsRun:"+ TrayLine1.IsInTurn() + " " + TrayLine2.IsInTurn() + " " +Line3Turn.InTurn + " " +"\n";
msg += "Line3CanRun:".PadRight(tLength, ' ') + TrayLine1.Line3CanRun + " " + TrayLine2.Line3CanRun + " " + "\n"; msg += "L3CanRun:"+ TrayLine1.Line3CanRun + " " + TrayLine2.Line3CanRun + " " + "\n";
return msg; return msg;
} }
public override bool StartInStoreMove(InOutParam param) public override bool StartInStoreMove(InOutParam param)
......
...@@ -571,15 +571,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -571,15 +571,15 @@ namespace OnlineStore.DeviceLibrary
{ {
string msg = ""; string msg = "";
int tLength = 15; int tLength = 15;
msg += "preTrayNum:".PadRight(tLength, ' ') + preTrayNum + "\n"; msg += "上个托盘:" + preTrayNum + "\n";
msg += "currTrayNum:".PadRight(tLength, ' ') + currTrayNum + "\n"; msg += "当前托盘:" + currTrayNum + "\n";
msg += "runStatus:".PadRight(tLength, ' ') + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "lineStatus:".PadRight(tLength, ' ') + lineStatus + "\n"; msg += "lineS: " + lineStatus + "\n";
msg += "MoveType:".PadRight(tLength, ' ') + MoveInfo.MoveType+"\n"; msg += "MoveT:"+ MoveInfo.MoveType+"\n";
msg += "MoveStep:".PadRight(tLength, ' ') + MoveInfo.SLog + "\n"; msg += "MoveS :" + MoveInfo.SLog + "\n";
msg += "SMoveType:".PadRight(tLength, ' ') + SecondMoveInfo.MoveType + "\n"; msg += "SMoveT:" + SecondMoveInfo.MoveType + "\n";
msg += "SMoveStep:".PadRight(tLength, ' ') + SecondMoveInfo.MoveStep + ""; msg += "SMoveS:" + SecondMoveInfo.MoveStep + "";
return msg; return msg;
} }
} }
......
...@@ -51,15 +51,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,15 +51,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(LineMoveType.OutStore, outParam); MoveInfo.NewMove(LineMoveType.OutStore, outParam);
//可以开始出库啦 //可以开始出库啦
MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove); MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove);
OutLog("出库移栽 " + MoveInfo.SLog + " :提升伺服下降指定的高度,升降轴回原点");
int targetPosition = BatchAxis.GetAclPosition() - outParam.PlateH * Config.Height_ChangeValue; int targetPosition = BatchAxis.GetAclPosition() - outParam.PlateH * Config.Height_ChangeValue;
if (targetPosition < Config.BatchAxisP2) if (targetPosition < Config.BatchAxisP2)
{ {
targetPosition = Config.BatchAxisP2; targetPosition = Config.BatchAxisP2;
} }
OutLog("出库移栽 " + MoveInfo.SLog + " :提升伺服下降指定的高度,目标:"+ targetPosition);
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed);
return true; return true;
//UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
public void StartOutStoreP() public void StartOutStoreP()
{ {
...@@ -354,6 +353,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -354,6 +353,9 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_211_AxisDownMove)) if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_211_AxisDownMove))
{ {
//判断伺服检测信号是否亮
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) || BatchAxis.IsInPosition(Config.BatchAxisP2))
{
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_212_CylinderTake); MoveInfo.NextMoveStep(LineMoveStep.FO_212_CylinderTake);
...@@ -367,6 +369,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -367,6 +369,19 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else
{
//可以开始出库啦
MoveInfo.NextMoveStep(LineMoveStep.FO_211_AxisDownMove);
int targetPosition = BatchAxis.GetAclPosition() - MoveInfo.MoveParam.PlateH * Config.Height_ChangeValue;
if (targetPosition < Config.BatchAxisP2)
{
targetPosition = Config.BatchAxisP2;
}
OutLog("出库移栽 " + MoveInfo.SLog + " :TrayOutProcess 伺服检测信号亮并且不再P2点,再次下降指定的高度,目标:"+ targetPosition);
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_P2Speed);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_CylinderTake)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_CylinderTake))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2);
...@@ -445,7 +460,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -445,7 +460,7 @@ namespace OnlineStore.DeviceLibrary
string msg = SServerManager.PutShelfFinished(Name, MoveInfo.MoveParam.WareCode, CurrShelfId, OutStoreCount.ToString(), out serverShelfData); string msg = SServerManager.PutShelfFinished(Name, MoveInfo.MoveParam.WareCode, CurrShelfId, OutStoreCount.ToString(), out serverShelfData);
if (String.IsNullOrEmpty(msg).Equals(false)) if (String.IsNullOrEmpty(msg).Equals(false))
{ {
LogUtil.error(Name + "【"+MoveInfo.MoveParam.WareCode+"】【"+CurrShelfId+"】【"+OutStoreCount.ToString()+"】PutShelfFinished 结果:" + msg); LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfId + "】【" + OutStoreCount.ToString() + "】PutShelfFinished 结果:" + msg);
serverShelfData = null; serverShelfData = null;
} }
}); });
...@@ -470,7 +485,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,7 +485,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要送出料架 //判断是否需要送出料架
if (serverShelfData != null && serverShelfData.cutTask <= 0) if (serverShelfData != null && serverShelfData.cutTask <= 0)
{ {
SendOutShelfOut("服务器返回cutTask="+serverShelfData.cutTask+",需要送出料架"); SendOutShelfOut("服务器返回cutTask=" + serverShelfData.cutTask + ",需要送出料架");
} }
else else
{ {
......
...@@ -981,15 +981,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -981,15 +981,15 @@ namespace OnlineStore.DeviceLibrary
{ {
string msg = ""; string msg = "";
// int tLength = 20; // int tLength = 20;
msg += "Sw41TrayNum: " + Sw41TrayNum + "\n"; msg += "横移41托盘: " + Sw41TrayNum + "\n";
msg += "Sw23TrayNum:" + Sw23TrayNum + "\n"; msg += "横移23托盘:" + Sw23TrayNum + "\n";
msg += "runStatus: "+ runStatus + "\n"; msg += "runS "+ runStatus + "\n";
msg += "lineStatus: "+ lineStatus + "\n"; msg += "lineS "+ lineStatus + "\n";
msg += "MoveType: " + MoveInfo.MoveType + "\n"; msg += "MoveT" + MoveInfo.MoveType + "\n";
msg += "MoveStep: " + MoveInfo.SLog + "\n"; msg += "MoveS " + MoveInfo.SLog + "\n";
msg += "SW41_Move: "+ SW41_MoveInfo.MoveType + " "+ SW41_MoveInfo.MoveStep + "\n"; msg += "SW41: "+ SW41_MoveInfo.MoveType + " "+ SW41_MoveInfo.MoveStep + "\n";
msg += "SW23_Move: " + SW23_MoveInfo.MoveType + " " + SW23_MoveInfo.MoveStep + "\n"; msg += "SW23: " + SW23_MoveInfo.MoveType + " " + SW23_MoveInfo.MoveStep + "\n";
return msg; return msg;
} }
} }
......
...@@ -39,7 +39,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,7 +39,7 @@ namespace OnlineStore.DeviceLibrary
string path = server + addr.Trim() + "?"; string path = server + addr.Trim() + "?";
foreach (string paramName in paramsMap.Keys) foreach (string paramName in paramsMap.Keys)
{ {
string par= System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8); string par = System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8);
path += paramName + "=" + par + "&"; path += paramName + "=" + par + "&";
} }
path = path.Substring(0, path.Length - 1); path = path.Substring(0, path.Length - 1);
...@@ -78,7 +78,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +78,7 @@ namespace OnlineStore.DeviceLibrary
string server = GetAddr(Addr_PosForPutin, paramMap); string server = GetAddr(Addr_PosForPutin, paramMap);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr; //string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码<< " + codeStr + ",获取入库PosID:" ); LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码<< " + codeStr + ",获取入库PosID:");
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
LogUtil.info("CodeReceived 【" + server + "】【" + resultStr + "】"); LogUtil.info("CodeReceived 【" + server + "】【" + resultStr + "】");
...@@ -121,7 +121,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -121,7 +121,7 @@ namespace OnlineStore.DeviceLibrary
} }
LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + ""); LogUtil.info("收到入库命令: " + param.ToStr() + " ,更新盘空满信息,托盘号【" + trayNum + "】,有料," + ReelType.InStore + "");
TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore,new InOutParam(trayNum, wareNum, posId, plateH, plateW,false)); TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, new InOutParam(trayNum, wareNum, posId, plateH, plateW, false));
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器; //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if (LineServer.BoxCanInStore(moveEquip.DeviceID)) if (LineServer.BoxCanInStore(moveEquip.DeviceID))
...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " ",ex); LogUtil.error(deviceName + " ", ex);
} }
return ""; return "";
} }
...@@ -176,7 +176,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -176,7 +176,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return msg = deviceName + " 【" + robotIndex + "】 条码【 " + codeStr + "】没有收到服务器反馈"; return msg = deviceName + " 【" + robotIndex + "】 条码【 " + codeStr + "】没有收到服务器反馈";
} }
else if ( serverResult.code.Equals(0).Equals(false)) else if (serverResult.code.Equals(0).Equals(false))
{ {
// code: 0为正常,其他为异常, // code: 0为正常,其他为异常,
// msg:消息, // msg:消息,
...@@ -192,7 +192,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,7 +192,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " ",ex); LogUtil.error(deviceName + " ", ex);
} }
return ""; return "";
} }
...@@ -233,7 +233,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -233,7 +233,7 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " ",ex); LogUtil.error(deviceName + " ", ex);
} }
return msg; return msg;
} }
...@@ -245,6 +245,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -245,6 +245,7 @@ namespace OnlineStore.DeviceLibrary
shelfData = null; shelfData = null;
try try
{ {
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码 paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码
paramMap.Add("rfid", rfid); // rfid = 料架的RFID信息 paramMap.Add("rfid", rfid); // rfid = 料架的RFID信息
...@@ -254,7 +255,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -254,7 +255,11 @@ namespace OnlineStore.DeviceLibrary
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
LogUtil.info("PutShelfFinished 【" + server + "】【" + resultStr + "】"); LogUtil.info("PutShelfFinished 【" + server + "】【" + resultStr + "】");
// 返回: {"code": 0, "msg":"ok", "data":{"rfid":"xxx","smallEmpty":0,"bigEmpty":0, "packageEmpty":0,"cutPackageTask":0,"packageTask":10,"cutTask":10, "smallTask":5, "bigTask":5} // 返回: {"code": 0, "msg":"ok", "data":{"rfid":"xxx","smallEmpty":0,"bigEmpty":0, "packageEmpty":0,"cutPackageTask":0,"packageTask":10,"cutTask":10, "smallTask":5, "bigTask":5}
ServerData serverResult = JsonHelper.DeserializeJsonToObject<ServerData>(resultStr); PutFinishedData serverResult = JsonHelper.DeserializeJsonToObject<PutFinishedData>(resultStr);
// string str = "{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":" - 1 - 1","cutTask":"0"}}";
//PutShelfFinished 【http://localhost/myproject/rest/api/qisda/device/putShelfFinished?barcode=R008062019120301889&rfid=-1-1&rfidLoc=4】
//【{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":"-1-1","cutTask":"0"}}】
if (serverResult == null) if (serverResult == null)
{ {
return msg = deviceName + "PutShelfFinished【 " + barcode + "】【" + rfid + "】【" + rfidPosId + "】没有收到服务器反馈"; return msg = deviceName + "PutShelfFinished【 " + barcode + "】【" + rfid + "】【" + rfidPosId + "】没有收到服务器反馈";
...@@ -263,14 +268,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -263,14 +268,15 @@ namespace OnlineStore.DeviceLibrary
{ {
return msg = deviceName + " PutShelfFinished【 " + barcode + "】【" + rfid + "】【" + rfidPosId + "】 :" + serverResult.msg; return msg = deviceName + " PutShelfFinished【 " + barcode + "】【" + rfid + "】【" + rfidPosId + "】 :" + serverResult.msg;
} }
if (String.IsNullOrEmpty(serverResult.data).Equals(false)) //if (String.IsNullOrEmpty(serverResult.data).Equals(false))
{ //{
shelfData = JsonHelper.DeserializeJsonToObject<ShelfData>(serverResult.data); // shelfData = JsonHelper.DeserializeJsonToObject<ShelfData>(serverResult.data);
} //}
shelfData = serverResult.data;
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " ",ex); LogUtil.error(deviceName + " ", ex);
} }
return ""; return "";
} }
...@@ -299,8 +305,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -299,8 +305,18 @@ namespace OnlineStore.DeviceLibrary
public string msg { get; set; } public string msg { get; set; }
public string data { get; set; } public string data { get; set; }
//PutShelfFinished 【http://localhost/myproject/rest/api/qisda/device/putShelfFinished?barcode=R008062019120301889&rfid=-1-1&rfidLoc=4】
//【{"code":0,"msg":"ok","data":{"smallTask":"1","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"0","packageEmpty":"0","rfid":"-1-1","cutTask":"0"}}】
} }
public class PutFinishedData
{
public int code { get; set; }
public string msg { get; set; }
public ShelfData data { get; set; }
}
public class ShelfData public class ShelfData
{ {
/// <summary> /// <summary>
......
...@@ -194,6 +194,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -194,6 +194,17 @@ namespace OnlineStore.DeviceLibrary
int p = ACServerManager.GetActualtPosition(Config); int p = ACServerManager.GetActualtPosition(Config);
return p; return p;
} }
public bool IsInPosition(int targetP)
{
int currp = GetAclPosition();
int chaz = targetP - currp;
if (Math.Abs(chaz) < Config.CanErrorCountMax)
{
return true;
}
return false;
}
/// <summary> /// <summary>
/// 绝对运动至点,不等待结果 /// 绝对运动至点,不等待结果
/// </summary> /// </summary>
......
...@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (InOrOutStore.Equals(2)) else if (InOrOutStore.Equals(2))
{ {
type = inoutPar.urgentReel ? "[紧急出料]" : "出料[ " + inoutPar.ToStr() + " ]"; type = inoutPar.urgentReel ? "[紧急出料][ " + inoutPar.ToStr() + " ]" : "出料[ " + inoutPar.ToStr() + " ]";
} }
//return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type + //return "托盘 [" + TrayCode + "] [" + (IsFull ? "有料" : "空") +"] ["+ type +
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!