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">
......
...@@ -33,14 +33,17 @@ ...@@ -33,14 +33,17 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblCurrTray = new System.Windows.Forms.Label();
this.lblOutTray = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chbOpenX = new System.Windows.Forms.CheckBox();
this.chbBuzzer = new System.Windows.Forms.CheckBox(); this.chbBuzzer = new System.Windows.Forms.CheckBox();
this.chbAGV = new System.Windows.Forms.CheckBox(); this.chbAGV = new System.Windows.Forms.CheckBox();
this.chbAutoRun = new System.Windows.Forms.CheckBox(); this.chbAutoRun = new System.Windows.Forms.CheckBox();
this.chkDebug = new System.Windows.Forms.CheckBox();
this.btnClearLog = new System.Windows.Forms.Button(); this.btnClearLog = new System.Windows.Forms.Button();
this.chkDebug = new System.Windows.Forms.CheckBox();
this.logBox = new System.Windows.Forms.RichTextBox(); this.logBox = new System.Windows.Forms.RichTextBox();
this.lblStatus = new System.Windows.Forms.Label(); this.lblStatus = new System.Windows.Forms.Label();
this.lblWarnMsg = new System.Windows.Forms.Label(); this.lblWarnMsg = new System.Windows.Forms.Label();
...@@ -115,22 +118,44 @@ ...@@ -115,22 +118,44 @@
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.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)));
this.groupBox1.Controls.Add(this.lblCurrTray);
this.groupBox1.Controls.Add(this.lblOutTray);
this.groupBox1.Controls.Add(this.pictureBox1); this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Location = new System.Drawing.Point(9, 117); this.groupBox1.Location = new System.Drawing.Point(9, 130);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(588, 489); this.groupBox1.Size = new System.Drawing.Size(588, 476);
this.groupBox1.TabIndex = 197; this.groupBox1.TabIndex = 197;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "点料效果图"; this.groupBox1.Text = "点料效果图";
// //
// lblCurrTray
//
this.lblCurrTray.AutoSize = true;
this.lblCurrTray.Location = new System.Drawing.Point(12, 60);
this.lblCurrTray.Name = "lblCurrTray";
this.lblCurrTray.Size = new System.Drawing.Size(140, 20);
this.lblCurrTray.TabIndex = 286;
this.lblCurrTray.Text = "XRay扫描区料盘信息";
//
// lblOutTray
//
this.lblOutTray.AutoSize = true;
this.lblOutTray.Location = new System.Drawing.Point(12, 26);
this.lblOutTray.Name = "lblOutTray";
this.lblOutTray.Size = new System.Drawing.Size(154, 20);
this.lblOutTray.TabIndex = 285;
this.lblOutTray.Text = "XRay出口处料盘信息:";
this.lblOutTray.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pictureBox1 // pictureBox1
// //
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.pictureBox1.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.pictureBox1.Location = new System.Drawing.Point(6, 25); this.pictureBox1.BackColor = System.Drawing.Color.LightGray;
this.pictureBox1.Location = new System.Drawing.Point(6, 85);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(576, 458); this.pictureBox1.Size = new System.Drawing.Size(576, 385);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 284; this.pictureBox1.TabIndex = 284;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
...@@ -147,7 +172,7 @@ ...@@ -147,7 +172,7 @@
this.listView1.Location = new System.Drawing.Point(9, 7); this.listView1.Location = new System.Drawing.Point(9, 7);
this.listView1.MultiSelect = false; this.listView1.MultiSelect = false;
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(984, 104); this.listView1.Size = new System.Drawing.Size(984, 117);
this.listView1.TabIndex = 191; this.listView1.TabIndex = 191;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details; this.listView1.View = System.Windows.Forms.View.Details;
...@@ -155,6 +180,7 @@ ...@@ -155,6 +180,7 @@
// groupBox2 // groupBox2
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.chbOpenX);
this.groupBox2.Controls.Add(this.chbBuzzer); this.groupBox2.Controls.Add(this.chbBuzzer);
this.groupBox2.Controls.Add(this.chbAGV); this.groupBox2.Controls.Add(this.chbAGV);
this.groupBox2.Controls.Add(this.chbAutoRun); this.groupBox2.Controls.Add(this.chbAutoRun);
...@@ -163,10 +189,23 @@ ...@@ -163,10 +189,23 @@
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(999, 4); this.groupBox2.Location = new System.Drawing.Point(999, 4);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(321, 107); this.groupBox2.Size = new System.Drawing.Size(321, 120);
this.groupBox2.TabIndex = 196; this.groupBox2.TabIndex = 196;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
// chbOpenX
//
this.chbOpenX.AutoSize = true;
this.chbOpenX.BackColor = System.Drawing.Color.Transparent;
this.chbOpenX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbOpenX.Location = new System.Drawing.Point(188, 17);
this.chbOpenX.Name = "chbOpenX";
this.chbOpenX.Size = new System.Drawing.Size(121, 24);
this.chbOpenX.TabIndex = 199;
this.chbOpenX.Text = "启用X射线点料";
this.chbOpenX.UseVisualStyleBackColor = false;
this.chbOpenX.CheckedChanged += new System.EventHandler(this.chbOpenX_CheckedChanged);
//
// chbBuzzer // chbBuzzer
// //
this.chbBuzzer.AutoSize = true; this.chbBuzzer.AutoSize = true;
...@@ -203,25 +242,12 @@ ...@@ -203,25 +242,12 @@
this.chbAutoRun.UseVisualStyleBackColor = true; this.chbAutoRun.UseVisualStyleBackColor = true;
this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged); this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged);
// //
// chkDebug
//
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(249, 17);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(72, 24);
this.chkDebug.TabIndex = 194;
this.chkDebug.Text = "debug";
this.chkDebug.UseVisualStyleBackColor = true;
this.chkDebug.Visible = false;
//
// btnClearLog // btnClearLog
// //
this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearLog.BackColor = System.Drawing.Color.White; this.btnClearLog.BackColor = System.Drawing.Color.White;
this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClearLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearLog.Location = new System.Drawing.Point(216, 66); this.btnClearLog.Location = new System.Drawing.Point(204, 68);
this.btnClearLog.Name = "btnClearLog"; this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(105, 35); this.btnClearLog.Size = new System.Drawing.Size(105, 35);
this.btnClearLog.TabIndex = 190; this.btnClearLog.TabIndex = 190;
...@@ -229,15 +255,28 @@ ...@@ -229,15 +255,28 @@
this.btnClearLog.UseVisualStyleBackColor = false; this.btnClearLog.UseVisualStyleBackColor = false;
this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click); this.btnClearLog.Click += new System.EventHandler(this.btnClearLog_Click);
// //
// chkDebug
//
this.chkDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkDebug.AutoSize = true;
this.chkDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chkDebug.Location = new System.Drawing.Point(243, 90);
this.chkDebug.Name = "chkDebug";
this.chkDebug.Size = new System.Drawing.Size(72, 24);
this.chkDebug.TabIndex = 194;
this.chkDebug.Text = "debug";
this.chkDebug.UseVisualStyleBackColor = true;
this.chkDebug.Visible = false;
//
// logBox // logBox
// //
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.logBox.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.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(603, 117); this.logBox.Location = new System.Drawing.Point(603, 130);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(720, 489); this.logBox.Size = new System.Drawing.Size(720, 476);
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);
...@@ -247,11 +286,12 @@ ...@@ -247,11 +286,12 @@
this.lblStatus.AutoSize = true; this.lblStatus.AutoSize = true;
this.lblStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStatus.ForeColor = System.Drawing.Color.Green; this.lblStatus.ForeColor = System.Drawing.Color.Green;
this.lblStatus.Location = new System.Drawing.Point(94, 46); this.lblStatus.Location = new System.Drawing.Point(108, 46);
this.lblStatus.Name = "lblStatus"; this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(65, 20); this.lblStatus.Size = new System.Drawing.Size(65, 20);
this.lblStatus.TabIndex = 92; this.lblStatus.TabIndex = 92;
this.lblStatus.Text = "等待启动"; this.lblStatus.Text = "等待启动";
this.lblStatus.Visible = false;
// //
// lblWarnMsg // lblWarnMsg
// //
...@@ -260,9 +300,9 @@ ...@@ -260,9 +300,9 @@
this.lblWarnMsg.AutoEllipsis = true; this.lblWarnMsg.AutoEllipsis = true;
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(308, 3); this.lblWarnMsg.Location = new System.Drawing.Point(322, 3);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1036, 75); this.lblWarnMsg.Size = new System.Drawing.Size(1022, 75);
this.lblWarnMsg.TabIndex = 96; this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -326,50 +366,50 @@ ...@@ -326,50 +366,50 @@
// 启动AToolStripMenuItem // 启动AToolStripMenuItem
// //
this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem"; this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem";
this.启动AToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.启动AToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.启动AToolStripMenuItem.Text = "启动 "; this.启动AToolStripMenuItem.Text = "启动 ";
this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动AToolStripMenuItem_Click); this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动AToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(114, 6);
// //
// 复位RToolStripMenuItem // 复位RToolStripMenuItem
// //
this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem"; this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem";
this.复位RToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复位RToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.复位RToolStripMenuItem.Text = "复位"; this.复位RToolStripMenuItem.Text = "复位";
this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click); this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(114, 6);
// //
// 停止TToolStripMenuItem // 停止TToolStripMenuItem
// //
this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem"; this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem";
this.停止TToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.停止TToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.停止TToolStripMenuItem.Text = "停止"; this.停止TToolStripMenuItem.Text = "停止";
this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止TToolStripMenuItem_Click); this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止TToolStripMenuItem_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(114, 6);
// //
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.退出ToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.退出ToolStripMenuItem.Text = "退出"; this.退出ToolStripMenuItem.Text = "退出";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1); this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(114, 6);
this.toolStripSeparator2.Visible = false; this.toolStripSeparator2.Visible = false;
// //
// 设置TToolStripMenuItem // 设置TToolStripMenuItem
...@@ -387,31 +427,31 @@ ...@@ -387,31 +427,31 @@
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习"; this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click); this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6);
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem2.Size = new System.Drawing.Size(160, 26);
this.toolStripMenuItem2.Text = "AGV调试"; this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(157, 6);
// //
// 标签编辑ToolStripMenuItem // 标签编辑ToolStripMenuItem
// //
this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem"; this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem";
this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.标签编辑ToolStripMenuItem.Text = "标签编辑"; this.标签编辑ToolStripMenuItem.Text = "标签编辑";
this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click); this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click);
// //
...@@ -430,31 +470,31 @@ ...@@ -430,31 +470,31 @@
// 清空日志ToolStripMenuItem // 清空日志ToolStripMenuItem
// //
this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem"; this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem";
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.清空日志ToolStripMenuItem.Text = "清空日志"; this.清空日志ToolStripMenuItem.Text = "清空日志";
this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click); this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
this.toolStripSeparator10.Name = "toolStripSeparator10"; this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator10.Size = new System.Drawing.Size(141, 6);
// //
// 复制日志ToolStripMenuItem // 复制日志ToolStripMenuItem
// //
this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem"; this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem";
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复制日志ToolStripMenuItem.Text = "复制日志"; this.复制日志ToolStripMenuItem.Text = "复制日志";
this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click); this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
this.toolStripSeparator11.Name = "toolStripSeparator11"; this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator11.Size = new System.Drawing.Size(141, 6);
// //
// 版本号ToolStripMenuItem // 版本号ToolStripMenuItem
// //
this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem"; this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem";
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.版本号ToolStripMenuItem.Text = "关于软件"; this.版本号ToolStripMenuItem.Text = "关于软件";
this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click); this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click);
// //
...@@ -475,13 +515,13 @@ ...@@ -475,13 +515,13 @@
// lblXrayWork // lblXrayWork
// //
this.lblXrayWork.AutoSize = true; this.lblXrayWork.AutoSize = true;
this.lblXrayWork.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblXrayWork.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblXrayWork.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.lblXrayWork.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.lblXrayWork.Location = new System.Drawing.Point(17, 44); this.lblXrayWork.Location = new System.Drawing.Point(19, 41);
this.lblXrayWork.Name = "lblXrayWork"; this.lblXrayWork.Name = "lblXrayWork";
this.lblXrayWork.Size = new System.Drawing.Size(58, 22); this.lblXrayWork.Size = new System.Drawing.Size(259, 26);
this.lblXrayWork.TabIndex = 97; this.lblXrayWork.TabIndex = 97;
this.lblXrayWork.Text = "点料中"; this.lblXrayWork.Text = "警告:点料过程中,请勿开门";
this.lblXrayWork.Visible = false; this.lblXrayWork.Visible = false;
// //
// FrmRobotMain // FrmRobotMain
...@@ -507,6 +547,7 @@ ...@@ -507,6 +547,7 @@
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
...@@ -563,6 +604,9 @@ ...@@ -563,6 +604,9 @@
private System.Windows.Forms.ToolStripMenuItem 标签编辑ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 标签编辑ToolStripMenuItem;
private System.Windows.Forms.Label lblXrayWork; private System.Windows.Forms.Label lblXrayWork;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblCurrTray;
private System.Windows.Forms.Label lblOutTray;
private System.Windows.Forms.CheckBox chbOpenX;
} }
} }
...@@ -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";
......
...@@ -98,12 +98,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,12 +98,6 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.XW02_InDoorOpen)) else if (MoveInfo.IsStep(StepEnum.XW02_InDoorOpen))
{ {
// MoveInfo.NextMoveStep(StepEnum.XW03_StopCylinderDown);
// WorkLog("料盘处理:挡停下降");
// CylinderMove(MoveInfo, IO_Type.X_StopCylinder_Up, IO_Type.X_StopCylinder_Down);
//}
//else if (MoveInfo.IsStep(StepEnum.XW03_StopCylinderDown))
//{
MoveInfo.NextMoveStep(StepEnum.XW04_InLineRun); MoveInfo.NextMoveStep(StepEnum.XW04_InLineRun);
WorkLog("料盘处理:入口和中间皮带线转动,"); WorkLog("料盘处理:入口和中间皮带线转动,");
IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH); IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
...@@ -138,11 +132,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,11 +132,17 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.XW07_InLineStop)) else if (MoveInfo.IsStep(StepEnum.XW07_InLineStop))
{ {
if(Work_ReelInfo.PlateH<=0||String.IsNullOrEmpty(Work_ReelInfo.WareCode)) if (Work_ReelInfo.PlateH <= 0)
{ {
Work_ReelInfo.IsNgReel = true; Work_ReelInfo.IsNgReel = true;
MoveInfo.MoveParam.SetReelInfo(In_ReelInfo); Work_ReelInfo.NgMsg = "无高度信息";
} }
else if (String.IsNullOrEmpty(Work_ReelInfo.WareCode))
{
Work_ReelInfo.IsNgReel = true;
Work_ReelInfo.NgMsg = "无有效条码";
}
MoveInfo.MoveParam.SetReelInfo(In_ReelInfo);
//判断是否需要点料 //判断是否需要点料
if (Work_ReelInfo.IsNgReel) if (Work_ReelInfo.IsNgReel)
{ {
...@@ -153,12 +153,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,12 +153,11 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
MoveInfo.NextMoveStep(StepEnum.XW08_DoorClose); MoveInfo.NextMoveStep(StepEnum.XW08_DoorClose);
WorkLog("料盘处理:左侧门关闭,右侧门关闭,准备开始点料"); WorkLog("料盘处理:左侧门关闭,右侧门关闭,挡停放行,准备开始点料");
CylinderMove(MoveInfo, IO_Type.X_InDoor_Down, IO_Type.X_InDoor_Up); CylinderMove(MoveInfo, IO_Type.X_InDoor_Down, IO_Type.X_InDoor_Up);
CylinderMove(MoveInfo, IO_Type.X_OutDoor_Down, IO_Type.X_OutDoor_Up); CylinderMove(MoveInfo, IO_Type.X_OutDoor_Down, IO_Type.X_OutDoor_Up);
CylinderMove(MoveInfo, IO_Type.X_StopCylinder_Down, IO_Type.X_StopCylinder_Up);
} }
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Down, IO_VALUE.HIGH));
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.X_DoorLimit_Up, IO_VALUE.HIGH));
} }
...@@ -166,16 +165,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -166,16 +165,28 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.XW08_DoorClose)) else if (MoveInfo.IsStep(StepEnum.XW08_DoorClose))
{ {
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.HIGH)) if (!OpenXLine)
{
MoveInfo.NextMoveStep(StepEnum.XW15_GetResult);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
int count = 99999;
InXWork = false;
WorkLog("点料:未启用X射线点料,模拟点料结果:" + count + "");
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count;
}
}
else if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(StepEnum.XW11_StartCount); MoveInfo.NextMoveStep(StepEnum.XW11_StartCount);
WorkLog("料盘处理:开始点料,等待X射线可以启动"); WorkLog("点料:启用X射线点料,等待X射线可以启动");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InXWork = true;
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
{ {
WarnMsg = MoveInfo.Name +"["+MoveInfo.MoveStep+"]"+ "等待 X互锁信号打开 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]" + "等待 X互锁信号打开 超时[" + FormUtil.GetSpanStr(MoveInfo.StepSpan()) + "]";
LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType); LogUtil.error(WarnMsg, SecMoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -184,10 +195,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -184,10 +195,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (xRayCanStart) if (xRayCanStart)
{ {
MoveInfo.NextMoveStep(StepEnum.XW12_XRayStart); XW12_XRayStart();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
bool result = xRay.Start();
WorkLog("料盘处理:启动X射线["+result+"],等待1秒");
} }
else if (MoveInfo.IsTimeOut(120)) else if (MoveInfo.IsTimeOut(120))
...@@ -199,55 +207,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,55 +207,13 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(StepEnum.XW12_XRayStart)) else if (MoveInfo.IsStep(StepEnum.XW12_XRayStart))
{ {
MoveInfo.NextMoveStep(StepEnum.XW13_GetXRayImage); XW13_GetXRayImage();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(8000));
WorkLog("点料:开始获取X射线图形 ");
string lastData = DateTime.Now.ToString("yyyy-MM-dd");
ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
carerayImage.GetImage();
carerayImage.WindowWidth = Config.WindowWidth;
carerayImage.WindowLevel = Config.WindowLevel;
Bitmap bmp = carerayImage.Get48bImage();
string fileP = Application.StartupPath + @"\XRAY\tif\" + DateTime.Now.ToString("HHmmss") + ".png";
bmp.Save(fileP, System.Drawing.Imaging.ImageFormat.Png);
WorkLog("点料:获取X射线图形,并保存到: " + fileP + ",记录时间"+ lastData + ",停止X射线");
GetImageEvent?.Invoke(bmp);
bool result = xRay.Stop();
if (!result)
{
LogUtil.error(" xRay.Stop()失败:" + result);
}
MoveInfo.EndStepWait();
} }
else if (MoveInfo.IsStep(StepEnum.XW13_GetXRayImage)) else if (MoveInfo.IsStep(StepEnum.XW13_GetXRayImage))
{ {
MoveInfo.NextMoveStep(StepEnum.XW15_GetResult); XW15_GetResult();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (xRay.IsRayOpen)
{
xRay.Stop();
}
int count = 99999;
countImage.GetCount(out count);
InXWork = false;
WorkLog("点料:获取点料结果,【" + count + "】,保存并上传结果");
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count;
}
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
Task.Factory.StartNew(delegate
{
string msg = "暂不上传";
// string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount);
if (!String.IsNullOrEmpty(msg))
{
LogUtil.error(Name + "上传【" + MoveInfo.MoveParam.OutStr() + "】点料结果失败:" + msg);
}
});
} }
else if (MoveInfo.IsStep(StepEnum.XW15_GetResult)) else if (MoveInfo.IsStep(StepEnum.XW15_GetResult))
{ {
...@@ -324,8 +290,119 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,8 +290,119 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void XW12_XRayStart()
{
MoveInfo.NextMoveStep(StepEnum.XW12_XRayStart);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InXWork = true;
bool result = xRay.Start();
WorkLog("料盘处理:启动X射线[" + result + "],等待1秒");
}
private string lastFileName = "";
private void XW13_GetXRayImage()
{
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.LOW))
{
LogUtil.error("XW13_GetXRayImage 方法,X_Lock_On=LOW,直接返回");
return;
}
MoveInfo.NextMoveStep(StepEnum.XW13_GetXRayImage);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(8000));
WorkLog("点料:清理"+path1_tif+"内容,开始获取X射线图形 ");
string lastData = DateTime.Now.ToString("yyyy-MM-dd");
ConfigAppSettings.SaveValue(Setting_Init.XRay_Data, lastData);
ClearFilePath();
carerayImage.GetImage();
carerayImage.WindowWidth = Config.WindowWidth;
carerayImage.WindowLevel = Config.WindowLevel;
Bitmap bmp = carerayImage.Get48bImage();
lastFileName= DateTime.Now.ToString("yyyyMMddHHmmss") + ".png";
string fileP = path1_tif +@"\"+ lastFileName;
bmp.Save(fileP, System.Drawing.Imaging.ImageFormat.Png);
WorkLog("点料:获取X射线图形,保存到: " + fileP + ",记录时间" + lastData + ",停止X射线");
GetImageEvent?.Invoke(bmp);
bool result = xRay.Stop();
if (!result)
{
if (!result)
{
LogUtil.error(" xRay.Stop() 第一次失败,再次调用Stop");
result = xRay.Stop();
}
LogUtil.error(" xRay.Stop()失败:" + result);
}
MoveInfo.EndStepWait();
}
private void XW15_GetResult()
{
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.LOW))
{
LogUtil.error("XW15_GetResult 方法,X_Lock_On=LOW,直接返回");
return;
}
MoveInfo.NextMoveStep(StepEnum.XW15_GetResult);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(9000));
if (xRay.IsRayOpen)
{
xRay.Stop();
}
int count = 99999;
countImage.GetCount(out count);
InXWork = false;
WorkLog("点料:获取点料结果,【" + count + "】,保存并上传结果");
if (Work_ReelInfo.WareCount <= 0)
{
MoveInfo.MoveParam.WareCount = count;
Work_ReelInfo.WareCount = count;
}
Task.Factory.StartNew(delegate
{
string msg = "暂不上传";
// string msg= SServerManager.Return_Material(Name, MoveInfo.MoveParam.WareCode, Work_ReelInfo.WareCount);
if (!String.IsNullOrEmpty(msg))
{
LogUtil.error(Name + "上传【" + MoveInfo.MoveParam.OutStr() + "】点料结果失败:" + msg);
}
});
string outF = path3_out +@"\"+ lastFileName;
if (System.IO.File.Exists(outF))
{
WorkLog("点料:读取结果图片【" + outF + "】");
Bitmap img = (Bitmap)Image.FromFile(outF).Clone();
GetImageEvent?.Invoke(img);
}
else
{
LogUtil.error("点料:未找到结果图片【" + outF + "】");
}
MoveInfo.EndStepWait();
}
private void ClearFilePath()
{
try
{
System.IO.Directory.Delete(path1_tif, true);
}
catch (Exception ex)
{
LogUtil.error("清除文件夹【" + path1_tif + "】内容出错:" + ex.ToString());
}
try
{
System.IO.Directory.CreateDirectory(path1_tif);
}
catch (Exception ex)
{
LogUtil.error("创建文件夹【" + path1_tif + "】出错:" + ex.ToString());
}
}
private bool IsInStoreNeed() private bool IsInStoreNeed()
{ {
......
...@@ -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!