20230406Change1
This commit is contained in:
parent
fd04fc4ea0
commit
8a92dd3eea
@ -278,7 +278,7 @@ namespace BRS.Process.A020
|
||||
{
|
||||
Mat SrcImage = image.Clone();
|
||||
// 固定路径的模板图像
|
||||
Mat Image = Cv2.ImRead(@"D:\MelsecPLCReadWrite\Bk\Image\1.png");
|
||||
Mat Image = Cv2.ImRead(@"D:\MelsecPLCReadWrite\Bk\20230330\1.png");
|
||||
Mat TempleteImage = Image.Clone();
|
||||
|
||||
// Point[][] contours1 = new Point[][] { };
|
||||
@ -466,29 +466,30 @@ namespace BRS.Process.A020
|
||||
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Restart();
|
||||
Mat Image = Cv2.ImRead(@"D:\MelsecPLCReadWrite\Bk\Image\1.png");
|
||||
|
||||
#if true
|
||||
genCalibratePts1();
|
||||
stopWatch2.Stop();
|
||||
Console.WriteLine(DateTime.Now + "==========配置=================" + stopWatch2.ElapsedMilliseconds + "===========================");
|
||||
|
||||
//MyPoint ssw = new MyPoint();
|
||||
|
||||
Mat Image = Cv2.ImRead(@"D:\MelsecPLCReadWrite\Bk\Image\1.png");
|
||||
List<MyPoint> resultPoint = new List<MyPoint>();
|
||||
|
||||
Mat _mat = dd.Clone();
|
||||
string ss = "D:\\QT1\\" + DateTime.Now.ToString("HHmmssfff") + ".jpg";
|
||||
string ss = "D:\\QT\\" + DateTime.Now.ToString("HHmmssfff") + ".jpg";
|
||||
Cv2.ImWrite(ss, _mat);
|
||||
|
||||
GetScrew(Image, resultPoint);
|
||||
|
||||
MyPoint ssw3 = resultPoint[0];
|
||||
Mat _mat2 = AloghitomMat(_mat, ref ssw3);//根据拍摄的白纸定标图片确定二维到三维转换的关系
|
||||
|
||||
//Mat _mat2 = AloghitomMat(_mat, ref ssw3);//根据拍摄的白纸定标图片确定二维到三维转换的关系
|
||||
|
||||
ssw1 = Interpolation(VP, VR, ssw3, true);//实际坐标值
|
||||
|
||||
string ss2 = "D:\\QT\\" + DateTime.Now.ToString("HHmmssfff") + ".jpg";
|
||||
Cv2.ImWrite(ss2, _mat2);
|
||||
//Cv2.ImWrite(ss2, _mat2);
|
||||
stopWatch.Stop();
|
||||
Console.WriteLine(DateTime.Now + "==========标定算法=================" + stopWatch.ElapsedMilliseconds + "===========================");
|
||||
|
||||
@ -885,13 +886,15 @@ namespace BRS.Process.A020
|
||||
while (true)
|
||||
{
|
||||
if ("0" == ProcessReadInt(MelsecPLC, "D65", "int"))
|
||||
break;
|
||||
else
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
{
|
||||
ShaftOperateOnce(MelsecPLC, "D57", 500);//自动拧紧螺丝标志位先置1,0.5s后置0
|
||||
ProcessWriteInt(MelsecPLC, "D171", "int", "200");
|
||||
ProcessWriteInt(MelsecPLC, "D167", "int", "50000");
|
||||
break;
|
||||
}
|
||||
else
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
@ -931,7 +934,6 @@ namespace BRS.Process.A020
|
||||
}
|
||||
Thread.Sleep(3000);
|
||||
ProcessStatus = ProcessStatus.Init;
|
||||
|
||||
}
|
||||
break;
|
||||
case ProcessStatus.Warning:
|
||||
@ -945,10 +947,7 @@ namespace BRS.Process.A020
|
||||
}
|
||||
});
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
|
||||
});
|
||||
LogAsync(DateTime.Now, LogLevel.Action, "流程启动完成!");
|
||||
PubSubCenter.GetInstance().Publish(PubSubCenterMessageType.IsProcessOpened.ToString(), true, null);
|
||||
return new ProcessResponse(true);
|
||||
|
272
src/BRS.Process.A020/UI/ContorlShaft.Designer.cs
generated
272
src/BRS.Process.A020/UI/ContorlShaft.Designer.cs
generated
@ -71,14 +71,24 @@ namespace BRS.Process.A020.UI
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.LightSeries = new Sunny.UI.UIPanel();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.RobotAStatus = new BRS.Process.A020.UI.CircleButton();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.ManualLight = new BRS.Process.A020.UI.CircleButton();
|
||||
this.AutoLight = new BRS.Process.A020.UI.CircleButton();
|
||||
this.MoveStateLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.StopStateLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ToughLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.LoosenLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.uiPanel2 = new Sunny.UI.UIPanel();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.AutoBtn1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ManualBtn1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ESBtn = new BRS.Process.A020.UI.CircleButton();
|
||||
this.TestBtn = new Sunny.UI.UIButton();
|
||||
this.AutoLoosenBtn = new Sunny.UI.UIButton();
|
||||
this.AutoToughBtn = new Sunny.UI.UIButton();
|
||||
@ -88,16 +98,6 @@ namespace BRS.Process.A020.UI
|
||||
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.uiButton1 = new Sunny.UI.UIButton();
|
||||
this.timer2 = new System.Windows.Forms.Timer(this.components);
|
||||
this.RobotAStatus = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ManualLight = new BRS.Process.A020.UI.CircleButton();
|
||||
this.AutoLight = new BRS.Process.A020.UI.CircleButton();
|
||||
this.MoveStateLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.StopStateLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ToughLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.LoosenLight1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.AutoBtn1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ManualBtn1 = new BRS.Process.A020.UI.CircleButton();
|
||||
this.ESBtn = new BRS.Process.A020.UI.CircleButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart2)).BeginInit();
|
||||
this.uiPanel1.SuspendLayout();
|
||||
this.uiPanel3.SuspendLayout();
|
||||
@ -236,6 +236,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
this.uiPanel1.Controls.Add(this.uiPanel3);
|
||||
this.uiPanel1.Controls.Add(this.BtnSeries);
|
||||
this.uiPanel1.Controls.Add(this.ESBtn);
|
||||
this.uiPanel1.Controls.Add(this.ParameterSetting);
|
||||
this.uiPanel1.Controls.Add(this.LightSeries);
|
||||
this.uiPanel1.Controls.Add(this.uiPanel2);
|
||||
@ -306,11 +307,11 @@ namespace BRS.Process.A020.UI
|
||||
this.BtnSeries.Controls.Add(this.AutoLoosenBtn1);
|
||||
this.BtnSeries.Controls.Add(this.ManualToughBtn);
|
||||
this.BtnSeries.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.BtnSeries.Location = new System.Drawing.Point(352, 152);
|
||||
this.BtnSeries.Location = new System.Drawing.Point(526, 180);
|
||||
this.BtnSeries.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.BtnSeries.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.BtnSeries.Name = "BtnSeries";
|
||||
this.BtnSeries.Size = new System.Drawing.Size(367, 394);
|
||||
this.BtnSeries.Size = new System.Drawing.Size(363, 366);
|
||||
this.BtnSeries.TabIndex = 40;
|
||||
this.BtnSeries.Text = null;
|
||||
this.BtnSeries.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -323,7 +324,7 @@ namespace BRS.Process.A020.UI
|
||||
this.label13.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label13.Location = new System.Drawing.Point(0, 0);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(367, 47);
|
||||
this.label13.Size = new System.Drawing.Size(363, 47);
|
||||
this.label13.TabIndex = 37;
|
||||
this.label13.Text = "操作按钮";
|
||||
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -347,7 +348,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
this.AutoToughBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoToughBtn1.Font = new System.Drawing.Font("微软雅黑", 18F);
|
||||
this.AutoToughBtn1.Location = new System.Drawing.Point(192, 85);
|
||||
this.AutoToughBtn1.Location = new System.Drawing.Point(183, 85);
|
||||
this.AutoToughBtn1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.AutoToughBtn1.Name = "AutoToughBtn1";
|
||||
this.AutoToughBtn1.Size = new System.Drawing.Size(170, 110);
|
||||
@ -361,7 +362,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
this.AutoLoosenBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoLoosenBtn1.Font = new System.Drawing.Font("微软雅黑", 18F);
|
||||
this.AutoLoosenBtn1.Location = new System.Drawing.Point(192, 223);
|
||||
this.AutoLoosenBtn1.Location = new System.Drawing.Point(183, 223);
|
||||
this.AutoLoosenBtn1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.AutoLoosenBtn1.Name = "AutoLoosenBtn1";
|
||||
this.AutoLoosenBtn1.Size = new System.Drawing.Size(170, 110);
|
||||
@ -402,11 +403,11 @@ namespace BRS.Process.A020.UI
|
||||
this.ParameterSetting.Controls.Add(this.textBox3);
|
||||
this.ParameterSetting.Controls.Add(this.label8);
|
||||
this.ParameterSetting.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.ParameterSetting.Location = new System.Drawing.Point(12, 152);
|
||||
this.ParameterSetting.Location = new System.Drawing.Point(227, 180);
|
||||
this.ParameterSetting.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.ParameterSetting.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.ParameterSetting.Name = "ParameterSetting";
|
||||
this.ParameterSetting.Size = new System.Drawing.Size(338, 394);
|
||||
this.ParameterSetting.Size = new System.Drawing.Size(292, 366);
|
||||
this.ParameterSetting.TabIndex = 39;
|
||||
this.ParameterSetting.Text = null;
|
||||
this.ParameterSetting.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -419,7 +420,7 @@ namespace BRS.Process.A020.UI
|
||||
this.label10.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label10.Location = new System.Drawing.Point(0, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(338, 47);
|
||||
this.label10.Size = new System.Drawing.Size(292, 47);
|
||||
this.label10.TabIndex = 36;
|
||||
this.label10.Text = "参数设置";
|
||||
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -428,7 +429,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
this.OKBtn.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.OKBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.OKBtn.Location = new System.Drawing.Point(263, 324);
|
||||
this.OKBtn.Location = new System.Drawing.Point(213, 323);
|
||||
this.OKBtn.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.OKBtn.Name = "OKBtn";
|
||||
this.OKBtn.Size = new System.Drawing.Size(70, 31);
|
||||
@ -440,7 +441,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(162, 78);
|
||||
this.textBox1.Location = new System.Drawing.Point(149, 78);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(134, 30);
|
||||
@ -463,7 +464,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
this.ResettingBtn.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ResettingBtn.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.ResettingBtn.Location = new System.Drawing.Point(187, 324);
|
||||
this.ResettingBtn.Location = new System.Drawing.Point(137, 323);
|
||||
this.ResettingBtn.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.ResettingBtn.Name = "ResettingBtn";
|
||||
this.ResettingBtn.Size = new System.Drawing.Size(70, 31);
|
||||
@ -486,7 +487,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(162, 260);
|
||||
this.textBox5.Location = new System.Drawing.Point(149, 260);
|
||||
this.textBox5.Multiline = true;
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(134, 30);
|
||||
@ -496,7 +497,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(162, 127);
|
||||
this.textBox2.Location = new System.Drawing.Point(149, 127);
|
||||
this.textBox2.Multiline = true;
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(134, 30);
|
||||
@ -528,7 +529,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(162, 217);
|
||||
this.textBox4.Location = new System.Drawing.Point(149, 217);
|
||||
this.textBox4.Multiline = true;
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(134, 30);
|
||||
@ -538,7 +539,7 @@ namespace BRS.Process.A020.UI
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(162, 172);
|
||||
this.textBox3.Location = new System.Drawing.Point(149, 172);
|
||||
this.textBox3.Multiline = true;
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(134, 30);
|
||||
@ -574,11 +575,11 @@ namespace BRS.Process.A020.UI
|
||||
this.LightSeries.Controls.Add(this.label3);
|
||||
this.LightSeries.Controls.Add(this.label4);
|
||||
this.LightSeries.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.LightSeries.Location = new System.Drawing.Point(219, 0);
|
||||
this.LightSeries.Location = new System.Drawing.Point(225, 0);
|
||||
this.LightSeries.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.LightSeries.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.LightSeries.Name = "LightSeries";
|
||||
this.LightSeries.Size = new System.Drawing.Size(819, 153);
|
||||
this.LightSeries.Size = new System.Drawing.Size(813, 153);
|
||||
this.LightSeries.TabIndex = 38;
|
||||
this.LightSeries.Text = null;
|
||||
this.LightSeries.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -595,6 +596,17 @@ namespace BRS.Process.A020.UI
|
||||
this.label15.Text = "机械臂\r\n连接状态";
|
||||
this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// RobotAStatus
|
||||
//
|
||||
this.RobotAStatus.BackColor = System.Drawing.Color.Gray;
|
||||
this.RobotAStatus.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.RobotAStatus.Enabled = false;
|
||||
this.RobotAStatus.Location = new System.Drawing.Point(706, 7);
|
||||
this.RobotAStatus.Name = "RobotAStatus";
|
||||
this.RobotAStatus.Size = new System.Drawing.Size(90, 90);
|
||||
this.RobotAStatus.TabIndex = 28;
|
||||
this.RobotAStatus.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
@ -617,6 +629,64 @@ namespace BRS.Process.A020.UI
|
||||
this.label11.Text = "自动拧紧状态\r\n指示灯";
|
||||
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// ManualLight
|
||||
//
|
||||
this.ManualLight.BackColor = System.Drawing.Color.Gray;
|
||||
this.ManualLight.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ManualLight.Enabled = false;
|
||||
this.ManualLight.Location = new System.Drawing.Point(549, 7);
|
||||
this.ManualLight.Name = "ManualLight";
|
||||
this.ManualLight.Size = new System.Drawing.Size(90, 90);
|
||||
this.ManualLight.TabIndex = 25;
|
||||
this.ManualLight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// AutoLight
|
||||
//
|
||||
this.AutoLight.BackColor = System.Drawing.Color.Gray;
|
||||
this.AutoLight.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoLight.Enabled = false;
|
||||
this.AutoLight.Location = new System.Drawing.Point(437, 7);
|
||||
this.AutoLight.Name = "AutoLight";
|
||||
this.AutoLight.Size = new System.Drawing.Size(90, 90);
|
||||
this.AutoLight.TabIndex = 24;
|
||||
this.AutoLight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// MoveStateLight1
|
||||
//
|
||||
this.MoveStateLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.MoveStateLight1.Location = new System.Drawing.Point(17, 7);
|
||||
this.MoveStateLight1.Name = "MoveStateLight1";
|
||||
this.MoveStateLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.MoveStateLight1.TabIndex = 3;
|
||||
this.MoveStateLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// StopStateLight1
|
||||
//
|
||||
this.StopStateLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.StopStateLight1.Location = new System.Drawing.Point(117, 7);
|
||||
this.StopStateLight1.Name = "StopStateLight1";
|
||||
this.StopStateLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.StopStateLight1.TabIndex = 15;
|
||||
this.StopStateLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// ToughLight1
|
||||
//
|
||||
this.ToughLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.ToughLight1.Location = new System.Drawing.Point(217, 7);
|
||||
this.ToughLight1.Name = "ToughLight1";
|
||||
this.ToughLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.ToughLight1.TabIndex = 16;
|
||||
this.ToughLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// LoosenLight1
|
||||
//
|
||||
this.LoosenLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.LoosenLight1.Location = new System.Drawing.Point(326, 7);
|
||||
this.LoosenLight1.Name = "LoosenLight1";
|
||||
this.LoosenLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.LoosenLight1.TabIndex = 17;
|
||||
this.LoosenLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
@ -666,13 +736,12 @@ namespace BRS.Process.A020.UI
|
||||
this.uiPanel2.Controls.Add(this.label14);
|
||||
this.uiPanel2.Controls.Add(this.AutoBtn1);
|
||||
this.uiPanel2.Controls.Add(this.ManualBtn1);
|
||||
this.uiPanel2.Controls.Add(this.ESBtn);
|
||||
this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.uiPanel2.Location = new System.Drawing.Point(721, 152);
|
||||
this.uiPanel2.Location = new System.Drawing.Point(896, 180);
|
||||
this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||
this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiPanel2.Name = "uiPanel2";
|
||||
this.uiPanel2.Size = new System.Drawing.Size(317, 394);
|
||||
this.uiPanel2.Size = new System.Drawing.Size(142, 366);
|
||||
this.uiPanel2.TabIndex = 37;
|
||||
this.uiPanel2.Text = null;
|
||||
this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -685,11 +754,47 @@ namespace BRS.Process.A020.UI
|
||||
this.label14.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label14.Location = new System.Drawing.Point(0, 0);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(317, 47);
|
||||
this.label14.Size = new System.Drawing.Size(142, 47);
|
||||
this.label14.TabIndex = 38;
|
||||
this.label14.Text = "操作按钮";
|
||||
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// AutoBtn1
|
||||
//
|
||||
this.AutoBtn1.BackColor = System.Drawing.Color.Gray;
|
||||
this.AutoBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoBtn1.Location = new System.Drawing.Point(15, 85);
|
||||
this.AutoBtn1.Name = "AutoBtn1";
|
||||
this.AutoBtn1.Size = new System.Drawing.Size(112, 112);
|
||||
this.AutoBtn1.TabIndex = 18;
|
||||
this.AutoBtn1.Text = "自动按钮";
|
||||
this.AutoBtn1.UseVisualStyleBackColor = false;
|
||||
this.AutoBtn1.Click += new System.EventHandler(this.AutoBtn1_Click);
|
||||
//
|
||||
// ManualBtn1
|
||||
//
|
||||
this.ManualBtn1.BackColor = System.Drawing.Color.Gray;
|
||||
this.ManualBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ManualBtn1.Location = new System.Drawing.Point(15, 223);
|
||||
this.ManualBtn1.Name = "ManualBtn1";
|
||||
this.ManualBtn1.Size = new System.Drawing.Size(112, 112);
|
||||
this.ManualBtn1.TabIndex = 19;
|
||||
this.ManualBtn1.Text = "手动按钮";
|
||||
this.ManualBtn1.UseVisualStyleBackColor = false;
|
||||
this.ManualBtn1.Click += new System.EventHandler(this.ManualBtn1_Click);
|
||||
//
|
||||
// ESBtn
|
||||
//
|
||||
this.ESBtn.BackColor = System.Drawing.Color.Red;
|
||||
this.ESBtn.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ESBtn.Location = new System.Drawing.Point(3, 180);
|
||||
this.ESBtn.Name = "ESBtn";
|
||||
this.ESBtn.Size = new System.Drawing.Size(219, 219);
|
||||
this.ESBtn.TabIndex = 0;
|
||||
this.ESBtn.Text = "急停";
|
||||
this.ESBtn.UseVisualStyleBackColor = false;
|
||||
this.ESBtn.Click += new System.EventHandler(this.ESBtn_Click);
|
||||
//
|
||||
// TestBtn
|
||||
//
|
||||
this.TestBtn.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
@ -794,111 +899,6 @@ namespace BRS.Process.A020.UI
|
||||
this.timer2.Interval = 1000;
|
||||
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
|
||||
//
|
||||
// RobotAStatus
|
||||
//
|
||||
this.RobotAStatus.BackColor = System.Drawing.Color.Gray;
|
||||
this.RobotAStatus.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.RobotAStatus.Enabled = false;
|
||||
this.RobotAStatus.Location = new System.Drawing.Point(706, 7);
|
||||
this.RobotAStatus.Name = "RobotAStatus";
|
||||
this.RobotAStatus.Size = new System.Drawing.Size(90, 90);
|
||||
this.RobotAStatus.TabIndex = 28;
|
||||
this.RobotAStatus.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// ManualLight
|
||||
//
|
||||
this.ManualLight.BackColor = System.Drawing.Color.Gray;
|
||||
this.ManualLight.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ManualLight.Enabled = false;
|
||||
this.ManualLight.Location = new System.Drawing.Point(549, 7);
|
||||
this.ManualLight.Name = "ManualLight";
|
||||
this.ManualLight.Size = new System.Drawing.Size(90, 90);
|
||||
this.ManualLight.TabIndex = 25;
|
||||
this.ManualLight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// AutoLight
|
||||
//
|
||||
this.AutoLight.BackColor = System.Drawing.Color.Gray;
|
||||
this.AutoLight.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoLight.Enabled = false;
|
||||
this.AutoLight.Location = new System.Drawing.Point(437, 7);
|
||||
this.AutoLight.Name = "AutoLight";
|
||||
this.AutoLight.Size = new System.Drawing.Size(90, 90);
|
||||
this.AutoLight.TabIndex = 24;
|
||||
this.AutoLight.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// MoveStateLight1
|
||||
//
|
||||
this.MoveStateLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.MoveStateLight1.Location = new System.Drawing.Point(17, 7);
|
||||
this.MoveStateLight1.Name = "MoveStateLight1";
|
||||
this.MoveStateLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.MoveStateLight1.TabIndex = 3;
|
||||
this.MoveStateLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// StopStateLight1
|
||||
//
|
||||
this.StopStateLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.StopStateLight1.Location = new System.Drawing.Point(117, 7);
|
||||
this.StopStateLight1.Name = "StopStateLight1";
|
||||
this.StopStateLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.StopStateLight1.TabIndex = 15;
|
||||
this.StopStateLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// ToughLight1
|
||||
//
|
||||
this.ToughLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.ToughLight1.Location = new System.Drawing.Point(217, 7);
|
||||
this.ToughLight1.Name = "ToughLight1";
|
||||
this.ToughLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.ToughLight1.TabIndex = 16;
|
||||
this.ToughLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// LoosenLight1
|
||||
//
|
||||
this.LoosenLight1.BackColor = System.Drawing.Color.Gray;
|
||||
this.LoosenLight1.Location = new System.Drawing.Point(326, 7);
|
||||
this.LoosenLight1.Name = "LoosenLight1";
|
||||
this.LoosenLight1.Size = new System.Drawing.Size(90, 90);
|
||||
this.LoosenLight1.TabIndex = 17;
|
||||
this.LoosenLight1.UseVisualStyleBackColor = false;
|
||||
//
|
||||
// AutoBtn1
|
||||
//
|
||||
this.AutoBtn1.BackColor = System.Drawing.Color.Gray;
|
||||
this.AutoBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.AutoBtn1.Location = new System.Drawing.Point(5, 85);
|
||||
this.AutoBtn1.Name = "AutoBtn1";
|
||||
this.AutoBtn1.Size = new System.Drawing.Size(112, 112);
|
||||
this.AutoBtn1.TabIndex = 18;
|
||||
this.AutoBtn1.Text = "自动按钮";
|
||||
this.AutoBtn1.UseVisualStyleBackColor = false;
|
||||
this.AutoBtn1.Click += new System.EventHandler(this.AutoBtn1_Click);
|
||||
//
|
||||
// ManualBtn1
|
||||
//
|
||||
this.ManualBtn1.BackColor = System.Drawing.Color.Gray;
|
||||
this.ManualBtn1.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ManualBtn1.Location = new System.Drawing.Point(5, 221);
|
||||
this.ManualBtn1.Name = "ManualBtn1";
|
||||
this.ManualBtn1.Size = new System.Drawing.Size(112, 112);
|
||||
this.ManualBtn1.TabIndex = 19;
|
||||
this.ManualBtn1.Text = "手动按钮";
|
||||
this.ManualBtn1.UseVisualStyleBackColor = false;
|
||||
this.ManualBtn1.Click += new System.EventHandler(this.ManualBtn1_Click);
|
||||
//
|
||||
// ESBtn
|
||||
//
|
||||
this.ESBtn.BackColor = System.Drawing.Color.Red;
|
||||
this.ESBtn.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.ESBtn.Location = new System.Drawing.Point(157, 144);
|
||||
this.ESBtn.Name = "ESBtn";
|
||||
this.ESBtn.Size = new System.Drawing.Size(137, 137);
|
||||
this.ESBtn.TabIndex = 0;
|
||||
this.ESBtn.Text = "急停";
|
||||
this.ESBtn.UseVisualStyleBackColor = false;
|
||||
this.ESBtn.Click += new System.EventHandler(this.ESBtn_Click);
|
||||
//
|
||||
// 扭矩轴控制
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -35,7 +35,6 @@ namespace BRS.Process.A020.UI
|
||||
|
||||
//private bool isSingleStepOperating = false;
|
||||
|
||||
|
||||
public 扭矩轴控制()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -66,7 +65,7 @@ namespace BRS.Process.A020.UI
|
||||
//ProcessA020.OnBitmapChanged -= BitMapTest;
|
||||
//ProcessA020.OnBitmapChanged += BitMapTest;
|
||||
pLCBase = ProcessA020.DeviceCollection.FirstOrDefault(u => u is PLCBase) as PLCBase;
|
||||
TcpListerWrapBase1 = ProcessA020.DeviceCollection.Find(d => d is TCPSeverBase && d.InitialConfig.Name == "ListenerA") as TCPSeverBase;
|
||||
TcpListerWrapBase1 = ProcessA020.DeviceCollection.Find(d => d is TCPSeverBase && d.InitialConfig.Name == "123") as TCPSeverBase;
|
||||
if (TcpListerWrapBase1 != null)
|
||||
{
|
||||
TcpListerWrapBase1.OnTcpDataReceived -= NbtRobotDriver_OnDataReceived;
|
||||
@ -1000,6 +999,8 @@ namespace BRS.Process.A020.UI
|
||||
//ProcessWriteInt(MelsecPLC, "D55", "int", "0");
|
||||
ProcessWriteInt(MelsecPLC, "D171", "int", "0");
|
||||
|
||||
TcpListerWrapBase1.SendMessage("PowerOFF_");//机械臂下电
|
||||
|
||||
shaftState = ShaftMachineState.Emergency;
|
||||
|
||||
this.StopStateLight1.BackColor = Color.Red;
|
||||
|
Loading…
Reference in New Issue
Block a user