diff --git a/CMS_CORE_Application/Form1.Designer.cs b/CMS_CORE_Application/Form1.Designer.cs index 8fa8a2e..0747a13 100644 --- a/CMS_CORE_Application/Form1.Designer.cs +++ b/CMS_CORE_Application/Form1.Designer.cs @@ -47,15 +47,38 @@ this.LabelBoh = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.TXTTime = new System.Windows.Forms.TextBox(); - this.TXTAlm = new System.Windows.Forms.TextBox(); - this.TXTMsg = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.TXTAlmNc = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.TXTSft = new System.Windows.Forms.TextBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.TXTAlmNc = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.TXTMsg = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.tabControl2 = new System.Windows.Forms.TabControl(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.TXTAlm = new System.Windows.Forms.TextBox(); + this.TXTPPLines = new System.Windows.Forms.TextBox(); this.panel1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.tabControl2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabControl1.SuspendLayout(); this.SuspendLayout(); // // Connect @@ -64,7 +87,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.Connect.Location = new System.Drawing.Point(14, 98); this.Connect.Name = "Connect"; - this.Connect.Size = new System.Drawing.Size(341, 23); + this.Connect.Size = new System.Drawing.Size(582, 23); this.Connect.TabIndex = 0; this.Connect.Text = "Connect"; this.Connect.UseVisualStyleBackColor = true; @@ -85,14 +108,14 @@ this.panel1.Controls.Add(this.Connect); this.panel1.Location = new System.Drawing.Point(-3, -2); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(371, 128); + this.panel1.Size = new System.Drawing.Size(612, 128); this.panel1.TabIndex = 1; // // label3 // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(170, 59); + this.label3.Location = new System.Drawing.Point(411, 59); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(29, 13); this.label3.TabIndex = 5; @@ -102,7 +125,7 @@ // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(155, 33); + this.label2.Location = new System.Drawing.Point(396, 33); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(44, 13); this.label2.TabIndex = 4; @@ -112,7 +135,7 @@ // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(148, 6); + this.label1.Location = new System.Drawing.Point(389, 6); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(51, 13); this.label1.TabIndex = 2; @@ -121,7 +144,7 @@ // TXTport // this.TXTport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTport.Location = new System.Drawing.Point(205, 56); + this.TXTport.Location = new System.Drawing.Point(446, 56); this.TXTport.Name = "TXTport"; this.TXTport.Size = new System.Drawing.Size(150, 20); this.TXTport.TabIndex = 3; @@ -130,7 +153,7 @@ // TXTip // this.TXTip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTip.Location = new System.Drawing.Point(205, 30); + this.TXTip.Location = new System.Drawing.Point(446, 30); this.TXTip.Name = "TXTip"; this.TXTip.Size = new System.Drawing.Size(150, 20); this.TXTip.TabIndex = 2; @@ -146,7 +169,7 @@ "Fanuc", "Siemens", "Osai"}); - this.NcCombo.Location = new System.Drawing.Point(205, 3); + this.NcCombo.Location = new System.Drawing.Point(446, 3); this.NcCombo.Name = "NcCombo"; this.NcCombo.Size = new System.Drawing.Size(150, 21); this.NcCombo.TabIndex = 2; @@ -155,7 +178,7 @@ // TXTPath1 // this.TXTPath1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTPath1.Location = new System.Drawing.Point(286, 229); + this.TXTPath1.Location = new System.Drawing.Point(507, 100); this.TXTPath1.Name = "TXTPath1"; this.TXTPath1.ReadOnly = true; this.TXTPath1.Size = new System.Drawing.Size(65, 20); @@ -165,7 +188,7 @@ // this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(212, 232); + this.label4.Location = new System.Drawing.Point(433, 103); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(68, 13); this.label4.TabIndex = 6; @@ -174,7 +197,7 @@ // TXTStat1 // this.TXTStat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTStat1.Location = new System.Drawing.Point(286, 255); + this.TXTStat1.Location = new System.Drawing.Point(507, 126); this.TXTStat1.Name = "TXTStat1"; this.TXTStat1.ReadOnly = true; this.TXTStat1.Size = new System.Drawing.Size(65, 20); @@ -184,7 +207,7 @@ // this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(209, 258); + this.label5.Location = new System.Drawing.Point(430, 129); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(71, 13); this.label5.TabIndex = 8; @@ -193,7 +216,7 @@ // TXTName // this.TXTName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTName.Location = new System.Drawing.Point(69, 148); + this.TXTName.Location = new System.Drawing.Point(290, 19); this.TXTName.Name = "TXTName"; this.TXTName.ReadOnly = true; this.TXTName.Size = new System.Drawing.Size(150, 20); @@ -203,7 +226,7 @@ // this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(11, 151); + this.label6.Location = new System.Drawing.Point(232, 22); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(55, 13); this.label6.TabIndex = 10; @@ -212,7 +235,7 @@ // TXTNProcess // this.TXTNProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTNProcess.Location = new System.Drawing.Point(286, 203); + this.TXTNProcess.Location = new System.Drawing.Point(507, 74); this.TXTNProcess.Name = "TXTNProcess"; this.TXTNProcess.ReadOnly = true; this.TXTNProcess.Size = new System.Drawing.Size(65, 20); @@ -221,7 +244,7 @@ // TXTMachNum // this.TXTMachNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTMachNum.Location = new System.Drawing.Point(286, 177); + this.TXTMachNum.Location = new System.Drawing.Point(507, 48); this.TXTMachNum.Name = "TXTMachNum"; this.TXTMachNum.ReadOnly = true; this.TXTMachNum.Size = new System.Drawing.Size(65, 20); @@ -231,7 +254,7 @@ // this.LabelBoh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.LabelBoh.AutoSize = true; - this.LabelBoh.Location = new System.Drawing.Point(174, 180); + this.LabelBoh.Location = new System.Drawing.Point(395, 51); this.LabelBoh.Name = "LabelBoh"; this.LabelBoh.Size = new System.Drawing.Size(106, 13); this.LabelBoh.TabIndex = 14; @@ -241,7 +264,7 @@ // this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(234, 206); + this.label8.Location = new System.Drawing.Point(455, 77); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(46, 13); this.label8.TabIndex = 15; @@ -250,77 +273,26 @@ // TXTTime // this.TXTTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.TXTTime.Location = new System.Drawing.Point(290, 623); + this.TXTTime.Location = new System.Drawing.Point(531, 752); this.TXTTime.Name = "TXTTime"; this.TXTTime.ReadOnly = true; this.TXTTime.Size = new System.Drawing.Size(65, 20); this.TXTTime.TabIndex = 16; // - // TXTAlm - // - this.TXTAlm.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TXTAlm.Location = new System.Drawing.Point(7, 408); - this.TXTAlm.Multiline = true; - this.TXTAlm.Name = "TXTAlm"; - this.TXTAlm.ReadOnly = true; - this.TXTAlm.Size = new System.Drawing.Size(343, 88); - this.TXTAlm.TabIndex = 17; - // - // TXTMsg - // - this.TXTMsg.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TXTMsg.Location = new System.Drawing.Point(7, 516); - this.TXTMsg.Multiline = true; - this.TXTMsg.Name = "TXTMsg"; - this.TXTMsg.ReadOnly = true; - this.TXTMsg.Size = new System.Drawing.Size(343, 95); - this.TXTMsg.TabIndex = 18; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(12, 281); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(24, 13); - this.label7.TabIndex = 19; - this.label7.Text = "Nc:"; - // - // TXTAlmNc - // - this.TXTAlmNc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TXTAlmNc.Location = new System.Drawing.Point(7, 297); - this.TXTAlmNc.Multiline = true; - this.TXTAlmNc.Name = "TXTAlmNc"; - this.TXTAlmNc.ReadOnly = true; - this.TXTAlmNc.Size = new System.Drawing.Size(343, 88); - this.TXTAlmNc.TabIndex = 20; - // // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(10, 392); + this.label9.Location = new System.Drawing.Point(557, 402); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(40, 13); this.label9.TabIndex = 21; this.label9.Text = "path 1:"; // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(8, 500); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(25, 13); - this.label10.TabIndex = 22; - this.label10.Text = "Plc:"; - // // label11 // this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(225, 151); + this.label11.Location = new System.Drawing.Point(446, 22); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(61, 13); this.label11.TabIndex = 24; @@ -329,36 +301,245 @@ // TXTSft // this.TXTSft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TXTSft.Location = new System.Drawing.Point(286, 148); + this.TXTSft.Location = new System.Drawing.Point(507, 19); this.TXTSft.Name = "TXTSft"; this.TXTSft.ReadOnly = true; this.TXTSft.Size = new System.Drawing.Size(64, 20); this.TXTSft.TabIndex = 23; // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.76253F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49.23747F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 283F)); + this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.groupBox4, 2, 0); + this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 19); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 1; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 18.00948F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 81.99052F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(565, 271); + this.tableLayoutPanel1.TabIndex = 25; + // + // groupBox1 + // + 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.Right))); + this.groupBox1.Controls.Add(this.TXTAlmNc); + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(137, 265); + this.groupBox1.TabIndex = 27; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Nc"; + // + // TXTAlmNc + // + this.TXTAlmNc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TXTAlmNc.Location = new System.Drawing.Point(6, 19); + this.TXTAlmNc.Multiline = true; + this.TXTAlmNc.Name = "TXTAlmNc"; + this.TXTAlmNc.ReadOnly = true; + this.TXTAlmNc.Size = new System.Drawing.Size(125, 240); + this.TXTAlmNc.TabIndex = 20; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.TXTMsg); + this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.groupBox2.Location = new System.Drawing.Point(146, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(132, 265); + this.groupBox2.TabIndex = 28; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Plc"; + // + // TXTMsg + // + this.TXTMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TXTMsg.Location = new System.Drawing.Point(6, 21); + this.TXTMsg.Multiline = true; + this.TXTMsg.Name = "TXTMsg"; + this.TXTMsg.ReadOnly = true; + this.TXTMsg.Size = new System.Drawing.Size(121, 238); + this.TXTMsg.TabIndex = 18; + // + // groupBox3 + // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.tableLayoutPanel1); + this.groupBox3.Location = new System.Drawing.Point(3, 315); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(577, 296); + this.groupBox3.TabIndex = 26; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Alarms"; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Controls.Add(this.groupBox6, 0, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox5, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox3, 0, 2); + this.tableLayoutPanel2.Location = new System.Drawing.Point(12, 132); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 3; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 51.92308F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 48.07692F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 301F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(583, 614); + this.tableLayoutPanel2.TabIndex = 27; + // + // groupBox4 + // + this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox4.Controls.Add(this.tabControl1); + this.groupBox4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.groupBox4.Location = new System.Drawing.Point(284, 3); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(278, 265); + this.groupBox4.TabIndex = 29; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Path"; + // + // groupBox5 + // + this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox5.Controls.Add(this.TXTSft); + this.groupBox5.Controls.Add(this.label11); + this.groupBox5.Controls.Add(this.TXTPath1); + this.groupBox5.Controls.Add(this.label4); + this.groupBox5.Controls.Add(this.TXTStat1); + this.groupBox5.Controls.Add(this.label5); + this.groupBox5.Controls.Add(this.label8); + this.groupBox5.Controls.Add(this.TXTName); + this.groupBox5.Controls.Add(this.LabelBoh); + this.groupBox5.Controls.Add(this.label6); + this.groupBox5.Controls.Add(this.TXTMachNum); + this.groupBox5.Controls.Add(this.TXTNProcess); + this.groupBox5.Location = new System.Drawing.Point(3, 3); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(577, 156); + this.groupBox5.TabIndex = 29; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Nc Info"; + // + // groupBox6 + // + 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.Right))); + this.groupBox6.Controls.Add(this.tabControl2); + this.groupBox6.Location = new System.Drawing.Point(3, 165); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(577, 144); + this.groupBox6.TabIndex = 30; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "Part Program"; + // + // tabControl2 + // + this.tabControl2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl2.Controls.Add(this.tabPage3); + this.tabControl2.Location = new System.Drawing.Point(6, 21); + this.tabControl2.Name = "tabControl2"; + this.tabControl2.SelectedIndex = 0; + this.tabControl2.Size = new System.Drawing.Size(565, 117); + this.tabControl2.TabIndex = 0; + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.TXTPPLines); + this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Padding = new System.Windows.Forms.Padding(3); + this.tabPage3.Size = new System.Drawing.Size(557, 91); + this.tabPage3.TabIndex = 0; + this.tabPage3.Text = "Path 1"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.TXTAlm); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(257, 212); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Path 1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Location = new System.Drawing.Point(6, 21); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(265, 238); + this.tabControl1.TabIndex = 0; + // + // TXTAlm + // + this.TXTAlm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TXTAlm.Location = new System.Drawing.Point(6, 5); + this.TXTAlm.Multiline = true; + this.TXTAlm.Name = "TXTAlm"; + this.TXTAlm.ReadOnly = true; + this.TXTAlm.Size = new System.Drawing.Size(245, 203); + this.TXTAlm.TabIndex = 18; + // + // TXTPPLines + // + this.TXTPPLines.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TXTPPLines.Location = new System.Drawing.Point(-1, 0); + this.TXTPPLines.Multiline = true; + this.TXTPPLines.Name = "TXTPPLines"; + this.TXTPPLines.ReadOnly = true; + this.TXTPPLines.Size = new System.Drawing.Size(558, 88); + this.TXTPPLines.TabIndex = 18; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(362, 655); - this.Controls.Add(this.label11); - this.Controls.Add(this.TXTSft); - this.Controls.Add(this.label10); + this.ClientSize = new System.Drawing.Size(603, 784); + this.Controls.Add(this.tableLayoutPanel2); this.Controls.Add(this.label9); - this.Controls.Add(this.TXTAlmNc); - this.Controls.Add(this.label7); - this.Controls.Add(this.TXTMsg); - this.Controls.Add(this.TXTAlm); this.Controls.Add(this.TXTTime); - this.Controls.Add(this.label8); - this.Controls.Add(this.LabelBoh); - this.Controls.Add(this.TXTMachNum); - this.Controls.Add(this.TXTNProcess); - this.Controls.Add(this.label6); - this.Controls.Add(this.TXTName); - this.Controls.Add(this.label5); - this.Controls.Add(this.TXTStat1); - this.Controls.Add(this.label4); - this.Controls.Add(this.TXTPath1); this.Controls.Add(this.panel1); this.Name = "Form1"; this.Text = "Form1"; @@ -366,6 +547,23 @@ this.Load += new System.EventHandler(this.Form1_Load); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.tabControl2.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.tabPage3.PerformLayout(); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabControl1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -392,14 +590,25 @@ private System.Windows.Forms.Label LabelBoh; private System.Windows.Forms.Label label8; private System.Windows.Forms.TextBox TXTTime; - private System.Windows.Forms.TextBox TXTAlm; - private System.Windows.Forms.TextBox TXTMsg; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox TXTAlmNc; private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label11; private System.Windows.Forms.TextBox TXTSft; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox TXTMsg; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox TXTAlmNc; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.TabControl tabControl2; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TextBox TXTAlm; + private System.Windows.Forms.TextBox TXTPPLines; } } diff --git a/CMS_CORE_Application/Form1.cs b/CMS_CORE_Application/Form1.cs index 636e126..eb926e4 100644 --- a/CMS_CORE_Application/Form1.cs +++ b/CMS_CORE_Application/Form1.cs @@ -71,6 +71,7 @@ namespace CMS_CORE_Application List Alm = new List(); List Msg = new List(); List Alm2 = new List(); + List Lines = new List(); try { @@ -97,7 +98,7 @@ namespace CMS_CORE_Application N.NC_RActiveAlarms(ref Alm2); N.PLC_RActiveMessages(ref Msg); N.NC_RSoftwareVersion(ref SFTVersion); - sw.Stop(); + N.PROC_RPPLines(1,ref Lines); @@ -115,14 +116,18 @@ namespace CMS_CORE_Application TXTAlm.Text = String.Join(Environment.NewLine, Alm); TXTAlmNc.Text = String.Join(Environment.NewLine, Alm2); TXTMsg.Text = String.Join(Environment.NewLine, Msg); + + TXTPPLines.Text = String.Join(Environment.NewLine, Lines); panel1.Enabled = false; }); } - if ((150 - (int)sw.ElapsedMilliseconds) > 0) - Thread.Sleep(150 - (int)sw.ElapsedMilliseconds); - else + + //sw.Stop(); + if ((200 - (int)sw.ElapsedMilliseconds) < 0) Debug.WriteLine("Ritardo"); + + Thread.Sleep(200); } } catch (Nc_Exception ex) diff --git a/CMS_CORE_Library/Demo/Nc_Demo.cs b/CMS_CORE_Library/Demo/Nc_Demo.cs index 8674499..cfcea2b 100644 --- a/CMS_CORE_Library/Demo/Nc_Demo.cs +++ b/CMS_CORE_Library/Demo/Nc_Demo.cs @@ -263,6 +263,12 @@ namespace CMS_CORE.Demo ThrowNCException(ex); } } + + public override void PROC_RPPLines(ushort ProcNumber, ref List Lines) + { + ThrowNCException(new Nc_Exception(getError(FUNC_NOTALL_NC_ERROR))); + } + #endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs b/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs index 8be61f1..941965f 100644 --- a/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs +++ b/CMS_CORE_Library/Fanuc/Nc_Fanuc.cs @@ -327,6 +327,46 @@ namespace CMS_CORE.Fanuc + //Get PP Lines + public override void PROC_RPPLines(ushort ProcNumber, ref List Lines) + { + Focas1.OPMSG3 Messg = new Focas1.OPMSG3(); + short nReturn = 0; + int linN; + ushort Lenght = 256; + short ReturnIndex = 1; + Char[] Chars= new Char[255]; + String[] newLines; + + //Check if the NC is Connected + CheckConnection(); + + //Execute the method + nReturn = Focas1.cnc_rdblkcount(nLibHandle[GetHandleIndexFromPath(ProcNumber)], out linN); + ReturnIndex = (short) linN; + + //Throw Exception if there's an error + if (nReturn != 0) + ThrowNCException(NC_PROD_ERROR, nReturn); + + + //Execute the method + nReturn = Focas1.cnc_rdexecprog(nLibHandle[GetHandleIndexFromPath(ProcNumber)],ref Lenght, out ReturnIndex, Chars); + newLines = new String(Chars).Replace("\0", String.Empty).Split('\n'); + + //Throw Exception if there's an error + if (nReturn != 0) + ThrowNCException(NC_PROD_ERROR, nReturn); + + //Setup the return values + Lines.Clear(); + foreach (String Line in newLines) + Lines.Add(Line); + + } + + + //Get the PMC Messages public override void PLC_RActiveMessages(ref List Alarms) { @@ -1425,11 +1465,14 @@ namespace CMS_CORE.Fanuc switch (status.run) { - case 0: return PROC_Status.RESET; - case 1: return PROC_Status.IDLE; - case 2: return PROC_Status.HOLD; + case 0: return PROC_Status.IDLE; + case 1: return PROC_Status.HOLD; + case 2: return PROC_Status.RUN; case 3: return PROC_Status.RUN; case 4: return PROC_Status.RUN; + case 5: return PROC_Status.RUN; + case 7: return PROC_Status.RUN; + case 8: return PROC_Status.RESET; } return PROC_Status.ERROR; } @@ -1728,6 +1771,7 @@ namespace CMS_CORE.Fanuc return ErrororOwner + "Generic Error On Function"; } + #endregion } diff --git a/CMS_CORE_Library/Nc.cs b/CMS_CORE_Library/Nc.cs index 0f71a4e..a0fc089 100644 --- a/CMS_CORE_Library/Nc.cs +++ b/CMS_CORE_Library/Nc.cs @@ -428,6 +428,20 @@ namespace CMS_CORE public abstract void PROC_RActiveAlarms(ushort ProcNumber, ref List Alarms); + /** + * + * Read actual & Next Lines of active PP + * + * Compatibility: Fanuc | Osai | Siemens + * + * + * Thrown when an internal or a library error occours + * Process to execute the action + * Reference of a List of String Variables where data will be saved + * */ + public abstract void PROC_RPPLines(ushort ProcNumber, ref List Lines); + + #endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/CMS_CORE_Library/Osai/Nc_Osai.cs b/CMS_CORE_Library/Osai/Nc_Osai.cs index 3624a6f..559a189 100644 --- a/CMS_CORE_Library/Osai/Nc_Osai.cs +++ b/CMS_CORE_Library/Osai/Nc_Osai.cs @@ -283,7 +283,6 @@ namespace CMS_CORE.Osai { //Execute the method nReturn = OpenNC.GetProcessStatus(i, out status, out errorClass, out errorNum); - //If there's the error "process not found" if (errorClass == 2 && errorNum == 6 && nReturn == 0) break; @@ -454,7 +453,57 @@ namespace CMS_CORE.Osai catch (Exception ex) { ThrowNCException(ex); - } + } + } + + + + //Get PP Lines + public override void PROC_RPPLines(ushort ProcNumber, ref List Lines) + { + uint errorClass, errorNum; + ushort nReturn; + MSGERROR err; + String L1 = ""; + String L2 = ""; + String L3 = ""; + String L4 = ""; + String L5 = ""; + String L6 = ""; + String L7 = ""; + String L8 = ""; + + //Check if the NC is Connected + CheckConnection(); + + //Try to get information + try + { + //Execute the method + nReturn = OpenNC.GetPartProgramLines(ProcNumber,out L1, out L2, out L3, out L4, out L5, out L6, out L7, out L8, out errorClass, out errorNum); + + //If there's an error launch exception + if (errorClass != 0 || errorNum != 0 || nReturn == 0) + throw new Nc_Exception(getError(NC_PROD_ERROR, errorClass, errorNum)); + + //Clear All Values + Lines.Clear(); + + //Build the new Lines + Lines.Add(L1); + Lines.Add(L2); + Lines.Add(L3); + Lines.Add(L4); + Lines.Add(L5); + Lines.Add(L6); + Lines.Add(L7); + Lines.Add(L8); + + } + catch (Exception ex) + { + ThrowNCException(ex); + } } diff --git a/CMS_CORE_Library/Siemens/Nc_Siemens.cs b/CMS_CORE_Library/Siemens/Nc_Siemens.cs index b0ab6ce..3d700c1 100644 --- a/CMS_CORE_Library/Siemens/Nc_Siemens.cs +++ b/CMS_CORE_Library/Siemens/Nc_Siemens.cs @@ -40,7 +40,7 @@ namespace CMS_CORE.Siemens const string PathIncrJog = "/Channel/GeometricAxis/actIncrVal"; const string PathAdvancedJog = "/Channel/State/machFunc"; const string PathRelatPosition = "/Channel/GeometricAxis/actToolBasPosEN"; - + const string PathActProgLines = "/Channel/ProgramInfo/actPartProgram"; // Global Variables private DateTime Last_Static_Read; @@ -272,6 +272,47 @@ namespace CMS_CORE.Siemens + //Get PP Lines + public override void PROC_RPPLines(ushort ProcNumber, ref List Lines) + { + + String[] newLines; + + //Check if the NC is Connected + CheckConnection(); + + //Setup variables + DataSvc Data = new DataSvc(); + Data.Timeout = TimeoutConn; + Data.PriorityFlag = SlPriority.highPriority; + Item ReadItem = new Item(PathActProgLines + "[u" + ProcNumber + "]"); + + //Try to get information + try + { + //Read Data + Data.Read(ReadItem); + + //Save Data + newLines = ((String)ReadItem.Value).Replace("\r",string.Empty).Split('\n'); + + //Setup the return values + Lines.Clear(); + foreach (String Line in newLines) + Lines.Add(Line); + + //Remove the first Line (the previous line) + if(Lines.Count > 0) + Lines.RemoveAt(0); + } + catch (Exception ex) + { + ThrowNCException(ex); + } + } + + + //Get the Nc Active Alarms public override void NC_RActiveAlarms(ref List Alarms) { @@ -945,6 +986,7 @@ namespace CMS_CORE.Siemens //Check if Siemens Environment is started private void CheckSiemensEnv() { + Debug.WriteLine(Environment.GetEnvironmentVariable("PATH")); if (!Environment.GetEnvironmentVariable("PATH").Contains(SinumerikEnvPath)) throw new Nc_Exception("CMS-Core-Error: Siemens Environment not found"); }