Commit c1af307d LN

出入库

1 个父辈 b1431631
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!--当前料架信息-料架号--> <!--当前料架信息-料架号-->
<add key ="CurrShelfNum" value ="-1"/> <add key ="CurrShelfNum" value ="-1"/>
<!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架--> <!--当前料架信息-料架类型,0=空料架,1=入库料架,2=出库料架-->
<add key ="CurrShelfType" value ="0"/> <add key ="CurrShelfType" value ="-1"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -163,6 +163,7 @@ namespace OnlineStore.DUOStore ...@@ -163,6 +163,7 @@ namespace OnlineStore.DUOStore
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.AutoScroll = true;
this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 14); this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 14);
...@@ -201,6 +202,7 @@ namespace OnlineStore.DUOStore ...@@ -201,6 +202,7 @@ namespace OnlineStore.DUOStore
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14); this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
...@@ -1254,7 +1256,7 @@ namespace OnlineStore.DUOStore ...@@ -1254,7 +1256,7 @@ namespace OnlineStore.DUOStore
this.lblMoveEquipInfo.AutoSize = true; this.lblMoveEquipInfo.AutoSize = true;
this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Blue; this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Blue;
this.lblMoveEquipInfo.Location = new System.Drawing.Point(270, 73); this.lblMoveEquipInfo.Location = new System.Drawing.Point(142, 74);
this.lblMoveEquipInfo.Name = "lblMoveEquipInfo"; this.lblMoveEquipInfo.Name = "lblMoveEquipInfo";
this.lblMoveEquipInfo.Size = new System.Drawing.Size(56, 17); this.lblMoveEquipInfo.Size = new System.Drawing.Size(56, 17);
this.lblMoveEquipInfo.TabIndex = 272; this.lblMoveEquipInfo.TabIndex = 272;
...@@ -1310,7 +1312,7 @@ namespace OnlineStore.DUOStore ...@@ -1310,7 +1312,7 @@ namespace OnlineStore.DUOStore
this.lblThisSta.AutoSize = true; this.lblThisSta.AutoSize = true;
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Green; this.lblThisSta.ForeColor = System.Drawing.Color.Green;
this.lblThisSta.Location = new System.Drawing.Point(138, 72); this.lblThisSta.Location = new System.Drawing.Point(10, 73);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(65, 19); this.lblThisSta.Size = new System.Drawing.Size(65, 19);
this.lblThisSta.TabIndex = 216; this.lblThisSta.TabIndex = 216;
...@@ -1335,6 +1337,7 @@ namespace OnlineStore.DUOStore ...@@ -1335,6 +1337,7 @@ namespace OnlineStore.DUOStore
this.Name = "FrmBox"; this.Name = "FrmBox";
this.Opacity = 0D; this.Opacity = 0D;
this.Text = "AC_SA_料仓"; this.Text = "AC_SA_料仓";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.FrmTest_Load); this.Load += new System.EventHandler(this.FrmTest_Load);
this.Shown += new System.EventHandler(this.FrmStoreBox_Shown); this.Shown += new System.EventHandler(this.FrmStoreBox_Shown);
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
......
...@@ -57,9 +57,10 @@ namespace OnlineStore.DUOStore ...@@ -57,9 +57,10 @@ namespace OnlineStore.DUOStore
chbAutoRun.Checked = store.UseBuzzer; chbAutoRun.Checked = store.UseBuzzer;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title); this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
chbAutoRun.Checked = (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1)); chbAutoRun.Checked = (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1));
// LogUtil.logBox = this.logBox; LoadListView();
// HideForm(); chbInstoreEnd.Checked = store.InstoreEndSendShelf;
chbOutstoreEnd.Checked = store.OutstoreEndSendShelf;
LoadOk = true; LoadOk = true;
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
this.timer1.Start(); this.timer1.Start();
...@@ -91,6 +92,8 @@ namespace OnlineStore.DUOStore ...@@ -91,6 +92,8 @@ namespace OnlineStore.DUOStore
tabPageList.Add(lineTabPage); tabPageList.Add(lineTabPage);
tabControl1.Controls.Add(lineTabPage); tabControl1.Controls.Add(lineTabPage);
} }
#region 料仓列表状态显示
private void LoadListView() private void LoadListView()
{ {
this.listView1.Columns.Clear(); this.listView1.Columns.Clear();
...@@ -101,7 +104,7 @@ namespace OnlineStore.DUOStore ...@@ -101,7 +104,7 @@ namespace OnlineStore.DUOStore
AddHealder("料盘信息", listView1.Size.Width - 110 - 130 - 50 - 90 - 10); AddHealder("料盘信息", listView1.Size.Width - 110 - 130 - 50 - 90 - 10);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8); //AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
AddRow(store, true); AddRow(store, false );
AddRow(store.BoxMap[1], store.BoxMap[1].IsDebug); AddRow(store.BoxMap[1], store.BoxMap[1].IsDebug);
AddRow(store.BoxMap[2], store.BoxMap[2].IsDebug); AddRow(store.BoxMap[2], store.BoxMap[2].IsDebug);
} }
...@@ -133,11 +136,11 @@ namespace OnlineStore.DUOStore ...@@ -133,11 +136,11 @@ namespace OnlineStore.DUOStore
List<EquipBase> eqList = new List<EquipBase>(store.BoxMap.Values); List<EquipBase> eqList = new List<EquipBase>(store.BoxMap.Values);
eqList.Insert(0, store); eqList.Insert(0, store);
foreach (EquipBase equip in store.BoxMap.Values) foreach (EquipBase equip in store.BoxMap.Values)
{ {
if (i.Equals(0)) if (i.Equals(0))
{ {
} }
else else
{ {
...@@ -202,7 +205,9 @@ namespace OnlineStore.DUOStore ...@@ -202,7 +205,9 @@ namespace OnlineStore.DUOStore
this.listView1.Items[rowIndex].SubItems[subIndex].Text = value; this.listView1.Items[rowIndex].SubItems[subIndex].Text = value;
} }
} }
} }
#endregion
/// <summary> /// <summary>
/// 隐藏窗口 /// 隐藏窗口
/// </summary> /// </summary>
...@@ -451,10 +456,25 @@ namespace OnlineStore.DUOStore ...@@ -451,10 +456,25 @@ namespace OnlineStore.DUOStore
if (!this.Visible) if (!this.Visible)
{ {
return; return;
} }
lblMoveInfo.Text = store.GetMoveStr();
string type = "";
if (store.CurrShelfType.Equals(0))
{
type = "空料架";
}
else if (store.CurrShelfType.Equals(1))
{
type = "入库料架";
}
else if (store.CurrShelfType.Equals(2))
{
type = "出库料架";
}
lblShelf.Text = "当前" + type + ":" + store.CurrShelfNum;
string msg = ""; string msg = "";
foreach(BoxBean box in StoreManager.Store.BoxMap.Values) foreach(BoxBean box in store.BoxMap.Values)
{ {
string s = box.WarnMsg; string s = box.WarnMsg;
if (!s.Equals("")) if (!s.Equals(""))
...@@ -462,7 +482,7 @@ namespace OnlineStore.DUOStore ...@@ -462,7 +482,7 @@ namespace OnlineStore.DUOStore
msg += box.Name+":"+s+ "\r" ; msg += box.Name+":"+s+ "\r" ;
} }
} }
UpdateListBox();
lblWarnMsg.Text = msg; lblWarnMsg.Text = msg;
LogM(); LogM();
} }
...@@ -656,5 +676,36 @@ namespace OnlineStore.DUOStore ...@@ -656,5 +676,36 @@ namespace OnlineStore.DUOStore
MessageBox.Show("未扫到二维码"); MessageBox.Show("未扫到二维码");
} }
} }
private void chbInstoreEnd_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (chbInstoreEnd.Checked.Equals(store.InstoreEndSendShelf))
{
return;
}
store.InstoreEndSendShelf = chbInstoreEnd.Checked;
LogUtil.info(store.Name + " 切换 入库完成送出料架=" + store.InstoreEndSendShelf);
}
private void chbOutstoreEnd_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (chbOutstoreEnd.Checked.Equals(store.OutstoreEndSendShelf))
{
return;
}
store.OutstoreEndSendShelf = chbOutstoreEnd.Checked;
LogUtil.info(store.Name + " 切换 入库完成送出料架=" + store.OutstoreEndSendShelf);
}
} }
} }
...@@ -5,11 +5,11 @@ using System.Runtime.InteropServices; ...@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下 // 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改 // 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。 // 与程序集关联的信息。
[assembly: AssemblyTitle("ACPackingStore")] [assembly: AssemblyTitle("DUOStore")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ACPackingStore")] [assembly: AssemblyProduct("DUOStore")]
[assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
......
...@@ -113,17 +113,17 @@ PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,500,,,,,,,,,,,, ...@@ -113,17 +113,17 @@ PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,500,,,,,,,,,,,,
PRO,0,T2_旋转轴P4速度,MiddleAxis_P4Speed,500,,,,,,,,,,,, PRO,0,T2_旋转轴P4速度,MiddleAxis_P4Speed,500,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,5000,,,,,,,,,,,, PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,5000,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料高点 P2,UpdownAxis_P2,5001,,,,,,,,,,,, PRO,0,T3_升降轴料串取放料高点/待机点 P2,UpdownAxis_P2,5001,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,5002,,,,,,,,,,,, PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,5002,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,5003,,,,,,,,,,,, PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,5003,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,5004,,,,,,,,,,,, PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,5004,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,5005,,,,,,,,,,,, PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,5005,,,,,,,,,,,,
PRO,0,T2_升降轴P1速度,UpdownAxis_P1Speed,500,,,,,,,,,,,, PRO,0,T2_升降轴P1速度/慢速度,UpdownAxis_P1Speed,500,,,,,,,,,,,,
PRO,0,T2_升降轴P2速度,UpdownAxis_P2Speed,501,,,,,,,,,,,, PRO,0,T2_升降轴P2速度/快速度,UpdownAxis_P2Speed,501,,,,,,,,,,,,
PRO,0,T2_升降轴P3速度,UpdownAxis_P3Speed,502,,,,,,,,,,,, PRO,0,T2_升降轴P3速度/慢速度,UpdownAxis_P3Speed,502,,,,,,,,,,,,
PRO,0,T2_升降轴P4速度,UpdownAxis_P4Speed,503,,,,,,,,,,,, PRO,0,T2_升降轴P4速度/快速度,UpdownAxis_P4Speed,503,,,,,,,,,,,,
PRO,0,T2_升降轴P5速度,UpdownAxis_P5Speed,504,,,,,,,,,,,, PRO,0,T2_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504,,,,,,,,,,,,
PRO,0,T2_升降轴P6速度,UpdownAxis_P6Speed,505,,,,,,,,,,,, PRO,0,T2_升降轴P6速度/快速度,UpdownAxis_P6Speed,505,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,, PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
......
...@@ -320,17 +320,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -320,17 +320,17 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void AutoResetProcess() private void AutoResetProcess()
{ {
try try
{ {
bool noInStore = true; bool noInStore = MoveInfo.MoveType.Equals(MoveType.None) && alarmType.Equals(AlarmType.None);
if (AutoInout.CurrInOutACount >= StoreManager.Config.Box_ResetACount && noInStore) if (AutoInout.CurrInOutACount >= StoreManager.Config.Box_ResetACount && noInStore)
{ {
if (runStatus < StoreRunStatus.Runing || MoveInfo.MoveType == MoveType.InStore || MoveInfo.MoveType == MoveType.OutStore) if (runStatus < StoreRunStatus.Runing || MoveInfo.MoveType == MoveType.InStore || MoveInfo.MoveType == MoveType.OutStore)
{ {
// LogInfo("已经累计出入库" + AutoInout.CurrInOutACount + "次,当时当前正在忙碌中暂不复位"); // LogInfo("已经累计出入库" + AutoInout.CurrInOutACount + "次,当时当前正在忙碌中暂不复位");
} }
else else
{ {
...@@ -339,14 +339,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -339,14 +339,26 @@ namespace OnlineStore.DeviceLibrary
} }
return; return;
} }
else if (waitOutStoreList.Count > 0) else if (waitInStoreParam != null && noInStore && IsDebug.Equals(false))
{
if (!StartInStoreMove(waitInStoreParam))
{
LogInfo("执行排队的入库【" + waitInStoreParam.ToStr() + "】失败");
}
else
{
LogInfo("执行排队的入库【" + waitInStoreParam.ToStr() + "】成功,清理缓存");
waitInStoreParam = null;
}
}
else if (waitOutStoreList.Count > 0 && noInStore && IsDebug.Equals(false))
{ {
InOutParam param = null; InOutParam param = null;
bool result = waitOutStoreList.TryDequeue(out param); bool result = waitOutStoreList.TryDequeue(out param);
if (result && param != null) if (result && param != null)
{ {
LogInfo("执行排队的出库【" + param.ToStr() + "】"); LogInfo("执行排队的出库【" + param.ToStr() + "】");
StartExecuctOut(param); StartExecuctOut(param);
} }
} }
} }
...@@ -367,10 +379,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -367,10 +379,6 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis.SuddenStop(true); UpdownAxis.SuddenStop(true);
InoutAxis.SuddenStop(true); InoutAxis.SuddenStop(true);
ComAxis.SuddenStop(true); ComAxis.SuddenStop(true);
//ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
//ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue());
CloseAllAxis(); CloseAllAxis();
LogInfo("StopMove"); LogInfo("StopMove");
isInPro = false; isInPro = false;
...@@ -386,14 +394,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -386,14 +394,6 @@ namespace OnlineStore.DeviceLibrary
CloseMultiAxis(IO_Type.Axis_Run, IO_Type.UpdownAxis_Break, new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis }); CloseMultiAxis(IO_Type.Axis_Run, IO_Type.UpdownAxis_Break, new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis });
} }
public string GetMoveStr()
{
string msg = "";
msg += "状态: " + runStatus + " " + storeStatus + "\n";
// msg += "lineS: " + storeStatus + "\n";
msg += "报警: " + alarmType + "\n";
msg += MoveInfo.MoveType + " " + MoveInfo.SLog + "\n";
return msg;
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -210,13 +210,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -210,13 +210,13 @@ namespace OnlineStore.DeviceLibrary
string[] plateHArray = data[ParamDefine.plateH].Split(splitChar); string[] plateHArray = data[ParamDefine.plateH].Split(splitChar);
bool urgentReel = FormUtil.GetBoolData(data, ParamDefine.urgentReel); bool urgentReel = FormUtil.GetBoolData(data, ParamDefine.urgentReel);
bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel); //bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel);
bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel); //bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : ""; //string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc); //int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc);
string barcode = data.ContainsKey(ParamDefine.barcode) ? data[ParamDefine.barcode] : ""; string barcode = data.ContainsKey(ParamDefine.barcode) ? data[ParamDefine.barcode] : "";
string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : ""; //string realRfid = data.ContainsKey(ParamDefine.realRfid) ? data[ParamDefine.realRfid] : "";
int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0); //int taskCount = FormUtil.GetIntData(data, ParamDefine.taskCount, 0);
//urgentReel: true 表示紧急料,需要出到料串上 //urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上 //cutReel: true 表示分盘料,需要出到料串上
...@@ -232,8 +232,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,8 +232,8 @@ namespace OnlineStore.DeviceLibrary
{ {
index++; index++;
int plateW =Convert.ToInt32( plateWArray[index]); int plateW =Convert.ToInt32( plateWArray[index]);
int plateH = Convert.ToInt32(plateHArray[index]); int plateH = Convert.ToInt32(plateHArray[index]);
InOutParam inoutParam = new InOutParam(barcode, posId, plateW, plateH); InOutParam inoutParam = new InOutParam(MoveType.OutStore, barcode, posId, plateW, plateH, (urgentReel ? 1 : 0));
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId); ACBoxPosition position = CSVPositionReader<ACBoxPosition>.GetPositon(posId);
......
...@@ -50,8 +50,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -50,8 +50,8 @@ namespace OnlineStore.DeviceLibrary
this.Config = lineConfig; this.Config = lineConfig;
this.ID = lineConfig.Id; this.ID = lineConfig.Id;
MoveInfo = new StoreMoveInfo(ID," DUO料仓 "); Name = (" DUO料仓 ").ToUpper();
Name = (" DUO料仓_" + Config.CID + " ").ToUpper(); MoveInfo = new StoreMoveInfo(ID, Name);
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
AddDeviceName(ioList, Config.IOIPList); AddDeviceName(ioList, Config.IOIPList);
...@@ -71,7 +71,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -71,7 +71,8 @@ namespace OnlineStore.DeviceLibrary
IOManager.Init(); IOManager.Init();
CodeManager.LoadConfig(); CodeManager.LoadConfig();
CurrShelfNum = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfNum);
CurrShelfType = ConfigAppSettings.GetIntValue(Setting_Init.CurrShelfType);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
// RFIDManager.RfidReader.Open(rfidList.ToArray()); // RFIDManager.RfidReader.Open(rfidList.ToArray());
...@@ -220,10 +221,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -220,10 +221,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LR_03_BatchAxisHome)) else if (MoveInfo.IsStep(StoreMoveStep.LR_03_BatchAxisHome))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.LR_04_BatchToP1); MoveInfo.NextMoveStep(StoreMoveStep.LR_04_BatchToP1);
LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :提升轴到P1点,上下轴到待机点P1"); LogUtil.info(Name + "复位 " + MoveInfo.MoveStep + " :提升轴到P1点,上下轴到待机点P2");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed); T1_BatchAxis.AbsMove(MoveInfo, Config.BatchAxis_P1, Config.BatchAxis_P1Speed);
T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P1, Config.UpdownAxis_P1Speed); T3_UpdownAxis.AbsMove(MoveInfo, Config.UpdownAxis_P2, Config.UpdownAxis_P2Speed);
} }
else if (MoveInfo.IsStep(StoreMoveStep.LR_04_BatchToP1)) else if (MoveInfo.IsStep(StoreMoveStep.LR_04_BatchToP1))
......
...@@ -297,5 +297,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -297,5 +297,28 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
public string GetMoveStr()
{
string msg = "";
msg += "状态: " + runStatus + " " + storeStatus + "\n";
// msg += "lineS: " + storeStatus + "\n";
msg += "报警: " + alarmType + "\n";
msg += MoveInfo.MoveType + " " + MoveInfo.SLog + "\n";
return msg;
}
protected void ClearTimeoutAlarm(string msg)
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
if (WarnMsg.Contains(msg) && alarmType.Equals(AlarmType.IoSingleTimeOut))
{
LogUtil.info(Name + "清理信号超时报警【" + WarnMsg + "】 ");
alarmType = AlarmType.None;
SetWarnMsg("");
}
}
} }
} }
...@@ -408,10 +408,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -408,10 +408,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(deviceName + "收到入库命令: " + result.Param.ToStr() + " "); LogUtil.info(deviceName + "收到入库命令: " + result.Param.ToStr() + " ");
if (!box.StartInStoreMove(result.Param)) if (!box.StartInStoreMove(result.Param))
{ {
if (box.waitInStoreList == null) if (box.waitInStoreParam == null)
{ {
result.Msg = deviceName + ("收到入库命令:" + "启动入库失败,缓存到waitInStoreList等待稍后入库: " + result.Param.ToStr() + " "); result.Msg = deviceName + ("收到入库命令:" + "启动入库失败,缓存到waitInStoreList等待稍后入库: " + result.Param.ToStr() + " ");
box.waitInStoreList = result.Param; box.waitInStoreParam = result.Param;
} }
} }
} }
......
...@@ -12,6 +12,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,6 +12,18 @@ namespace OnlineStore.DeviceLibrary
{ {
public class InOutParam public class InOutParam
{ {
/// <summary>
/// 创建新出入库信息
/// </summary>
/// <param name="type">出入库类型</param>
/// <param name="wareNo">二维码内容</param>
/// <param name="posId">库位号</param>
/// <param name="platew">宽度</param>
/// <param name="plateh">高度</param>
/// <param name="targetP">出入库目标位置, 0=出库表示批量出料,入库表示目标库位 。 1=紧急出料到NG口,入库NG送到NG口</param>
/// <param name="shefNum">料架编号</param>
/// <param name="IsNg">是否是入库NG料</param>
/// <param name="ngMsg">NG消息</param>
public InOutParam(MoveType type, string wareNo = "", string posId = "", int platew = 0, int plateh = 0, int targetP = 0, int shefNum=0, bool IsNg = false, string ngMsg = "") public InOutParam(MoveType type, string wareNo = "", string posId = "", int platew = 0, int plateh = 0, int targetP = 0, int shefNum=0, bool IsNg = false, string ngMsg = "")
{ {
WareCode = wareNo; WareCode = wareNo;
...@@ -121,12 +133,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -121,12 +133,19 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
if (moveType.Equals(MoveType.InStore)) if (moveType.Equals(MoveType.InStore))
{ {
return " 入库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] "; return " 入库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
} }
else else
{ {
return " 出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] "; if (TargetPosition.Equals(1))
{
return " 批量出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
}
else
{
return " 单盘出库 [" + PosID + "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
}
} }
} }
} }
......
...@@ -257,12 +257,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,12 +257,15 @@ namespace OnlineStore.DeviceLibrary
/// 料仓出库: 进出轴到P1 /// 料仓出库: 进出轴到P1
/// </summary> /// </summary>
SO_09_InoutBack, SO_09_InoutBack,
/// <summary> /// <summary>
/// 料仓出库:升降轴,旋转轴到待机点P1 /// 料仓出库:升降轴,旋转轴到待机点P1
/// </summary> /// </summary>
SO_10_GoBack, SO_10_GoBack,
/// <summary>
/// 等待提升机构拿走料盘
/// </summary>
SO_11_WaitTrayGo,
/// <summary> /// <summary>
...@@ -325,11 +328,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,11 +328,12 @@ namespace OnlineStore.DeviceLibrary
#region 入料装置入料处理,2001 开始 #region 料架入库处理,2001 开始
/// <summary> /// <summary>
///入料检测: 提升轴先返回P1 ///入料检测: 提升轴先返回P1
/// </summary> /// </summary>
LI_01_BatchAxisToP1 = 2001, LI_01_BatchAxisToP1 = 2001,
/// <summary> /// <summary>
/// 入料检测:取料提升机构后退端 /// 入料检测:取料提升机构后退端
...@@ -347,23 +351,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,23 +351,18 @@ namespace OnlineStore.DeviceLibrary
/// 入料检测:流水线上料区检测到料架,流水线再正传五秒 /// 入料检测:流水线上料区检测到料架,流水线再正传五秒
/// </summary> /// </summary>
LI_05_WaitTime, LI_05_WaitTime,
/// <summary> /// <summary>
///入料检测: 顶升气缸上升 ///入料检测: 顶升气缸上升
/// </summary> /// </summary>
LI_06_TopUp, LI_06_TopUp,
/// <summary> /// <summary>
/// 入料检测:取料提升机构前进 /// 入料检测:取料提升机构前进
/// </summary> /// </summary>
LI_07_HoisterForward, LI_07_HoisterForward,
/// <summary> /// <summary>
/// 入料检测:上料轴开始慢速上升到P2点,等待检测到料盘 /// 入料检测:上料轴开始慢速上升到P2点,等待检测到料盘
/// </summary> /// </summary>
LI_08_AxisUpToP2, LI_08_AxisUpToP2,
/// <summary> /// <summary>
/// 入料检测:扫码 /// 入料检测:扫码
/// </summary> /// </summary>
...@@ -373,12 +372,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -373,12 +372,10 @@ namespace OnlineStore.DeviceLibrary
/// 入料检测:有料盘:升降轴到料串高点P2,旋转轴到料串位置P4 /// 入料检测:有料盘:升降轴到料串高点P2,旋转轴到料串位置P4
/// </summary> /// </summary>
LI_11_AxisToTray, LI_11_AxisToTray,
/// <summary> /// <summary>
/// 取料:升降轴到料串低点P1 /// 取料:升降轴到料串低点P1
/// </summary> /// </summary>
LI_12_UpdownAxisToP3, LI_12_UpdownAxisToP3,
/// <summary> /// <summary>
/// 取料:夹爪气缸夹紧 /// 取料:夹爪气缸夹紧
/// </summary> /// </summary>
...@@ -452,11 +449,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -452,11 +449,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 送出料架,上料阻挡下降1秒,流水线开始转动 /// 送出料架,上料阻挡下降1秒,流水线开始转动
/// </summary> /// </summary>
LI_34_WorkStopDown = 11034, LI_34_WorkStopDown ,
/// <summary> /// <summary>
/// 送出料架,等待上料无料架 /// 送出料架,等待上料无料架
/// </summary> /// </summary>
LI_35_WaitShelfGo = 11035, LI_35_WaitShelfGo ,
/// <summary> /// <summary>
///送出料架, 流水线再转动3秒, ///送出料架, 流水线再转动3秒,
/// </summary> /// </summary>
...@@ -470,6 +467,127 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,6 +467,127 @@ namespace OnlineStore.DeviceLibrary
#region 料架出库处理,3001 开始
/// <summary>
///料架出库: 提升轴先返回P1
/// </summary>
LO_01_BatchAxisToP1 =3001,
/// <summary>
/// 料架出库:取料提升机构后退端
/// </summary>
LO_02_HoisterBack,
/// <summary>
/// 料架出库:定位气缸下降
/// </summary>
LO_03_LocationDown,
/// <summary>
/// 料架出库,转动料架,等待条件到达停止
/// </summary>
LO_04_LineStart,
/// <summary>
/// 料架出库:流水线上料区检测到料架,流水线再正传五秒
/// </summary>
LO_05_WaitTime,
/// <summary>
///料架出库: 顶升气缸上升
/// </summary>
LO_06_TopUp,
/// <summary>
/// 料架出库:取料提升机构前进
/// </summary>
LO_07_HoisterForward,
/// <summary>
/// 料架出库:上料轴开始慢速上升到P2点,等待检测到料盘
/// </summary>
LO_08_AxisUpToP2,
/// <summary>
/// 料架出库,料串已准备好,等待出库中
/// </summary>
LO_09_WaitOut,
/// <summary>
/// 取放料:批量轴下降指定的高度
/// </summary>
LO_11_BatchAxisDown,
/// <summary>
/// 取放料:旋转轴到料仓门口,升降轴到入料低点
/// </summary>
LO_12_ToBoxDoor,
/// <summary>
/// 取放料:升降轴下降到料门口低点
/// </summary>
LO_13_UpdownDown,
/// <summary>
/// 取放料:夹爪气缸夹紧
/// </summary>
LO_14_CylinderTighten,
/// <summary>
/// 取放料:升降轴上升到料门口高点
/// </summary>
LO_15_UpdownUp,
/// <summary>
/// 取放料:旋转轴到料仓位置P1
/// </summary>
LO_16_MiddleToP1,
/// <summary>
/// 取放料:升降轴到料串高点P2
/// </summary>
LO_17_UpdownToP2,
/// <summary>
/// 取放料:升降轴到料串放料低点
/// </summary>
LO_18_UpdownDown,
/// <summary>
/// 料盘移栽: 夹爪气缸放松
/// </summary>
LO_19_CylinderRelax,
/// <summary>
/// 料盘移栽: 升降轴到料串高点
/// </summary>
LO_20_UpdownUp,
/// <summary>
/// 料盘移栽:判断是否送出料架
/// </summary>
LO_21_NeedSendShelf,
/// <summary>
/// 送出料架,未检测到料盘,提升伺服到P1点
/// </summary>
LO_31_BatchAxisToP1 = 3031,
/// <summary>
/// 送出料架,升降盘定位气缸后退
/// </summary>
LO_32_HoisterBack,
/// <summary>
/// 送出料架,顶升气缸下降
/// </summary>
LO_33_TopCylinderDown,
/// <summary>
/// 送出料架,上料阻挡下降1秒,流水线开始转动
/// </summary>
LO_34_WorkStopDown,
/// <summary>
/// 送出料架,等待上料无料架
/// </summary>
LO_35_WaitShelfGo ,
/// <summary>
///送出料架, 流水线再转动3秒,
/// </summary>
LO_36_LineRun,
/// <summary>
///送出料架, 流水线停止转动,
/// </summary>
LO_37_LineStop,
#endregion
} }
public enum AlarmType public enum AlarmType
......
...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
{ {
moveType = MoveType.None; moveType = MoveType.None;
MoveParam = new InOutParam(); MoveParam = new InOutParam(MoveType.None);
this.storeId = storeId; this.storeId = storeId;
this.moveStep = StoreMoveStep.Wait; this.moveStep = StoreMoveStep.Wait;
IsInWait = false; IsInWait = false;
...@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,7 +85,7 @@ namespace OnlineStore.DeviceLibrary
this.moveType = type; this.moveType = type;
if (param == null) if (param == null)
{ {
param = new InOutParam(); param = new InOutParam(type);
} }
this.MoveParam = param; this.MoveParam = param;
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
......
...@@ -222,32 +222,32 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -222,32 +222,32 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("UpdownAxis_P6")] [ConfigProAttribute("UpdownAxis_P6")]
public int UpdownAxis_P6 { get; set; } public int UpdownAxis_P6 { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P1速度,UpdownAxis_P1Speed,500 /// PRO,0,T2_升降轴P1速度/慢速度,UpdownAxis_P1Speed,500
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P1Speed")] [ConfigProAttribute("UpdownAxis_P1Speed")]
public int UpdownAxis_P1Speed { get; set; } public int UpdownAxis_P1Speed { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P2速度,UpdownAxis_P2Speed,501 /// PRO,0,T2_升降轴P2速度/快速度,UpdownAxis_P2Speed,501
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P2Speed")] [ConfigProAttribute("UpdownAxis_P2Speed")]
public int UpdownAxis_P2Speed { get; set; } public int UpdownAxis_P2Speed { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P3速度,UpdownAxis_P3Speed,502 /// PRO,0,T2_升降轴P3速度/慢速度,UpdownAxis_P3Speed,502
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P3Speed")] [ConfigProAttribute("UpdownAxis_P3Speed")]
public int UpdownAxis_P3Speed { get; set; } public int UpdownAxis_P3Speed { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P4速度,UpdownAxis_P4Speed,503 /// PRO,0,T2_升降轴P4速度/快速度,UpdownAxis_P4Speed,503
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P4Speed")] [ConfigProAttribute("UpdownAxis_P4Speed")]
public int UpdownAxis_P4Speed { get; set; } public int UpdownAxis_P4Speed { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P5速度,UpdownAxis_P5Speed,504 /// PRO,0,T2_升降轴P5速度/慢速度,UpdownAxis_P5Speed,504
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P5Speed")] [ConfigProAttribute("UpdownAxis_P5Speed")]
public int UpdownAxis_P5Speed { get; set; } public int UpdownAxis_P5Speed { get; set; }
/// <summary> /// <summary>
/// PRO,0,T2_升降轴P6速度,UpdownAxis_P6Speed,505 /// PRO,0,T2_升降轴P6速度/快速度,UpdownAxis_P6Speed,505
/// </summary> /// </summary>
[ConfigProAttribute("UpdownAxis_P6Speed")] [ConfigProAttribute("UpdownAxis_P6Speed")]
public int UpdownAxis_P6Speed { get; set; } public int UpdownAxis_P6Speed { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!