This commit is contained in:
Lucio Maranta
2018-04-27 10:52:33 +00:00
parent 9ce4856369
commit ec6b72d7c2
12 changed files with 64 additions and 52 deletions
+1
View File
@@ -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);
+1
View File
@@ -149,6 +149,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Siemens\Nc_Siemens.cs" />
<Compile Include="Siemens\ToolsConfiguration.cs" />
<Compile Include="ToolConfigurations.cs" />
<Compile Include="Utils\Nc_Utils.cs" />
</ItemGroup>
<ItemGroup>
+6 -44
View File
@@ -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
}
/** <summary>Process-Status</summary> */
public enum PROC_STATUS : ushort
{
/** <summary>Idle-Status</summary> */
@@ -374,6 +374,7 @@ namespace CMS_CORE_Library
};
/** <summary>CMS-Process-Mode</summary> */
public enum PROC_MODE : ushort
{
/** <summary>Automatic-Mode</summary> */
@@ -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<int, string> SelectValues;
}
public static List<ToolConfiguration> SiemensToolsConfig = new List<ToolConfiguration>()
{
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<int, string>()
{
{0, "none"},
{1, "clockWhise"},
{2, "counterClockWhise"}
}},
new ToolConfiguration{Name = "toolLife", Type="select", SelectValues = new Dictionary<int, string>()
{
{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<int, string>()
{
{100, "milling"},
{110, "ballNoseAndMill"},
{111, "canonicalBallEnd"},
{120, "endMill" }
}}
};
public class MagazineModel
{
public int Id;
+28
View File
@@ -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<ILibraryService> cf;
private ILibraryService serverService;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Contructor & global methods
@@ -1841,6 +1843,7 @@ namespace CMS_CORE.Demo
}
}
public override CmsError TOOLS_RFamilyData(ref List<FamilyModel> 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)
{
+1
View File
@@ -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
{
@@ -184,7 +184,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="Images\CMS_Icon.ico" />
<None Include="Resources\refresh.png" />
<Content Include="Resources\refresh.png" />
<None Include="Resources\removeButton.png" />
<EmbeddedResource Include="Languages\IT.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
@@ -121,25 +121,31 @@
<data name="addButton" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABISURBVDhPY8AGvn379h8bhkoTBiDFFl0mKHg4GwCSwIax
YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAABISURBVDhPY8AGvn379h8bhkoTBiDFFl0mKHg4GwCSwIax
GYANY7WNWDycDMCGsSnGhqFxgQpAEtgMgEoTBsPEAGwYKo0EGBgAMACkrMWZPQwAAAAASUVORK5CYII=
</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="refresh" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7O
HOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAAAsSAAALEgHS3X78AAAA2klEQVQ4T73TzQoBURjG8dnh
EqRcgAUbGws3IUquwtIFKAtbG5dgo1wE8rEhXISykfJRPv7PMHXGnImEp34157yd9zRnzji/SAJNrHDA
CUs0kMYMI1hTwQ7XNwRSxgUqdpBDFBEUcEZogyS8nauaeMoc5uJAgzY0qZ1tGcJcPIAvG6iQcUcfRKfa
vz/+J1OEfspXyUKvu3ZHRtTVPCgdnC09qN5yR0bMxTLBc2pQbQvdWF/Mxbo0JcQe8ujCqxURiNkgjHZW
Y2t0qmOkUIdu3xF7LKCfKY5vxnFu9N9UT/M6R8UAAAAASUVORK5CYII=
</value>
</data>
<data name="removeButton" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAAmSURBVDhPYxgFVADfvn37TwkGG+Dk5EQWHk4GUIKhcTEK
YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAAmSURBVDhPYxgFVADfvn37TwkGG+Dk5EQWHk4GUIKhcTEK
yAcMDABULP5BZjjimQAAAABJRU5ErkJggg==
</value>
</data>
<data name="saveButton" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASJAheA4cf3j/
YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASJAheA4cf3j/
EY6RxUB0zIR9mIaQYgAIwwyBaifdABAm2gBkjKyGtgYQg0cNGJQGkIOh2ikBDAwAR/4LjdUkCHIAAAAA
SUVORK5CYII=
</value>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

@@ -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);
@@ -162,4 +162,15 @@
<metadata name="toolStrip7.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>647, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="refreshToolUI.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADaSURBVDhPvdPNCgFRGMbx2eESpFyABRsbCzchSq7C0gUo
C1sbl2CjXATysSFchLKR8lE+/s8wdcaciYSnfjXnvJ33NGfOOL9IAk2scMAJSzSQxgwjWFPBDtc3BFLG
BSp2kEMUERRwRmiDJLydq5p4yhzm4kCDNjSpnW0Zwlw8gC8bqJBxRx9Ep9q/P/4nU4R+ylfJQq+7dkdG
1NU8KB2cLT2o3nJHRszFMsFzalBtC91YX8zFujQlxB7y6MKrFRGI2SCMdlZja3SqY6RQh27fEXssoJ8p
jm/GcW7031RP8zpHxQAAAABJRU5ErkJggg==
</value>
</data>
</root>