Commit 3f948576 LN

界面调整。X光点料调整。增加X光点料开关。点料时阻挡上升

1 个父辈 0bb9e1fc
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!--是否启用打印标签--> <!--是否启用打印标签-->
<add key ="NeedPrintLabel" value ="0"/> <add key ="NeedPrintLabel" value ="0"/>
<!--XRay射线最后一次使用时间--> <!--XRay射线最后一次使用时间-->
<add key ="XRay_Data" value =""/> <add key ="XRay_Data" value ="2020-6-2"/>
</appSettings> </appSettings>
<log4net> <log4net>
......
...@@ -90,6 +90,10 @@ ...@@ -90,6 +90,10 @@
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\X-Ray\X-Ray.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="agvtest\FrmAgvTest.cs"> <Compile Include="agvtest\FrmAgvTest.cs">
......
...@@ -139,7 +139,7 @@ namespace OnlineStore.AutoCountClient ...@@ -139,7 +139,7 @@ namespace OnlineStore.AutoCountClient
"\t AGV-" + equipBean.Config.RightAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.RightAgvName).ToString() + ""; "\t AGV-" + equipBean.Config.RightAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.RightAgvName).ToString() + "";
lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus); lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg+"\r\n"+equipBean.LeftBatchMove.WarnMsg+"\r\n"+equipBean.RightBatchMove.WarnMsg;
lblMoveInfo.Text = equipBean.GetMoveStr(); lblMoveInfo.Text = equipBean.GetMoveStr();
} }
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<value>17, 11</value> <value>17, 11</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value> <value>63</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
......
...@@ -77,7 +77,7 @@ namespace OnlineStore.AutoCountClient ...@@ -77,7 +77,7 @@ namespace OnlineStore.AutoCountClient
} }
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("HHmmss") + ".png"; //string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
FrmBase.GetVersion(true); FrmBase.GetVersion(true);
if (!RobotManager.Init()) if (!RobotManager.Init())
{ {
...@@ -105,6 +105,11 @@ namespace OnlineStore.AutoCountClient ...@@ -105,6 +105,11 @@ namespace OnlineStore.AutoCountClient
{ {
try try
{ {
if (this.pictureBox1.Image != null)
{
this.pictureBox1.Image.Dispose();
this.pictureBox1.Image = null;
}
this.pictureBox1.Image = bitmap; this.pictureBox1.Image = bitmap;
} }
catch (Exception ex) catch (Exception ex)
...@@ -426,7 +431,8 @@ namespace OnlineStore.AutoCountClient ...@@ -426,7 +431,8 @@ namespace OnlineStore.AutoCountClient
warnMsg = AddMsg(warnMsg, robot.inputEquip.RightBatchMove.WarnMsg, robot.inputEquip.RightBatchMove.alarmType, robot.inputEquip.RightBatchMove.LastAlarmTime); warnMsg = AddMsg(warnMsg, robot.inputEquip.RightBatchMove.WarnMsg, robot.inputEquip.RightBatchMove.alarmType, robot.inputEquip.RightBatchMove.LastAlarmTime);
} }
} }
lblOutTray.Text = "XRay出口处料盘:" + robot.XrayBean.Out_ReelInfo.ToStr();
lblCurrTray.Text = "XRay扫描区料盘:" + robot.XrayBean.Work_ReelInfo.ToStr();
lblWarnMsg.Text = warnMsg; lblWarnMsg.Text = warnMsg;
if (robot.runStatus > RobotRunStatus.Wait) if (robot.runStatus > RobotRunStatus.Wait)
{ {
...@@ -470,7 +476,7 @@ namespace OnlineStore.AutoCountClient ...@@ -470,7 +476,7 @@ namespace OnlineStore.AutoCountClient
SetItemText(i, item_debug_index, equip.IsDebug ? "✘" : "✔"); SetItemText(i, item_debug_index, equip.IsDebug ? "✘" : "✔");
SetItemText(i, item_alarm_index, equip.alarmType.ToString()); SetItemText(i, item_alarm_index, equip.alarmType.ToString());
SetItemText(i, item_runStr_index, equip.GetRunStr()); SetItemText(i, item_runStr_index, equip.GetRunStr());
RobotRunStatus s = equip.runStatus;
string trayInfo = ""; string trayInfo = "";
if (equip.MoveInfo.MoveType.Equals(RobotMoveType.Working) || equip.MoveInfo.MoveType.Equals(RobotMoveType.Labelling)) if (equip.MoveInfo.MoveType.Equals(RobotMoveType.Working) || equip.MoveInfo.MoveType.Equals(RobotMoveType.Labelling))
{ {
...@@ -480,8 +486,23 @@ namespace OnlineStore.AutoCountClient ...@@ -480,8 +486,23 @@ namespace OnlineStore.AutoCountClient
{ {
trayInfo = equip.SecMoveInfo.MoveParam.OutStr(); trayInfo = equip.SecMoveInfo.MoveParam.OutStr();
} }
SetItemText(i,item_move_info_index, trayInfo); else if (equip is InputEquip)
SetItemColor(i, equip.runStatus, equip.alarmType); {
if (robot.inputEquip.LeftBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.Working) || robot.inputEquip.LeftBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.Labelling))
{
s = RobotRunStatus.Busy;
SetItemText(i, item_runStr_index, "忙碌_左入料");
trayInfo = robot.inputEquip.LeftBatchMove.MoveInfo.MoveParam.OutStr();
}
else if (robot.inputEquip.RightBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.Working) || robot.inputEquip.RightBatchMove.MoveInfo.MoveType.Equals(RobotMoveType.Labelling))
{
s = RobotRunStatus.Busy;
SetItemText(i, item_runStr_index, "忙碌_右入料");
trayInfo = robot.inputEquip.RightBatchMove.MoveInfo.MoveParam.OutStr();
}
}
SetItemText(i, item_move_info_index, trayInfo);
SetItemColor(i, s , equip.alarmType);
i++; i++;
} }
...@@ -688,5 +709,19 @@ namespace OnlineStore.AutoCountClient ...@@ -688,5 +709,19 @@ namespace OnlineStore.AutoCountClient
LogUtil.error("标签编辑错误:" + ex.ToString()); LogUtil.error("标签编辑错误:" + ex.ToString());
} }
} }
private void chbOpenX_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (chbOpenX.Checked.Equals(robot.XrayBean.OpenXLine))
{
return;
}
robot.XrayBean.OpenXLine = chbOpenX.Checked;
LogUtil.info("勾选:启用X射线点料 =" + chbOpenX.Checked);
}
} }
} }
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.btnXStart = new System.Windows.Forms.Button();
this.btnXStop = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lblXrOpen = new System.Windows.Forms.Label();
this.lblLastS = new System.Windows.Forms.Label(); this.lblLastS = new System.Windows.Forms.Label();
this.lblData = new System.Windows.Forms.Label(); this.lblData = new System.Windows.Forms.Label();
this.lblCom = new System.Windows.Forms.Label(); this.lblCom = new System.Windows.Forms.Label();
...@@ -69,6 +73,7 @@ ...@@ -69,6 +73,7 @@
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -201,6 +206,7 @@ ...@@ -201,6 +206,7 @@
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.groupBox7);
this.groupBox6.Controls.Add(this.groupBox2); this.groupBox6.Controls.Add(this.groupBox2);
this.groupBox6.Controls.Add(this.lblInoutInfo); this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
...@@ -212,26 +218,74 @@ ...@@ -212,26 +218,74 @@
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
// //
// groupBox7
//
this.groupBox7.Controls.Add(this.btnXStart);
this.groupBox7.Controls.Add(this.btnXStop);
this.groupBox7.Location = new System.Drawing.Point(294, 306);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(258, 168);
this.groupBox7.TabIndex = 283;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "X光测试";
//
// btnXStart
//
this.btnXStart.BackColor = System.Drawing.Color.White;
this.btnXStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnXStart.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnXStart.Location = new System.Drawing.Point(22, 39);
this.btnXStart.Name = "btnXStart";
this.btnXStart.Size = new System.Drawing.Size(130, 35);
this.btnXStart.TabIndex = 286;
this.btnXStart.Text = "打开X光";
this.btnXStart.UseVisualStyleBackColor = false;
this.btnXStart.Click += new System.EventHandler(this.btnXStart_Click);
//
// btnXStop
//
this.btnXStop.BackColor = System.Drawing.Color.White;
this.btnXStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnXStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnXStop.Location = new System.Drawing.Point(22, 96);
this.btnXStop.Name = "btnXStop";
this.btnXStop.Size = new System.Drawing.Size(130, 35);
this.btnXStop.TabIndex = 285;
this.btnXStop.Text = "关闭X光";
this.btnXStop.UseVisualStyleBackColor = false;
this.btnXStop.Click += new System.EventHandler(this.btnXStop_Click);
//
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.lblXrOpen);
this.groupBox2.Controls.Add(this.lblLastS); this.groupBox2.Controls.Add(this.lblLastS);
this.groupBox2.Controls.Add(this.lblData); this.groupBox2.Controls.Add(this.lblData);
this.groupBox2.Controls.Add(this.lblCom); this.groupBox2.Controls.Add(this.lblCom);
this.groupBox2.Controls.Add(this.lblDiany); this.groupBox2.Controls.Add(this.lblDiany);
this.groupBox2.Controls.Add(this.lblDianl); this.groupBox2.Controls.Add(this.lblDianl);
this.groupBox2.Location = new System.Drawing.Point(12, 41); this.groupBox2.Location = new System.Drawing.Point(12, 306);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(276, 149); this.groupBox2.Size = new System.Drawing.Size(276, 168);
this.groupBox2.TabIndex = 282; this.groupBox2.TabIndex = 282;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "X射线信息"; this.groupBox2.Text = "X光参数/状态信息";
this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter); this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
// //
// lblXrOpen
//
this.lblXrOpen.AutoSize = true;
this.lblXrOpen.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblXrOpen.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblXrOpen.Location = new System.Drawing.Point(12, 144);
this.lblXrOpen.Name = "lblXrOpen";
this.lblXrOpen.Size = new System.Drawing.Size(0, 17);
this.lblXrOpen.TabIndex = 5;
//
// lblLastS // lblLastS
// //
this.lblLastS.AutoSize = true; this.lblLastS.AutoSize = true;
this.lblLastS.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblLastS.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLastS.Location = new System.Drawing.Point(12, 124); this.lblLastS.Location = new System.Drawing.Point(12, 120);
this.lblLastS.Name = "lblLastS"; this.lblLastS.Name = "lblLastS";
this.lblLastS.Size = new System.Drawing.Size(68, 17); this.lblLastS.Size = new System.Drawing.Size(68, 17);
this.lblLastS.TabIndex = 4; this.lblLastS.TabIndex = 4;
...@@ -241,7 +295,7 @@ ...@@ -241,7 +295,7 @@
// //
this.lblData.AutoSize = true; this.lblData.AutoSize = true;
this.lblData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblData.Location = new System.Drawing.Point(12, 99); this.lblData.Location = new System.Drawing.Point(12, 96);
this.lblData.Name = "lblData"; this.lblData.Name = "lblData";
this.lblData.Size = new System.Drawing.Size(92, 17); this.lblData.Size = new System.Drawing.Size(92, 17);
this.lblData.TabIndex = 3; this.lblData.TabIndex = 3;
...@@ -261,7 +315,7 @@ ...@@ -261,7 +315,7 @@
// //
this.lblDiany.AutoSize = true; this.lblDiany.AutoSize = true;
this.lblDiany.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblDiany.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDiany.Location = new System.Drawing.Point(12, 74); this.lblDiany.Location = new System.Drawing.Point(12, 72);
this.lblDiany.Name = "lblDiany"; this.lblDiany.Name = "lblDiany";
this.lblDiany.Size = new System.Drawing.Size(68, 17); this.lblDiany.Size = new System.Drawing.Size(68, 17);
this.lblDiany.TabIndex = 1; this.lblDiany.TabIndex = 1;
...@@ -271,7 +325,7 @@ ...@@ -271,7 +325,7 @@
// //
this.lblDianl.AutoSize = true; this.lblDianl.AutoSize = true;
this.lblDianl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblDianl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDianl.Location = new System.Drawing.Point(12, 49); this.lblDianl.Location = new System.Drawing.Point(12, 48);
this.lblDianl.Name = "lblDianl"; this.lblDianl.Name = "lblDianl";
this.lblDianl.Size = new System.Drawing.Size(68, 17); this.lblDianl.Size = new System.Drawing.Size(68, 17);
this.lblDianl.TabIndex = 0; this.lblDianl.TabIndex = 0;
...@@ -280,9 +334,9 @@ ...@@ -280,9 +334,9 @@
// lblInoutInfo // lblInoutInfo
// //
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green; this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
this.lblInoutInfo.Location = new System.Drawing.Point(13, 16); this.lblInoutInfo.Location = new System.Drawing.Point(331, 16);
this.lblInoutInfo.Name = "lblInoutInfo"; this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(1280, 22); this.lblInoutInfo.Size = new System.Drawing.Size(962, 22);
this.lblInoutInfo.TabIndex = 281; this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前点料信息:"; this.lblInoutInfo.Text = "当前点料信息:";
// //
...@@ -291,7 +345,7 @@ ...@@ -291,7 +345,7 @@
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(13, 198); this.lblMoveInfo.Location = new System.Drawing.Point(24, 21);
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;
...@@ -306,7 +360,7 @@ ...@@ -306,7 +360,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(327, 41); this.lblThisSta.Location = new System.Drawing.Point(327, 41);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(975, 66); this.lblThisSta.Size = new System.Drawing.Size(975, 149);
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;
...@@ -703,6 +757,7 @@ ...@@ -703,6 +757,7 @@
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.groupBox6.ResumeLayout(false); this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout(); this.groupBox6.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
...@@ -765,6 +820,10 @@ ...@@ -765,6 +820,10 @@
private System.Windows.Forms.Label lblDiany; private System.Windows.Forms.Label lblDiany;
private System.Windows.Forms.Label lblDianl; private System.Windows.Forms.Label lblDianl;
private System.Windows.Forms.Label lblLastS; private System.Windows.Forms.Label lblLastS;
private System.Windows.Forms.Label lblXrOpen;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.Button btnXStart;
private System.Windows.Forms.Button btnXStop;
} }
} }
...@@ -38,8 +38,8 @@ namespace OnlineStore.AutoCountClient ...@@ -38,8 +38,8 @@ namespace OnlineStore.AutoCountClient
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
lblCom.Text = "X射线端口号:" + equipBean.Config.XRay_Port; lblCom.Text = "X射线端口号:" + equipBean.Config.XRay_Port;
lblDianl.Text = "电流值:" + equipBean.Config.XRay_Electricity; lblDianl.Text = "电流:" + equipBean.Config.XRay_Electricity + ", 电压:" + equipBean.Config.XRay_Voltage;
lblDiany.Text = "电压值:" + equipBean.Config.XRay_Voltage; lblDiany.Text = "窗宽:" + equipBean.Config.WindowWidth + ",窗位:" + equipBean.Config.WindowLevel;
lblData.Text = "最后使用时间:" + ConfigAppSettings.GetValue(Setting_Init.XRay_Data); lblData.Text = "最后使用时间:" + ConfigAppSettings.GetValue(Setting_Init.XRay_Data);
lblLastS.Text = equipBean.LastXRayState; lblLastS.Text = equipBean.LastXRayState;
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
...@@ -103,6 +103,14 @@ namespace OnlineStore.AutoCountClient ...@@ -103,6 +103,14 @@ namespace OnlineStore.AutoCountClient
ReadIOList(); ReadIOList();
ReadBtnDO(); ReadBtnDO();
lblLastS.Text = equipBean.LastXRayState; lblLastS.Text = equipBean.LastXRayState;
if (equipBean.xRay.IsRayOpen)
{
lblXrOpen.Text = "XRay射线已打开";
}
else
{
lblXrOpen.Text = "";
}
if (equipBean.runStatus > RobotRunStatus.Wait) if (equipBean.runStatus > RobotRunStatus.Wait)
{ {
lblName.BackColor = Color.Green; lblName.BackColor = Color.Green;
...@@ -371,6 +379,35 @@ namespace OnlineStore.AutoCountClient ...@@ -371,6 +379,35 @@ namespace OnlineStore.AutoCountClient
{ {
} }
private void btnXStart_Click(object sender, EventArgs e)
{
if (!equipBean.xRayCanStart)
{
LogUtil.info(equipBean.Name + "用户点击 打开X光 :"+ "不能打开X光, 当前状态:" + equipBean.LastXRayState);
MessageBox.Show("不能打开X光, 当前状态:"+ equipBean.LastXRayState, "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (!equipBean.LockOnCanMove())
{
LogUtil.info(equipBean.Name + "用户点击 打开X光 :" + "不能打开X光, 请先检查 急停/门禁/防护门");
MessageBox.Show("不能打开X光, 请先检查 急停/门禁/防护门 ", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
DialogResult result = MessageBox.Show("确定打开X光,请确保防护门已关闭 ", "确认提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (result.Equals(DialogResult.OK))
{
LogUtil.info(equipBean.Name + "用户点击 打开X光 ,调用 xRay.Start");
equipBean.xRay.Start();
}
}
private void btnXStop_Click(object sender, EventArgs e)
{
LogUtil.info(equipBean.Name + "用户点击 关闭X光 ");
equipBean.xRay.Stop();
}
} }
} }
......
...@@ -68,4 +68,14 @@ Stop ...@@ -68,4 +68,14 @@ Stop
PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,, PRO,0,贴标机构Z轴旋转点P4,LabelZ_P4,2000,,,,,
PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
\ No newline at end of file \ No newline at end of file
PRO,0,贴标机构Z轴P4速度,LabelZ_P4Speed,4500,,,,,
1.增加X光启用禁用功能
2.Xray料盘信息显示
3.入料左右侧信息显示
4.X射线增加手动调试按钮
5.X光图片每次删除上次的
6.X光图片名称增加日期。
7.点料时挡停要上升
\ No newline at end of file \ No newline at end of file
...@@ -349,29 +349,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -349,29 +349,12 @@ namespace OnlineStore.DeviceLibrary
if (SecMoveInfo.IsInWait) if (SecMoveInfo.IsInWait)
{ {
return; return;
} }
//if (SecMoveInfo.IsStep(StepEnum.Wait))
//{
// SecMoveInfo.NextMoveStep(StepEnum.OL01_Paste_Back);
// SecWorkLog(" 启动贴标: 贴标气缸后退,吸盘停止输出,贴标Z轴到待机点P1,取码气缸前进");
// IOMove(IO_Type.Nozzle_Work, IO_VALUE.LOW);
// CylinderMove(SecMoveInfo, IO_Type.PasteCode_Forward, IO_Type.PasteCode_Back);
// CylinderMove(SecMoveInfo, IO_Type.TakeCode_Back, IO_Type.TakeCode_Forward);
// if (!LabelZAxis.IsInPosition(Config.LabelZ_P1))
// {
// LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P1, Config.LabelZ_P1Speed);
// }
//}
if (SecMoveInfo.IsStep(StepEnum.OL01_Paste_Back)) if (SecMoveInfo.IsStep(StepEnum.OL01_Paste_Back))
{ {
// SecMoveInfo.NextMoveStep(StepEnum.OL02_TakeForward);
// SecWorkLog("贴标: 取码气缸前进,");
// CylinderMove(SecMoveInfo, IO_Type.TakeCode_Back, IO_Type.TakeCode_Forward);
//}
//else if (SecMoveInfo.IsStep(StepEnum.OL02_TakeForward))
//{
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel); SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown; RobotManager.LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
NeedPrint = ConfigAppSettings.GetIntValue(Setting_Init.NeedPrintLabel).Equals(1);
SecWorkLog("贴标: 重置状态=Unknown,开始打印标签[" + NeedPrint + "] ,贴标XYR轴到取标签点P2, 等待1s"); SecWorkLog("贴标: 重置状态=Unknown,开始打印标签[" + NeedPrint + "] ,贴标XYR轴到取标签点P2, 等待1s");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (NeedPrint) if (NeedPrint)
...@@ -387,12 +370,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -387,12 +370,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecMoveInfo.IsStep(StepEnum.OL03_PrintLabel)) else if (SecMoveInfo.IsStep(StepEnum.OL03_PrintLabel))
{ {
// SecMoveInfo.NextMoveStep(StepEnum.OL04_PrintOk);
// SecWorkLog("贴标: 等待 贴标机打码OK信号");
//}
//else if (SecMoveInfo.IsStep(StepEnum.OL04_PrintOk))
//{
bool isPrintOk = RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Idle); bool isPrintOk = RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Idle);
bool isTimeOut = SecMoveInfo.IsTimeOut(60); bool isTimeOut = SecMoveInfo.IsTimeOut(60);
...@@ -404,16 +382,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,16 +382,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (SecMoveInfo.IsStep(StepEnum.OL05_TakeBack)) else if (SecMoveInfo.IsStep(StepEnum.OL05_TakeBack))
{ {
// SecMoveInfo.NextMoveStep(StepEnum.OL06_XYRToP2);
// SecWorkLog("贴标: 贴标XYR轴到取标签点P2");
// LabelXAxis.AbsMove(SecMoveInfo, Config.LabelX_P2, Config.LabelX_P2Speed);
// LabelYAxis.AbsMove(SecMoveInfo, Config.LabelY_P2, Config.LabelY_P2Speed);
// LabelRAxis.AbsMove(SecMoveInfo, Config.LabelR_P2, Config.LabelR_P2Speed);
//}
//else if (SecMoveInfo.IsStep(StepEnum.OL06_XYRToP2))
//{
SecMoveInfo.NextMoveStep(StepEnum.OL07_ZToP2); SecMoveInfo.NextMoveStep(StepEnum.OL07_ZToP2);
SecWorkLog("贴标: Z轴到取标签点P2"); SecWorkLog("贴标: Z轴到取标签点P2");
LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P2, Config.LabelZ_P2Speed); LabelZAxis.AbsMove(SecMoveInfo, Config.LabelZ_P2, Config.LabelZ_P2Speed);
......
...@@ -14,6 +14,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,6 +14,8 @@ namespace OnlineStore.DeviceLibrary
{ {
public partial class X_RAY_Equip : EquipBase public partial class X_RAY_Equip : EquipBase
{ {
public bool OpenXLine = false;
public ReelInfo In_ReelInfo = new ReelInfo(); public ReelInfo In_ReelInfo = new ReelInfo();
public ReelInfo Work_ReelInfo = new ReelInfo(); public ReelInfo Work_ReelInfo = new ReelInfo();
public ReelInfo Out_ReelInfo = new ReelInfo(); public ReelInfo Out_ReelInfo = new ReelInfo();
...@@ -21,54 +23,68 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,54 +23,68 @@ namespace OnlineStore.DeviceLibrary
public XRay_Config Config; public XRay_Config Config;
private XRay xRay = null; public XRay xRay = null;
private CountImage countImage = null; public CountImage countImage = null;
private CarerayImage carerayImage = null; public CarerayImage carerayImage = null;
private bool xRayCanStart = false; public bool xRayCanStart = false;
public string LastXRayState = ""; public string LastXRayState = "未知";
public bool InXWork = false; public bool InXWork = false;
private string path_XRAY = Application.StartupPath + @"\XRAY";
private string path1_tif = Application.StartupPath + @"\XRAY\tif";
private string path2_png = Application.StartupPath + @"\XRAY\png";
private string path3_out = Application.StartupPath + @"\XRAY\out";
public X_RAY_Equip(string cid, XRay_Config config) public X_RAY_Equip(string cid, XRay_Config config)
{ {
this.DeviceID = config.Id; this.DeviceID = config.Id;
this.Config = config; this.Config = config;
baseConfig = config; baseConfig = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = (" " + "XRay" + "_Equip "); Name = (" " + "点料模块 ");
Init(); Init();
ledProcessTimer.Elapsed += LedProcess; ledProcessTimer.Elapsed += LedProcess;
IoCheckTimer.Elapsed += IoCheckTimerProcess; IoCheckTimer.Elapsed += IoCheckTimerProcess;
MoveInfo = new RobotMoveInfo(Name); MoveInfo = new RobotMoveInfo(Name);
SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove"); SecMoveInfo = new RobotMoveInfo( Name.Trim() + "-SMove");
XRayLoad(); Task.Factory.StartNew(delegate {
XRayLoad();
});
} }
private void XRayLoad() private void XRayLoad()
{ {
try try
{ {
countImage = new CountImage("XRay");
countImage.SetDirectory(path1_tif, path2_png, path3_out);
LogUtil.info(Name + "CountImage path1【" + path1_tif + "】");
LogUtil.info(Name + "CountImage path2【" + path2_png + "】");
LogUtil.info(Name + "CountImage path3【" + path3_out + "】");
LogUtil.info(Name + "CountImage SetDirectory: 完成");
carerayImage = new CarerayImage("XRay");
bool cResult = carerayImage.Open();
LogUtil.info(Name + "carerayImage.Open()=" + cResult);
xRay = new XRay("XRay"); xRay = new XRay("XRay");
xRay.WarmUp += XRay_WarmUp;
string lastData = ConfigAppSettings.GetValue(Setting_Init.XRay_Data); string lastData = ConfigAppSettings.GetValue(Setting_Init.XRay_Data);
bool xresult = xRay.Open(Config.XRay_Port, lastData); bool xresult = xRay.Open(Config.XRay_Port, lastData);
if (!xresult) if (!xresult)
{ {
LogUtil.info(Name + "第一次 xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult+", 再打开一次 "); LastXRayState = "第一次 xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult + ", 再打开一次";
LogUtil.info(Name + "第一次 xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult + ", 再打开一次 ");
xresult = xRay.Open(Config.XRay_Port, lastData); xresult = xRay.Open(Config.XRay_Port, lastData);
} }
LastXRayState = "xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult;
LogUtil.info(Name + "xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult); LogUtil.info(Name + "xRay.Open(" + Config.XRay_Port + "," + lastData + ")=" + xresult);
xRay.WarmUp += XRay_WarmUp;
carerayImage = new CarerayImage("XRay");
bool cResult = carerayImage.Open();
LogUtil.info(Name + "carerayImage.Open()=" + cResult);
countImage = new CountImage("XRay");
string path1 = Application.StartupPath + @"\XRAY\tif";
string path2 = Application.StartupPath + @"\XRAY\png";
string path3 = Application.StartupPath + @"\XRAY\out";
countImage.SetDirectory(path1, path2, path3);
LogUtil.info(Name + "SetDirectory: path1【" + path1 + "】path2【" + path2 + "】path3【" + path3 + "】" + cResult);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -80,6 +96,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,6 +96,11 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
if (xRay.IsRayOpen)
{
xRay.Stop();
}
xRay.Close(); xRay.Close();
carerayImage.Close(); carerayImage.Close();
} }
...@@ -315,6 +336,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -315,6 +336,7 @@ namespace OnlineStore.DeviceLibrary
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "alarm: " + alarmType + "\n"; msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n"; msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
msg += "X光图片:" + lastFileName + "\n";
msg += "入口料盘:" + In_ReelInfo.ToStr() + " \r\n"; msg += "入口料盘:" + In_ReelInfo.ToStr() + " \r\n";
msg += "扫描区料盘:" + Work_ReelInfo.ToStr() + " \r\n"; msg += "扫描区料盘:" + Work_ReelInfo.ToStr() + " \r\n";
......
...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
public string ToStr() public string ToStr()
{ {
return "[" + WareCode + "] [" + PlateW + "X" + PlateH + "] ["+WareCount+"]"+(IsNgReel?"[NG料:"+NgMsg+"]":"")+""; return "[" + WareCode + "] [" + PlateW + "X" + PlateH + "] [数量:" + WareCount+"]"+(IsNgReel?"[NG料:"+NgMsg+"]":"")+"";
} }
public ReelInfo GetReelInfo() public ReelInfo GetReelInfo()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!