Commit 13d111d8 LN

料架号不一致,送出料架时料架信息使用上次的。日志修改

1 个父辈 74f9149e
......@@ -54,6 +54,8 @@
this.lblSize = new System.Windows.Forms.Label();
this.txtUpdownP11 = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label5 = new System.Windows.Forms.Label();
this.txtCom7_P3_P2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtComP3_P2 = new System.Windows.Forms.TextBox();
this.btnComP4 = new System.Windows.Forms.Button();
......@@ -137,8 +139,6 @@
this.btnTempClose = new System.Windows.Forms.Button();
this.btnTempInit = new System.Windows.Forms.Button();
this.axisMoveControl1 = new OnlineStore.ACPackingStore.AxisMoveControl();
this.label5 = new System.Windows.Forms.Label();
this.txtCom7_P3_P2 = new System.Windows.Forms.TextBox();
this.groupShelf.SuspendLayout();
this.panel1.SuspendLayout();
this.tabControl1.SuspendLayout();
......@@ -611,6 +611,35 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "压紧轴位置配置";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Cursor = System.Windows.Forms.Cursors.Default;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ForeColor = System.Drawing.Color.Purple;
this.label5.Location = new System.Drawing.Point(6, 141);
this.label5.Name = "label5";
this.label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label5.Size = new System.Drawing.Size(193, 17);
this.label5.TabIndex = 265;
this.label5.Text = "七寸盘_压紧前点P3-压紧点P2差值:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtCom7_P3_P2
//
this.txtCom7_P3_P2.AcceptsReturn = true;
this.txtCom7_P3_P2.BackColor = System.Drawing.SystemColors.Window;
this.txtCom7_P3_P2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtCom7_P3_P2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCom7_P3_P2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtCom7_P3_P2.Location = new System.Drawing.Point(201, 138);
this.txtCom7_P3_P2.MaxLength = 0;
this.txtCom7_P3_P2.Name = "txtCom7_P3_P2";
this.txtCom7_P3_P2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtCom7_P3_P2.Size = new System.Drawing.Size(80, 23);
this.txtCom7_P3_P2.TabIndex = 264;
this.txtCom7_P3_P2.Text = "999";
//
// label2
//
this.label2.AutoSize = true;
......@@ -1520,7 +1549,7 @@
//
this.lblMoveInfo.AutoSize = true;
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.Location = new System.Drawing.Point(975, 12);
this.lblMoveInfo.Location = new System.Drawing.Point(965, 13);
this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(56, 17);
this.lblMoveInfo.TabIndex = 269;
......@@ -1557,7 +1586,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(5, 38);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(892, 67);
this.lblWarnMsg.Size = new System.Drawing.Size(939, 77);
this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -1811,35 +1840,6 @@
this.axisMoveControl1.Size = new System.Drawing.Size(547, 449);
this.axisMoveControl1.TabIndex = 0;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Cursor = System.Windows.Forms.Cursors.Default;
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ForeColor = System.Drawing.Color.Purple;
this.label5.Location = new System.Drawing.Point(6, 141);
this.label5.Name = "label5";
this.label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label5.Size = new System.Drawing.Size(193, 17);
this.label5.TabIndex = 265;
this.label5.Text = "七寸盘_压紧前点P3-压紧点P2差值:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtCom7_P3_P2
//
this.txtCom7_P3_P2.AcceptsReturn = true;
this.txtCom7_P3_P2.BackColor = System.Drawing.SystemColors.Window;
this.txtCom7_P3_P2.Cursor = System.Windows.Forms.Cursors.IBeam;
this.txtCom7_P3_P2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCom7_P3_P2.ForeColor = System.Drawing.SystemColors.WindowText;
this.txtCom7_P3_P2.Location = new System.Drawing.Point(201, 138);
this.txtCom7_P3_P2.MaxLength = 0;
this.txtCom7_P3_P2.Name = "txtCom7_P3_P2";
this.txtCom7_P3_P2.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtCom7_P3_P2.Size = new System.Drawing.Size(80, 23);
this.txtCom7_P3_P2.TabIndex = 264;
this.txtCom7_P3_P2.Text = "999";
//
// FrmBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......
......@@ -100,7 +100,19 @@ shelfLoc问题修改。
扫码修改
20200409修改
压紧轴压紧前点P3-压紧轴压紧点P2的差值,7寸盘和其他的分开配置。
BoxConfig_1.csv 和 BoxConfig_2.csv 需要增加一行配置:
PRO,压紧轴(轴4)七寸盘压紧前点相对压紧点的位置,CompAxis7_P3_P2_Value,-50000,,,,,,,
修改问题:
料架号不一致,送出料架时料架信息使用上次的。
出库时发现料架对不上,送出料架时发的mark应该用原来的
......
......@@ -326,7 +326,7 @@ namespace OnlineStore.DeviceLibrary
return;
}
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
LogInfo(MoveInfo.MoveType + ": 线体停止转动, 压紧轴,旋转轴,上下轴开始 原点返回");
LogInfo(MoveInfo.MoveType + ": 停止线体, 压紧轴,旋转轴,上下轴开始 原点返回");
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H05_OtherAxisBack);
ACAxisHomeMove(Config.Comp_Axis);
ACAxisHomeMove(Config.Middle_Axis);
......@@ -692,6 +692,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
(IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH)))
{
LogUtil.info(Name + "AutoShelfInstore=true ,检测到料架,开始料架入库");
StartShelfInStore();
}
//判断是否要更新状态为None 顶升下降时才需要needEnter
......@@ -774,7 +775,7 @@ namespace OnlineStore.DeviceLibrary
bool result = waitOutStoreList.TryDequeue(out param);
if (result && param != null)
{
LogInfo("开始执行排队中的出库【" + param.ToStr() + "】");
LogInfo("执行排队的出库【" + param.ToStr() + "】");
StartExecuctOut(param);
}
}
......@@ -870,12 +871,12 @@ namespace OnlineStore.DeviceLibrary
public string GetMoveStr()
{
string msg = "";
msg += "runS: " + storeRunStatus + "\n";
msg += "lineS: " + storeStatus + "\n";
msg += "alarm: " + alarmType + "\n";
msg += MoveInfo.MoveType +" "+MoveInfo.SLog+ "\n";
msg += "状态: " + storeRunStatus + " " + storeStatus + "\n";
// msg += "lineS: " + storeStatus + "\n";
msg += "报警: " + alarmType + "\n";
msg += MoveInfo.MoveType + " " + MoveInfo.SLog + "\n";
// msg += "MoveS: " + MoveInfo.SLog + "\n";
msg += "Shlef: " + CurrShelfID + "\n";
msg += "料架: " + CurrShelfID + " " + LastOutParam.rfid + "\n";
msg += Config.AgvNodeName + ":" + AgvClient.GetAction(Config.AgvNodeName);
return msg;
}
......
......@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut;
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_WaitInLineSingle)||
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_WaitLineIn)||
MoveInfo.MoveStep.Equals(StoreMoveStep.BI_04_WaitTakeSingle))
{
timeOutMs = 30000;
......@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否在P1,如果是,不需要运行
if (ACServerManager.isInPosition(Config.InOut_Axis, InOut_P1))
{
LogInfo("进出轴当前已经在P1,不需要再回P1");
LogUtil.debug(Name+ "进出轴当前已经在P1,不需要再回P1");
}
else
{
......@@ -218,7 +218,17 @@ namespace OnlineStore.DeviceLibrary
private int LastWidth = 0;
private int LastHeight = 0;
private string CurrShelfID = "";
private string LastRfidID = "";//服务器发送的出库rfid
/// <summary>
/// 最后一次使用的料架号
/// </summary>
// private string LastRfidID = "";//服务器发送的出库rfid
private InOutParam LastOutParam = new InOutParam() ;
private string GetLastRfid()
{
//出库料架使用,返回上次使用的料架绑定的虚拟料架号
return LastOutParam.rfid;
}
#region 入库
private void ClearLastTrayInfo()
......@@ -262,7 +272,8 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料架取料:" + MoveInfo.SLog + " 叉子后退到待机点P1, 重置盘信息");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ClearLastTrayInfo();
LastRfidID = "";
//LastRfidID = "";
LastOutParam = new InOutParam();
}
......@@ -319,7 +330,7 @@ namespace OnlineStore.DeviceLibrary
//读取RFID
RFIDData data = RFIDManager.ReadRFID(Config.RFID_IP, true);
CurrShelfID = data.NumStr();
LogUtil.info(Name + "更新当前料架号CurrShelfID=【" + CurrShelfID + "】,LastRfidID=【" + LastRfidID+"】");
LogUtil.info(Name + "更新当前料架号CurrShelfID=【" + CurrShelfID + "】,LastRfidID=【" + GetLastRfid() +"】");
}
private void StartMoveToBag()
......@@ -777,14 +788,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(StoreMoveType.OutStore, param);
LogInfo("启动出库【" + param.ToStr() + "】 ");
//出库前shelfPosID需要固定,出库时根据rfid判断是否需要出入料架
MoveInfo.NextMoveStep(StoreMoveStep.SO_01_DeviceBack);
MoveInfo.NextMoveStep(StoreMoveStep.SO_01_InoutBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ":进出轴到P1 开始");
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
return true;
}
private void SO_03_ToBagPosition()
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToPosition);
InOutStoreLog("出库 " + MoveInfo.SLog + ":走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点) ,顶升上升");
ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.MoveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
......@@ -806,7 +817,7 @@ namespace OnlineStore.DeviceLibrary
#region 出入库步骤
if (MoveInfo.MoveStep == StoreMoveStep.SO_01_DeviceBack)
if (MoveInfo.MoveStep == StoreMoveStep.SO_01_InoutBack)
{
//判断是否需要送出料架,是否需要进入料架,是否可以直接开始
if (MoveInfo.MoveParam.rfid.Equals(""))
......@@ -815,16 +826,17 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_02_TopCylinderDown);
InOutStoreLog("出库 " + MoveInfo.SLog + ":料架顶升下降");
MoveInfo.NextMoveStep(StoreMoveStep.SO_02_TopDown);
InOutStoreLog("出库 " + MoveInfo.SLog + ":顶升下降");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_02_TopCylinderDown)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_02_TopDown)
{
if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH))
{
string LastRfidID = GetLastRfid();
// if (IsRightShelfId(CurrShelfID, MoveInfo.MoveParam.realRfid))
if (MoveInfo.MoveParam.rfid.Equals(LastRfidID))
{
......@@ -834,13 +846,16 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.error("出库 【" + LastRfidID + "】 【" + MoveInfo.MoveParam.rfid + "," + MoveInfo.MoveParam.realRfid + "】不同料架,送出当前料架,稍后重新出库");
//送出料架,并且记录出库信息,等会重新出库
StartShelfOut();
//重新记录
LogInfo(" 执行出库【" + MoveInfo.MoveParam.ToStr() + "】失败,料架号不一致,加入等待队列");
waitOutStoreList.Enqueue(MoveInfo.MoveParam);
LogUtil.error(Name+ "出库 【" + LastRfidID + "】 【" + MoveInfo.MoveParam.rfid + "," + MoveInfo.MoveParam.realRfid + "】不同料架,送出当前料架,稍后重新出库");
// MoveInfo.MoveParam.rfid = LastRfidID;
MoveInfo.NewMove(StoreMoveType.OutStore, LastOutParam);
//送出料架,并且记录出库信息,等会重新出库
StartShelfOut();
return;
}
}
......@@ -849,7 +864,7 @@ namespace OnlineStore.DeviceLibrary
string mark = GetMarkInfo();
// string rfid = MoveInfo.MoveParam.rfid;
MoveInfo.NextMoveStep(StoreMoveStep.BI_00_ReadyShelf);
InOutStoreLog("出库 " + MoveInfo.SLog + ": 通知agv调度准备带料架的agv[" + mark + "],等待agv到达或检测到料架信号,进出轴到P1");
InOutStoreLog("出库 " + MoveInfo.SLog + ": NeedEnter[" + mark + "],等待agv_Arrive 或有料架,进出轴到P1");
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
//需要先叫agv到达
AgvClient.SetStatus(Config.AgvNodeName, mark, MoveInfo.MoveParam.rfid, ClientAction.NeedEnter, ClientLevel.High, true);
......@@ -860,23 +875,23 @@ namespace OnlineStore.DeviceLibrary
SO_03_ToBagPosition();
}
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_03_ToBagPosition)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_03_ToPosition)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_04_DeviceToBag);
MoveInfo.NextMoveStep(StoreMoveStep.SO_04_ToPos);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进入库位中, 进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_04_DeviceToBag)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_04_ToPos)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_05_BagWareToDevice);
MoveInfo.NextMoveStep(StoreMoveStep.SO_05_GetReel);
InOutStoreLog("出库 " + MoveInfo.SLog + ": 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) ");
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_BagWareToDevice)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_GetReel)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_06_BagDeviceBack);
MoveInfo.NextMoveStep(StoreMoveStep.SO_06_InoutBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子从库位返回,进出轴至P1(待机点) ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1(moveP.InOut_P1);
......@@ -887,7 +902,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.OutStoreBoxEnd;
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_06_BagDeviceBack)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_06_InoutBack)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
InOutStoreLog("出库 " + MoveInfo.SLog + ":走到料架位置,旋转轴至P101,升降轴至P102, ");
......@@ -915,14 +930,14 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_WaitNoTray)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_DeviceToShelf);
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DeviceToShelf)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_12_DevicePutWare);
MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel);
InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空serverShelfData=null ");
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed);
......@@ -937,7 +952,7 @@ namespace OnlineStore.DeviceLibrary
string msg = StoreManager.PutShelfFinished(Name, MoveInfo.MoveParam.WareCode, CurrShelfID, posLoc.ToString(), out serverShelfData);
if (String.IsNullOrEmpty(msg).Equals(false))
{
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfID + "】【" + posLoc + "】【"+LastRfidID+"】PutShelfFinished 结果:" + msg);
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfID + "】【" + posLoc + "】【"+GetLastRfid()+"】PutShelfFinished 结果:" + msg);
serverShelfData = null;
}
}
......@@ -947,7 +962,7 @@ namespace OnlineStore.DeviceLibrary
string msg = StoreManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, CurrShelfID + "@" + posLoc.ToString(), out newTaskCount);
if (String.IsNullOrEmpty(msg).Equals(false))
{
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfID + "】【" + posLoc + "】【" + LastRfidID + "】UpdateTrayLoc 结果:" + msg);
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfID + "】【" + posLoc + "】【" + GetLastRfid() + "】UpdateTrayLoc 结果:" + msg);
serverShelfData = null;
}
if (newTaskCount > MoveInfo.MoveParam.taskCount)
......@@ -958,16 +973,16 @@ namespace OnlineStore.DeviceLibrary
}
});
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_12_DevicePutWare)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_12_PutReel)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_13_DeviceOutFromDoor);
MoveInfo.NextMoveStep(StoreMoveStep.SO_13_InoutBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子从出料口返回, 进出轴到P1 ");
InOutBackToP1(moveP.InOut_P1);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_13_DeviceOutFromDoor)
else if (MoveInfo.MoveStep == StoreMoveStep.SO_13_InoutBack)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_14_GoBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ": 升降轴返回,升降轴到P1,料架顶升下降");
InOutStoreLog("出库 " + MoveInfo.SLog + ": 升降轴返回,升降轴到P1,顶升下降");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
//发送消息给流水线
// SendOutStoreEnd(MoveInfo);
......@@ -988,7 +1003,7 @@ namespace OnlineStore.DeviceLibrary
// InOutStoreLog("出库完成,料架【" + CurrShelfID + "】没有剩余位置,送出料架");
// isNeedSend = true;
//}
string logName = "【" + CurrShelfID + "】【" + LastRfidID + "】";
string logName = "【" + CurrShelfID + "】【" + GetLastRfid() + "】";
//只有rfid不为空才需要送出料架
if (String.IsNullOrEmpty(MoveInfo.MoveParam.rfid))
{
......@@ -1039,7 +1054,7 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
else if (MoveInfo.MoveStep <= StoreMoveStep.SO_01_DeviceBack)
else if (MoveInfo.MoveStep <= StoreMoveStep.SO_01_InoutBack)
{
ShelfEnterProcess();
}
......
......@@ -27,12 +27,12 @@ namespace OnlineStore.DeviceLibrary
private void ShelfEnterProcess()
{
string mark = GetMarkInfo();
string moveName = "料架入库[" + mark + "]";
string moveName = "入库料架[" + mark + "]";
bool instoreShelf = true;
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
instoreShelf = false;
moveName = "空料架进入["+ mark + "]";
moveName = "出库料架[" + CurrShelfID + "][" + mark + "]";
}
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_00_ReadyShelf))
{
......@@ -104,26 +104,28 @@ namespace OnlineStore.DeviceLibrary
{
LineStop();
MoveInfo.NextMoveStep(StoreMoveStep.BI_08_LocationUp);
InOutStoreLog(moveName + MoveInfo.SLog + "线体停止转动,定位装置上升,读取料架编号,设置状态为None");
InOutStoreLog(moveName + MoveInfo.SLog + "停止线体,读取料架号,设置"+ Config.AgvNodeName + "=None");
AgvClient.SetStatus(Config.AgvNodeName);
// CylinderMove(MoveInfo, IO_Type.LocationCylinder_Down, IO_Type.LocationCylinder_Up);
if (!instoreShelf)
{
LastRfidID = MoveInfo.MoveParam.rfid;
// LastRfidID = MoveInfo.MoveParam.rfid;
LastOutParam = MoveInfo.MoveParam;
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进入库位中, 进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, MoveInfo.MoveParam.MoveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
else
{
LastRfidID = "";
LastOutParam = new InOutParam();
// LastRfidID = "";
}
UpdateShelfId();
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_08_LocationUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_09_TopCylinderUp);
InOutStoreLog(moveName + MoveInfo.SLog + "顶升装置上升");
InOutStoreLog(moveName + MoveInfo.SLog + ""+CurrShelfID+"顶升上升");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
if (!instoreShelf)
......@@ -142,7 +144,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_06_BagDeviceBack);
MoveInfo.NextMoveStep(StoreMoveStep.SO_06_InoutBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子从库位返回,进出轴至P1(待机点) ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
......@@ -161,12 +163,12 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
string mark = GetMarkInfo();
InOutStoreLog("送出出库料架:顶升气缸下降,调用 NeedLeave[" + mark + "][" + CurrShelfID + "] ");
InOutStoreLog("送出[" + CurrShelfID + "][" + mark+"]:顶升下降,调用 NeedLeave[" + mark + "][" + CurrShelfID + "] ");
AgvClient.NeedLeave(Config.AgvNodeName, mark, CurrShelfID);
}
else
{
InOutStoreLog("送出空料架:顶升气缸下降,调用 NeedLeave[0][" + CurrShelfID + "],清空料架clearPutInRfid[" + CurrShelfID + "]");
InOutStoreLog("送出空料架["+CurrShelfID+"]:顶升下降,调用 NeedLeave[0][" + CurrShelfID + "],clearPutInRfid[" + CurrShelfID + "]");
AgvClient.NeedLeave(Config.AgvNodeName,"0", CurrShelfID);
StoreManager.clearPutInRfid(Name, CurrShelfID);
}
......@@ -215,7 +217,7 @@ namespace OnlineStore.DeviceLibrary
if (process.ProcessName.EndsWith("ACPackingStore"))
{
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + Name+ ", 名称:{0} 内存大小:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
sbResult.AppendFormat(DateTime.Now.ToLongTimeString() + Name+ ", 名称:{0} 内存:{1}M ", process.ProcessName, process.PrivateMemorySize64 / 1024 / 1024F);
totalMemery += process.PrivateMemorySize64 / 1024;
double value = (process.TotalProcessorTime - prevCpuTime).TotalMilliseconds / interval / Environment.ProcessorCount;
sbResult.AppendFormat(" CPU : " + Math.Round(value, 2) + "%");
......@@ -232,11 +234,11 @@ namespace OnlineStore.DeviceLibrary
private void ShelfOutProcess()
{
string mark = GetMarkInfo();
string moveName = "送出空料架["+mark+"]";
string moveName = "送出空料架["+CurrShelfID+"]";
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
{
moveName = "送出出库料架[" + mark + "]";
moveName = "送出[" + CurrShelfID + "][" + mark + "]";
}
// LogCPU();
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_01_TopDown))
......@@ -309,14 +311,14 @@ namespace OnlineStore.DeviceLibrary
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.HIGH));
}else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_07_WaitShelfOut))
{
MoveInfo.NextMoveStep(StoreMoveStep.BS_08_WaitInLineSingle);
MoveInfo.NextMoveStep(StoreMoveStep.BS_08_WaitLineIn);
InOutStoreLog(moveName + MoveInfo.SLog + ":等待 入料口有信号,最多等待30秒");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.LOW));
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.HIGH));
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_WaitInLineSingle))
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_WaitLineIn))
{
MoveInfo.NextMoveStep(StoreMoveStep.BS_09_WaitTime);
InOutStoreLog(moveName + MoveInfo.SLog + ":再转动1000 , 等待入料口无信号");
......@@ -348,9 +350,10 @@ namespace OnlineStore.DeviceLibrary
//结束
MoveEndToRuningStatus();
//EmprtShelfList = new ConcurrentQueue<string>();
InOutStoreLog(moveName + MoveInfo.SLog + ":停止转动,送出料架结束 ,设置状态为None,清空当前料架:"+CurrShelfID);
InOutStoreLog(moveName + MoveInfo.SLog + ":料架"+ CurrShelfID + "已离开 ,"+ Config.AgvNodeName + "=None");
CurrShelfID = "";
LastRfidID = "";
LastOutParam = new InOutParam();
//LastRfidID = "";
AgvClient.SetStatus(Config.AgvNodeName);
}
}
......@@ -377,13 +380,14 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveType.Equals(StoreMoveType.None) &&
IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW))
{
LogUtil.info(Name + logN + " ,检测到料架,开始料架入库");
StartShelfInStore();
return true;
}
}
else
{
LogUtil.info(name + logN + " ,未找到相关处理");
LogUtil.info(Name + logN + " ,未找到相关处理");
}
return false;
......@@ -714,7 +718,7 @@ namespace OnlineStore.DeviceLibrary
return false;
}
LogInfo(" 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】设置入库参数 , 开始入库!");
int p3 = ComTargetPosition + Config.CompAxis_P3_P2_Value;
int p3 = ComTargetPosition + Config.GetCom_P3_P2(plateW);
MoveInfo.MoveParam.UpdatePosId(message, posId, plateW, plateH, ComTargetPosition, p3);
return true;
}
......
......@@ -16,12 +16,12 @@ namespace OnlineStore.DeviceLibrary
public class InOutParam
{
public static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public InOutParam()
{
this.WareCode = "";
MoveP = null;
}
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()
//{
// this.WareCode = "";
// MoveP = null;
//}
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="")
{
this.ShelfPosID = ShelfPosID;
WareCode = wareNo;
......
......@@ -482,9 +482,9 @@ namespace OnlineStore.DeviceLibrary
}
protected void InOutStoreLog(string msg)
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
string shelfId = MoveInfo.MoveParam != null ? "" + MoveInfo.MoveParam.ShelfPosID : "_";
LogInfo(" [" + posId +"] ["+ shelfId + "] :" + msg);
string posId = MoveInfo.MoveParam != null ? "["+MoveInfo.MoveParam.PosID+"]" : "";
string shelfId = MoveInfo.MoveParam != null ? "[" + MoveInfo.MoveParam.ShelfPosID+"]" : "";
LogInfo(" " + posId +""+ shelfId + " :" + msg);
}
protected int GetAlarmCodeByAxis(ConfigMoveAxis axis)
{
......
......@@ -213,31 +213,31 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
///料仓出库:叉子先运动到P1
/// </summary>
SO_01_DeviceBack = 2002,
SO_01_InoutBack = 2002,
/// <summary>
///料仓出库,,顶升气缸下降,先检测料架
/// </summary>
SO_02_TopCylinderDown = 2001,
SO_02_TopDown = 2001,
/// <summary>
/// 料仓出库,,所有轴运行到库位,压紧轴到压紧前点P3 ,旋转轴到库位点P2,轴2(上下) 至P5(库位出库前点)
/// </summary>
SO_03_ToBagPosition = 2003,
SO_03_ToPosition = 2003,
/// <summary>
/// 料仓出库,,叉子进入库位中, 进出轴到库位P3
/// </summary>
SO_04_DeviceToBag = 2004,
SO_04_ToPos = 2004,
/// <summary>
///料仓出库,, 库位的物品放入叉子上,轴2( 上下) 至P6( 库位出料缓冲点),轴4( 压紧) 至P2(压紧点)
/// </summary>
SO_05_BagWareToDevice = 2005,
SO_05_GetReel = 2005,
/// <summary>
///料仓出库,,叉子从 库位返回,轴3( 叉子) 至P1( 待机点)
/// </summary>
SO_06_BagDeviceBack = 2006,
SO_06_InoutBack = 2006,
/// <summary>
/// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤 )
......@@ -261,15 +261,15 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料仓出库,叉子到料架,进出轴至P20
/// /// </summary>
SO_11_DeviceToShelf = 2011,
SO_11_ToShelf = 2011,
/// <summary>
/// 料仓出库,,把物品放下,压紧轴到P1,升降轴至P20
/// </summary>
SO_12_DevicePutWare = 2012,
SO_12_PutReel = 2012,
/// <summary>
/// 料仓出库,,叉子从出料口返回,,进出轴到P1
/// </summary>
SO_13_DeviceOutFromDoor = 2013,
SO_13_InoutBack = 2013,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点),顶升气缸下降
......@@ -449,7 +449,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 送出空料架:等待取料工位无信号,入料口有信号
/// </summary>
BS_08_WaitInLineSingle = 4008,
BS_08_WaitLineIn = 4008,
/// <summary>
/// 送出空料架:再转动3000时间
/// </summary>
......
......@@ -327,10 +327,10 @@ namespace OnlineStore.DeviceLibrary
return "扫码完成";
}else if (WaitType.Equals(WaitEnum.W010_AgvStatus))
{
return "Agv状态:" + (ClientAction)AgvAction;
return " Agv_" + (ClientAction)AgvAction+" ";
}else if (WaitType.Equals(WaitEnum.W011_DoorCloseEvent))
{
return "Agv状态:DoorClose" ;
return "Agv_DoorClose事件" ;
}
else
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!