Commit a49e5680 LN

压紧轴位置根据高度获取。

1 个父辈 c29089ae
...@@ -60,6 +60,9 @@ ...@@ -60,6 +60,9 @@
this.btnUCopy = new System.Windows.Forms.Button(); this.btnUCopy = new System.Windows.Forms.Button();
this.btnICopy = new System.Windows.Forms.Button(); this.btnICopy = new System.Windows.Forms.Button();
this.btnCCopy = new System.Windows.Forms.Button(); this.btnCCopy = new System.Windows.Forms.Button();
this.btnCom = new System.Windows.Forms.Button();
this.btnComStop = new System.Windows.Forms.Button();
this.btnUpdate = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -92,7 +95,7 @@ ...@@ -92,7 +95,7 @@
// //
// btnMiddleMove // btnMiddleMove
// //
this.btnMiddleMove.BackColor = System.Drawing.SystemColors.Control; this.btnMiddleMove.BackColor = System.Drawing.Color.White;
this.btnMiddleMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMiddleMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMiddleMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMove.Location = new System.Drawing.Point(246, 65); this.btnMiddleMove.Location = new System.Drawing.Point(246, 65);
...@@ -136,7 +139,7 @@ ...@@ -136,7 +139,7 @@
// //
// btnUpDownMove // btnUpDownMove
// //
this.btnUpDownMove.BackColor = System.Drawing.SystemColors.Control; this.btnUpDownMove.BackColor = System.Drawing.Color.White;
this.btnUpDownMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpDownMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMove.Location = new System.Drawing.Point(246, 122); this.btnUpDownMove.Location = new System.Drawing.Point(246, 122);
...@@ -150,7 +153,7 @@ ...@@ -150,7 +153,7 @@
// //
// btnInOutMove // btnInOutMove
// //
this.btnInOutMove.BackColor = System.Drawing.SystemColors.Control; this.btnInOutMove.BackColor = System.Drawing.Color.White;
this.btnInOutMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInOutMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnInOutMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMove.Location = new System.Drawing.Point(246, 180); this.btnInOutMove.Location = new System.Drawing.Point(246, 180);
...@@ -164,7 +167,7 @@ ...@@ -164,7 +167,7 @@
// //
// btnInOutMovej // btnInOutMovej
// //
this.btnInOutMovej.BackColor = System.Drawing.SystemColors.Control; this.btnInOutMovej.BackColor = System.Drawing.Color.White;
this.btnInOutMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInOutMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnInOutMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMovej.Location = new System.Drawing.Point(395, 180); this.btnInOutMovej.Location = new System.Drawing.Point(395, 180);
...@@ -178,7 +181,7 @@ ...@@ -178,7 +181,7 @@
// //
// btnUpDownMovej // btnUpDownMovej
// //
this.btnUpDownMovej.BackColor = System.Drawing.SystemColors.Control; this.btnUpDownMovej.BackColor = System.Drawing.Color.White;
this.btnUpDownMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpDownMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMovej.Location = new System.Drawing.Point(395, 122); this.btnUpDownMovej.Location = new System.Drawing.Point(395, 122);
...@@ -192,7 +195,7 @@ ...@@ -192,7 +195,7 @@
// //
// btnMiddleMovej // btnMiddleMovej
// //
this.btnMiddleMovej.BackColor = System.Drawing.SystemColors.Control; this.btnMiddleMovej.BackColor = System.Drawing.Color.White;
this.btnMiddleMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMiddleMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMiddleMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMovej.Location = new System.Drawing.Point(395, 65); this.btnMiddleMovej.Location = new System.Drawing.Point(395, 65);
...@@ -207,9 +210,9 @@ ...@@ -207,9 +210,9 @@
// button1 // button1
// //
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(569, 347); this.button1.Location = new System.Drawing.Point(590, 430);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37); this.button1.Size = new System.Drawing.Size(140, 45);
this.button1.TabIndex = 16; this.button1.TabIndex = 16;
this.button1.Text = "关闭"; this.button1.Text = "关闭";
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
...@@ -280,7 +283,7 @@ ...@@ -280,7 +283,7 @@
// //
// btnComMovej // btnComMovej
// //
this.btnComMovej.BackColor = System.Drawing.SystemColors.Control; this.btnComMovej.BackColor = System.Drawing.Color.White;
this.btnComMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnComMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnComMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMovej.Location = new System.Drawing.Point(395, 240); this.btnComMovej.Location = new System.Drawing.Point(395, 240);
...@@ -294,7 +297,7 @@ ...@@ -294,7 +297,7 @@
// //
// btnComMove // btnComMove
// //
this.btnComMove.BackColor = System.Drawing.SystemColors.Control; this.btnComMove.BackColor = System.Drawing.Color.White;
this.btnComMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnComMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnComMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMove.Location = new System.Drawing.Point(246, 240); this.btnComMove.Location = new System.Drawing.Point(246, 240);
...@@ -389,11 +392,53 @@ ...@@ -389,11 +392,53 @@
this.btnCCopy.UseVisualStyleBackColor = true; this.btnCCopy.UseVisualStyleBackColor = true;
this.btnCCopy.Click += new System.EventHandler(this.btnCCopy_Click); this.btnCCopy.Click += new System.EventHandler(this.btnCCopy_Click);
// //
// btnCom
//
this.btnCom.BackColor = System.Drawing.Color.White;
this.btnCom.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCom.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCom.Location = new System.Drawing.Point(97, 430);
this.btnCom.Name = "btnCom";
this.btnCom.Size = new System.Drawing.Size(289, 45);
this.btnCom.TabIndex = 35;
this.btnCom.Text = "压紧轴向下压紧到信号亮";
this.btnCom.UseVisualStyleBackColor = false;
this.btnCom.Click += new System.EventHandler(this.btnCom_Click);
//
// btnComStop
//
this.btnComStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.btnComStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComStop.Location = new System.Drawing.Point(410, 430);
this.btnComStop.Name = "btnComStop";
this.btnComStop.Size = new System.Drawing.Size(140, 45);
this.btnComStop.TabIndex = 36;
this.btnComStop.Text = "压紧轴停止运动";
this.btnComStop.UseVisualStyleBackColor = false;
this.btnComStop.Click += new System.EventHandler(this.btnComStop_Click);
//
// btnUpdate
//
this.btnUpdate.BackColor = System.Drawing.Color.White;
this.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdate.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdate.Location = new System.Drawing.Point(590, 328);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(140, 45);
this.btnUpdate.TabIndex = 37;
this.btnUpdate.Text = "更新位置";
this.btnUpdate.UseVisualStyleBackColor = false;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// FrmAxisDebug // FrmAxisDebug
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(805, 442); this.ClientSize = new System.Drawing.Size(805, 519);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.btnComStop);
this.Controls.Add(this.btnCom);
this.Controls.Add(this.btnCCopy); this.Controls.Add(this.btnCCopy);
this.Controls.Add(this.btnICopy); this.Controls.Add(this.btnICopy);
this.Controls.Add(this.btnUCopy); this.Controls.Add(this.btnUCopy);
...@@ -468,5 +513,8 @@ ...@@ -468,5 +513,8 @@
private System.Windows.Forms.Button btnUCopy; private System.Windows.Forms.Button btnUCopy;
private System.Windows.Forms.Button btnICopy; private System.Windows.Forms.Button btnICopy;
private System.Windows.Forms.Button btnCCopy; private System.Windows.Forms.Button btnCCopy;
private System.Windows.Forms.Button btnCom;
private System.Windows.Forms.Button btnComStop;
private System.Windows.Forms.Button btnUpdate;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -26,7 +26,7 @@ namespace OnlineStore.ACPackingStore ...@@ -26,7 +26,7 @@ namespace OnlineStore.ACPackingStore
private ConfigMoveAxis comp = null; private ConfigMoveAxis comp = null;
//private int compress_Slv = 0; //private int compress_Slv = 0;
private AC_BOX_Bean boxBean = null; private AC_BOX_Bean boxBean = null;
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public FrmAxisDebug(AC_BOX_Bean boxBean) public FrmAxisDebug(AC_BOX_Bean boxBean)
{ {
middle = boxBean.Config.Middle_Axis; middle = boxBean.Config.Middle_Axis;
...@@ -35,9 +35,9 @@ namespace OnlineStore.ACPackingStore ...@@ -35,9 +35,9 @@ namespace OnlineStore.ACPackingStore
comp = boxBean.Config.Comp_Axis; comp = boxBean.Config.Comp_Axis;
inout = boxBean.Config.InOut_Axis; inout = boxBean.Config.InOut_Axis;
this. boxBean = boxBean; this.boxBean = boxBean;
InitializeComponent(); InitializeComponent();
this.Text = boxBean.Name + "_轴点动调试"; this.Text = boxBean.Name + "_轴点动调试";
} }
...@@ -375,5 +375,27 @@ namespace OnlineStore.ACPackingStore ...@@ -375,5 +375,27 @@ namespace OnlineStore.ACPackingStore
{ {
Clipboard.SetDataObject(txtComPosition.Text, true); Clipboard.SetDataObject(txtComPosition.Text, true);
} }
private void btnComStop_Click(object sender, EventArgs e)
{
LogUtil.info(boxBean.Name + "点击:" + btnComStop.Text);
ACServerManager.SuddenStop(comp.DeviceName, comp.GetAxisValue());
UpdateCompPosition();
}
private void btnCom_Click(object sender, EventArgs e)
{
LogUtil.info(boxBean.Name + "点击:" + btnCom.Text);
ACServerManager.AbsMove(comp.DeviceName, comp.GetAxisValue(), boxBean.Config.CompAxis_P4_Position, boxBean.Config.CompAxis_P4_Speed);
boxBean.ComAxisStartCheck(IO_Type.Compress_Check,IO_VALUE.HIGH);
}
private void btnUpdate_Click(object sender, EventArgs e)
{
UpdateMiddlePosition();
UpdateInOutPosition();
UpdateUpdownPosition();
UpdateCompPosition();
}
} }
} }
...@@ -554,9 +554,9 @@ ...@@ -554,9 +554,9 @@
this.groupInout.Controls.Add(this.btnUpDownP3); this.groupInout.Controls.Add(this.btnUpDownP3);
this.groupInout.Controls.Add(this.btnUpDownP4); this.groupInout.Controls.Add(this.btnUpDownP4);
this.groupInout.Enabled = false; this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(3, 164); this.groupInout.Location = new System.Drawing.Point(3, 159);
this.groupInout.Name = "groupInout"; this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(1304, 362); this.groupInout.Size = new System.Drawing.Size(1304, 375);
this.groupInout.TabIndex = 100; this.groupInout.TabIndex = 100;
this.groupInout.TabStop = false; this.groupInout.TabStop = false;
this.groupInout.Text = "料仓操作"; this.groupInout.Text = "料仓操作";
......
...@@ -153,13 +153,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,13 +153,13 @@ namespace OnlineStore.DeviceLibrary
if (!instoreShelf) if (!instoreShelf)
{ {
InOutStoreLog("出库 " + MoveInfo.SLog + ": 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴开始缓慢压紧到P4 :" + Config.CompAxis_P4_Position ); InOutStoreLog("出库 " + MoveInfo.SLog + ": 拿起物品,升降轴至P6["+ MoveInfo.MoveParam.MoveP.UpDown_P6 + "],压紧轴到压紧点P2 :" + MoveInfo.MoveParam.MoveP.ComPress_P2);
//ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.MoveP.ComPress_P2, Config.CompAxis_P2_Speed); ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.MoveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P6, Config.UpDownAxis_P6_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitComAxis(Config.Comp_Axis, Config.CompAxis_P4_Position, Config.CompAxis_P4_Speed)); //MoveInfo.WaitList.Add(WaitResultInfo.WaitComAxis(Config.Comp_Axis, Config.CompAxis_P4_Position, Config.CompAxis_P4_Speed));
Config.Comp_Axis.TargetPosition = Config.CompAxis_P4_Position; //Config.Comp_Axis.TargetPosition = Config.CompAxis_P4_Position;
ACServerManager.AbsMove(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue(), Config.CompAxis_P4_Position, Config.CompAxis_P4_Speed); //ACServerManager.AbsMove(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue(), Config.CompAxis_P4_Position, Config.CompAxis_P4_Speed);
ComAxisStartCheck(); //ComAxisStartCheck();
} }
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_09_TopCylinderUp)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_09_TopCylinderUp))
...@@ -189,16 +189,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,16 +189,15 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
//MoveInfo.NextMoveStep(StoreMoveStep.SO_08_InoutBack); MoveInfo.NextMoveStep(StoreMoveStep.SO_08_InoutBack);
//InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子从库位返回,进出轴至P1(待机点) "); InOutStoreLog("出库 " + MoveInfo.SLog + ":进出轴返回P1["+ MoveInfo.MoveParam.MoveP.InOut_P1 + "] ");
////ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed); InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
//InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1); //把库位的物品放到取到叉子上之后是出仓完成
////把库位的物品放到取到叉子上之后是出仓完成 string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
//string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; lastPosId = posId;
//lastPosId = posId; lastPosIdStatus = StoreStatus.OutStoreBoxEnd;
//lastPosIdStatus = StoreStatus.OutStoreBoxEnd; storeStatus = StoreStatus.OutStoreBoxEnd;
//storeStatus = StoreStatus.OutStoreBoxEnd; //SO_06_StartCompress();
SO_06_StartCompress();
} }
} }
} }
...@@ -648,8 +647,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -648,8 +647,8 @@ namespace OnlineStore.DeviceLibrary
foreach (string posId in posIdArray) foreach (string posId in posIdArray)
{ {
index++; index++;
string plateW = plateWArray[index]; int plateW = Convert.ToInt32( plateWArray[index]);
string plateH = plateHArray[index]; int plateH =Convert.ToInt32( plateHArray[index]);
string shelfPosID = StoreManager.GetShelfIDByLoc(rfidLoc, ShelfPosList); string shelfPosID = StoreManager.GetShelfIDByLoc(rfidLoc, ShelfPosList);
InOutParam inoutParam = new InOutParam(barcode, posId, shelfPosID, plateW, plateH, urgentReel, cutReel, smallReel, rfid, rfidLoc, taskCount, realRfid); InOutParam inoutParam = new InOutParam(barcode, posId, shelfPosID, plateW, plateH, urgentReel, cutReel, smallReel, rfid, rfidLoc, taskCount, realRfid);
...@@ -756,8 +755,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -756,8 +755,8 @@ namespace OnlineStore.DeviceLibrary
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度, //服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置 //postId格式BoxId#位置
string posId = data[ParamDefine.posId]; string posId = data[ParamDefine.posId];
string plateW = data[ParamDefine.plateW]; int plateW = FormUtil.GetIntData(data, ParamDefine.plateW);
string plateH = data[ParamDefine.plateH]; int plateH = FormUtil.GetIntData(data, ParamDefine.plateH);
int storeId = InOutParam.GetPosStoreId(posId); int storeId = InOutParam.GetPosStoreId(posId);
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId); ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
...@@ -767,9 +766,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -767,9 +766,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】"); LogUtil.error(Name + "收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return false; return false;
} }
LogInfo(" 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】设置入库参数 , 开始入库!"); int p2 = Config.GetComP2(plateH).TargetComP2(); ;
int p3 = ComTargetPosition + Config.GetCom_P3_P2(plateW); int p3 = p2 + Config.GetCom_P3_P2(plateW);
MoveInfo.MoveParam.UpdatePosId(message, posId, plateW, plateH, ComTargetPosition, p3); LogInfo(" 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】设置入库参数,压紧位置["+p2+"]["+p3+"] , 开始入库!");
MoveInfo.MoveParam.UpdatePosId(message, posId, plateW, plateH, p2, p3);
return true; return true;
} }
} }
...@@ -901,8 +901,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -901,8 +901,8 @@ namespace OnlineStore.DeviceLibrary
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度, //服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置 //postId格式BoxId#位置
string posId = data[ParamDefine.posId]; string posId = data[ParamDefine.posId];
string plateW = data[ParamDefine.plateW]; int plateW = FormUtil.GetIntData(data, ParamDefine.plateW);
string plateH = data[ParamDefine.plateH]; int plateH = FormUtil.GetIntData(data, ParamDefine.plateH);
int storeId = InOutParam.GetPosStoreId(posId); int storeId = InOutParam.GetPosStoreId(posId);
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId); ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
...@@ -913,9 +913,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -913,9 +913,10 @@ namespace OnlineStore.DeviceLibrary
codeResultType = CodeResultType.NotFoundPos; codeResultType = CodeResultType.NotFoundPos;
return false; return false;
} }
LogInfo(" 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】设置入库参数 , 开始入库!"); int p2 = Config.GetComP2(plateH).TargetComP2(); ;
int p3 = ComTargetPosition + Config.GetCom_P3_P2(plateW); int p3 = p2 + Config.GetCom_P3_P2(plateW);
MoveInfo.MoveParam.UpdatePosId(message, posId, plateW, plateH, ComTargetPosition, p3); LogInfo(" 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】设置入库参数,压紧位置[" + p2 + "][" + p3 + "] , 开始入库!");
MoveInfo.MoveParam.UpdatePosId(message, posId, plateW, plateH, p2, p3);
codeResultType = CodeResultType.Success; codeResultType = CodeResultType.Success;
return true; return true;
} }
......
...@@ -201,13 +201,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,13 +201,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(box.Name + "GetPositon[" + param.ShelfPosID + "]=null,没有库位不能执行出入库"); LogUtil.error(box.Name + "GetPositon[" + param.ShelfPosID + "]=null,没有库位不能执行出入库");
return false; return false;
} }
if (String.IsNullOrEmpty(param.PlateH)) if (param.PlateH<=0)
{ {
param.PlateH = position.BagHigh.ToString(); param.PlateH = position.BagHigh;
} }
if (string.IsNullOrEmpty(param.PlateW)) if (param.PlateW<=0)
{ {
param.PlateW = position.BagWidth.ToString(); param.PlateW = position.BagWidth;
} }
if (sp != null) if (sp != null)
{ {
...@@ -232,7 +232,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,7 +232,7 @@ namespace OnlineStore.DeviceLibrary
p.UpDown_P11 = box.Config.UpDownAxis_P11; p.UpDown_P11 = box.Config.UpDownAxis_P11;
p.UpDown_P12 = box.Config.UpDownAxis_P12; p.UpDown_P12 = box.Config.UpDownAxis_P12;
p.ComPress_P2 = box.Config.GetComP2(position.BagHigh).TargetComP2(); p.ComPress_P2 = box.Config.GetComP2(param.PlateH).TargetComP2();
p.ComPress_P3 = p.ComPress_P2 + box.Config.GetCom_P3_P2(param.PlateW); p.ComPress_P3 = p.ComPress_P2 + box.Config.GetCom_P3_P2(param.PlateW);
p.InOut_P3 = position.InoutAxis_P3; p.InOut_P3 = position.InoutAxis_P3;
p.Middle_P2 = position.MiddleAxis_P2; p.Middle_P2 = position.MiddleAxis_P2;
...@@ -656,14 +656,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -656,14 +656,7 @@ namespace OnlineStore.DeviceLibrary
msg = deviceName + " 【" + barcode + "】结果:没有收到服务器反馈 "; msg = deviceName + " 【" + barcode + "】结果:没有收到服务器反馈 ";
LogUtil.info(msg); LogUtil.info(msg);
return ResultType.Error; return ResultType.Error;
} }
//else if ((!string.IsNullOrEmpty(serverResult.msg)))// || serverResult.result.Equals(0).Equals(false)
//{
// msg = deviceName + " 【" + barcode + "】结果:" + serverResult.msg;
// LogUtil.info(msg);
// // return false;
//}
else if (serverResult.result.Equals(-1)) else if (serverResult.result.Equals(-1))
{ {
IsLockInfoMatch = false; IsLockInfoMatch = false;
......
...@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public class InOutParam public class InOutParam
{ {
public InOutParam(string wareNo="", string posId="", string ShelfPosID="", string platew = "", string plateh = "", bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0,int taskCount=0,string realRfid="") public InOutParam(string wareNo="", string posId="", string ShelfPosID="", int platew = 0, int plateh =0, bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0,int taskCount=0,string realRfid="")
{ {
this.ShelfPosID = ShelfPosID; this.ShelfPosID = ShelfPosID;
WareCode = wareNo; WareCode = wareNo;
...@@ -69,12 +69,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,12 +69,12 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料盘高度 /// 料盘高度
/// </summary> /// </summary>
public string PlateH { get; set; } public int PlateH = 0;
/// <summary> /// <summary>
/// 料盘宽度 /// 料盘宽度
/// </summary> /// </summary>
public string PlateW { get; set; } public int PlateW = 0;
/// <summary> /// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上 /// urgentReel: true 表示紧急料,需要出到料串上
/// </summary> /// </summary>
...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -169,7 +169,7 @@ namespace OnlineStore.DeviceLibrary
} }
internal void UpdatePosId(string message, string posId, string plateW, string plateH,int comP2,int comP3) internal void UpdatePosId(string message, string posId, int plateW, int plateH,int comP2,int comP3)
{ {
this.WareCode = message; this.WareCode = message;
this.PosID = posId; this.PosID = posId;
......
...@@ -234,14 +234,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,14 +234,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
SO_05_GetReel, SO_05_GetReel,
/// <summary> ///// <summary>
/// 料仓出库,,压紧轴开始缓慢压紧 ///// 料仓出库,,压紧轴开始缓慢压紧
/// </summary> ///// </summary>
SO_06_StartCompress, //SO_06_StartCompress,
/// <summary> ///// <summary>
/// 料仓出库,,检测到料叉压紧确认信号,再次向下压紧指定的值 ///// 料仓出库,,检测到料叉压紧确认信号,再次向下压紧指定的值
/// </summary> ///// </summary>
SO_07_ComDownMove, //SO_07_ComDownMove,
/// <summary> /// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!