Fix fanuc - osai selected process data
This commit is contained in:
Generated
+47
-69
@@ -69,16 +69,14 @@
|
||||
this.TXTPPName = new System.Windows.Forms.TextBox();
|
||||
this.TXTPPLines = new System.Windows.Forms.TextBox();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.lastTime = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.totalTimesTXT = new System.Windows.Forms.TextBox();
|
||||
this.lastTimeDbTXT = new System.Windows.Forms.TextBox();
|
||||
this.mediaTestDbTXT = new System.Windows.Forms.TextBox();
|
||||
this.labelTest = new System.Windows.Forms.Label();
|
||||
this.labelTest2TXT = new System.Windows.Forms.TextBox();
|
||||
this.TXTNow = new System.Windows.Forms.TextBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.Error = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.labelTest1TXT = new System.Windows.Forms.TextBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tableLayoutPanel3.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
@@ -356,7 +354,7 @@
|
||||
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, 295F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 296F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.groupBox4, 2, 0);
|
||||
@@ -375,7 +373,7 @@
|
||||
| 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(159, 3);
|
||||
this.groupBox2.Location = new System.Drawing.Point(158, 3);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(145, 265);
|
||||
this.groupBox2.TabIndex = 28;
|
||||
@@ -402,7 +400,7 @@
|
||||
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(150, 265);
|
||||
this.groupBox1.Size = new System.Drawing.Size(149, 265);
|
||||
this.groupBox1.TabIndex = 27;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Nc";
|
||||
@@ -416,7 +414,7 @@
|
||||
this.TXTAlmNc.Multiline = true;
|
||||
this.TXTAlmNc.Name = "TXTAlmNc";
|
||||
this.TXTAlmNc.ReadOnly = true;
|
||||
this.TXTAlmNc.Size = new System.Drawing.Size(138, 240);
|
||||
this.TXTAlmNc.Size = new System.Drawing.Size(137, 240);
|
||||
this.TXTAlmNc.TabIndex = 20;
|
||||
//
|
||||
// groupBox4
|
||||
@@ -426,9 +424,9 @@
|
||||
| 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(310, 3);
|
||||
this.groupBox4.Location = new System.Drawing.Point(309, 3);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(290, 265);
|
||||
this.groupBox4.Size = new System.Drawing.Size(291, 265);
|
||||
this.groupBox4.TabIndex = 29;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Path";
|
||||
@@ -442,7 +440,7 @@
|
||||
this.tabControl1.Location = new System.Drawing.Point(6, 21);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(277, 238);
|
||||
this.tabControl1.Size = new System.Drawing.Size(278, 238);
|
||||
this.tabControl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
@@ -451,7 +449,7 @@
|
||||
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(269, 212);
|
||||
this.tabPage1.Size = new System.Drawing.Size(270, 212);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Path 1";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
@@ -465,7 +463,7 @@
|
||||
this.TXTAlm.Multiline = true;
|
||||
this.TXTAlm.Name = "TXTAlm";
|
||||
this.TXTAlm.ReadOnly = true;
|
||||
this.TXTAlm.Size = new System.Drawing.Size(257, 203);
|
||||
this.TXTAlm.Size = new System.Drawing.Size(258, 203);
|
||||
this.TXTAlm.TabIndex = 18;
|
||||
//
|
||||
// groupBox3
|
||||
@@ -567,12 +565,10 @@
|
||||
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.label13);
|
||||
this.groupBox5.Controls.Add(this.lastTime);
|
||||
this.groupBox5.Controls.Add(this.label12);
|
||||
this.groupBox5.Controls.Add(this.totalTimesTXT);
|
||||
this.groupBox5.Controls.Add(this.lastTimeDbTXT);
|
||||
this.groupBox5.Controls.Add(this.mediaTestDbTXT);
|
||||
this.groupBox5.Controls.Add(this.labelTest1TXT);
|
||||
this.groupBox5.Controls.Add(this.labelTest);
|
||||
this.groupBox5.Controls.Add(this.labelTest2TXT);
|
||||
this.groupBox5.Controls.Add(this.TXTNow);
|
||||
this.groupBox5.Controls.Add(this.label7);
|
||||
this.groupBox5.Controls.Add(this.TXTSft);
|
||||
@@ -594,53 +590,21 @@
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Nc Info";
|
||||
//
|
||||
// label13
|
||||
// labelTest
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(62, 120);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(41, 13);
|
||||
this.label13.TabIndex = 32;
|
||||
this.label13.Text = "label13";
|
||||
this.labelTest.AutoSize = true;
|
||||
this.labelTest.Location = new System.Drawing.Point(95, 99);
|
||||
this.labelTest.Name = "labelTest";
|
||||
this.labelTest.Size = new System.Drawing.Size(66, 13);
|
||||
this.labelTest.TabIndex = 30;
|
||||
this.labelTest.Text = "Label Test 2";
|
||||
//
|
||||
// lastTime
|
||||
// labelTest2TXT
|
||||
//
|
||||
this.lastTime.AutoSize = true;
|
||||
this.lastTime.Location = new System.Drawing.Point(59, 90);
|
||||
this.lastTime.Name = "lastTime";
|
||||
this.lastTime.Size = new System.Drawing.Size(46, 13);
|
||||
this.lastTime.TabIndex = 31;
|
||||
this.lastTime.Text = "lastTime";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(56, 63);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(47, 13);
|
||||
this.label12.TabIndex = 30;
|
||||
this.label12.Text = "Avarage";
|
||||
//
|
||||
// totalTimesTXT
|
||||
//
|
||||
this.totalTimesTXT.Location = new System.Drawing.Point(114, 113);
|
||||
this.totalTimesTXT.Name = "totalTimesTXT";
|
||||
this.totalTimesTXT.Size = new System.Drawing.Size(100, 20);
|
||||
this.totalTimesTXT.TabIndex = 29;
|
||||
//
|
||||
// lastTimeDbTXT
|
||||
//
|
||||
this.lastTimeDbTXT.Location = new System.Drawing.Point(114, 87);
|
||||
this.lastTimeDbTXT.Name = "lastTimeDbTXT";
|
||||
this.lastTimeDbTXT.Size = new System.Drawing.Size(100, 20);
|
||||
this.lastTimeDbTXT.TabIndex = 28;
|
||||
//
|
||||
// mediaTestDbTXT
|
||||
//
|
||||
this.mediaTestDbTXT.Location = new System.Drawing.Point(114, 60);
|
||||
this.mediaTestDbTXT.Name = "mediaTestDbTXT";
|
||||
this.mediaTestDbTXT.Size = new System.Drawing.Size(100, 20);
|
||||
this.mediaTestDbTXT.TabIndex = 27;
|
||||
this.labelTest2TXT.Location = new System.Drawing.Point(164, 96);
|
||||
this.labelTest2TXT.Name = "labelTest2TXT";
|
||||
this.labelTest2TXT.Size = new System.Drawing.Size(217, 20);
|
||||
this.labelTest2TXT.TabIndex = 27;
|
||||
//
|
||||
// TXTNow
|
||||
//
|
||||
@@ -679,6 +643,22 @@
|
||||
this.Error.Size = new System.Drawing.Size(462, 20);
|
||||
this.Error.TabIndex = 27;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(95, 73);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(66, 13);
|
||||
this.label12.TabIndex = 32;
|
||||
this.label12.Text = "Label Test 1";
|
||||
//
|
||||
// labelTest1TXT
|
||||
//
|
||||
this.labelTest1TXT.Location = new System.Drawing.Point(164, 70);
|
||||
this.labelTest1TXT.Name = "labelTest1TXT";
|
||||
this.labelTest1TXT.Size = new System.Drawing.Size(217, 20);
|
||||
this.labelTest1TXT.TabIndex = 31;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -766,12 +746,10 @@
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox Error;
|
||||
private System.Windows.Forms.TextBox mediaTestDbTXT;
|
||||
private System.Windows.Forms.TextBox lastTimeDbTXT;
|
||||
private System.Windows.Forms.Label lastTime;
|
||||
private System.Windows.Forms.TextBox labelTest2TXT;
|
||||
private System.Windows.Forms.Label labelTest;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.TextBox totalTimesTXT;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox labelTest1TXT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ namespace CMS_CORE_Application
|
||||
////////////////////////////////////////////////////////////// TEST
|
||||
Stopwatch st = new Stopwatch();
|
||||
sw.Restart();
|
||||
|
||||
cmsError = N.NC_WMDICommand(1, "X0");
|
||||
SelectedProcessData selected = new SelectedProcessData();
|
||||
cmsError = N.PROC_RSelectedProcessData(1, ref selected);
|
||||
|
||||
sw.Stop();
|
||||
Console.WriteLine(sw.ElapsedMilliseconds);
|
||||
@@ -141,6 +141,9 @@ namespace CMS_CORE_Application
|
||||
TXTPPName.Text = PPName;
|
||||
TXTNow.Text = NcTime.ToString();
|
||||
|
||||
labelTest1TXT.Text = selected.RapidOverride.ToString();
|
||||
labelTest2TXT.Text = selected.WorkOverride.ToString();
|
||||
|
||||
if (error == false)
|
||||
Error.Text = "";
|
||||
|
||||
|
||||
@@ -1736,12 +1736,21 @@ namespace CMS_CORE_Library.Fanuc
|
||||
// Check if message exist & if is an operator type (type == 4)
|
||||
if (count >= 5 && Messg.msg5.datano >= 0 && Messg.msg5.type == 4)
|
||||
msg = Messg.msg5.data;
|
||||
|
||||
OffsetModel offsetData = new OffsetModel();
|
||||
if(offsetId != 0)
|
||||
// Read offset data
|
||||
cmsError = TOOLS_ROffset(offsetId, ref offsetData);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
|
||||
processData = new SelectedProcessData()
|
||||
{
|
||||
ActiveOffsetId = offsetId,
|
||||
Origin = origin,
|
||||
ProcessMessage = msg
|
||||
ProcessMessage = msg,
|
||||
OffsetData = offsetData
|
||||
};
|
||||
|
||||
return NO_ERROR;
|
||||
@@ -4466,9 +4475,9 @@ namespace CMS_CORE_Library.Fanuc
|
||||
case SCREEN_PAGE.Fanuc_Offset: return Focas1.page_code.OFFSET;
|
||||
case SCREEN_PAGE.Fanuc_Message: return Focas1.page_code.ALARM;
|
||||
case SCREEN_PAGE.Fanuc_System: return Focas1.page_code.PARAM;
|
||||
case SCREEN_PAGE.Fanuc_Custom1: return Focas1.page_code.TMAC1;
|
||||
case SCREEN_PAGE.Fanuc_Custom2: return Focas1.page_code.TMAC2;
|
||||
case SCREEN_PAGE.Fanuc_Graph: return Focas1.page_code.GRAPH;
|
||||
case SCREEN_PAGE.Fanuc_MGI: return Focas1.page_code.TMAC1;
|
||||
case SCREEN_PAGE.Fanuc_Custom2: return Focas1.page_code.TMAC2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -412,6 +412,12 @@ namespace CMS_CORE_Library.Models
|
||||
public short ActiveOffsetId { get; set; }
|
||||
|
||||
public string ProcessMessage { get; set; }
|
||||
|
||||
public double RapidOverride { get; set; }
|
||||
|
||||
public ushort WorkOverride { get; set; }
|
||||
|
||||
public OffsetModel OffsetData { get; set; }
|
||||
}
|
||||
|
||||
public class AssistedToolingModel
|
||||
|
||||
@@ -1863,7 +1863,7 @@ namespace CMS_CORE_Library
|
||||
Fanuc_System = 203,
|
||||
Fanuc_Message = 204,
|
||||
Fanuc_Graph = 205,
|
||||
Fanuc_Custom1 = 206,
|
||||
Fanuc_MGI = 206,
|
||||
Fanuc_Custom2 = 207,
|
||||
}
|
||||
|
||||
|
||||
@@ -425,7 +425,6 @@ namespace CMS_CORE_Library.Osai
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
ushort nReturn = OpenNC.GetNcInfo1(1, out GETINFO1DATA info, out uint errorClass, out uint errorNum);
|
||||
if (errorClass != 0 || errorNum != 0 || nReturn == 0)
|
||||
return GetNCError(errorClass, errorNum);
|
||||
@@ -1100,7 +1099,7 @@ namespace CMS_CORE_Library.Osai
|
||||
// Choose memory type
|
||||
switch (index[0].ToUpper())
|
||||
{
|
||||
case "GW": Type = MEMORY_TYPE.Osai_MW; break;
|
||||
case "GW": Type = MEMORY_TYPE.Osai_GW; break;
|
||||
case "MW": Type = MEMORY_TYPE.Osai_MW; break;
|
||||
case "M": Type = MEMORY_TYPE.Osai_MW; break;
|
||||
case "MD": Type = MEMORY_TYPE.Osai_MD; break;
|
||||
@@ -1736,12 +1735,22 @@ namespace CMS_CORE_Library.Osai
|
||||
if (errorClass != 0 || errorNum != 0 || nReturn == 0)
|
||||
return GetNCError(errorClass, errorNum);
|
||||
|
||||
OffsetModel offsetData = new OffsetModel();
|
||||
// Read offset data
|
||||
if(info.actualtooloff != 0)
|
||||
cmsError = TOOLS_ROffset((short)info.actualtooloff, ref offsetData);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
processData = new SelectedProcessData()
|
||||
{
|
||||
ActiveOffsetId = (short)info.actualtooloff,
|
||||
Origin = axOr,
|
||||
ProcessMessage = message ?? ""
|
||||
};
|
||||
ProcessMessage = message ?? "",
|
||||
RapidOverride = info.rapfeedov,
|
||||
WorkOverride = info.manfeedov,
|
||||
OffsetData = offsetData
|
||||
};
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -52,10 +52,31 @@ namespace CMS_CORE_Library
|
||||
{
|
||||
{0, "generic"},
|
||||
{10, "angularTransmission"},
|
||||
{80, "disk"},
|
||||
{81, "cutter50"},
|
||||
{83, "cutter70"},
|
||||
{84, "cutter80"},
|
||||
|
||||
// Ultra sound rotation
|
||||
{70, "ultrasoundRot10"},
|
||||
{71, "ultrasoundRot20"},
|
||||
{72, "ultrasoundRot30"},
|
||||
{73, "ultrasoundRot40"},
|
||||
{74, "ultrasoundRot50"},
|
||||
{75, "ultrasoundRot60"},
|
||||
{76, "ultrasoundRot70"},
|
||||
{77, "ultrasoundRot80"},
|
||||
{78, "ultrasoundRot90"},
|
||||
{79, "ultrasoundRot100"},
|
||||
|
||||
// Ultra sound NO rotation
|
||||
{80, "ultrasoundNoRot10"},
|
||||
{81, "ultrasoundNoRot20"},
|
||||
{82, "ultrasoundNoRot30"},
|
||||
{83, "ultrasoundNoRot40"},
|
||||
{84, "ultrasoundNoRot50"},
|
||||
{85, "ultrasoundNoRot60"},
|
||||
{86, "ultrasoundNoRot70"},
|
||||
{87, "ultrasoundNoRot80"},
|
||||
{88, "ultrasoundNoRot90"},
|
||||
{89, "ultrasoundNoRot100"},
|
||||
|
||||
{90, "blade1"},
|
||||
{91, "blade2"},
|
||||
{92, "blade3"},
|
||||
@@ -350,8 +371,8 @@ namespace CMS_CORE_Library
|
||||
new FieldsConfiguration{Name = "radius", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue },
|
||||
new FieldsConfiguration{Name = "wearLength", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = int.MinValue, MaxValue = int.MaxValue },
|
||||
new FieldsConfiguration{Name = "wearRadius", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = int.MinValue, MaxValue = int.MaxValue },
|
||||
new FieldsConfiguration{Name = "realLength", Type = "double", SelectValues = null, Category = "general", ReadOnly = true, MinValue = int.MinValue, MaxValue = int.MaxValue }
|
||||
new FieldsConfiguration{Name = "realRadius", Type = "double", SelectValues = null, Category = "general", ReadOnly = true, MinValue = int.MinValue, MaxValue = int.MaxValue },
|
||||
new FieldsConfiguration{Name = "realLength", Type = "double", SelectValues = null, Category = "general", ReadOnly = true, MinValue = int.MinValue, MaxValue = int.MaxValue },
|
||||
new FieldsConfiguration{Name = "realRadius", Type = "double", SelectValues = null, Category = "general", ReadOnly = true, MinValue = int.MinValue, MaxValue = int.MaxValue }
|
||||
},
|
||||
EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>() // Set value runtime, based on NC vendor
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user