Commit 56fbbcf6 张东亮

扫码检查只有一个条码且是否是CB开头

1 个父辈 0b5d64bf
...@@ -142,6 +142,7 @@ namespace DeviceLibrary ...@@ -142,6 +142,7 @@ namespace DeviceLibrary
Line.Pause(); Line.Pause();
//Lift.Pause(); //Lift.Pause();
} }
if(!ok)
Msg.add(Name + "正面安全光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(Name + "正面安全光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning);
} }
...@@ -152,7 +153,8 @@ namespace DeviceLibrary ...@@ -152,7 +153,8 @@ namespace DeviceLibrary
ok = false; ok = false;
Line.Pause(); Line.Pause();
} }
Msg.add(Name + "侧面光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning); if (!ok)
Msg.add(Name + "侧面光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning);
} }
if (ok) if (ok)
......
...@@ -131,7 +131,7 @@ namespace DeviceLibrary ...@@ -131,7 +131,7 @@ namespace DeviceLibrary
else else
{ {
var codes = x.Select((a) => a.CodeStr); var codes = x.Select((a) => a.CodeStr);
if (codes.Any(s => !string.IsNullOrEmpty(s) && s.ToUpper().StartsWith("CB"))) if (x.Count == 1 && codes.Any(s => !string.IsNullOrEmpty(s) && s.ToUpper().StartsWith("CB")))
{ {
MoveInfo.NextMoveStep(MoveStep.In05); MoveInfo.NextMoveStep(MoveStep.In05);
Lift.LiftDown(MoveInfo); Lift.LiftDown(MoveInfo);
......
...@@ -304,15 +304,15 @@ namespace DeviceLibrary ...@@ -304,15 +304,15 @@ namespace DeviceLibrary
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
break; break;
case MoveStep.H03_HomeReset: case MoveStep.H03_HomeReset:
if (IOMonitor.IODebound(IO_Type.SideA_ForkMaterial_Check,Config, IO_VALUE.LOW,2000)&& if (IOMonitor.IODebound(IO_Type.SideA_ForkMaterial_Check, Config, IO_VALUE.LOW, 2000) &&
IOMonitor.IODebound(IO_Type.SideB_ForkMaterial_Check,Config,IO_VALUE.LOW,2000)) IOMonitor.IODebound(IO_Type.SideB_ForkMaterial_Check, Config, IO_VALUE.LOW, 2000))
{ {
ResetMoveInfo.NextMoveStep(MoveStep.H04_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H04_HomeReset);
YAxis.HomeMove(ResetMoveInfo, forceHome); YAxis.HomeMove(ResetMoveInfo, forceHome);
ResetMoveInfo.log("正在回原 ,升降轴,回原"); ResetMoveInfo.log("正在回原 ,升降轴,回原");
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
} }
else if(ResetMoveInfo.IsTimeOut(6)) else if (ResetMoveInfo.IsTimeOut(6))
{ {
Msg.add("存储机构取料暂停", MsgLevel.warning);//伸缩叉2侧X06/X07检测到有物料无法继续 Msg.add("存储机构取料暂停", MsgLevel.warning);//伸缩叉2侧X06/X07检测到有物料无法继续
RobotManage.UserPause("再次确认回原时料叉上是否有料"); RobotManage.UserPause("再次确认回原时料叉上是否有料");
...@@ -430,7 +430,8 @@ namespace DeviceLibrary ...@@ -430,7 +430,8 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("前门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); if (!ok)
Msg.add("前门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.BackDoor_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.BackDoor_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -439,7 +440,8 @@ namespace DeviceLibrary ...@@ -439,7 +440,8 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("后门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); if (!ok)
Msg.add("后门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning);
} }
if (!lastSafeCheckStatus && ok) if (!lastSafeCheckStatus && ok)
{ {
......
...@@ -72,7 +72,7 @@ namespace TheMachine ...@@ -72,7 +72,7 @@ namespace TheMachine
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2); this.menuStrip1.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(1008, 35); this.menuStrip1.Size = new System.Drawing.Size(1904, 29);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
...@@ -86,38 +86,38 @@ namespace TheMachine ...@@ -86,38 +86,38 @@ namespace TheMachine
this.退出ToolStripMenuItem}); this.退出ToolStripMenuItem});
this.设备操作ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.设备操作ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.设备操作ToolStripMenuItem.Name = "设备操作ToolStripMenuItem"; this.设备操作ToolStripMenuItem.Name = "设备操作ToolStripMenuItem";
this.设备操作ToolStripMenuItem.Size = new System.Drawing.Size(106, 31); this.设备操作ToolStripMenuItem.Size = new System.Drawing.Size(86, 25);
this.设备操作ToolStripMenuItem.Text = "设备操作"; this.设备操作ToolStripMenuItem.Text = "设备操作";
// //
// 启用调试模式ToolStripMenuItem // 启用调试模式ToolStripMenuItem
// //
this.启用调试模式ToolStripMenuItem.Enabled = false; this.启用调试模式ToolStripMenuItem.Enabled = false;
this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem"; this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem";
this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(238, 32); this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(192, 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);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(235, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(189, 6);
// //
// 二维码识别调试ToolStripMenuItem // 二维码识别调试ToolStripMenuItem
// //
this.二维码识别调试ToolStripMenuItem.Name = "二维码识别调试ToolStripMenuItem"; this.二维码识别调试ToolStripMenuItem.Name = "二维码识别调试ToolStripMenuItem";
this.二维码识别调试ToolStripMenuItem.Size = new System.Drawing.Size(238, 32); this.二维码识别调试ToolStripMenuItem.Size = new System.Drawing.Size(192, 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);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(235, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(189, 6);
// //
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(238, 32); this.退出ToolStripMenuItem.Size = new System.Drawing.Size(192, 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);
// //
...@@ -125,7 +125,7 @@ namespace TheMachine ...@@ -125,7 +125,7 @@ namespace TheMachine
// //
this.关于ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); this.关于ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem"; this.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.关于ToolStripMenuItem.Size = new System.Drawing.Size(66, 31); this.关于ToolStripMenuItem.Size = new System.Drawing.Size(54, 25);
this.关于ToolStripMenuItem.Text = "关于"; this.关于ToolStripMenuItem.Text = "关于";
this.关于ToolStripMenuItem.Click += new System.EventHandler(this.关于ToolStripMenuItem_Click); this.关于ToolStripMenuItem.Click += new System.EventHandler(this.关于ToolStripMenuItem_Click);
// //
...@@ -136,10 +136,10 @@ namespace TheMachine ...@@ -136,10 +136,10 @@ namespace TheMachine
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(0, 90); this.tabControl1.Location = new System.Drawing.Point(0, 351);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1008, 639); this.tabControl1.Size = new System.Drawing.Size(1904, 678);
this.tabControl1.TabIndex = 1; this.tabControl1.TabIndex = 1;
// //
// tabPage1 // tabPage1
...@@ -155,9 +155,9 @@ namespace TheMachine ...@@ -155,9 +155,9 @@ namespace TheMachine
this.tabPage1.Controls.Add(this.cb_IgnoreGratingSignal); this.tabPage1.Controls.Add(this.cb_IgnoreGratingSignal);
this.tabPage1.Controls.Add(this.cb_IgnoreSafecheck); this.tabPage1.Controls.Add(this.cb_IgnoreSafecheck);
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 36); this.tabPage1.Location = new System.Drawing.Point(4, 30);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(1000, 599); this.tabPage1.Size = new System.Drawing.Size(1896, 644);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "信息"; this.tabPage1.Text = "信息";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
...@@ -193,7 +193,7 @@ namespace TheMachine ...@@ -193,7 +193,7 @@ namespace TheMachine
// pictureBox2 // pictureBox2
// //
this.pictureBox2.BackColor = System.Drawing.Color.Gainsboro; this.pictureBox2.BackColor = System.Drawing.Color.Gainsboro;
this.pictureBox2.Location = new System.Drawing.Point(479, 314); this.pictureBox2.Location = new System.Drawing.Point(479, 350);
this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(463, 283); this.pictureBox2.Size = new System.Drawing.Size(463, 283);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
...@@ -206,7 +206,7 @@ namespace TheMachine ...@@ -206,7 +206,7 @@ namespace TheMachine
// pictureBox1 // pictureBox1
// //
this.pictureBox1.BackColor = System.Drawing.Color.Gainsboro; this.pictureBox1.BackColor = System.Drawing.Color.Gainsboro;
this.pictureBox1.Location = new System.Drawing.Point(10, 314); this.pictureBox1.Location = new System.Drawing.Point(10, 350);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(463, 283); this.pictureBox1.Size = new System.Drawing.Size(463, 283);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
...@@ -256,7 +256,7 @@ namespace TheMachine ...@@ -256,7 +256,7 @@ namespace TheMachine
this.cb_EnableBuzzer.AutoSize = true; this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(657, 16); this.cb_EnableBuzzer.Location = new System.Drawing.Point(657, 16);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer"; this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(134, 31); this.cb_EnableBuzzer.Size = new System.Drawing.Size(109, 25);
this.cb_EnableBuzzer.TabIndex = 5; this.cb_EnableBuzzer.TabIndex = 5;
this.cb_EnableBuzzer.Text = "使用蜂鸣器"; this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true; this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
...@@ -267,7 +267,7 @@ namespace TheMachine ...@@ -267,7 +267,7 @@ namespace TheMachine
this.cb_IgnoreGratingSignal.AutoSize = true; this.cb_IgnoreGratingSignal.AutoSize = true;
this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(657, 78); this.cb_IgnoreGratingSignal.Location = new System.Drawing.Point(657, 78);
this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal"; this.cb_IgnoreGratingSignal.Name = "cb_IgnoreGratingSignal";
this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(154, 31); this.cb_IgnoreGratingSignal.Size = new System.Drawing.Size(125, 25);
this.cb_IgnoreGratingSignal.TabIndex = 2; this.cb_IgnoreGratingSignal.TabIndex = 2;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅"; this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true; this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
...@@ -278,7 +278,7 @@ namespace TheMachine ...@@ -278,7 +278,7 @@ namespace TheMachine
this.cb_IgnoreSafecheck.AutoSize = true; this.cb_IgnoreSafecheck.AutoSize = true;
this.cb_IgnoreSafecheck.Location = new System.Drawing.Point(657, 47); this.cb_IgnoreSafecheck.Location = new System.Drawing.Point(657, 47);
this.cb_IgnoreSafecheck.Name = "cb_IgnoreSafecheck"; this.cb_IgnoreSafecheck.Name = "cb_IgnoreSafecheck";
this.cb_IgnoreSafecheck.Size = new System.Drawing.Size(268, 31); this.cb_IgnoreSafecheck.Size = new System.Drawing.Size(215, 25);
this.cb_IgnoreSafecheck.TabIndex = 2; this.cb_IgnoreSafecheck.TabIndex = 2;
this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)"; this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)";
this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true; this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true;
...@@ -300,10 +300,10 @@ namespace TheMachine ...@@ -300,10 +300,10 @@ namespace TheMachine
this.stateView.Dock = System.Windows.Forms.DockStyle.Fill; this.stateView.Dock = System.Windows.Forms.DockStyle.Fill;
this.stateView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.stateView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.stateView.HideSelection = false; this.stateView.HideSelection = false;
this.stateView.Location = new System.Drawing.Point(3, 30); this.stateView.Location = new System.Drawing.Point(3, 25);
this.stateView.MultiSelect = false; this.stateView.MultiSelect = false;
this.stateView.Name = "stateView"; this.stateView.Name = "stateView";
this.stateView.Size = new System.Drawing.Size(605, 259); this.stateView.Size = new System.Drawing.Size(605, 264);
this.stateView.TabIndex = 0; this.stateView.TabIndex = 0;
this.stateView.UseCompatibleStateImageBehavior = false; this.stateView.UseCompatibleStateImageBehavior = false;
// //
...@@ -314,11 +314,11 @@ namespace TheMachine ...@@ -314,11 +314,11 @@ namespace TheMachine
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.listView1.HideSelection = false; this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(411, 0); this.listView1.Location = new System.Drawing.Point(4, 85);
this.listView1.MultiSelect = false; this.listView1.MultiSelect = false;
this.listView1.Name = "listView1"; this.listView1.Name = "listView1";
this.listView1.ShowGroups = false; this.listView1.ShowGroups = false;
this.listView1.Size = new System.Drawing.Size(597, 118); this.listView1.Size = new System.Drawing.Size(1888, 260);
this.listView1.TabIndex = 2; this.listView1.TabIndex = 2;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
// //
...@@ -347,10 +347,10 @@ namespace TheMachine ...@@ -347,10 +347,10 @@ namespace TheMachine
// //
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1008, 729); this.ClientSize = new System.Drawing.Size(1904, 1041);
this.Controls.Add(this.listView1); this.Controls.Add(this.listView1);
this.Controls.Add(this.btn_stop); this.Controls.Add(this.btn_stop);
this.Controls.Add(this.btn_run); this.Controls.Add(this.btn_run);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!