Added lifeoption in configuration

Added siemens tool data
This commit is contained in:
Lucio Maranta
2019-09-20 10:51:33 +00:00
parent 741757604f
commit a7bc67fb6e
7 changed files with 20 additions and 11 deletions
+2 -6
View File
@@ -104,7 +104,7 @@ namespace CMS_CORE_Application
cmsError = N.NC_RDateTime(ref NcTime);
if (cmsError.IsError()) { error = true; SetError(Lines, cmsError); }
cmsError = N.PLC_RHeadsData(Heads, 3);
cmsError = N.PLC_RHeadsData(Heads, 1);
if (cmsError.IsError()) { error = true; SetError(Lines, cmsError); }
cmsError = N.NC_RSerialNumber(ref serial);
@@ -118,11 +118,7 @@ namespace CMS_CORE_Application
////////////////////////////////////////////////////////////// TEST
Stopwatch st = new Stopwatch();
sw.Restart();
N.AXES_ROrigin(5);
int val1 = 0;
N.PLC_RActiveClient(ref val1);
N.NC_Connect();
sw.Stop();
Console.WriteLine("TEMPO PER FUNZIONE " + sw.ElapsedMilliseconds);
+3 -4
View File
@@ -31,9 +31,8 @@ namespace CMS_CORE_Library.Demo
// Magazine config parameters
private List<SiemensMagazineConfigModel> MagazineConfig = new List<SiemensMagazineConfigModel>()
{
new SiemensMagazineConfigModel{Id = 1, Type = SIEMENS_MAGAZINE_TYPE.REVOLVER, LoadingIsActive = true, Name = "MAG1"},
new SiemensMagazineConfigModel{Id = 2, Type = SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = true, Name = "MAG2"},
new SiemensMagazineConfigModel{Id = 3, Type = SIEMENS_MAGAZINE_TYPE.CHAIN, LoadingIsActive = false, Name = "MAG3"},
new SiemensMagazineConfigModel{Id = 1, Type = SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = true, Name = "MAG1"},
new SiemensMagazineConfigModel{Id = 2, Type = SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = true, Name = "MAG2"}
};
////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
@@ -1447,7 +1446,7 @@ namespace CMS_CORE_Library.Demo
processData.WorkOverride = val;
processData.ProcessMessage = "Messaggio di test decisamente lungo";
processData.ProcessMessage = "Generic Message";
processData.OffsetData = new OffsetModel()
{
+2
View File
@@ -2996,6 +2996,8 @@ namespace CMS_CORE_Library.Fanuc
{
ODBPDFDRV baseDir = new ODBPDFDRV();
short nReturn = cnc_rdpdf_drive(nLibHandle[0], baseDir);
if (nReturn != 0)
return GetNcError(nReturn);
string absolutePath = FormatPathForNc(path, baseDir.drive1);
+1 -1
View File
@@ -11764,7 +11764,7 @@ internal class Focas1
internal static extern short cnc_getcurscrn(ushort FlibHndl, out short scrn_no);
// funzioni aggiunte al marshalling
[DllImport("FWLIB32.dll", EntryPoint = "cnc_chglang")]
[DllImport(FOCAS_LIB_NAME, EntryPoint = "cnc_chglang")]
public static extern short cnc_chglang(ushort FlibHndl, byte b);
internal enum page_code: short
@@ -342,6 +342,11 @@ namespace CMS_CORE_Library.Models
{
public string ToolName;
public int ChildId;
public bool Disabled;
public bool Measured;
public double MaxLoad;
public double MaxSpeed;
public double ResidualLife;
}
public class HeadDataModel
@@ -224,6 +224,7 @@ namespace CMS_CORE_Library.Models
public bool MagPositionOptionActive;
public bool OffsetOptionActive;
public bool RadiusMetricType;
public bool LifeOption;
public List<SiemensMagazineConfigModel> Magazines;
public List<FieldsConfiguration> ToolsConfiguration;
+6
View File
@@ -1083,6 +1083,11 @@ namespace CMS_CORE_Library.Siemens
{
ChildId = tool == null ? 0 : tool.ChildId,
ToolName = tool == null ? "" : tool.FamilyName,
Disabled = tool == null ? false : !tool.IsEnabled,
Measured = tool == null ? false : tool.IsMeasured,
MaxLoad = tool == null ? 0 : tool.Load,
MaxSpeed = tool == null ? 0 : tool.MaxSpeed,
ResidualLife = tool.EdgesData.FirstOrDefault().ResidualLife
}
});
}
@@ -3401,6 +3406,7 @@ namespace CMS_CORE_Library.Siemens
config.FamilyOptionActive = true;
config.MagPositionOptionActive = true;
config.RadiusMetricType = false;
config.LifeOption = true;
// Set fields configurations
config.ToolsConfiguration = SiemensToolFieldsConfig;