diff --git a/CMS_CORE_Application/Form1.cs b/CMS_CORE_Application/Form1.cs index 8f375f2..3fe034b 100644 --- a/CMS_CORE_Application/Form1.cs +++ b/CMS_CORE_Application/Form1.cs @@ -193,6 +193,7 @@ namespace CMS_CORE_Application Name = "Da demo" }; cmsError = N.TOOLS_WAddFamily(ref family); + cmsError = N.TOOLS_RConfiguration(ref toolsConfig); // N.PLC_WPowerOnData(6, true); //N.PLC_RFunctionAccess(ref functionality); diff --git a/CMS_CORE_Library/CMS_CORE_Library.csproj b/CMS_CORE_Library/CMS_CORE_Library.csproj index a0ff0cf..d0d2e9d 100644 --- a/CMS_CORE_Library/CMS_CORE_Library.csproj +++ b/CMS_CORE_Library/CMS_CORE_Library.csproj @@ -149,6 +149,7 @@ + diff --git a/CMS_CORE_Library/DataStructures.cs b/CMS_CORE_Library/DataStructures.cs index a12a5a6..ba83755 100644 --- a/CMS_CORE_Library/DataStructures.cs +++ b/CMS_CORE_Library/DataStructures.cs @@ -274,7 +274,7 @@ namespace CMS_CORE_Library public string Name; } - #endregion Data structor models + #endregion Data structure models /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -349,7 +349,6 @@ namespace CMS_CORE_Library public const int ALARMS_NUMBER = 1024; public const int HEADS_NUMBER = 20; - public enum HEAD_OVERRIDE_SIGN { PLUS = 0, @@ -357,6 +356,7 @@ namespace CMS_CORE_Library } /** Process-Status */ + public enum PROC_STATUS : ushort { /** Idle-Status */ @@ -374,6 +374,7 @@ namespace CMS_CORE_Library }; /** CMS-Process-Mode */ + public enum PROC_MODE : ushort { /** Automatic-Mode */ @@ -421,56 +422,17 @@ namespace CMS_CORE_Library SPINDLE = 1, MAGAZINE_GROUND = 2 } - + public class ToolConfiguration { public string Name; public string Type; + public string Category; public Dictionary SelectValues; } - public static List SiemensToolsConfig = new List() - { - new ToolConfiguration{Name = "id", Type = "int", SelectValues = null}, - new ToolConfiguration{Name = "name", Type = "string", SelectValues = null}, - new ToolConfiguration{Name = "childId", Type = "int", SelectValues = null}, - new ToolConfiguration{Name = "isActive", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "isInhibited", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "fixedPlace", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "isMeasured", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "changeTool", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "isInUse", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "preAlarm", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "cooling1", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "cooling2", Type = "boolean", SelectValues = null}, - new ToolConfiguration{Name = "rotation", Type = "select", - SelectValues = new Dictionary() - { - {0, "none"}, - {1, "clockWhise"}, - {2, "counterClockWhise"} - }}, - new ToolConfiguration{Name = "toolLife", Type="select", SelectValues = new Dictionary() - { - {0, "toolLifeType"}, - {1, "countLife"}, - {2, "wearLife"} - }}, - new ToolConfiguration{Name = "edgeId", Type = "int", SelectValues = null}, - new ToolConfiguration{Name = "edgeResidualLife", Type = "double", SelectValues = null}, - new ToolConfiguration{Name = "edgeNominalLife", Type = "double", SelectValues = null}, - new ToolConfiguration{Name = "edgeNominalLife", Type = "double", SelectValues = null}, - new ToolConfiguration{Name = "edgePreAlarmVal", Type = "double", SelectValues = null}, - new ToolConfiguration{Name= "toolType", Type = "select", - SelectValues = new Dictionary() - { - {100, "milling"}, - {110, "ballNoseAndMill"}, - {111, "canonicalBallEnd"}, - {120, "endMill" } - }} - }; + public class MagazineModel { public int Id; diff --git a/CMS_CORE_Library/Demo/Nc_Demo.cs b/CMS_CORE_Library/Demo/Nc_Demo.cs index faf42f6..71bfb49 100644 --- a/CMS_CORE_Library/Demo/Nc_Demo.cs +++ b/CMS_CORE_Library/Demo/Nc_Demo.cs @@ -14,6 +14,7 @@ using System.Threading; using static CMS_CORE.Nc; using static CMS_CORE_Library.DataStructures; using static CMS_CORE.Demo.MEMORY_ADDRESS; +using static CMS_CORE_Library.ToolConfigurations; namespace CMS_CORE.Demo { @@ -23,6 +24,7 @@ namespace CMS_CORE.Demo private ChannelFactory cf; private ILibraryService serverService; + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #region Contructor & global methods @@ -1841,6 +1843,7 @@ namespace CMS_CORE.Demo } } + public override CmsError TOOLS_RFamilyData(ref List families) { // Check if the NC Demo is Connected @@ -1876,6 +1879,31 @@ namespace CMS_CORE.Demo } } + //public override CmsError TOOLS_WUpdateFamilyData(int id, string name) + //{ + // // Check if the NC Demo is Connected + // CmsError cmsError = CheckConnection(); + // if (cmsError.IsError()) + // return cmsError; + // try + // { + // DemoFamilyModel demo = new DemoFamilyModel() + // { + // Id = id, + // Name = name + // }; + + // // Get families data + // serverService.PutFamily(); + + + // return NO_ERROR; + // } + // catch (Exception ex) + // { + // return ManageException(ex); + // } + //} public override CmsError TOOLS_WAddFamily(ref FamilyModel family) { diff --git a/CMS_CORE_Library/Siemens/Nc_Siemens.cs b/CMS_CORE_Library/Siemens/Nc_Siemens.cs index aa727b3..5c79dbc 100644 --- a/CMS_CORE_Library/Siemens/Nc_Siemens.cs +++ b/CMS_CORE_Library/Siemens/Nc_Siemens.cs @@ -16,6 +16,7 @@ using static CMS_CORE.Nc; using static CMS_CORE.Siemens.MEMORY_ADDRESS; using static CMS_CORE_Library.DataStructures; using static Siemens.Sinumerik.Operate.Services.ToolMngmntSvc; +using static CMS_CORE_Library.ToolConfigurations; namespace CMS_CORE.Siemens { diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj index 4402eb7..7c883f9 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/CMS_Core_Nc_Demo_Application.csproj @@ -184,7 +184,8 @@ - + + Always diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db index 7ef99da..d9440ec 100644 Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Nc_Demo_Db.db differ diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Properties/Resources.resx b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Properties/Resources.resx index 5eba359..d3e34d9 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Properties/Resources.resx +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Properties/Resources.resx @@ -121,25 +121,31 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABISURBVDhPY8AGvn379h8bhkoTBiDFFl0mKHg4GwCSwIax + YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAABISURBVDhPY8AGvn379h8bhkoTBiDFFl0mKHg4GwCSwIax GYANY7WNWDycDMCGsSnGhqFxgQpAEtgMgEoTBsPEAGwYKo0EGBgAMACkrMWZPQwAAAAASUVORK5CYII= - - - ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7O + HOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAAsSAAALEgHS3X78AAAA2klEQVQ4T73TzQoBURjG8dnh + EqRcgAUbGws3IUquwtIFKAtbG5dgo1wE8rEhXISykfJRPv7PMHXGnImEp34157yd9zRnzji/SAJNrHDA + CUs0kMYMI1hTwQ7XNwRSxgUqdpBDFBEUcEZogyS8nauaeMoc5uJAgzY0qZ1tGcJcPIAvG6iQcUcfRKfa + vz/+J1OEfspXyUKvu3ZHRtTVPCgdnC09qN5yR0bMxTLBc2pQbQvdWF/Mxbo0JcQe8ujCqxURiNkgjHZW + Y2t0qmOkUIdu3xF7LKCfKY5vxnFu9N9UT/M6R8UAAAAASUVORK5CYII= + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAAmSURBVDhPYxgFVADfvn37TwkGG+Dk5EQWHk4GUIKhcTEK + YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAAmSURBVDhPYxgFVADfvn37TwkGG+Dk5EQWHk4GUIKhcTEK yAcMDABULP5BZjjimQAAAABJRU5ErkJggg== iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASJAheA4cf3j/ + YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASJAheA4cf3j/ EY6RxUB0zIR9mIaQYgAIwwyBaifdABAm2gBkjKyGtgYQg0cNGJQGkIOh2ikBDAwAR/4LjdUkCHIAAAAA SUVORK5CYII= diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/refresh.png b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/refresh.png index a214ed9..3dc5197 100644 Binary files a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/refresh.png and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/refresh.png differ diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/removeButton.png b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/removeButton.png new file mode 100644 index 0000000..cdebb80 Binary files /dev/null and b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Resources/removeButton.png differ diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs index 0bd23c4..b7945df 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.Designer.cs @@ -35,6 +35,7 @@ namespace Nc_Demo_Application System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DemoApplicationForm)); this.serverStatusLabel = new System.Windows.Forms.Label(); this.ncDataPage = new System.Windows.Forms.TabPage(); this.toolStrip5 = new Nc_Demo_Application.Views.ToolStripEx(); @@ -1420,7 +1421,7 @@ namespace Nc_Demo_Application // refreshToolUI // this.refreshToolUI.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.refreshToolUI.Image = global::Nc_Demo_Application.Properties.Resources.refresh; + this.refreshToolUI.Image = ((System.Drawing.Image)(resources.GetObject("refreshToolUI.Image"))); this.refreshToolUI.ImageTransparentColor = System.Drawing.Color.Magenta; this.refreshToolUI.Name = "refreshToolUI"; this.refreshToolUI.Size = new System.Drawing.Size(23, 22); diff --git a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx index c7b5ef4..bf2f2bf 100644 --- a/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx +++ b/CMS_CORE_Nc_Demo_Application/Nc_Demo_Application/Views/DemoApplicationForm.resx @@ -162,4 +162,15 @@ 647, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADaSURBVDhPvdPNCgFRGMbx2eESpFyABRsbCzchSq7C0gUo + C1sbl2CjXATysSFchLKR8lE+/s8wdcaciYSnfjXnvJ33NGfOOL9IAk2scMAJSzSQxgwjWFPBDtc3BFLG + BSp2kEMUERRwRmiDJLydq5p4yhzm4kCDNjSpnW0Zwlw8gC8bqJBxRx9Ep9q/P/4nU4R+ylfJQq+7dkdG + 1NU8KB2cLT2o3nJHRszFMsFzalBtC91YX8zFujQlxB7y6MKrFRGI2SCMdlZja3SqY6RQh27fEXssoJ8p + jm/GcW7031RP8zpHxQAAAABJRU5ErkJggg== + + \ No newline at end of file