Commit 5b55cc5a LN

1

1 个父辈 716e62a7
......@@ -53,7 +53,7 @@
this.panBase.Controls.Add(this.btnStart);
this.panBase.Controls.Add(this.btnInStore);
this.panBase.Controls.Add(this.btnStop);
this.panBase.Location = new System.Drawing.Point(2, 3);
this.panBase.Location = new System.Drawing.Point(3, 3);
this.panBase.Name = "panBase";
this.panBase.Size = new System.Drawing.Size(1177, 50);
this.panBase.TabIndex = 259;
......
......@@ -17,14 +17,13 @@ using UserFromControl;
namespace OnlineStore.AssemblyLine
{
internal partial class FrmEquipBase : FrmBase
{
//internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
{
internal FrmEquipBase()
{
InitializeComponent();
}
protected EquipBase equipBase = null;
internal EquipBase equipBase = null;
protected Dictionary<string, IOTextControl> DIControlList = new Dictionary<string, IOTextControl>();
protected Dictionary<string, IOTextControl> DOControlList = new Dictionary<string, IOTextControl>();
......@@ -94,10 +93,14 @@ namespace OnlineStore.AssemblyLine
{
FormStatus(true);
}
else
{
MessageBox.Show(equipBase.WarnMsg,"启动失败",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show(equipBase.Name + "已启动,不能重复启动");
MessageBox.Show(equipBase.Name + "已启动,不能重复启动","提示",MessageBoxButtons.OK, MessageBoxIcon.Warning );
}
}
protected void StopRun()
......@@ -106,7 +109,7 @@ namespace OnlineStore.AssemblyLine
{
if (equipBase.runStatus <= LineRunStatus.Wait)
{
MessageBox.Show(equipBase.Name + "请先启动设备");
MessageBox.Show(equipBase.Name + "请先启动设备", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
......@@ -131,7 +134,7 @@ namespace OnlineStore.AssemblyLine
}
else
{
MessageBox.Show(equipBase.Name + "请先启动设备");
MessageBox.Show(equipBase.Name + "请先启动设备", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning );
}
}
internal virtual void FormStatus(bool status)
......
......@@ -111,12 +111,9 @@ namespace OnlineStore.AssemblyLine
{
return;
}
if ( this.Visible)
{
ReadIOList();
ReadBtnDO();
}
lblName.BackColor = equipBean.GetShowColor();
ReadIOList();
ReadBtnDO();
lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait)
{
if (btnStart.Enabled)
......@@ -125,20 +122,20 @@ namespace OnlineStore.AssemblyLine
}
}
else
{
{
if (!btnStart.Enabled)
{
FormStatus(false );
FormStatus(false);
}
}
if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked)&&(!IsInCheck))
if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked) && (!IsInCheck))
{
chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
}
}
lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() +
"\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + "";
string canOut = equipBean.Config.IsCanOut.Equals(1) ? "紧急出料模块" : "入料模块";
lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus) + "(" + canOut + ")";
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg;
string text = "";
List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList);
......@@ -159,7 +156,7 @@ namespace OnlineStore.AssemblyLine
}
catch (Exception ex)
{
LogUtil.error(equipBean.Name + "界面定时器出错:" ,ex);
LogUtil.error(equipBean.Name + "界面定时器出错:", ex);
}
}
......@@ -477,7 +474,7 @@ namespace OnlineStore.AssemblyLine
int sizePosition = FormUtil.GetIntValue(txtSizePosition);
equipBean.Config.UpdateUpdownP2(size, sizePosition);
LineManager.SaveFeedingEquipConfig(equipBean.Config);
MessageBox.Show("保存成功!");
MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void btnLineRun_Click(object sender, EventArgs e)
......
......@@ -143,7 +143,7 @@
this.groupBox1.Controls.Add(this.txtSlaveId);
this.groupBox1.Controls.Add(this.cmbWriteIO);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(497, 392);
this.groupBox1.Location = new System.Drawing.Point(497, 391);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(731, 111);
this.groupBox1.TabIndex = 105;
......@@ -362,7 +362,7 @@
this.groupDo.Controls.Add(this.HY_LineRun);
this.groupDo.Controls.Add(this.HY_TopCylinder_Up);
this.groupDo.Controls.Add(this.HY_LineBackRun);
this.groupDo.Location = new System.Drawing.Point(497, 188);
this.groupDo.Location = new System.Drawing.Point(497, 192);
this.groupDo.Name = "groupDo";
this.groupDo.Size = new System.Drawing.Size(731, 195);
this.groupDo.TabIndex = 255;
......@@ -611,9 +611,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(255, 13);
this.lblThisSta.Location = new System.Drawing.Point(255, 51);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(470, 157);
this.lblThisSta.Size = new System.Drawing.Size(470, 119);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -667,18 +667,18 @@
this.lblHyInfo.AutoSize = true;
this.lblHyInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblHyInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblHyInfo.Location = new System.Drawing.Point(16, 19);
this.lblHyInfo.Location = new System.Drawing.Point(6, 103);
this.lblHyInfo.Name = "lblHyInfo";
this.lblHyInfo.Size = new System.Drawing.Size(68, 17);
this.lblHyInfo.TabIndex = 281;
this.lblHyInfo.Text = "运动信息:";
this.lblHyInfo.Text = "设备信息:";
//
// lblMoveInfo
//
this.lblMoveInfo.AutoSize = true;
this.lblMoveInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblMoveInfo.Location = new System.Drawing.Point(16, 94);
this.lblMoveInfo.Location = new System.Drawing.Point(6, 19);
this.lblMoveInfo.Name = "lblMoveInfo";
this.lblMoveInfo.Size = new System.Drawing.Size(68, 17);
this.lblMoveInfo.TabIndex = 280;
......@@ -968,7 +968,7 @@
this.axisMoveControl1.Location = new System.Drawing.Point(5, 3);
this.axisMoveControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(566, 427);
this.axisMoveControl1.Size = new System.Drawing.Size(566, 398);
this.axisMoveControl1.TabIndex = 0;
//
// FrmHYEquip
......
......@@ -42,23 +42,23 @@ namespace OnlineStore.AssemblyLine
foreach (int heigth in LineManager.GetTrayList())
{
cmbSizeList.Items.Add(heigth);
}
cmbSizeList.SelectedIndex = 0;
}
cmbSizeList.SelectedIndex = 0;
}
else
{
tabControl1.TabPages.Remove(tabPage2);
tabControl1.TabPages.Remove(tabPage2);
}
LoadDP2();
chbDebug.Checked = equipBean.IsDebug;
lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus);
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg;
lblName.Text = equipBean.Name;
this.Text = equipBean.Name;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblHyInfo.Text = equipBean.GetHYDesc();
LoadDOBtn(groupDo);
LoadDOBtn(groupDo);
IsLoad = true;
}
......@@ -114,11 +114,10 @@ namespace OnlineStore.AssemblyLine
{
return;
}
if (this.Visible)
{
ReadIOList();
ReadBtnDO();
}
ReadIOList();
ReadBtnDO();
lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait)
{
......@@ -138,20 +137,18 @@ namespace OnlineStore.AssemblyLine
}
lblMoveInfo.Text = equipBean.GetMoveStr();
// string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库":"不可出库" ;
lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus);
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg;
}
catch (Exception ex)
{
LogUtil.error(equipBean.Name + "界面定时器出错:" + ex.ToString());
}
}
}
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{
// KNDAIManager.NeedShow = false;
{
try
{
if (this.timer1.Enabled)
......@@ -176,8 +173,7 @@ namespace OnlineStore.AssemblyLine
private void WriteDO(IO_VALUE value)
{
string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex);
// IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int index = FormUtil.GetIntValue(txtDOIndex);
int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId);
if (time > 0)
......@@ -243,7 +239,7 @@ namespace OnlineStore.AssemblyLine
internal override void FormStatus(bool isStart)
{
btnStart.Enabled = !isStart;
btnStop.Enabled = true;
btnStop.Enabled = true;
//btnInStore.Enabled = isStart;
btnOutStore.Enabled = isStart;
}
......@@ -328,7 +324,7 @@ namespace OnlineStore.AssemblyLine
}
}
private void btnCloseAll_Click(object sender, EventArgs e)
{
foreach (Control con in groupDo.Controls)
......@@ -401,7 +397,7 @@ namespace OnlineStore.AssemblyLine
equipBean.Config.UpdateUpdownP2(size, sizePosition);
equipBean.Config.UpdateUpdownP3(size, sizeBoxP);
LineManager.SaveHYEquipConfig(equipBean.Config);
MessageBox.Show("保存成功!");
MessageBox.Show("保存成功!","提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void LoadDP2()
......@@ -440,7 +436,7 @@ namespace OnlineStore.AssemblyLine
equipBean.Config.UpdateUpdownP2Detial(size, height, position);
LineManager.SaveHYEquipConfig(equipBean.Config);
LogUtil.info(equipBean.Name + "用户操作:尺寸:" + size + ",高度:" + height + ",P2值:" + position + ",保存成功");
MessageBox.Show("保存成功!");
MessageBox.Show("保存成功!", "提示",MessageBoxButtons.OK, MessageBoxIcon.Information);
listDetitalP2.Items.Clear();
......@@ -507,7 +503,7 @@ namespace OnlineStore.AssemblyLine
}
private void btnLineRun_Click(object sender, EventArgs e)
{
equipBean.LineRun();
equipBean.LineRun();
}
private void btnStopDown_Click(object sender, EventArgs e)
{
......@@ -515,11 +511,11 @@ namespace OnlineStore.AssemblyLine
}
private void btnLineBackRun_Click(object sender, EventArgs e)
{
{
equipBean.LineStop();
}
private void btnFrontStopDown_Click(object sender, EventArgs e)
{
DoBtnClick(sender);
......@@ -544,12 +540,12 @@ namespace OnlineStore.AssemblyLine
}
private void HY_ShortL_StopDown_Click(object sender, EventArgs e)
{
{
DoBtnClick(sender);
}
private void HY_LongL_StopDown_Click(object sender, EventArgs e)
{
{
DoBtnClick(sender);
}
......@@ -559,7 +555,7 @@ namespace OnlineStore.AssemblyLine
}
private void HY_StopCylinder_Down_Click(object sender, EventArgs e)
{
{
equipBean.CylinderMove(null, IO_Type.HY_StopCylinder_Up, IO_Type.HY_StopCylinder_Down);
}
......@@ -569,7 +565,7 @@ namespace OnlineStore.AssemblyLine
}
private void HY_OL_StopCylinder_Down_Click(object sender, EventArgs e)
{
{
equipBean.CylinderMove(null, IO_Type.HY_OL_StopCylinder_Up, IO_Type.HY_OL_StopCylinder_Down);
}
......@@ -579,19 +575,20 @@ namespace OnlineStore.AssemblyLine
}
private void HY_LocationCylinder_Down1_Click(object sender, EventArgs e)
{
{
equipBean.CylinderMove(null, IO_Type.HY_LocationCylinder_Up, IO_Type.HY_LocationCylinder_Down);
}
private void HY_MoveCylinder_Give_Click(object sender, EventArgs e)
{
{
equipBean.CylinderMove(null, IO_Type.HY_MoveCylinder_Take, IO_Type.HY_MoveCylinder_Give);
}
private void HY_ClampCylinder_Relax_Click(object sender, EventArgs e)
{
{
equipBean.CylinderMove(null, IO_Type.HY_ClampCylinder_Work, IO_Type.HY_ClampCylinder_Relax);
}
}
}
......
......@@ -53,7 +53,6 @@
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPosId = new System.Windows.Forms.Label();
this.btnUpdateStatus = new System.Windows.Forms.Button();
......@@ -62,7 +61,6 @@
this.btnInStoreTset = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.tabPage5 = new System.Windows.Forms.TabPage();
this.panel5 = new System.Windows.Forms.Panel();
this.picLine = new System.Windows.Forms.PictureBox();
......@@ -133,7 +131,6 @@
this.panel3.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.panel4.SuspendLayout();
this.tabPage4.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage5.SuspendLayout();
this.panel5.SuspendLayout();
......@@ -151,7 +148,6 @@
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage4);
this.tabControl1.Controls.Add(this.tabPage5);
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(8, 81);
......@@ -164,6 +160,7 @@
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.logBox);
this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1";
......@@ -178,9 +175,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| 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.Location = new System.Drawing.Point(3, 5);
this.logBox.Location = new System.Drawing.Point(3, 3);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(1317, 599);
this.logBox.Size = new System.Drawing.Size(1317, 601);
this.logBox.TabIndex = 106;
this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
......@@ -424,17 +421,6 @@
this.label14.TabIndex = 198;
this.label14.Text = "绿色:忙碌中";
//
// tabPage4
//
this.tabPage4.Controls.Add(this.groupBox1);
this.tabPage4.Controls.Add(this.listView1);
this.tabPage4.Location = new System.Drawing.Point(4, 29);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(1328, 609);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = " 设备状态 ";
this.tabPage4.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -446,7 +432,7 @@
this.groupBox1.Controls.Add(this.btnInStoreTset);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(417, 102);
this.groupBox1.Location = new System.Drawing.Point(32, 60);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(872, 61);
this.groupBox1.TabIndex = 195;
......@@ -474,7 +460,7 @@
this.btnUpdateStatus.TabIndex = 195;
this.btnUpdateStatus.Text = "更改为调试状态";
this.btnUpdateStatus.UseVisualStyleBackColor = false;
this.btnUpdateStatus.Click += new System.EventHandler(this.btnUpdateStatus_Click);
//this.btnUpdateStatus.Click += new System.EventHandler(this.btnUpdateStatus_Click);
//
// txtPosId
//
......@@ -528,24 +514,6 @@
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listView1.BackColor = System.Drawing.Color.White;
this.listView1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(5, 7);
this.listView1.MultiSelect = false;
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(1319, 582);
this.listView1.TabIndex = 191;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
// tabPage5
//
this.tabPage5.Controls.Add(this.panel5);
......@@ -1028,7 +996,6 @@
this.panel3.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage5.ResumeLayout(false);
......@@ -1055,7 +1022,6 @@
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label lblWarnMsg;
......@@ -1125,7 +1091,6 @@
private System.Windows.Forms.Label lblCID;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ToolStripMenuItem toolName;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator23;
......
......@@ -116,11 +116,10 @@ namespace OnlineStore.AssemblyLine
{
return;
}
if ( this.Visible)
{
ReadIOList();
ReadBtnDO();
}
lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait)
{
......@@ -371,7 +370,7 @@ namespace OnlineStore.AssemblyLine
}
else
{
MessageBox.Show("未启动或不在空闲中,无法入库测试!");
MessageBox.Show("未启动或不在空闲中,无法入库测试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
......@@ -384,7 +383,7 @@ namespace OnlineStore.AssemblyLine
}
else
{
MessageBox.Show("未启动或不在空闲中,无法入库测试!");
MessageBox.Show("未启动或不在空闲中,无法入库测试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
......
......@@ -267,7 +267,7 @@ namespace OnlineStore.AssemblyLine
private void ReadAxisStatus()
{
string groupText = cmbAxis.Text + "-状态监控";
if (!groupBox2.Equals(groupText))
if (!groupBox2.Text.Equals(groupText))
{
groupBox2.Text = groupText;
}
......
......@@ -82,7 +82,7 @@ namespace OnlineStore.AssemblyLine
lblStatus.Text = equip.GetRunStr();
toolTip1.ToolTipTitle = ""+equip.Name+":双击进入";
lblDebug.Text = "启用:" + (equip.IsDebug ? "✘" : "✔");
if (equip.DeviceID < 200)
if (equip.DeviceID < 100)
{
if (equip.MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
......@@ -100,40 +100,53 @@ namespace OnlineStore.AssemblyLine
{
lblMoveInfo.Text = "暂无出入库";
}
if (equip.DeviceID < 100)
{
BoxInfo box = LineServer.GetBoxInfo(equip.DeviceID);
string online = "✘";
if (box != null)
{
//lvi.SubItems.Add(box.CId.ToString());
//lvi.SubItems.Add(online);
//lvi.SubItems.Add(box.SAlarmType.ToString());
//lvi.SubItems.Add(box.ToShowStr());
if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond)
{
online = "✔";
}
if (box.SAlarmType.Equals(LineAlarm.None))
{
lblBox.Text = "BOX[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr();
lblBox.BackColor = Color.Green;
}
else
{
lblBox.Text = "BOX[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr();
lblBox.BackColor = Color.Red;
}
BoxInfo box = LineServer.GetBoxInfo(equip.DeviceID);
string online = "✘";
if (box != null)
{
if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond)
{
online = "✔";
}
if (box.SAlarmType.Equals(LineAlarm.None))
{
lblBox.Text = "BOX[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr();
lblBox.BackColor = Color.Green;
}
else
{
lblBox.Text = "BOX状态:" + online;
lblBox.BackColor = Color.Gray;
lblBox.Text = "BOX[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr();
lblBox.BackColor = Color.Red;
}
}
else
{
lblBox.Text = "BOX状态:" + online;
lblBox.BackColor = Color.Gray;
}
}
else if (equip.DeviceID < 200)
{
if (equip.MoveInfo.MoveType.Equals(LineMoveType.InStore))
{
lblMoveInfo.Text = "料架" + equip.CurrShelfId + ",入库:" + equip.MoveInfo.MoveParam.PosId + "_" + equip.MoveInfo.MoveParam.WareCode;
}
else if (equip.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
lblMoveInfo.Text = "料架"+equip.CurrShelfId+",出库:" + equip.MoveInfo.MoveParam.PosId + "_" + equip.MoveInfo.MoveParam.WareCode;
}
else if (equip.SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture))
{
lblMoveInfo.Text = "托盘[" + equip.currTrayNum + "]处理中";
}
else
{
lblMoveInfo.Text = "暂无出入库";
}
}
else
{
if (equip.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
......
......@@ -15,6 +15,8 @@ namespace OnlineStore.DeviceLibrary
{
public bool MoveStop = false;
public string CurrShelfId = "";//当前的料架ID
public string LastOutShelfId = "";//最后一个出口
public LineMoveInfo SecondMoveInfo = null;
public bool IsDebug = false;
......@@ -593,9 +595,8 @@ namespace OnlineStore.DeviceLibrary
string msg = "";
int tLength = 15;
if (!String.IsNullOrEmpty(RFIDIP))
{
msg += "上个托盘:" + preTrayNum + "\n";
msg += "当前托盘:" + currTrayNum + "\n";
{
msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + "\n";
}
msg += "runS: " + runStatus + "\n";
msg += "alarm: " + alarmType +" "+LastAlarmTime.ToLongTimeString()+ "\n";
......
......@@ -19,8 +19,6 @@ namespace OnlineStore.DeviceLibrary
{
public FeedingEquip_Config Config;
public bool OutEndSendShelfOut = false;
public string CurrShelfId = "";//当前的料架ID
public string LastOutShelfId = "";//最后一个出口
public AxisBean BatchAxis = null;
public FeedingEquip(string cid, FeedingEquip_Config config)
{
......@@ -39,10 +37,6 @@ namespace OnlineStore.DeviceLibrary
RFIDIP = RFIDManager.GetRFIP(DeviceID);
}
/// <summary>
/// 开始运行
/// </summary>
public override bool StartRun(bool isDebug = false)
{
if (CanStartRun().Equals(false))
......@@ -942,9 +936,8 @@ namespace OnlineStore.DeviceLibrary
{
msg += "出库信息:" + LastOutParam.ToShortStr() + "\r\n";
}
msg += "上个托盘:" + preTrayNum + "\n";
msg += "当前托盘:" + currTrayNum + "\n";
msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + "\n";
msg += "runS: " + runStatus + "\n";
msg += "alarm: " + alarmType + "\n";
msg += "MoveT:" + MoveInfo.MoveType + "\n";
......
......@@ -474,6 +474,7 @@ namespace OnlineStore.DeviceLibrary
{
if (getPosTask.IsCompleted && LastPosParam != null)
{
MoveInfo.MoveParam = LastPosParam;
MoveInfo.NextMoveStep(LineMoveStep.FI_32_WaitTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
InLog(" " + MoveInfo.SLog + " 开始拦截空托盘 " + LastPosParam.ToStr() + "");
......@@ -506,6 +507,7 @@ namespace OnlineStore.DeviceLibrary
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果");
BatchAxisToP3(false, false);
}
MoveInfo.MoveParam = LastPosParam;
ClearTimeoutAlarm("等待空托盘到达超时");
}
else if (MoveInfo.IsTimeOut(180))
......
......@@ -14,11 +14,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 当前设备对应的横移出口的设备ID
/// </summary>
protected int HyOutDeviceId = 0;
public int HyOutDeviceId = 0;
/// <summary>
/// 当前设备对应的横移入口的设备ID
/// </summary>
private int HyInDeviceId = 0;
public int HyInDeviceId = 0;
public static HYEquipBase GetHY(string cid, HYEquip_Config config)
{
int hynum = (config.Id % 100);
......@@ -131,11 +131,13 @@ namespace OnlineStore.DeviceLibrary
buf.Append(" 取放料设备:" + dName + "\r\n");
if (Config.IsSideWayIn)
{
buf.Append("C1线横移入口:✔" + "\r\n");
dName = LineManager.Line.AllEquipMap[HyOutDeviceId].Name;
buf.Append("C1线横移入口:✔" + ",对应出口"+dName+"\r\n");
}
if (Config.IsSideWayOut)
{
buf.Append("C1线横移出口:✔" + "\r\n");
dName = LineManager.Line.AllEquipMap[HyInDeviceId].Name;
buf.Append("C1线横移出口:✔" + ",对应入口" + dName + "\r\n");
}
if (Config.IsOutLineIn)
{
......
......@@ -769,29 +769,29 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
InOutParam inoup = trayInfo.InoutPar;
InOutParam param = trayInfo.InoutPar;
if (trayInfo.IsFull && trayInfo.InoutPar.InStoreNg && this.DeviceID.Equals(216))
{
LogInfo(" 托盘需要横移到出料线:入料NG料" + "" + inoup.ToStr());
LogInfo(" 托盘需要横移到出料线:入料NG料" + "" + param.ToStr());
//如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "")
{
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode);
}
MoveInfo.MoveParam = inoup;
MoveInfo.MoveParam = param;
return true ;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel && this.DeviceID.Equals(216))
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel && this.DeviceID.Equals(216))
{
//紧急料到NG箱
LogInfo(" 托盘需要横移到出料线:紧急出料" + "" + inoup.ToStr());
MoveInfo.MoveParam = inoup;
LogInfo(" 托盘需要横移到出料线:紧急出料" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && inoup.urgentReel.Equals(false) && inoup.cutReel.Equals(false))
else if (trayInfo.InOrOutStore.Equals(ReelType.OutStore) && param.urgentReel.Equals(false) && param.cutReel.Equals(false))
{
LogInfo(" 托盘需要横移到出料线:工单出库料" + "" + inoup.ToStr());
LogInfo(" 托盘需要横移到出料线:工单出库料" + "" + param.ToStr());
List<int> mustLine = new List<int>();
List<int> firstLine = new List<int>();
//urgentReel: true 表示紧急料,需要出到料串上
......@@ -800,23 +800,23 @@ namespace OnlineStore.DeviceLibrary
//rfid: 分配的料架RFID
//rfidLoc:
//是否是小盘
if (inoup.rfidLoc <= 0)
if (param.rfidLoc <= 0)
{
//-1时随意放
}
else if (inoup.smallReel)
else if (param.smallReel)
{
if (inoup.rfidLoc >= 70 && inoup.rfidLoc <= 72)
if (param.rfidLoc >= 70 && param.rfidLoc <= 72)
{
// 70,71,72时只能分配到3 / 4号皮带线;
mustLine = new List<int> { 213, 216 };
}
else if (inoup.rfidLoc <= 46)
else if (param.rfidLoc <= 46)
{
// 小料时,架位为1 - 46优先走1 / 2号皮带线
firstLine = new List<int> { 204, 206 };
}
else if (inoup.rfidLoc >= 47)
else if (param.rfidLoc >= 47)
{
// ,47 - 92优先走3 / 4号皮带线,
firstLine = new List<int> { 213, 216 };
......@@ -827,16 +827,16 @@ namespace OnlineStore.DeviceLibrary
//大料12号只能走1号2后皮带线
// 料架的架位大料时,架位1 - 6,12号优先走1 / 2号皮带线,
//7 - 11优先走3 / 4号皮带线
if (inoup.rfidLoc.Equals(12))
if (param.rfidLoc.Equals(12))
{
// 大料12号只能走1号2后皮带线
mustLine = new List<int> { 204, 206 };
}
else if (inoup.rfidLoc <= 6)
else if (param.rfidLoc <= 6)
{
firstLine = new List<int> { 204, 206 };
}
else if (inoup.rfidLoc >= 7)
else if (param.rfidLoc >= 7)
{
firstLine = new List<int> { 213, 216 };
}
......@@ -846,8 +846,8 @@ namespace OnlineStore.DeviceLibrary
{
if (mustLine.Contains(DeviceID))
{
LogInfo(" 托盘需要横移到出料线:工单出料,必须线" + "" + inoup.ToStr());
MoveInfo.MoveParam = inoup;
LogInfo(" 托盘需要横移到出料线:工单出料,必须线" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
......@@ -855,8 +855,8 @@ namespace OnlineStore.DeviceLibrary
{
if (firstLine.Contains(DeviceID) )
{
LogInfo(" 托盘需要横移到出料线:工单出料,优先线" + "" + inoup.ToStr());
MoveInfo.MoveParam = inoup;
LogInfo(" 托盘需要横移到出料线:工单出料,优先线" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
else
......@@ -864,16 +864,16 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - trayInfo.LastUpdateTime;
if (span.TotalSeconds > 300)
{
LogInfo(" 托盘需要横移到出料线:工单出料,超时五分钟" + "" + inoup.ToStr());
MoveInfo.MoveParam = inoup;
LogInfo(" 托盘需要横移到出料线:工单出料,超时五分钟" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
}
else
{
LogInfo(" 托盘需要横移到出料线:工单出料,随意放" + "" + inoup.ToStr());
MoveInfo.MoveParam = inoup;
LogInfo(" 托盘需要横移到出料线:工单出料,随意放" + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
}
......
......@@ -17,7 +17,7 @@ namespace OnlineStore.DeviceLibrary
{
public HY_C1_SLStation(string cid, HYEquip_Config config) : base(cid, config)
{
Name = (" C1THY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
Name = (" C1HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + " ").ToUpper();
}
public override bool StartRun(bool isDebug = false)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!