Commit 5b55cc5a LN

1

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