Commit 58121589 LN

入料ng的盘不需要更新位置

1 个父辈 a2fd34d6
此文件类型无法预览
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<PropertyGroup /> <PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="Client"> <Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath> <HintPath>..\..\..\RC1250-ACPackingStore\dll\Client.dll</HintPath>
</Reference> </Reference>
<Reference Include="CodeLibrary"> <Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath> <HintPath>..\..\dll\CodeLibrary.dll</HintPath>
......
...@@ -305,10 +305,10 @@ ...@@ -305,10 +305,10 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox6.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.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblTrayNum); this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(495, 227); this.groupBox6.Location = new System.Drawing.Point(495, 227);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(797, 256); this.groupBox6.Size = new System.Drawing.Size(797, 256);
......
...@@ -15,8 +15,7 @@ using log4net; ...@@ -15,8 +15,7 @@ using log4net;
using System.Reflection; using System.Reflection;
using UserFromControl; using UserFromControl;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common; using OnlineStore.Common;
namespace OnlineStore.AssemblyLine namespace OnlineStore.AssemblyLine
{ {
...@@ -124,7 +123,7 @@ namespace OnlineStore.AssemblyLine ...@@ -124,7 +123,7 @@ namespace OnlineStore.AssemblyLine
if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked)&&(!IsInCheck)) if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked)&&(!IsInCheck))
{ {
chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut; chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
} }
lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() + lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() +
"\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + ""; "\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + "";
string canOut = equipBean.Config.IsCanOut.Equals(1) ? "紧急出料模块" : "入料模块"; string canOut = equipBean.Config.IsCanOut.Equals(1) ? "紧急出料模块" : "入料模块";
......
...@@ -140,16 +140,16 @@ ...@@ -140,16 +140,16 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(460, 180); this.logBox.Location = new System.Drawing.Point(448, 153);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(860, 350); this.logBox.Size = new System.Drawing.Size(872, 453);
this.logBox.TabIndex = 106; this.logBox.TabIndex = 106;
this.logBox.Text = ""; this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged); this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.label5); this.groupBox3.Controls.Add(this.label5);
this.groupBox3.Controls.Add(this.chbInStoNG); this.groupBox3.Controls.Add(this.chbInStoNG);
...@@ -163,9 +163,9 @@ ...@@ -163,9 +163,9 @@
this.groupBox3.Controls.Add(this.cmbTray); this.groupBox3.Controls.Add(this.cmbTray);
this.groupBox3.Controls.Add(this.label1); this.groupBox3.Controls.Add(this.label1);
this.groupBox3.Controls.Add(this.btnUpdateTray); this.groupBox3.Controls.Add(this.btnUpdateTray);
this.groupBox3.Location = new System.Drawing.Point(460, 534); this.groupBox3.Location = new System.Drawing.Point(448, 77);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(860, 68); this.groupBox3.Size = new System.Drawing.Size(872, 68);
this.groupBox3.TabIndex = 197; this.groupBox3.TabIndex = 197;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "托盘信息编辑"; this.groupBox3.Text = "托盘信息编辑";
...@@ -305,9 +305,9 @@ ...@@ -305,9 +305,9 @@
this.groupBox2.Controls.Add(this.chkDebug); this.groupBox2.Controls.Add(this.chkDebug);
this.groupBox2.Controls.Add(this.btnClearLog); this.groupBox2.Controls.Add(this.btnClearLog);
this.groupBox2.Controls.Add(this.btnCopyLog); this.groupBox2.Controls.Add(this.btnCopyLog);
this.groupBox2.Location = new System.Drawing.Point(460, 4); this.groupBox2.Location = new System.Drawing.Point(448, 4);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(860, 71); this.groupBox2.Size = new System.Drawing.Size(872, 71);
this.groupBox2.TabIndex = 196; this.groupBox2.TabIndex = 196;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "状态信息"; this.groupBox2.Text = "状态信息";
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
this.btnClearTray.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClearTray.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearTray.BackColor = System.Drawing.Color.White; this.btnClearTray.BackColor = System.Drawing.Color.White;
this.btnClearTray.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearTray.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearTray.Location = new System.Drawing.Point(334, 21); this.btnClearTray.Location = new System.Drawing.Point(346, 21);
this.btnClearTray.Name = "btnClearTray"; this.btnClearTray.Name = "btnClearTray";
this.btnClearTray.Size = new System.Drawing.Size(105, 35); this.btnClearTray.Size = new System.Drawing.Size(105, 35);
this.btnClearTray.TabIndex = 196; this.btnClearTray.TabIndex = 196;
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
this.btnTrayInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnTrayInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnTrayInfo.BackColor = System.Drawing.Color.White; this.btnTrayInfo.BackColor = System.Drawing.Color.White;
this.btnTrayInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnTrayInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTrayInfo.Location = new System.Drawing.Point(445, 22); this.btnTrayInfo.Location = new System.Drawing.Point(457, 22);
this.btnTrayInfo.Name = "btnTrayInfo"; this.btnTrayInfo.Name = "btnTrayInfo";
this.btnTrayInfo.Size = new System.Drawing.Size(105, 35); this.btnTrayInfo.Size = new System.Drawing.Size(105, 35);
this.btnTrayInfo.TabIndex = 195; this.btnTrayInfo.TabIndex = 195;
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true; this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(781, 27); this.chkDebug.Location = new System.Drawing.Point(793, 27);
this.chkDebug.Name = "chkDebug"; this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(72, 24); this.chkDebug.Size = new System.Drawing.Size(72, 24);
this.chkDebug.TabIndex = 194; this.chkDebug.TabIndex = 194;
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White; this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(669, 22); this.btnClearLog.Location = new System.Drawing.Point(681, 22);
this.btnClearLog.Name = "btnClearLog"; this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35); this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190; this.btnClearLog.TabIndex = 190;
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCopyLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCopyLog.BackColor = System.Drawing.Color.White; this.btnCopyLog.BackColor = System.Drawing.Color.White;
this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCopyLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyLog.Location = new System.Drawing.Point(557, 22); this.btnCopyLog.Location = new System.Drawing.Point(569, 22);
this.btnCopyLog.Name = "btnCopyLog"; this.btnCopyLog.Name = "btnCopyLog";
this.btnCopyLog.Size = new System.Drawing.Size(105, 35); this.btnCopyLog.Size = new System.Drawing.Size(105, 35);
this.btnCopyLog.TabIndex = 191; this.btnCopyLog.TabIndex = 191;
...@@ -409,12 +409,13 @@ ...@@ -409,12 +409,13 @@
this.groupBox1.Controls.Add(this.btnInStoreTset); this.groupBox1.Controls.Add(this.btnInStoreTset);
this.groupBox1.Controls.Add(this.button2); this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(460, 84); this.groupBox1.Location = new System.Drawing.Point(448, 101);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(860, 78); this.groupBox1.Size = new System.Drawing.Size(872, 61);
this.groupBox1.TabIndex = 195; this.groupBox1.TabIndex = 195;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓通信测试"; this.groupBox1.Text = "料仓通信测试";
this.groupBox1.Visible = false;
// //
// lblPosId // lblPosId
// //
...@@ -430,7 +431,7 @@ ...@@ -430,7 +431,7 @@
this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdateStatus.BackColor = System.Drawing.Color.White; this.btnUpdateStatus.BackColor = System.Drawing.Color.White;
this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateStatus.Location = new System.Drawing.Point(629, 28); this.btnUpdateStatus.Location = new System.Drawing.Point(641, 11);
this.btnUpdateStatus.Name = "btnUpdateStatus"; this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35); this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35);
this.btnUpdateStatus.TabIndex = 195; this.btnUpdateStatus.TabIndex = 195;
...@@ -522,11 +523,12 @@ ...@@ -522,11 +523,12 @@
// //
this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.lblWarnMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.AutoEllipsis = true;
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(308, 3); this.lblWarnMsg.Location = new System.Drawing.Point(308, 3);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1028, 68); this.lblWarnMsg.Size = new System.Drawing.Size(1028, 75);
this.lblWarnMsg.TabIndex = 96; this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -743,10 +745,10 @@ ...@@ -743,10 +745,10 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1350, 729); this.ClientSize = new System.Drawing.Size(1350, 729);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.lblStatus); this.Controls.Add(this.lblStatus);
this.Controls.Add(this.lblWarnMsg); this.Controls.Add(this.lblWarnMsg);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.tabControl1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
......
...@@ -432,10 +432,10 @@ namespace OnlineStore.AssemblyLine ...@@ -432,10 +432,10 @@ namespace OnlineStore.AssemblyLine
string canScanCode = ""; string canScanCode = "";
if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing)) if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing))
{ {
canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)"; //canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
} }
lblStatus.Text = KTK_Store.GetRunStr(lineBean.lineStatus, lineBean.runStatus)+canScanCode; lblStatus.Text = KTK_Store.GetRunStr(lineBean.lineStatus, lineBean.runStatus)+canScanCode;
lblWarnMsg.Text = LineManager.Line.WarnMsg; string warnMsg= LineManager.Line.WarnMsg.Equals("")?"":LineManager.Line.WarnMsg+"\r\n";
//if (lineBean.isNotScanCode && lblWarnMsg.Text.Equals("")) //if (lineBean.isNotScanCode && lblWarnMsg.Text.Equals(""))
//{ //{
// lblWarnMsg.Text = "未扫到二维码,请重新放入料盘"; // lblWarnMsg.Text = "未扫到二维码,请重新放入料盘";
...@@ -451,11 +451,12 @@ namespace OnlineStore.AssemblyLine ...@@ -451,11 +451,12 @@ namespace OnlineStore.AssemblyLine
{ {
if (move.WarnMsg.Equals("").Equals(false)) if (move.WarnMsg.Equals("").Equals(false))
{ {
lblWarnMsg.Text = move.WarnMsg; warnMsg+= move.WarnMsg+ "\r\n";
break; break;
} }
} }
} }
lblWarnMsg.Text = warnMsg;
int i = 0; int i = 0;
int item_debug_index = 1; int item_debug_index = 1;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
<Reference Include="Client"> <Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath> <HintPath>..\..\..\RC1250-ACPackingStore\dll\Client.dll</HintPath>
</Reference> </Reference>
<Reference Include="CodeLibrary"> <Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath> <HintPath>..\..\dll\CodeLibrary.dll</HintPath>
......
...@@ -732,6 +732,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -732,6 +732,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(WarnMsg, DeviceID + 12); LogUtil.error(WarnMsg, DeviceID + 12);
Alarm(LineAlarmType.IoSingleTimeOut); Alarm(LineAlarmType.IoSingleTimeOut);
} }
//送出料架处理
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_UpdownAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_UpdownAxisToP2))
......
...@@ -171,12 +171,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -171,12 +171,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
LogUtil.info(Name + "开始连接IO模块 "); LogUtil.info(Name + "开始连接IO模块 ");
IOManager.instance.ConnectionIOList(cioList); IOManager.instance.ConnectionIOList(cioList);
//Thread.Sleep(5);
//Task.Factory.StartNew(delegate
//{
// RFIDManager.Open(rfidList.ToArray());
//});
addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check)); addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check));
addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN)); addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN));
addLastDI(IO_Type.Reset_BTN, IOValue(IO_Type.Reset_BTN)); addLastDI(IO_Type.Reset_BTN, IOValue(IO_Type.Reset_BTN));
...@@ -292,7 +287,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,7 +287,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = true; mainTimer.Enabled = true;
return true; return true;
} }
} }
private void EquipStartRun(EquipBase moveEquip) private void EquipStartRun(EquipBase moveEquip)
{ {
if (moveEquip.IsDebug) if (moveEquip.IsDebug)
...@@ -301,13 +296,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -301,13 +296,12 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
// Task.Factory.StartNew(delegate // Task.Factory.StartNew(delegate
//{ //{
bool result = moveEquip.StartRun(); bool result = moveEquip.StartRun();
// }); // });
Thread.Sleep(60); Thread.Sleep(60);
} }
} }
private void RHomeOp() private void RHomeOp()
{ {
...@@ -315,8 +309,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -315,8 +309,7 @@ namespace OnlineStore.DeviceLibrary
// TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ; // TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ;
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
mainTimer.Enabled = false; mainTimer.Enabled = false;
IoCheckTimer.Enabled = false; IoCheckTimer.Enabled = false;
isInprocess = false;
isInSuddenDown = false; isInSuddenDown = false;
isNoAirCheck = false; isNoAirCheck = false;
TrayManager.TrayErrorMsg = ""; TrayManager.TrayErrorMsg = "";
...@@ -333,9 +326,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -333,9 +326,7 @@ namespace OnlineStore.DeviceLibrary
} }
TrayManager.ErrorDeviceId = -1; TrayManager.ErrorDeviceId = -1;
WriteDrivetMotorRun( IO_VALUE.LOW); WriteDrivetMotorRun( IO_VALUE.LOW);
//NG气缸后退
// CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
//横移轨道下降 //横移轨道下降
SideWayStop(); SideWayStop();
...@@ -354,11 +345,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -354,11 +345,8 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
}
}
public override bool Reset() public override bool Reset()
{ {
...@@ -775,10 +763,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -775,10 +763,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
case LineRunStatus.Runing: case LineRunStatus.Runing:
if ((isInSuddenDown.Equals(false) && isNoAirCheck.Equals(false))) if ((isInSuddenDown.Equals(false) && isNoAirCheck.Equals(false)))
{ {
//出入库定时检测处理
InOutTimerProcess();
//清理超时异常 //清理超时异常
IOTimeOutProcess(); IOTimeOutProcess();
} }
...@@ -845,6 +830,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -845,6 +830,7 @@ namespace OnlineStore.DeviceLibrary
bool isReviceInfo = false; bool isReviceInfo = false;
if (moveEquip.MoveInfo.MoveType.Equals(LineMoveType.InStore) && moveEquip.MoveInfo.MoveParam != null && moveEquip.MoveInfo.MoveParam.PosId.Equals(posId)) if (moveEquip.MoveInfo.MoveType.Equals(LineMoveType.InStore) && moveEquip.MoveInfo.MoveParam != null && moveEquip.MoveInfo.MoveParam.PosId.Equals(posId))
{ {
LogInfo(" IsReviceInPosId 正在入库中:" + MoveInfo.MoveParam.ToStr());
isReviceInfo = true; isReviceInfo = true;
} }
if (!isReviceInfo && moveEquip.waitInStoreList.Count > 0) if (!isReviceInfo && moveEquip.waitInStoreList.Count > 0)
...@@ -853,6 +839,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -853,6 +839,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (inout.PosId.Equals(posId) && (!inout.WareCode.Equals(""))) if (inout.PosId.Equals(posId) && (!inout.WareCode.Equals("")))
{ {
LogInfo(" IsReviceInPosId 已存在入库任务:" + inout.ToStr());
isReviceInfo = true; isReviceInfo = true;
break; break;
} }
......
...@@ -16,11 +16,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,11 +16,7 @@ namespace OnlineStore.DeviceLibrary
public bool LineCanRun() public bool LineCanRun()
{ {
//if (IOValue(IO_Type.Line_Run).Equals(IO_VALUE.HIGH)) return true;
{
return true;
}
return false;
} }
public bool CanProcessLine(bool isCheckSleep = true) public bool CanProcessLine(bool isCheckSleep = true)
...@@ -35,88 +31,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,88 +31,12 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOValue(IO_Type.DriveMotor_Run3, 0).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.DriveMotor_Run3, 0).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.DriveMotor_Run4, 0).Equals(IO_VALUE.HIGH)) IOManager.IOValue(IO_Type.DriveMotor_Run4, 0).Equals(IO_VALUE.HIGH))
{ {
return true; return true;
if (isCheckSleep)
{
if (runStatus >= LineRunStatus.Runing && IsSleep.Equals(false))
{
return true;
}
else
{
return false;
}
}
return true;
}
return false;
}
/// <summary>
/// 判断出料流水线是否可以开始出料
/// </summary>
internal bool DLineStartOut(int dlineId, int LineNum)
{
foreach (DischargeLine line in DisLineMap.Values)
{
if ((line.DeviceID % 100).Equals(dlineId))
{
if (line.CanStartOut(LineNum))
{
return true;
}
}
} }
return false; return false;
} }
private bool isInprocess = false;
private DateTime lastProTime = DateTime.Now;
private void InOutTimerProcess()
{
TimeSpan span = DateTime.Now - lastProTime;
if (isInprocess && span.TotalSeconds < 10)
{
return;
}
try
{
isInprocess = true;
lastProTime = DateTime.Now;
//出入料口条件: 各料仓无报警( 伺服), 各移栽装置处 于原位待机, 检测夹具IO,驱动电机运转
//if (!CanProcessLine(false))
//{
// isWaitOutGo = false;
// isInprocess = false;
// return;
//}
//TODO 需要处理NG料盘推出
}
catch (Exception ex)
{
LogUtil.error("InOutTimerProcess出错:" + ex.StackTrace);
}
isInprocess = false;
}
/// <summary>
/// 判断当前是否可以开始扫码
/// </summary>
public bool CanScanCode()
{
//若有移栽在出库过程中,则不能扫码
foreach (MoveEquip move in MoveEquipMap.Values)
{
List<InOutParam> ps = new List<InOutParam>(move.waitOutStoreList);
if (move.MoveInfo.MoveType.Equals(LineMoveType.OutStore) || ps.Count > 0)
{
return false;
}
}
return true;
}
private DateTime preIoTimerOutTime = DateTime.Now; private DateTime preIoTimerOutTime = DateTime.Now;
private void IOTimeOutProcess() private void IOTimeOutProcess()
{ {
...@@ -253,32 +173,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -253,32 +173,11 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(checkWaitInfo.Name + " [" + checkWaitInfo.MoveStep + "] CheckWait 出错:" + ex.StackTrace); LogUtil.error(checkWaitInfo.Name + " [" + checkWaitInfo.MoveStep + "] CheckWait 出错:" +ex.StackTrace+ ex.Message+ex.ToString());
} }
} }
/// <summary>
/// 判断指定的皮带线是否可用
/// </summary>
/// <param name="lineNum"></param>
/// <returns></returns>
internal bool ProvidingCanUse(List<int> lineList)
{
//有一条线可用就返回true
foreach (int lineNum in lineList)
{
int deviceN = 200 + lineNum;
if (ProvidingEquipMap.ContainsKey(deviceN))
{
ProvidingEquip pro = ProvidingEquipMap[deviceN];
if (pro.runStatus >= LineRunStatus.HomeMoving && pro.isInSuddenDown.Equals(false) && pro.isNoAirCheck.Equals(false))
{
return true;
}
}
}
return false;
}
#endregion #endregion
...@@ -286,65 +185,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -286,65 +185,23 @@ namespace OnlineStore.DeviceLibrary
#region 出库 #region 出库
public override bool StartOutStoreMove(InOutParam param) public override bool StartOutStoreMove(InOutParam param)
{ {
//阻挡气缸0-2下降
runStatus = LineRunStatus.Busy;
InOutLog("开始出库忙碌中[BUSY]");
MoveInfo.NewMove(LineMoveType.OutStore, param);
MoveInfo.NextMoveStep(LineMoveStep.LO_00_Wait100);
return true; return true;
} }
protected override void OutStoreProcess() protected override void OutStoreProcess()
{ {
if (!LineCanRun())
{
return;
}
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (MoveInfo.IsInWait)
{
return;
}
} }
#endregion #endregion
#region 入库 #region 入库
/// <summary>
/// 开始入库移动移动
/// </summary>
public override bool StartInStoreMove(InOutParam param)
{
//TODO:发送数据给服务器,获取需要入库的库位号,记录盘信息,料仓位置信息到缓存中
runStatus = LineRunStatus.Busy;
InOutLog("开始入库忙碌中[BUSY]");
MoveInfo.NewMove(LineMoveType.InStore);
MoveInfo.NextMoveStep(LineMoveStep.LI_00_Wait100);
MoveInfo.MoveParam = param;
//等待料仓验证成功,最多等待10秒,若验证不成功,直接失败 public override bool StartInStoreMove(InOutParam param)
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000)); {
MoveInfo.WaitList.Add(WaitResultInfo.WaitCanInstore()); return true;
MoveInfo.OneWaitCanEndStep = true;
return true;
} }
protected override void InStoreProcess() protected override void InStoreProcess()
{ {
if (!LineCanRun())
{
return;
}
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (MoveInfo.IsInWait)
{
return;
}
} }
#endregion #endregion
...@@ -372,6 +229,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,6 +229,7 @@ namespace OnlineStore.DeviceLibrary
internal int Sw23TrayNum = 0; internal int Sw23TrayNum = 0;
private void Equip_TrayPEndEvent(int swNum, int trayNum) private void Equip_TrayPEndEvent(int swNum, int trayNum)
{ {
try {
if (swNum <= 0 || this.runStatus <= (LineRunStatus.Wait)) if (swNum <= 0 || this.runStatus <= (LineRunStatus.Wait))
{ {
return; return;
...@@ -411,6 +269,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -411,6 +269,10 @@ namespace OnlineStore.DeviceLibrary
LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW41_MoveInfo 忙碌中"); LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW41_MoveInfo 忙碌中");
} }
} }
}catch(Exception ex)
{
LogUtil.error(Name + "Equip_TrayPEndEvent出错:" + ex.ToString());
}
} }
/// <summary> /// <summary>
...@@ -986,7 +848,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -986,7 +848,10 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
/// <summary>
/// 判断指定的移栽是否可以入库
/// </summary>
/// <returns></returns>
public bool CanIntore(int id) public bool CanIntore(int id)
{ {
if (!NoErrorAlarm()) if (!NoErrorAlarm())
...@@ -1013,6 +878,46 @@ namespace OnlineStore.DeviceLibrary ...@@ -1013,6 +878,46 @@ namespace OnlineStore.DeviceLibrary
// LogUtil.error("runStatus【" + runStatus + "】,move.MoveInfo.MoveType【" + move.MoveInfo.MoveType + "】,move.runStatus【" + move.runStatus + "】 "); // LogUtil.error("runStatus【" + runStatus + "】,move.MoveInfo.MoveType【" + move.MoveInfo.MoveType + "】,move.runStatus【" + move.runStatus + "】 ");
return false; return false;
} }
/// <summary>
/// 判断指定的皮带线是否可用
/// </summary>
/// <param name="lineNum"></param>
/// <returns></returns>
internal bool ProvidingCanUse(List<int> lineList)
{
//有一条线可用就返回true
foreach (int lineNum in lineList)
{
int deviceN = 200 + lineNum;
if (ProvidingEquipMap.ContainsKey(deviceN))
{
ProvidingEquip pro = ProvidingEquipMap[deviceN];
if (pro.runStatus >= LineRunStatus.HomeMoving && pro.isInSuddenDown.Equals(false) && pro.isNoAirCheck.Equals(false))
{
return true;
}
}
}
return false;
}
/// <summary>
/// 判断出料流水线是否可以开始出料
/// </summary>
internal bool DLineStartOut(int dlineId, int LineNum)
{
foreach (DischargeLine line in DisLineMap.Values)
{
if ((line.DeviceID % 100).Equals(dlineId))
{
if (line.CanStartOut(LineNum))
{
return true;
}
}
}
return false;
}
#endregion #endregion
#region AGV小车判断 #region AGV小车判断
......
...@@ -389,7 +389,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,7 +389,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH); UpdownDownP2Move(MoveInfo.MoveParam.PlateH);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait);
OutLog("出库 " + MoveInfo.SLog + " : 上下气缸1下降后等待0.3秒再夹紧"); OutLog("出库 " + MoveInfo.SLog + " : 上下气缸1下降后等待0.3秒再夹紧");
...@@ -398,13 +398,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -398,13 +398,20 @@ namespace OnlineStore.DeviceLibrary
//只有当BOX可以进行出出料时,移栽物品,防止卡住 //只有当BOX可以进行出出料时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait))
{ {
int lineId = DeviceID % 100; int lineId = DeviceID % 100;
MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack);
OutLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧,更新料盘位置【"+ MoveInfo.MoveParam.WareCode + "】【INBELT】【"+ lineId + "】");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
if (MoveInfo.MoveParam.InStoreNg)
{
OutLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧,入料NG,不需要更新料盘位置");
//更新料盘位置 }
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, lineId); else
{
OutLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INBELT】【" + lineId + "】");
//更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, lineId);
}
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack))
{ {
...@@ -419,7 +426,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -419,7 +426,7 @@ namespace OnlineStore.DeviceLibrary
int num = MoveInfo.MoveParam.TrayNumber; int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.PO_05_WaitBox); MoveInfo.NextMoveStep(LineMoveStep.PO_05_WaitBox);
LogInfo("出料PO_05_WaitBox【" + posId + "】处理(等待可以移栽) 更新盘号【" + num + "】为空盘"); LogInfo("出料PO_05_WaitBox【" + posId + "】处理(等待可以移栽) 更新盘号【" + num + "】为空盘");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut()); // MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut());
TrayManager.UpdateTrayInfo(num); TrayManager.UpdateTrayInfo(num);
//阻挡气缸移动 //阻挡气缸移动
......
...@@ -374,26 +374,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -374,26 +374,32 @@ namespace OnlineStore.DeviceLibrary
public void CylinderMove(LineMoveInfo moveInfo, string IoLowType, string IoHighType, bool isCheckMove = false) public void CylinderMove(LineMoveInfo moveInfo, string IoLowType, string IoHighType, bool isCheckMove = false)
{ {
if (baseConfig.DType.Equals(DeviceType.FeedingEquip)) try
{ {
if (!baseConfig.DOList.ContainsKey(IoLowType)) if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{ {
return; if (!baseConfig.DOList.ContainsKey(IoLowType))
{
return;
}
if (!baseConfig.DOList.ContainsKey(IoHighType))
{
return;
}
} }
if (!baseConfig.DOList.ContainsKey(IoHighType)) if (isCheckMove)
{ {
return; CheckAndMove(IoLowType, IO_VALUE.LOW);
CheckAndMove(IoHighType, IO_VALUE.HIGH);
} }
} else
if (isCheckMove) {
{ IOMove(IoLowType, IO_VALUE.LOW);
CheckAndMove(IoLowType, IO_VALUE.LOW); IOMove(IoHighType, IO_VALUE.HIGH);
CheckAndMove(IoHighType, IO_VALUE.HIGH); }
} }catch(Exception ex)
else
{ {
IOMove(IoLowType, IO_VALUE.LOW); LogUtil.error(Name + "CylinderMove ["+moveInfo.Name+"] ["+IoLowType+"] ["+IoHighType+"] ["+isCheckMove+"] 出错:"+ex.ToString());
IOMove(IoHighType, IO_VALUE.HIGH);
} }
if (moveInfo != null) if (moveInfo != null)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!