From b732e1514d8d1f3d901d7d43b11837de9f88d16c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 27 May 2020 10:31:43 +0200 Subject: [PATCH 01/84] typo --- Thermo.Active.NC/NcAdapter.cs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 3558caf1..8ff3aa85 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1100,11 +1100,11 @@ namespace Thermo.Active.NC if (currPlcRecipe.ContainsKey(item.Id)) { // recupero da mem PLC - var paramPLC = currPlcRecipe[item.Id]; + DataStructures.RecipeParam paramPLC = currPlcRecipe[item.Id]; currRange = new RPRange() { Min = paramPLC.ValMin, - Max = paramPLC.ValMax, + Max = paramPLC.ValMax }; currStatus = new RPStatus() { @@ -1121,6 +1121,28 @@ namespace Thermo.Active.NC ValueAct = paramPLC.ValueAct }; } + else + { + currRange = new RPRange() + { + Min = 0, + Max = 999999 + }; + currStatus = new RPStatus() + { + Visible = false, + Enabled = false, + HasError = false + }; + // calcolo intero oggetto + currParam = new DTORecipeParam() + { + Range = currRange, + Status = currStatus, + UnitMeasure = "", + ValueAct = 0 + }; + } currentRecipe.Add(item.Label, currParam); } } From 1a120db9e3f528ce40325c081fc6adaada0c394d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 28 May 2020 17:36:09 +0200 Subject: [PATCH 02/84] Update conf recipeParams --- Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs b/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs index c308032d..4eb44d9a 100644 --- a/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs +++ b/Thermo.Active.Model/DTOModels/Recipe/DTORecipeParam.cs @@ -9,6 +9,8 @@ namespace Thermo.Active.Model.DTOModels.Recipe public class DTORecipeParam { public int Id { get; set; } = 0; + public double SetpointHMI { get; set; } = 0; + public double SetpointPLC { get; set; } = 0; public RPRange Range { get; set; } public RPStatus Status { get; set; } public string UnitMeasure { get; set; } @@ -21,6 +23,10 @@ namespace Thermo.Active.Model.DTOModels.Recipe if (Id!= item.Id) return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; if (!Range.Equals(item.Range)) return false; if (!Status.Equals(item.Status)) From fa77cc11cb612b0d2691bad4d7701a80870fdf3c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 28 May 2020 17:49:25 +0200 Subject: [PATCH 03/84] Update Adapter --- Thermo.Active.NC/NcAdapter.cs | 56 ++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 8ff3aa85..fb449fe6 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -29,9 +29,10 @@ namespace Thermo.Active.NC public class NcAdapter : IDisposable { /// + /// TODO FIXME DeleteMe | cancellare /// check e usare dati simulati/reali (in fase implementazione) /// - public bool simData = true; + public bool simData = false; public NcThermo numericalControl; @@ -1068,6 +1069,12 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Vero metodo lettura ricetta da 2 aree memoria PLC + /// + /// + /// + /// public CmsError ReadRecipeData(bool refreshOnlyRT, out Dictionary currentRecipe) { // init obj @@ -1153,7 +1160,43 @@ namespace Thermo.Active.NC return NO_ERROR; } + /// + /// SCrittura memoria (SOLO SetpointHMI invero) + /// + /// + /// + public CmsError WriteRecipeData(Dictionary updtRecipe) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // ciclo x ogni valore della ricetta aggiornata ricevuto + DataStructures.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new DataStructures.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + + public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) { //ReadScadaDataSiemens(scadaSchema, out scadaValue); @@ -1573,6 +1616,17 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Scrive tutti i parametri della ricetta indicati + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeParams(Dictionary updtRecipe) + { + CmsError cmsError = WriteRecipeData(updtRecipe); + + return cmsError; + } /// /// Legge tutti i parametri della ricetta e calcolo la overview dei vari steps From 3a39f20b5a99426b9e681023abe1ac5b8626d99d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 28 May 2020 18:06:51 +0200 Subject: [PATCH 04/84] Metodo scrittura ricetta da testare --- .../Controllers/WebApi/RecipeController.cs | 55 +++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 4bf64e2a..c3860ab7 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -24,8 +24,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { - // serve?!?!? - //ncAdapter.Connect(); CmsError cmsError = ncAdapter.GetRecipeOverview(out Dictionary currOverview); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -38,8 +36,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { - // serve?!?!? - //ncAdapter.Connect(); CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currentRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -47,5 +43,56 @@ namespace Thermo.Active.Controllers.WebApi return Ok(currentRecipe); } } + + [Route("param/{paramName:string}/value/{SetpointHMI:double}"), HttpPut] + //[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.THERMO_MANAGER, Action = ACTIONS.WRITE)] + public IHttpActionResult setParameter(string paramName, double SetpointHMI) + { + //using (UsersController usersController = new UsersController()) + //{ + + // UserModel user = usersController.FindById(userId); + + // if (user == null) + // return NotFound(); + + // if (userData.newPassword == userData.actPassword) + // return BadRequest("error_password_same"); + + // if (Crypto.VerifyHashedPassword(user.Password, userData.actPassword) != true) + // return BadRequest("error_password_not_ok"); + + // if (Crypto.VerifyHashedPassword(user.Password, userData.newPassword) == true) + // return BadRequest("error_password_same_old"); + + // return Ok(usersController.UpdateUserPassword(userId, userData)); + //} + using (NcAdapter ncAdapter = new NcAdapter()) + { + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + Dictionary updtRecipe = new Dictionary(); + + if (prevRecipe.ContainsKey(paramName)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[paramName]; + currParam.SetpointHMI = SetpointHMI; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(paramName, currParam); + // scrivo sul PLC + ncAdapter.WriteRecipeParams(updtRecipe); + } + + // rileggo e restituisco... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary actRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(actRecipe); + } + } } } \ No newline at end of file From 79bf7362010777252829bf83b9513529b5f22ecf Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 28 May 2020 18:36:36 +0200 Subject: [PATCH 05/84] commented signal-r method to review... --- Thermo.Active/Controllers/WebApi/RecipeController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index c3860ab7..5b89d2e8 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -43,7 +43,8 @@ namespace Thermo.Active.Controllers.WebApi return Ok(currentRecipe); } } - + +#if false [Route("param/{paramName:string}/value/{SetpointHMI:double}"), HttpPut] //[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.THERMO_MANAGER, Action = ACTIONS.WRITE)] public IHttpActionResult setParameter(string paramName, double SetpointHMI) @@ -93,6 +94,7 @@ namespace Thermo.Active.Controllers.WebApi return Ok(actRecipe); } - } + } +#endif } } \ No newline at end of file From 14ed50b58d6ca2ba2f020c513bec1121efaa03c5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 29 May 2020 11:42:47 +0200 Subject: [PATCH 06/84] WebApi method 4 params update --- Thermo.Active.Core/ThreadsFunctions.cs | 6 +- Thermo.Active.NC/NcAdapter.cs | 36 ++++++---- .../Controllers/WebApi/RecipeController.cs | 72 +++++++++++++++++-- 3 files changed, 92 insertions(+), 22 deletions(-) diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs index 1329d902..cf558517 100644 --- a/Thermo.Active.Core/ThreadsFunctions.cs +++ b/Thermo.Active.Core/ThreadsFunctions.cs @@ -26,7 +26,7 @@ using Thermo.Active.Model.DTOModels.Recipe; public static class ThreadsFunctions { - public static int recipeRtCounter = 5; + public static int recipeRtCounter = 0; public static bool reconnectionIsRunning = false; private static ConcurrentDictionary Timers = new ConcurrentDictionary(); @@ -692,7 +692,7 @@ public static class ThreadsFunctions catch (ThreadAbortException) { ncAdapter.Dispose(); - } + } } public static void ReadRecipeData() { @@ -721,7 +721,7 @@ public static class ThreadsFunctions if (ncAdapter.numericalControl.NC_IsConnected()) { // Get new data from PLC - libraryError = ncAdapter.ReadRecipeData(onlyRt, out Dictionary currRecipe); + libraryError = ncAdapter.ReadRecipeData(onlyRt, false, out Dictionary currRecipe); if (libraryError.IsError()) ManageLibraryError(libraryError); diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index fb449fe6..0ec46fc0 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1072,10 +1072,11 @@ namespace Thermo.Active.NC /// /// Vero metodo lettura ricetta da 2 aree memoria PLC /// - /// + /// Indica se aggiornare SOLO i dati RT + /// Indica se usare ultimi dati letti dal PLC senza effettiva lettura (via cache) /// /// - public CmsError ReadRecipeData(bool refreshOnlyRT, out Dictionary currentRecipe) + public CmsError ReadRecipeData(bool refreshOnlyRT, bool useLastRead, out Dictionary currentRecipe) { // init obj currentRecipe = new Dictionary(); @@ -1085,7 +1086,15 @@ namespace Thermo.Active.NC if (NcConfig.NcVendor == NC_VENDOR.S7NET) { Dictionary currPlcRecipe = new Dictionary(); - CmsError cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); + CmsError cmsError = NO_ERROR; + if(useLastRead) + { + cmsError = numericalControl.PLC_RRecipeLastParamList(ref currPlcRecipe); + } + else + { + cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); + } if (cmsError.IsError()) return cmsError; DTORecipeParam currParam = new DTORecipeParam(); @@ -1196,7 +1205,7 @@ namespace Thermo.Active.NC return NO_ERROR; } - + public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) { //ReadScadaDataSiemens(scadaSchema, out scadaValue); @@ -1560,7 +1569,14 @@ namespace Thermo.Active.NC RPRange currRange = new RPRange(); RPStatus currStatus = new RPStatus(); - if (simData) + if (!simData) + { + // gestione errore + cmsError = ReadRecipeData(false, true, out currRecipe); + if (cmsError.IsError()) + return cmsError; + } + else { // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() @@ -1604,17 +1620,11 @@ namespace Thermo.Active.NC currRecipe.Add(item.Label, currParam); } } - else - { - // gestione errore - cmsError = ReadRecipeData(false, out currRecipe); - if (cmsError.IsError()) - return cmsError; - } // restituisco cod errore se trovato return cmsError; - } + } + /// /// Scrive tutti i parametri della ricetta indicati diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 5b89d2e8..397e85bb 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -24,6 +24,11 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + CmsError cmsError = ncAdapter.GetRecipeOverview(out Dictionary currOverview); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -36,18 +41,69 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currentRecipe); + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - return Ok(currentRecipe); + return Ok(currRecipe); + } + } + + + + [Route("update"), HttpPut] + public IHttpActionResult WriteParameters(Dictionary parametersList) + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + Dictionary updtRecipe = new Dictionary(); + + foreach (var item in parametersList) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + } + + // scrivo sul PLC + ncAdapter.WriteRecipeParams(updtRecipe); + +#if true + // rileggo e restituisco... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary actRecipe); + //cmsError = ncAdapter.ReadRecipeData(false, out Dictionary actRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); +#endif + + return Ok(actRecipe); } } #if false - [Route("param/{paramName:string}/value/{SetpointHMI:double}"), HttpPut] - //[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.THERMO_MANAGER, Action = ACTIONS.WRITE)] - public IHttpActionResult setParameter(string paramName, double SetpointHMI) + //[Route("param/{paramName:string}/value/{SetpointHMI:double}"), HttpPut] + ////[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.THERMO_MANAGER, Action = ACTIONS.WRITE)] + //public IHttpActionResult setParameter(string paramName, double SetpointHMI) + [Route("write"), HttpPost] + public IHttpActionResult WriteParameter(string paramName, double SetpointHMI) + { //using (UsersController usersController = new UsersController()) //{ @@ -70,6 +126,9 @@ namespace Thermo.Active.Controllers.WebApi //} using (NcAdapter ncAdapter = new NcAdapter()) { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -89,12 +148,13 @@ namespace Thermo.Active.Controllers.WebApi // rileggo e restituisco... cmsError = ncAdapter.ReadFullRecipe(out Dictionary actRecipe); + //cmsError = ncAdapter.ReadRecipeData(false, out Dictionary actRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); return Ok(actRecipe); } - } + } #endif } } \ No newline at end of file From 9294cecc15727808f8f3ade4ae5c51c3ff3ee68f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 29 May 2020 12:20:34 +0200 Subject: [PATCH 07/84] COmpletata webApi scrittura parametri ricetta --- Thermo.Active.NC/NcAdapter.cs | 74 +++---------------- .../Controllers/WebApi/RecipeController.cs | 74 ++----------------- 2 files changed, 18 insertions(+), 130 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 0ec46fc0..9e6c059f 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -28,12 +28,6 @@ namespace Thermo.Active.NC { public class NcAdapter : IDisposable { - /// - /// TODO FIXME DeleteMe | cancellare - /// check e usare dati simulati/reali (in fase implementazione) - /// - public bool simData = false; - public NcThermo numericalControl; public NcAdapter() => @@ -1087,13 +1081,13 @@ namespace Thermo.Active.NC { Dictionary currPlcRecipe = new Dictionary(); CmsError cmsError = NO_ERROR; - if(useLastRead) + if (useLastRead) { cmsError = numericalControl.PLC_RRecipeLastParamList(ref currPlcRecipe); } else { - cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); + cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); } if (cmsError.IsError()) return cmsError; @@ -1131,10 +1125,13 @@ namespace Thermo.Active.NC // calcolo intero oggetto currParam = new DTORecipeParam() { + Id = item.Id, Range = currRange, Status = currStatus, UnitMeasure = "", - ValueAct = paramPLC.ValueAct + ValueAct = paramPLC.ValueAct, + SetpointHMI = paramPLC.SetpointHMI, + SetpointPLC = paramPLC.SetpointPLC }; } else @@ -1153,6 +1150,7 @@ namespace Thermo.Active.NC // calcolo intero oggetto currParam = new DTORecipeParam() { + Id = item.Id, Range = currRange, Status = currStatus, UnitMeasure = "", @@ -1188,7 +1186,6 @@ namespace Thermo.Active.NC { Id = (short)item.Value.Id, SetpointHMI = item.Value.SetpointHMI - }; // scrivo! CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); @@ -1569,61 +1566,14 @@ namespace Thermo.Active.NC RPRange currRange = new RPRange(); RPStatus currStatus = new RPStatus(); - if (!simData) - { - // gestione errore - cmsError = ReadRecipeData(false, true, out currRecipe); - if (cmsError.IsError()) - return cmsError; - } - else - { - // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... - List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() - { - Id = x.Id, - Category = x.Category.ToString(), - SubCategory_1 = x.SubCategory_1, - SubCategory_2 = x.SubCategory_2, - Name = x.Name, - Description = x.Description, - Format = x.Format, - Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower() - }).ToList(); - - int minVal, maxVal, actVal; - Random rnd = new Random(); - foreach (var item in recipeConfig) - { - // randomizzo valori... - minVal = rnd.Next(0, 10); - maxVal = rnd.Next(100, 200); - actVal = rnd.Next(minVal - 5, maxVal + 5); - currRange = new RPRange() - { - Min = minVal, - Max = maxVal, - }; - currStatus = new RPStatus() - { - Visible = true, - Enabled = true, - HasError = (actVal < minVal || actVal > maxVal) - }; - currParam = new DTORecipeParam() - { - Range = currRange, - Status = currStatus, - UnitMeasure = "", - ValueAct = actVal - }; - currRecipe.Add(item.Label, currParam); - } - } + // gestione errore + cmsError = ReadRecipeData(false, true, out currRecipe); + if (cmsError.IsError()) + return cmsError; // restituisco cod errore se trovato return cmsError; - } + } /// diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 397e85bb..b530966f 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -80,81 +80,19 @@ namespace Thermo.Active.Controllers.WebApi // salvo (1 parametro, potrei fare N...) updtRecipe.Add(item.Key, currParam); } + else + { + return NotFound(); + } } // scrivo sul PLC ncAdapter.WriteRecipeParams(updtRecipe); -#if true - // rileggo e restituisco... - cmsError = ncAdapter.ReadFullRecipe(out Dictionary actRecipe); - //cmsError = ncAdapter.ReadRecipeData(false, out Dictionary actRecipe); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); -#endif - - return Ok(actRecipe); + // ritorno solo fatto! + return Ok(); } } -#if false - //[Route("param/{paramName:string}/value/{SetpointHMI:double}"), HttpPut] - ////[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.THERMO_MANAGER, Action = ACTIONS.WRITE)] - //public IHttpActionResult setParameter(string paramName, double SetpointHMI) - [Route("write"), HttpPost] - public IHttpActionResult WriteParameter(string paramName, double SetpointHMI) - - { - //using (UsersController usersController = new UsersController()) - //{ - - // UserModel user = usersController.FindById(userId); - - // if (user == null) - // return NotFound(); - - // if (userData.newPassword == userData.actPassword) - // return BadRequest("error_password_same"); - - // if (Crypto.VerifyHashedPassword(user.Password, userData.actPassword) != true) - // return BadRequest("error_password_not_ok"); - - // if (Crypto.VerifyHashedPassword(user.Password, userData.newPassword) == true) - // return BadRequest("error_password_same_old"); - - // return Ok(usersController.UpdateUserPassword(userId, userData)); - //} - using (NcAdapter ncAdapter = new NcAdapter()) - { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - - Dictionary updtRecipe = new Dictionary(); - - if (prevRecipe.ContainsKey(paramName)) - { - // aggiorno il valore HMI nel parametro - var currParam = prevRecipe[paramName]; - currParam.SetpointHMI = SetpointHMI; - // salvo (1 parametro, potrei fare N...) - updtRecipe.Add(paramName, currParam); - // scrivo sul PLC - ncAdapter.WriteRecipeParams(updtRecipe); - } - - // rileggo e restituisco... - cmsError = ncAdapter.ReadFullRecipe(out Dictionary actRecipe); - //cmsError = ncAdapter.ReadRecipeData(false, out Dictionary actRecipe); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - - return Ok(actRecipe); - } - } -#endif } } \ No newline at end of file From e3fb3302644a3fb734d3af8aa1af97e8d7d416da Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 29 May 2020 19:17:59 +0200 Subject: [PATCH 08/84] Preliminary models added to test --- .../DTOModels/Recipe/DTOModule.cs | 71 +++++++++++++++++++ .../DTOModels/Recipe/DTOModuleConfigModel.cs | 35 +++++++++ .../Thermo.Active.Model.csproj | 2 + .../Controllers/WebApi/ModulesController.cs | 41 +++++++++++ Thermo.Active/Thermo.Active.csproj | 1 + 5 files changed, 150 insertions(+) create mode 100644 Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs create mode 100644 Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs create mode 100644 Thermo.Active/Controllers/WebApi/ModulesController.cs diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs new file mode 100644 index 00000000..26831f6f --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModule.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModule + { + public int Id { get; set; } = 0; + public int ActualDuration { get; set; } = 0; + public int ActualDelay { get; set; } = 0; + public int EstimDuration { get; set; } = 0; + public int EstimDelay { get; set; } = 0; + public List PrevModId { get; set; } = new List(); + public RBStatus Status { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is DTOModule item)) + return false; + + if (Id!= item.Id) + return false; + if (ActualDuration != item.ActualDuration) + return false; + if (ActualDelay != item.ActualDelay) + return false; + if (PrevModId != item.PrevModId) + return false; + if (EstimDelay != item.EstimDelay) + return false; + if (!Status.Equals(item.Status)) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + + public struct RBStatus + { + public bool Visible { get; set; } + public bool Executing { get; set; } + public bool HasError { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RBStatus item)) + return false; + + if (Visible != item.Visible) + return false; + if (Executing != item.Executing) + return false; + if (HasError != item.HasError) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs new file mode 100644 index 00000000..93d3c905 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModuleConfigModel.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModuleConfigModel + { + public int Id; + public string Label; + public BlockType Type; + public BlockSection Section; + public int IdMainParam = -1; // -1 = non visibile + public bool DelayVisible; + public int VisualPriority; + } + + public enum BlockType + { + HEATING, + DRAWING, + MOVEMENT, + VACUUM, + COOLING, + EXTRACTION + } + public enum BlockSection + { + HEATING, + FORMING, + EXTRACTION + } +} diff --git a/Thermo.Active.Model/Thermo.Active.Model.csproj b/Thermo.Active.Model/Thermo.Active.Model.csproj index b4394495..4621c464 100644 --- a/Thermo.Active.Model/Thermo.Active.Model.csproj +++ b/Thermo.Active.Model/Thermo.Active.Model.csproj @@ -102,6 +102,8 @@ + + diff --git a/Thermo.Active/Controllers/WebApi/ModulesController.cs b/Thermo.Active/Controllers/WebApi/ModulesController.cs new file mode 100644 index 00000000..20244e1f --- /dev/null +++ b/Thermo.Active/Controllers/WebApi/ModulesController.cs @@ -0,0 +1,41 @@ +using CMS_CORE_Library.Models; +using Thermo.Active.Model.DTOModels; +using Thermo.Active.NC; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Web.Http; +using static CMS_CORE_Library.Models.DataStructures; +using static Thermo.Active.Config.ServerConfig; +using static Thermo.Active.Model.Constants; +using Thermo.Active.Model.DTOModels.Recipe; + +namespace Thermo.Active.Controllers.WebApi +{ + [RoutePrefix("api/ModBlock")] + public class ModulesController : ApiController + { + [Route("current"), HttpGet] + public IHttpActionResult GetModules() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currRecipe); + } + } + + } +} \ No newline at end of file diff --git a/Thermo.Active/Thermo.Active.csproj b/Thermo.Active/Thermo.Active.csproj index 3677d1d4..27014bd2 100644 --- a/Thermo.Active/Thermo.Active.csproj +++ b/Thermo.Active/Thermo.Active.csproj @@ -222,6 +222,7 @@ + From 642026eadc3105ff697bb143da8b87d6d47c1b12 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 1 Jun 2020 18:23:37 +0200 Subject: [PATCH 09/84] update x nuovi metodi CORE library --- Thermo.Active.NC/NcAdapter.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 9e6c059f..23f0ba7b 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1079,18 +1079,20 @@ namespace Thermo.Active.NC // solo x S7... if (NcConfig.NcVendor == NC_VENDOR.S7NET) { - Dictionary currPlcRecipe = new Dictionary(); + Dictionary currPlcRecipe = new Dictionary(); CmsError cmsError = NO_ERROR; if (useLastRead) { - cmsError = numericalControl.PLC_RRecipeLastParamList(ref currPlcRecipe); + cmsError = numericalControl.PLC_RRecipeParamList(false, ref currPlcRecipe); } else { cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); } + if (cmsError.IsError()) return cmsError; + DTORecipeParam currParam = new DTORecipeParam(); // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() @@ -1110,7 +1112,7 @@ namespace Thermo.Active.NC if (currPlcRecipe.ContainsKey(item.Id)) { // recupero da mem PLC - DataStructures.RecipeParam paramPLC = currPlcRecipe[item.Id]; + ThermoModels.RecipeParam paramPLC = currPlcRecipe[item.Id]; currRange = new RPRange() { Min = paramPLC.ValMin, @@ -1178,11 +1180,11 @@ namespace Thermo.Active.NC if (NcConfig.NcVendor == NC_VENDOR.S7NET) { // ciclo x ogni valore della ricetta aggiornata ricevuto - DataStructures.RecipeParam currParam; + ThermoModels.RecipeParam currParam; foreach (var item in updtRecipe) { // salvo SOLO il setpoint HMI... - currParam = new DataStructures.RecipeParam() + currParam = new ThermoModels.RecipeParam() { Id = (short)item.Value.Id, SetpointHMI = item.Value.SetpointHMI From 3120746f601c0865a59ed22ccbfe1d82a68839f6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 1 Jun 2020 19:03:32 +0200 Subject: [PATCH 10/84] Draft DTO a classess for warmers & modules --- .../DTOModels/Recipe/DTOModulesBlock.cs | 97 +++++++++++++++++++ .../DTOModels/Recipe/DTOWarmers.cs | 97 +++++++++++++++++++ .../DTOModels/Recipe/RecipeParam.cs | 21 ---- .../DTOModels/Recipe/RecipeParamRT.cs | 27 ------ .../Thermo.Active.Model.csproj | 4 +- Thermo.Active.NC/NcAdapter.cs | 53 +++++++++- .../Controllers/WebApi/ModulesController.cs | 6 +- .../Controllers/WebApi/WarmersController.cs | 83 ++++++++++++++++ Thermo.Active/Listeners/ListenersHandler.cs | 3 + Thermo.Active/Thermo.Active.csproj | 1 + 10 files changed, 338 insertions(+), 54 deletions(-) create mode 100644 Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs create mode 100644 Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs delete mode 100644 Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs delete mode 100644 Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs create mode 100644 Thermo.Active/Controllers/WebApi/WarmersController.cs diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs new file mode 100644 index 00000000..33aca349 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOModulesBlock.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOModulesBlock + { + public int Id { get; set; } = 0; + public double SetpointHMI { get; set; } = 0; + public double SetpointPLC { get; set; } = 0; + //public RPRange Range { get; set; } + //public RPStatus Status { get; set; } + public string UnitMeasure { get; set; } + public double ValueAct { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is DTOModulesBlock item)) + return false; + + if (Id!= item.Id) + return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; + //if (!Range.Equals(item.Range)) + // return false; + //if (!Status.Equals(item.Status)) + // return false; + if (UnitMeasure != item.UnitMeasure) + return false; + if (ValueAct != item.ValueAct) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + +#if false + public struct RPRange + { + public double Min { get; set; } + public double Max { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPRange item)) + return false; + + if (Min != item.Min) + return false; + if (Max != item.Max) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + public struct RPStatus + { + public bool Visible { get; set; } + public bool Enabled { get; set; } + public bool HasError { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPStatus item)) + return false; + + if (Visible != item.Visible) + return false; + if (Enabled != item.Enabled) + return false; + if (HasError != item.HasError) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +#endif +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs new file mode 100644 index 00000000..66fb0f79 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Model.DTOModels.Recipe +{ + public class DTOWarmers + { + public int Id { get; set; } = 0; + public double SetpointHMI { get; set; } = 0; + public double SetpointPLC { get; set; } = 0; + //public RPRange Range { get; set; } + //public RPStatus Status { get; set; } + public string UnitMeasure { get; set; } + public double ValueAct { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is DTOWarmers item)) + return false; + + if (Id!= item.Id) + return false; + if (SetpointHMI != item.SetpointHMI) + return false; + if (SetpointPLC != item.SetpointPLC) + return false; + //if (!Range.Equals(item.Range)) + // return false; + //if (!Status.Equals(item.Status)) + // return false; + if (UnitMeasure != item.UnitMeasure) + return false; + if (ValueAct != item.ValueAct) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + +#if false + public struct RPRange + { + public double Min { get; set; } + public double Max { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPRange item)) + return false; + + if (Min != item.Min) + return false; + if (Max != item.Max) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } + public struct RPStatus + { + public bool Visible { get; set; } + public bool Enabled { get; set; } + public bool HasError { get; set; } + public override bool Equals(object obj) + { + if (!(obj is RPStatus item)) + return false; + + if (Visible != item.Visible) + return false; + if (Enabled != item.Enabled) + return false; + if (HasError != item.HasError) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +#endif +} diff --git a/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs b/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs deleted file mode 100644 index 0be98501..00000000 --- a/Thermo.Active.Model/DTOModels/Recipe/RecipeParam.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Thermo.Active.Model.DTOModels.Recipe -{ - /// - /// Struttura parametri "lenti" (lettura NON frequente) - /// - public class RecipeParam - { - public int Id { get; set; } - public double SetpointHMI { get; set; } - public double SetpointPLC { get; set; } - public double ValueMax { get; set; } - public double ValueMin { get; set; } - public string UnitMeasure { get; set; } - } -} diff --git a/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs b/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs deleted file mode 100644 index 97628808..00000000 --- a/Thermo.Active.Model/DTOModels/Recipe/RecipeParamRT.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Thermo.Active.Model.DTOModels.Recipe -{ - /// - /// Struttura parametri "veloci" (RT=RealTime, lettura frequente) - /// - public class RecipeParamRT - { - public short Id { get; set; } - public short StatusBit { get; set; } - public double ValueAct { get; set; } - } - - [Flags] - public enum StatusVal - { - None = 0x0, - Visible = 0x1, - Enabled = 0x2, - HasError = 0x4 - } -} diff --git a/Thermo.Active.Model/Thermo.Active.Model.csproj b/Thermo.Active.Model/Thermo.Active.Model.csproj index 4621c464..966a0296 100644 --- a/Thermo.Active.Model/Thermo.Active.Model.csproj +++ b/Thermo.Active.Model/Thermo.Active.Model.csproj @@ -104,6 +104,8 @@ + + @@ -116,8 +118,6 @@ - - diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 23f0ba7b..e510d828 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1577,7 +1577,6 @@ namespace Thermo.Active.NC return cmsError; } - /// /// Scrive tutti i parametri della ricetta indicati /// @@ -1658,6 +1657,58 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Legge tutti i parametri della ricetta + /// + /// Oggetto elenco modules block + /// + public CmsError ReadModulesBlock(out Dictionary currModules) + { + CmsError cmsError = NO_ERROR; + currModules = new Dictionary(); + + // FIXME TODO +#if false + DTORecipeParam currParam = new DTORecipeParam(); + RPRange currRange = new RPRange(); + RPStatus currStatus = new RPStatus(); + + // gestione errore + cmsError = ReadRecipeData(false, true, out currModules); + if (cmsError.IsError()) + return cmsError; +#endif + + // restituisco cod errore se trovato + return cmsError; + } + + /// + /// Legge tutti i parametri della ricetta + /// + /// Oggetto elenco 1024 ch riscaldi + /// + public CmsError ReadWarmers(out Dictionary currWarmers) + { + CmsError cmsError = NO_ERROR; + currWarmers = new Dictionary(); + + // FIXME TODO +#if false + DTORecipeParam currParam = new DTORecipeParam(); + RPRange currRange = new RPRange(); + RPStatus currStatus = new RPStatus(); + + // gestione errore + cmsError = ReadRecipeData(false, true, out currModules); + if (cmsError.IsError()) + return cmsError; +#endif + + // restituisco cod errore se trovato + return cmsError; + } + #endregion Read Data diff --git a/Thermo.Active/Controllers/WebApi/ModulesController.cs b/Thermo.Active/Controllers/WebApi/ModulesController.cs index 20244e1f..035927cc 100644 --- a/Thermo.Active/Controllers/WebApi/ModulesController.cs +++ b/Thermo.Active/Controllers/WebApi/ModulesController.cs @@ -20,7 +20,7 @@ namespace Thermo.Active.Controllers.WebApi public class ModulesController : ApiController { [Route("current"), HttpGet] - public IHttpActionResult GetModules() + public IHttpActionResult GetCurrentModules() { using (NcAdapter ncAdapter = new NcAdapter()) { @@ -29,11 +29,11 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + CmsError cmsError = ncAdapter.ReadModulesBlock(out Dictionary currModules); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - return Ok(currRecipe); + return Ok(currModules); } } diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs new file mode 100644 index 00000000..f437f5b5 --- /dev/null +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -0,0 +1,83 @@ +using CMS_CORE_Library.Models; +using Thermo.Active.Model.DTOModels; +using Thermo.Active.NC; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Web.Http; +using static CMS_CORE_Library.Models.DataStructures; +using static Thermo.Active.Config.ServerConfig; +using static Thermo.Active.Model.Constants; +using Thermo.Active.Model.DTOModels.Recipe; + +namespace Thermo.Active.Controllers.WebApi +{ + [RoutePrefix("api/warmers")] + public class WarmersController : ApiController + { + [Route("current"), HttpGet] + public IHttpActionResult GetCurrentWarmers() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currWarmers); + } + } + + + // FIXME TODO determinare IN PRIMIS nel modello COSA e come aggiornare... +#if false + [Route("update"), HttpPut] + public IHttpActionResult WriteWarmers(Dictionary parametersList) + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + Dictionary updtRecipe = new Dictionary(); + + foreach (var item in parametersList) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + else + { + return NotFound(); + } + } + + // scrivo sul PLC + ncAdapter.WriteRecipeParams(updtRecipe); + + // ritorno solo fatto! + return Ok(); + } + } +#endif + + } +} \ No newline at end of file diff --git a/Thermo.Active/Listeners/ListenersHandler.cs b/Thermo.Active/Listeners/ListenersHandler.cs index 1571ea8b..47bb4851 100644 --- a/Thermo.Active/Listeners/ListenersHandler.cs +++ b/Thermo.Active/Listeners/ListenersHandler.cs @@ -114,6 +114,9 @@ namespace Thermo.Active.Listeners SignalRListener.SendThermoGaugeData(a); })); + // FIXME TODO ADD ProdCycle + + // FIXME TODO ADD ProdInfo // Broadcast infos.Add(MessageServices.Current.Subscribe(BROADCAST_DATA, (a, b) => diff --git a/Thermo.Active/Thermo.Active.csproj b/Thermo.Active/Thermo.Active.csproj index 27014bd2..f6b40ad4 100644 --- a/Thermo.Active/Thermo.Active.csproj +++ b/Thermo.Active/Thermo.Active.csproj @@ -223,6 +223,7 @@ + From e5daf52bb481e0c13c967b04354108aa3689e730 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 15:21:00 +0200 Subject: [PATCH 11/84] Add xml/xsd for ModBlock and Risk --- .../Config/moduleBlockConfig.xml | 21 + .../Config/moduleBlockConfigValidator.xsd | 43 + .../Config/risk2007Config.xml | 981 ++++++++++++++++++ .../Config/risk2007ConfigValidator.xsd | 304 ++++++ 4 files changed, 1349 insertions(+) create mode 100644 Thermo.Active.Config/Config/moduleBlockConfig.xml create mode 100644 Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd create mode 100644 Thermo.Active.Config/Config/risk2007Config.xml create mode 100644 Thermo.Active.Config/Config/risk2007ConfigValidator.xsd diff --git a/Thermo.Active.Config/Config/moduleBlockConfig.xml b/Thermo.Active.Config/Config/moduleBlockConfig.xml new file mode 100644 index 00000000..22fa3bc2 --- /dev/null +++ b/Thermo.Active.Config/Config/moduleBlockConfig.xml @@ -0,0 +1,21 @@ + + + + 1 + + Heating +
Heating
+ 1 + true + 1 +
+ + 2 + + Heating +
Heating
+ -1 + true + 1 +
+
\ No newline at end of file diff --git a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd new file mode 100644 index 00000000..ae074146 --- /dev/null +++ b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Thermo.Active.Config/Config/risk2007Config.xml b/Thermo.Active.Config/Config/risk2007Config.xml new file mode 100644 index 00000000..2091b8f9 --- /dev/null +++ b/Thermo.Active.Config/Config/risk2007Config.xml @@ -0,0 +1,981 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + \ No newline at end of file diff --git a/Thermo.Active.Config/Config/risk2007ConfigValidator.xsd b/Thermo.Active.Config/Config/risk2007ConfigValidator.xsd new file mode 100644 index 00000000..415a9194 --- /dev/null +++ b/Thermo.Active.Config/Config/risk2007ConfigValidator.xsd @@ -0,0 +1,304 @@ + + + + + + + Id tipo resistenza. Corrisponde al'id riferimento + + + + + Numero riga di appartenenza + + + + + Id della termocoppia installata. 0 = no termocoppia, altrimenti 1... + + + + + Id della termocoppia di riferimento + + + + + Id del gruppo di appartenenza + + + + + Numero del canale assoluto + + + + + TRUE = duty cycle nuovo, altrimenti FALSE + + + + + Spazio da aggiungere prima della resistenza [pix] + + + + + Spazio da aggiungere dopo la resistenza [pix] + + + + + Sfasamento per pilotaggio a impulsi: +possibilità di far lavorare alcuni canali sfasati rispetto agli altri, in modo da avere un assorbimento istantaneo il più basso possibile. +Default=FALSE + + + + + + Ritardo per la partenza del soft-start ad impulsi per ogni singolo canale senza che questo abbia necessariamente finito la rampa +Default=0 + + + + + + + + + + + + + + + + + + Id tipo resistenza + + + + Corrente riferimento specifico per il tipo resistenza + + + + + Potenza nominale della resistenza espressa in Watt + + + + + Marca e modello resistenza + + + + + 1=250mm 2=125mm + + + + + Soglia bassa sotto cui considerare l'assorbimento un allarme + + + + + Usata in collaudo. Esprime la semiampiezza dell'intorno di corrente di lettura entro cui l'assorbimento è considerato coretto + + + + + Usata in lavoro. Esprime il numero di letture non buone oltre cui considerare allarme + + + + + Impostazioni softstart. +Bit0-4: definiscono la velocità del softstart. Il valore indica il numero di ripetizioni del singolo step della rampa. Più il valore è piccolo maggiore sarà la velocità del softstart. [default 3]. +Bit5: se = 0 il softstart lavora con tabella fissa (solo 50hZ), se = 1 il softstart lavora con i valori WaveMax e IntervalWidth, anche con frequenze diverse da 50hZ. + + + + + Numero di letture dell'allarme oltre cui considerare vero l'allarme + + + + + Limite di percentuale per soft start +Default=100 +Esempio: se pct target = 50% e SoftLim=35%, viene effettuato il soft start fino al 35% poi si salta alla pct target di 50% + + + + + + + Percentuale minima per duty a impulsi +Default=0 +Esempio: se PctMin=40% per pct target da 0-39% viene usato il pilataggio a parzializzazione di fase (alogeno) da 40% a 100% viene usato il pilotaggio a impulsi (quarzo) + + + + + + + + Record di configurazione correnti per tipo resistenza + + + + Boh!!! + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + Sensibilità [W] + + + + + + Configurazione sistema di riscaldo NEW_Risk2007 + + + + + + + + + + 0 = riscaldo superiore, 1 = riscaldo inferiore, 2 = preriscaldo sup., 3 = preriscaldo inf. + + + + + Fattore di scala per disegnare il riscaldo [TwinPix] + + + + + Fattore di proporzione fra larghezza e altezza [larghezza/altezza] + + + + + Offset di compensazione lettura termocoppia + + + + + Interasse fra le righe di resistenza [mm] + + + + + + + + + + + + + + + + + + + + + + + + Indirizzo di memorizzazione termocoppie lato CPU: 4D5=R8TC8IO, D5=NEW_RISK2007 + + + + + Velocità di trasmissione [baud] (9600,19200) + + + + + Porta seriale per comunicazione con CPU riscaldo + + + + + Fattore di moltiplicazione della lettura della termocoppia: 0.5=R8TC8IO, 0.6=NEW_RISK2007 + + + + + TRUE = utilizzo la parametrizzazione per il softStart, FALSE = utilizzo il softstart cablato nel firmware delle res8CH + + + + + Numero di semionde massime in un secondo (50hZ = 120, 60hZ = 140) + + + + + Durata in tempo di 1/100 di semionda [microsec] (50hZ = 95, 60hZ = 82) + + + + + Durata timeout per spegnimento riscaldo in caso di mancanza di comunicazione con la CPU. Trascorso il timout serve rimandare un comando di ON alla CPU per la riaccensione del riscaldo. Indicando 0 la CPU ignora lo spegnimento automatico su assenza di comunicazione. [sec] + + + + + Durata in tempo di 1/100 di semionda [microsec] per lampade al quarzo + + + + + Frequenza di invio dei frame di regolazione dalla cpu per lampade al quarzo + + + + + From 8bd8144294d054f7ea4c0dbf2b3cb9512cc1b6aa Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 15:21:15 +0200 Subject: [PATCH 12/84] Started config setup for new objects --- Thermo.Active.Config/ServerConfig.cs | 2 + .../ServerConfigController.cs | 56 ++++++++++++++++++- .../Thermo.Active.Config.csproj | 16 ++++++ .../ConfigModels/ModBlockConfigModel.cs | 16 ++++++ .../ConfigModels/RiskConfigModel.cs | 16 ++++++ Thermo.Active.Model/Constants.cs | 25 +++++++++ .../Thermo.Active.Model.csproj | 2 + Thermo.Active.Utils/supportFunctions.cs | 40 ++++++++++++- 8 files changed, 167 insertions(+), 6 deletions(-) create mode 100644 Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs create mode 100644 Thermo.Active.Model/ConfigModels/RiskConfigModel.cs diff --git a/Thermo.Active.Config/ServerConfig.cs b/Thermo.Active.Config/ServerConfig.cs index 361d1889..59a61a21 100644 --- a/Thermo.Active.Config/ServerConfig.cs +++ b/Thermo.Active.Config/ServerConfig.cs @@ -33,6 +33,8 @@ namespace Thermo.Active.Config public static List InitialAlarmsConfig; public static List HeadsConfig; public static List RecipeConfig; + public static List ModBlockConfig; + public static List RiskConfig; public static CmsConnectConfigModel CmsConnectConfig; public static AreasConfigModel ProductionConfig; diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 68df96f3..bd28630f 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -34,6 +34,8 @@ namespace Thermo.Active.Config ReadAlarmsConfig(); ReadHeadsConfig(); ReadRecipeConfig(); + ReadModBlockConfig(); + ReadRiskConfig(); // ReadCMSConnectConfig(); ReadMacros(); ReadScadaFile(); @@ -572,19 +574,21 @@ namespace Thermo.Active.Config }) .ToList(); } - + /// + /// Recipe Config setup from file + /// private static void ReadRecipeConfig() { XDocument xmlConfigFile = GetXmlHandlerWithValidator(RECIPE_CONFIG_SCHEMA_PATH, RECIPE_CONFIG_PATH); - // Read head config from XML file + // Read Recipe config from XML file RecipeConfig = xmlConfigFile .Root .Elements() .Select(x => new RecipeConfigModel() { Id = Convert.ToInt16(x.Element("id").Value), - Category = GetTActCategory(x.Element("category").Value), + Category = GetTActParamType(x.Element("category").Value), SubCategory_1 = x.Element("subCategory_1").Value, SubCategory_2 = x.Element("subCategory_2").Value, Name = x.Element("name").Value, @@ -593,6 +597,52 @@ namespace Thermo.Active.Config }) .ToList(); } + /// + /// Module config setup from file + /// + private static void ReadModBlockConfig() + { + XDocument xmlConfigFile = GetXmlHandlerWithValidator(MODBLOCK_CONFIG_SCHEMA_PATH, MODBLOCK_CONFIG_PATH); + + // Read head config from XML file + ModBlockConfig = xmlConfigFile + .Root + .Elements() + .Select(x => new ModBlockConfigModel() + { + Id = Convert.ToInt16(x.Element("id").Value), + Label = x.Element("label").Value, + Type = GetTActMB_Type(x.Element("type").Value), + Section = GetTActMB_Section(x.Element("section").Value), + IdParam = Convert.ToInt16(x.Element("idParam").Value), + ShowDelay = Convert.ToBoolean(x.Element("showDelay").Value), + Priority = Convert.ToInt16(x.Element("priority").Value) + }) + .ToList(); + } + /// + /// Warmers config setup from file + /// + private static void ReadRiskConfig() + { + XDocument xmlConfigFile = GetXmlHandlerWithValidator(RISK_CONFIG_SCHEMA_PATH, RISK_CONFIG_PATH); + + //// Read head config from XML file + //RiskConfig = xmlConfigFile + // .Root + // .Elements() + // .Select(x => new RiskConfigModel() + // { + // Id = Convert.ToInt16(x.Element("id").Value), + // Category = GetTActCategory(x.Element("category").Value), + // SubCategory_1 = x.Element("subCategory_1").Value, + // SubCategory_2 = x.Element("subCategory_2").Value, + // Name = x.Element("name").Value, + // Description = x.Element("description").Value, + // Format = x.Element("format").Value + // }) + // .ToList(); + } private static void ReadCMSConnectConfig() { diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index e171df4b..3881321e 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -69,9 +69,15 @@ Always + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest Designer @@ -159,5 +165,15 @@ Designer + + + Designer + + + + + Designer + + \ No newline at end of file diff --git a/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs new file mode 100644 index 00000000..1b96a39f --- /dev/null +++ b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using static Thermo.Active.Model.Constants; + +namespace Thermo.Active.Model.ConfigModels +{ + public class ModBlockConfigModel + { + public int Id; + public string Label { get; set; } + public TACT_MBLOCK_TYPE Type { get; set; } + public TACT_MBLOCK_SECTION Section { get; set; } + public int IdParam{ get; set; } + public bool ShowDelay { get; set; } + public int Priority { get; set; } + } +} diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs new file mode 100644 index 00000000..238375d7 --- /dev/null +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using static Thermo.Active.Model.Constants; + +namespace Thermo.Active.Model.ConfigModels +{ + public class RiskConfigModel + { + public int Id; + public TACT_PARAM_TYPE Category { get; set; } + public string SubCategory_1 { get; set; } + public string SubCategory_2 { get; set; } + public string Name { get; set; } + public string Description { get; set; } + public string Format { get; set; } + } +} diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index b3e58e33..d12ea9f3 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -90,6 +90,25 @@ namespace Thermo.Active.Model Options } + public enum TACT_MBLOCK_TYPE + { + ND = 0, + Heating, + Drawing, + Movement, + Vacuum, + Cooling, + Extraction + } + + public enum TACT_MBLOCK_SECTION + { + ND = 0, + Heating, + Forming, + Extraction + } + public enum MAINTENANCE_UNIT_OF_MEASURE { mm = 0, @@ -216,6 +235,12 @@ namespace Thermo.Active.Model public const string RECIPE_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "recipeConfigValidator.xsd"; public const string RECIPE_CONFIG_PATH = CONFIG_DIRECTORY + "recipeConfig.xml"; + public const string MODBLOCK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "moduleBlockConfigValidator.xsd"; + public const string MODBLOCK_CONFIG_PATH = CONFIG_DIRECTORY + "moduleBlockConfig.xml"; + + public const string RISK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "risk2007ConfigValidator.xsd"; + public const string RISK_CONFIG_PATH = CONFIG_DIRECTORY + "risk2007Config.xml"; + public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "ncSoftKeyConfigValidator.xsd"; public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml"; diff --git a/Thermo.Active.Model/Thermo.Active.Model.csproj b/Thermo.Active.Model/Thermo.Active.Model.csproj index 966a0296..20404e3f 100644 --- a/Thermo.Active.Model/Thermo.Active.Model.csproj +++ b/Thermo.Active.Model/Thermo.Active.Model.csproj @@ -63,6 +63,8 @@ + + diff --git a/Thermo.Active.Utils/supportFunctions.cs b/Thermo.Active.Utils/supportFunctions.cs index 269cd3f8..b41ac62a 100644 --- a/Thermo.Active.Utils/supportFunctions.cs +++ b/Thermo.Active.Utils/supportFunctions.cs @@ -39,13 +39,47 @@ namespace Thermo.Active.Utils default: return HEAD_TYPE.WJ; } } - - public static TACT_PARAM_TYPE GetTActCategory(string strCategory) + /// + /// Conversion string --> TACT_PARAM_TYPE + /// + /// + /// + public static TACT_PARAM_TYPE GetTActParamType(string strValue) { TACT_PARAM_TYPE answ = TACT_PARAM_TYPE.ND; try { - answ = (TACT_PARAM_TYPE)Enum.Parse(typeof(TACT_PARAM_TYPE), strCategory); + answ = (TACT_PARAM_TYPE)Enum.Parse(typeof(TACT_PARAM_TYPE), strValue); + } + catch { } + return answ; + } + /// + /// Conversion string --> TACT_MBLOCK_TYPE + /// + /// + /// + public static TACT_MBLOCK_TYPE GetTActMB_Type(string strValue) + { + TACT_MBLOCK_TYPE answ = TACT_MBLOCK_TYPE.ND; + try + { + answ = (TACT_MBLOCK_TYPE)Enum.Parse(typeof(TACT_MBLOCK_TYPE), strValue); + } + catch { } + return answ; + } + /// + /// Conversion string --> TACT_MBLOCK_SECTION + /// + /// + /// + public static TACT_MBLOCK_SECTION GetTActMB_Section(string strValue) + { + TACT_MBLOCK_SECTION answ = TACT_MBLOCK_SECTION.ND; + try + { + answ = (TACT_MBLOCK_SECTION)Enum.Parse(typeof(TACT_MBLOCK_SECTION), strValue); } catch { } return answ; From d6ea0e7f9af5dc3f5d402912c7aecb5d7832f94d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 15:52:00 +0200 Subject: [PATCH 13/84] Update ENUM uppercase --- .../Config/moduleBlockConfigValidator.xsd | 18 +++++++++--------- Thermo.Active.Model/Constants.cs | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd index ae074146..d4841553 100644 --- a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd +++ b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd @@ -24,20 +24,20 @@ - - - - - - + + + + + + - - - + + + \ No newline at end of file diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index d12ea9f3..3656cd00 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -93,20 +93,20 @@ namespace Thermo.Active.Model public enum TACT_MBLOCK_TYPE { ND = 0, - Heating, - Drawing, - Movement, - Vacuum, - Cooling, - Extraction + HEATING, + DRAWING, + MOVEMENT, + VACUUM, + COOLING, + EXTRACTION } public enum TACT_MBLOCK_SECTION { ND = 0, - Heating, - Forming, - Extraction + HEATING, + FORMING, + EXTRACTION } public enum MAINTENANCE_UNIT_OF_MEASURE From 3d16c4d682144a5c10f6dbf8bb0d8c4ac6ff5005 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 19:02:56 +0200 Subject: [PATCH 14/84] Fix moduleBLock config --- .../Config/moduleBlockConfig.xml | 192 ++++++++++++++++-- .../Config/moduleBlockConfigValidator.xsd | 23 ++- 2 files changed, 198 insertions(+), 17 deletions(-) diff --git a/Thermo.Active.Config/Config/moduleBlockConfig.xml b/Thermo.Active.Config/Config/moduleBlockConfig.xml index 22fa3bc2..ef3095f8 100644 --- a/Thermo.Active.Config/Config/moduleBlockConfig.xml +++ b/Thermo.Active.Config/Config/moduleBlockConfig.xml @@ -1,21 +1,185 @@ - - + + 1 - - Heating -
Heating
- 1 - true + + DiscesaCZ ENG + DiscesaCZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false 1 -
- + + 2 - - Heating -
Heating
+ + MembDiscesaZ ENG + MembDiscesaZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 3 + + MembZ ENG + MembZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 4 + + Mod_MembSalitaZ ENG + Mod_MembSalitaZ ITA + + MOVEMENT +
HEATING
+ -1 + false + false + 1 +
+ + 6 + + Mod_RiscaldoInf ENG + Mod_RiscaldoInf ITA + + HEATING +
HEATING
+ -1 + false + false + 1 +
+ + 7 + + Mod_RiscaldoSup ENG + Mod_RiscaldoSup ITA + + HEATING +
HEATING
+ 0 + false + false + 2 +
+ + 8 + + Mod_PirometroRisc ENG + Mod_PirometroRisc ITA + + HEATING +
HEATING
+ 80 + true + true + 3 +
+ + 13 + + Mod_Imbutitura ENG + Mod_Imbutitura ITA + + DRAWING +
FORMING
+ 99 + true + true + 2 +
+ + 16 + + Mod_Raffreddamento ENG + Mod_Raffreddamento ITA + + COOLING +
FORMING
-1 true + false + 2 +
+ + 17 + + Mod_PirometroRaffr ENG + Mod_PirometroRaffr ITA + + COOLING +
FORMING
+ 139 + true + true + 3 +
+ + 19 + + Mod_Vuoto ENG + Mod_Vuoto ITA + + VACUUM +
FORMING
+ -1 + true + false + 4 +
+ + 21 + + Mod_VuotoDiretto ENG + Mod_VuotoDiretto ITA + + VACUUM +
FORMING
+ -1 + true + false + 5 +
+ + 36 + + Mod_EstrazioneZ ENG + Mod_EstrazioneZ ITA + + EXTRACTION +
EXTRACTION
+ -1 + true + false + 2 +
+ + 42 + + Mod_SalitaCZ ENG + Mod_SalitaCZ ITA + + MOVEMENT +
EXTRACTION
+ -1 + false + false 1 -
-
\ No newline at end of file + + \ No newline at end of file diff --git a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd index d4841553..220ba2fb 100644 --- a/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd +++ b/Thermo.Active.Config/Config/moduleBlockConfigValidator.xsd @@ -1,18 +1,26 @@  - + - + - + + + + + + + + + @@ -21,6 +29,15 @@ + + + + + + + + + From eba5920137a005082f03838e0d62274b06982b65 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 19:03:13 +0200 Subject: [PATCH 15/84] Update risk naming --- .../Config/{risk2007Config.xml => risk2007.xml} | 2 +- .../{risk2007ConfigValidator.xsd => risk2007Validator.xsd} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Thermo.Active.Config/Config/{risk2007Config.xml => risk2007.xml} (99%) rename Thermo.Active.Config/Config/{risk2007ConfigValidator.xsd => risk2007Validator.xsd} (100%) diff --git a/Thermo.Active.Config/Config/risk2007Config.xml b/Thermo.Active.Config/Config/risk2007.xml similarity index 99% rename from Thermo.Active.Config/Config/risk2007Config.xml rename to Thermo.Active.Config/Config/risk2007.xml index 2091b8f9..61a34c58 100644 --- a/Thermo.Active.Config/Config/risk2007Config.xml +++ b/Thermo.Active.Config/Config/risk2007.xml @@ -1,5 +1,5 @@  - + diff --git a/Thermo.Active.Config/Config/risk2007ConfigValidator.xsd b/Thermo.Active.Config/Config/risk2007Validator.xsd similarity index 100% rename from Thermo.Active.Config/Config/risk2007ConfigValidator.xsd rename to Thermo.Active.Config/Config/risk2007Validator.xsd From 90ef09785c8290bd944287d1ae3f1a23f786aece Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2020 19:03:28 +0200 Subject: [PATCH 16/84] update decoding objects --- Thermo.Active.Config/ServerConfig.cs | 3 +- .../ServerConfigController.cs | 28 +++++++++++--- .../Thermo.Active.Config.csproj | 4 +- .../ConfigModels/ModBlockConfigModel.cs | 2 +- .../ConfigModels/RiskConfigModel.cs | 37 +++++++++++++++---- Thermo.Active.Model/Constants.cs | 4 +- 6 files changed, 59 insertions(+), 19 deletions(-) diff --git a/Thermo.Active.Config/ServerConfig.cs b/Thermo.Active.Config/ServerConfig.cs index 59a61a21..e18c1028 100644 --- a/Thermo.Active.Config/ServerConfig.cs +++ b/Thermo.Active.Config/ServerConfig.cs @@ -34,7 +34,8 @@ namespace Thermo.Active.Config public static List HeadsConfig; public static List RecipeConfig; public static List ModBlockConfig; - public static List RiskConfig; + public static List RiskResistConfig; + public static List RiskChannelConfig; public static CmsConnectConfigModel CmsConnectConfig; public static AreasConfigModel ProductionConfig; diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index bd28630f..56d93da0 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -610,8 +610,10 @@ namespace Thermo.Active.Config .Elements() .Select(x => new ModBlockConfigModel() { - Id = Convert.ToInt16(x.Element("id").Value), - Label = x.Element("label").Value, + Id = Convert.ToInt16(x.Element("id").Value), + LocalizedLabels = x.Element("localizedLabels").Elements().ToDictionary( + y => y.Attribute("langKey").Value, y => y.Value + ), Type = GetTActMB_Type(x.Element("type").Value), Section = GetTActMB_Section(x.Element("section").Value), IdParam = Convert.ToInt16(x.Element("idParam").Value), @@ -627,14 +629,28 @@ namespace Thermo.Active.Config { XDocument xmlConfigFile = GetXmlHandlerWithValidator(RISK_CONFIG_SCHEMA_PATH, RISK_CONFIG_PATH); - //// Read head config from XML file - //RiskConfig = xmlConfigFile + // Read head config from XML file + RiskResistConfig = xmlConfigFile + .Root + .Elements() + .Select(x => new RiskResistModel() + { + Id=0, + IdChannel = Convert.ToInt16(x.Element("canale").Value), + Row = Convert.ToInt16(x.Element("riga").Value), + Column=0, + Dimension=0 + }) + .ToList(); + + + //RiskChannelConfig = xmlConfigFile // .Root // .Elements() - // .Select(x => new RiskConfigModel() + // .Select(x => new RiskChannelModel() // { // Id = Convert.ToInt16(x.Element("id").Value), - // Category = GetTActCategory(x.Element("category").Value), + // //Category = GetTActCategory(x.Element("category").Value), // SubCategory_1 = x.Element("subCategory_1").Value, // SubCategory_2 = x.Element("subCategory_2").Value, // Name = x.Element("name").Value, diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index 3881321e..27d70235 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -75,7 +75,7 @@ PreserveNewest - + PreserveNewest @@ -171,7 +171,7 @@ - + Designer diff --git a/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs index 1b96a39f..52738f36 100644 --- a/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs +++ b/Thermo.Active.Model/ConfigModels/ModBlockConfigModel.cs @@ -6,7 +6,7 @@ namespace Thermo.Active.Model.ConfigModels public class ModBlockConfigModel { public int Id; - public string Label { get; set; } + public Dictionary LocalizedLabels { get; set; } public TACT_MBLOCK_TYPE Type { get; set; } public TACT_MBLOCK_SECTION Section { get; set; } public int IdParam{ get; set; } diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs index 238375d7..224b1db2 100644 --- a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -3,14 +3,37 @@ using static Thermo.Active.Model.Constants; namespace Thermo.Active.Model.ConfigModels { - public class RiskConfigModel + public class RiskRiflettore + { + public int Tipo; + public List resistenza; + } + public class RiskResistenza + { + public int Tipo; + public int Riga; + public int Canale; + } + public class RiskRiferimenti { public int Id; - public TACT_PARAM_TYPE Category { get; set; } - public string SubCategory_1 { get; set; } - public string SubCategory_2 { get; set; } - public string Name { get; set; } - public string Description { get; set; } - public string Format { get; set; } + public int Potenza; + public int Dimensione; + } + public class RiskResistModel + { + public int Id; + public int IdChannel; + public int Column; + public int Row; + public int Dimension; + } + public class RiskChannelModel + { + public int IdChannel; + public int IdReflector; + public int SetpointRecipe; + public int SetpointThermo; + public int MaxPower; } } diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index 3656cd00..480e679d 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -238,8 +238,8 @@ namespace Thermo.Active.Model public const string MODBLOCK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "moduleBlockConfigValidator.xsd"; public const string MODBLOCK_CONFIG_PATH = CONFIG_DIRECTORY + "moduleBlockConfig.xml"; - public const string RISK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "risk2007ConfigValidator.xsd"; - public const string RISK_CONFIG_PATH = CONFIG_DIRECTORY + "risk2007Config.xml"; + public const string RISK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "risk2007Validator.xsd"; + public const string RISK_CONFIG_PATH = CONFIG_DIRECTORY + "risk2007.xml"; public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "ncSoftKeyConfigValidator.xsd"; public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml"; From 3b3b6c424ec85cf6ef2b36c147ab47787ec6d5e5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 12:06:11 +0200 Subject: [PATCH 17/84] Completed RISK config decoding --- .../ServerConfigController.cs | 178 +++++++++++++----- .../ConfigModels/RiskConfigModel.cs | 2 +- 2 files changed, 128 insertions(+), 52 deletions(-) diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 56d93da0..86c811d4 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -13,14 +13,14 @@ using System.Xml.Linq; using System.Xml.Schema; using System.Xml.Serialization; using static Thermo.Active.Config.ServerConfig; -using static Thermo.Active.Model.Constants; +using static Thermo.Active.Model.Constants; using static Thermo.Active.Utils.SupportFunctions; namespace Thermo.Active.Config { public static class ServerConfigController { - private static string actualFileName; + private static string actualFileName; public static void ReadStartupConfig() { @@ -44,7 +44,7 @@ namespace Thermo.Active.Config catch (XmlException ex) { ExceptionManager.ManageError(ERROR_LEVEL.FATAL, - "Error while reading file: " + ex.SourceUri + + "Error while reading file: " + ex.SourceUri + "\n Error: " + ex.Message, true ); @@ -53,7 +53,7 @@ namespace Thermo.Active.Config { var message = ex.Message; if (ex.InnerException != null) - message += "\n"+ex.InnerException.Message; + message += "\n" + ex.InnerException.Message; ExceptionManager.ManageError(ERROR_LEVEL.FATAL, message, true); } } @@ -62,7 +62,7 @@ namespace Thermo.Active.Config { // Create new instance XmlSchemaSet readerSettings = new XmlSchemaSet(); - + // Add Schema from Assembly Assembly myAssembly = Assembly.GetExecutingAssembly(); using (Stream schemaStream = myAssembly.GetManifestResourceStream(configSchemaFilePath)) @@ -72,11 +72,11 @@ namespace Thermo.Active.Config readerSettings.Add(null, schemaReader); } } - + actualFileName = configFilePath; // Open file reader - XDocument xmlConfigFile = XDocument.Load((!isFullPath ? BASE_PATH + "\\": "") + configFilePath); + XDocument xmlConfigFile = XDocument.Load((!isFullPath ? BASE_PATH + "\\" : "") + configFilePath); // Validate file xmlConfigFile.Validate(readerSettings, ValidationHandler); @@ -132,13 +132,13 @@ namespace Thermo.Active.Config break; case AREAS.SCADA_KEY: - SetAreaValue(ref ScadaConfig, element); + SetAreaValue(ref ScadaConfig, element); break; case AREAS.JOBEDITOR_KEY: SetAreaValue(ref JobEditorConfig, element); break; - + case AREAS.USERS_KEY: SetAreaValue(ref UsersConfig, element); break; @@ -160,20 +160,20 @@ namespace Thermo.Active.Config private static void ValidationHandler(object sender, ValidationEventArgs e) { if (e.Severity == XmlSeverityType.Warning) - { + { ExceptionManager.ManageError(ERROR_LEVEL.WARNING, e.Message, true); - } + } else if (e.Severity == XmlSeverityType.Error) - { + { ExceptionManager.ManageError(ERROR_LEVEL.FATAL, // "Error while reading file: " + e.Exception.SourceUri + "Error while reading XML file \"" + actualFileName + "\" \n\n" + e.Message, true ); - } + } } - public static bool CheckAreaStatus(string areaName) + public static bool CheckAreaStatus(string areaName) { // Get Area status ( enabled field) by name switch (areaName) { @@ -208,7 +208,7 @@ namespace Thermo.Active.Config } private static void ReadScadaFile() - { + { DirectoryInfo d = new DirectoryInfo(SCADA_DIRECTORY); FileInfo[] files = d.GetFiles("*.xml"); @@ -220,7 +220,7 @@ namespace Thermo.Active.Config StreamReader sr = new StreamReader(SCADA_DIRECTORY + file.Name); XmlSerializer xmlSerializer = new XmlSerializer(typeof(ScadaSchemaModel)); - ScadaSchemaModel schema = xmlSerializer.Deserialize(sr) as ScadaSchemaModel; + ScadaSchemaModel schema = xmlSerializer.Deserialize(sr) as ScadaSchemaModel; // Setup incremental ids @@ -233,7 +233,8 @@ namespace Thermo.Active.Config { Id = i++, Buttons = x.Buttons.Select(y => { y.Id = i++; return y; }).ToArray(), - Images = x.Images.Select(y => { + Images = x.Images.Select(y => + { y.Id = i++; y.Name = GetImageBase64String(SCADA_DIRECTORY + name, y.Name); return y; @@ -279,7 +280,7 @@ namespace Thermo.Active.Config InstallationDate = x.Element("installationDate").Value, MgiOption = Convert.ToBoolean(x.Element("mgiOption").Value), SiemensKeyboardOption = Convert.ToBoolean(x.Element("siemensKeyboardOption").Value), - MachineNumberHasLetters = Convert.ToBoolean(x.Element("machineNumberHasLetters").Value) + MachineNumberHasLetters = Convert.ToBoolean(x.Element("machineNumberHasLetters").Value) }).FirstOrDefault(); // Read Prod Software Config with LINQ @@ -288,9 +289,9 @@ namespace Thermo.Active.Config .Descendants(PROD_SFT_CONFIG_KEY) .Select(x => new SoftwareProdConfigModel() { - Enabled = Convert.ToBoolean(x.Element("enabled").Value), + Enabled = Convert.ToBoolean(x.Element("enabled").Value), Path = x.Element("path").Value - }).FirstOrDefault(); + }).FirstOrDefault(); // Read server config with LINQ and save into static config ServerStartupConfig = xmlConfigFile @@ -304,7 +305,7 @@ namespace Thermo.Active.Config EnableDirectoryBrowsing = Convert.ToBoolean(x.Element("enableDirectoryBrowsing").Value), DatabaseAddress = x.Element("databaseAddress").Value, AutoOpenCmsClient = Convert.ToBoolean(x.Element("autoOpenCmsClient").Value), - TextEditorPath = x.Element("textEditorPath").Value, + TextEditorPath = x.Element("textEditorPath").Value, MTCFolderPath = x.Element("MTCFolderPath").Value, MTCApplicationName = x.Element("MTCApplicationName").Value, MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").Value), @@ -347,7 +348,7 @@ namespace Thermo.Active.Config XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfig(); - + MaintenancesConfig = xmlConfigFile .Descendants("maintenances") .Elements("maintenance") @@ -376,11 +377,11 @@ namespace Thermo.Active.Config XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfigFromXml( xmlConfigFile.Root.Descendants("cmsContacts").FirstOrDefault(), - out CmsContactConfig, - out CmsAuxContact1, + out CmsContactConfig, + out CmsAuxContact1, out CmsAuxContact2 ); - + xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); ReadAssistanceConfigFromXml( xmlConfigFile.Root.Descendants("scmContacts").FirstOrDefault(), @@ -547,7 +548,7 @@ namespace Thermo.Active.Config { AlarmId = Convert.ToInt32(x.Element("alarmId").Value), PlcId = Convert.ToInt32(x.Element("plcId").Value), - RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) + RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) }) .ToList(); } @@ -629,35 +630,110 @@ namespace Thermo.Active.Config { XDocument xmlConfigFile = GetXmlHandlerWithValidator(RISK_CONFIG_SCHEMA_PATH, RISK_CONFIG_PATH); - // Read head config from XML file - RiskResistConfig = xmlConfigFile + int i = 0; + + List Riflettori = new List(); + List Resistenze = new List(); + List Riferimenti = new List(); + + // carico gli oggetti "nativi" + Riferimenti = xmlConfigFile .Root - .Elements() - .Select(x => new RiskResistModel() + .Elements("riferimenti") + .Select(x => new RiskRiferimenti() { - Id=0, - IdChannel = Convert.ToInt16(x.Element("canale").Value), - Row = Convert.ToInt16(x.Element("riga").Value), - Column=0, - Dimension=0 + Id = Convert.ToInt16(x.Value), + Dimensione = Convert.ToInt16(x.Attribute("dimensione").Value), + Potenza = Convert.ToInt16(x.Attribute("potenza").Value) }) .ToList(); - //RiskChannelConfig = xmlConfigFile - // .Root - // .Elements() - // .Select(x => new RiskChannelModel() - // { - // Id = Convert.ToInt16(x.Element("id").Value), - // //Category = GetTActCategory(x.Element("category").Value), - // SubCategory_1 = x.Element("subCategory_1").Value, - // SubCategory_2 = x.Element("subCategory_2").Value, - // Name = x.Element("name").Value, - // Description = x.Element("description").Value, - // Format = x.Element("format").Value - // }) - // .ToList(); + Riflettori = xmlConfigFile + .Root + .Elements("riflettore") + .Select(x => new RiskRiflettore() + { + Tipo = Convert.ToInt16(x.Attribute("tipo").Value), + Resistenze = x.Elements("resistenza") + .Select(y => new RiskResistenza() + { + Canale = Convert.ToInt16(y.Attribute("canale").Value), + Riga = Convert.ToInt16(y.Attribute("riga").Value), + Tipo = Convert.ToInt16(y.Attribute("tipo").Value) + } + ) + .ToList() + }) + .ToList(); + + // conversione da modelli RISK a modello Thermo... + int numCol = -1; + int ResistId = 0; + int oldRow = 0; + int currRow = 0; + RiskChannelConfig = new List(); + RiskResistConfig = new List(); + + // ciclo x calcolare i canali + foreach (var riflettore in Riflettori) + { + // ciclo sulle resistente + foreach (var resistenza in riflettore.Resistenze) + { + // cerco se ho già il canale + var found = RiskChannelConfig.Find(item => item.IdChannel == resistenza.Canale); + if (found == null) + { + // cerco il TIPO... + var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); + if(riferimento!=null) + { + RiskChannelConfig.Add(new RiskChannelModel() + { + IdChannel = resistenza.Canale, + IdReflector = riflettore.Tipo, + SetpointRecipe = 0, + SetpointThermo = 0, + MaxPower = riferimento.Potenza + }); + } + + } + + } + + } + + // ciclo sui riflettori x recuperare le resistenze... + foreach (var riflettore in Riflettori) + { + // ciclo sulle resistente + foreach (var resistenza in riflettore.Resistenze) + { + if (oldRow != resistenza.Riga) + { + numCol = 0; + oldRow = resistenza.Riga; + } + else + { + numCol++; + } + + // cerco il TIPO... + var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); + + RiskResistConfig.Add(new RiskResistModel() + { + Id = ResistId++, + Row = resistenza.Riga, + Column = numCol, + IdChannel = resistenza.Canale, + Dimension = riferimento.Dimensione + }); ; + } + } } private static void ReadCMSConnectConfig() @@ -690,14 +766,14 @@ namespace Thermo.Active.Config Token = x.Element("token").Value }) .FirstOrDefault(); - + if (DecodeCMSConnectGatewayLogin(tempGatewayConfigModel.Token, out _tempUSR, out _tempPSW)) { tempGatewayConfigModel.Username = _tempUSR; tempGatewayConfigModel.Password = _tempPSW; } else - throw new Exception("Error while reading \""+ CMS_CONNECT_CONFIG_PATH + "\": Gateway Token not valid"); + throw new Exception("Error while reading \"" + CMS_CONNECT_CONFIG_PATH + "\": Gateway Token not valid"); CmsConnectConfig.Gateway = tempGatewayConfigModel; } diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs index 224b1db2..7c1f6d30 100644 --- a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -6,7 +6,7 @@ namespace Thermo.Active.Model.ConfigModels public class RiskRiflettore { public int Tipo; - public List resistenza; + public List Resistenze; } public class RiskResistenza { From 9232597888c14b8a219f22bec4ceec37547e599f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 18:51:15 +0200 Subject: [PATCH 18/84] UPdate methods for recipe edit confirm/cancel --- Thermo.Active.NC/NcAdapter.cs | 26 +++++++++- Thermo.Active/App_Start/SwaggerConfig.cs | 2 +- .../Controllers/WebApi/RecipeController.cs | 52 +++++++++++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index e510d828..9efc234e 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1089,7 +1089,7 @@ namespace Thermo.Active.NC { cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe); } - + if (cmsError.IsError()) return cmsError; @@ -1170,7 +1170,7 @@ namespace Thermo.Active.NC return NO_ERROR; } /// - /// SCrittura memoria (SOLO SetpointHMI invero) + /// Scrittura memoria (SOLO SetpointHMI invero) /// /// /// @@ -1203,6 +1203,28 @@ namespace Thermo.Active.NC return NO_ERROR; } + /// + /// Comando conferma dati ricetta + /// + /// true: HMI --> PLC, false: PLC --> HMI + /// + public CmsError ConfirmRecipeData(bool confirmUpdate) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // call NC for update + CmsError cmsError = numericalControl.PLC_WRecipeEdit(confirmUpdate); + if (cmsError.IsError()) + return cmsError; + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) diff --git a/Thermo.Active/App_Start/SwaggerConfig.cs b/Thermo.Active/App_Start/SwaggerConfig.cs index 190235dc..1a178d30 100644 --- a/Thermo.Active/App_Start/SwaggerConfig.cs +++ b/Thermo.Active/App_Start/SwaggerConfig.cs @@ -33,7 +33,7 @@ namespace Thermo.Active // hold additional metadata for an API. Version and title are required but you can also provide // additional fields by chaining methods off SingleApiVersion. // - c.SingleApiVersion("v1", "Step"); + c.SingleApiVersion("v1", "ThermoActive"); // If you want the output Swagger docs to be indented properly, enable the "PrettyPrint" option. // diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index b530966f..92614144 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -63,7 +63,10 @@ namespace Thermo.Active.Controllers.WebApi { // Try connection CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + // read recipe! CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -94,5 +97,54 @@ namespace Thermo.Active.Controllers.WebApi } } + /// + /// Confirm recipe modification (parameters: HMI --> PLC) + /// + /// + [Route("confirm"), HttpPut] + public IHttpActionResult ConfirmEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Cancel recipe modification (parameters: PLC --> HMI) + /// + /// + [Route("cancel"), HttpPut] + public IHttpActionResult CancelEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + + } } \ No newline at end of file From 9798b5a993a1e2a9b74f96a5d5fd69db4643bcbc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 19:38:30 +0200 Subject: [PATCH 19/84] Added overview real calculation --- Thermo.Active.NC/NcAdapter.cs | 55 ++++++++++++------- .../Controllers/WebApi/RecipeController.cs | 2 - 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 9efc234e..c7b4fdd2 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1621,15 +1621,14 @@ namespace Thermo.Active.NC CmsError cmsError = NO_ERROR; currOverview = new Dictionary(); - // !!!FARE davvero!!! -#if false - // gestione errore - cmsError = ReadScadaData(schema, out currParam); - if (cmsError.IsError()) - return cmsError; -#endif - // calcolo! + // leggo la ricetta! + var currRecipe = new Dictionary(); + cmsError = ReadFullRecipe(out currRecipe); + if (cmsError.IsError()) + return cmsError; + + // calcolo x categoria! // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() @@ -1645,34 +1644,50 @@ namespace Thermo.Active.NC }).ToList(); RecipeCatStatus currStatus = RecipeCatStatus.Unchanged; - int countCat = 0; + + // percorro conf ricetta... foreach (var item in recipeConfig) { - // ogni 20 incremento... - if (countCat < 20) + // cerco SE ci sia già uno status... + if (currOverview.ContainsKey(item.Category)) { - currStatus = RecipeCatStatus.Unchanged; - } - else if (countCat < 40) - { - currStatus = RecipeCatStatus.ChangedOk; + currStatus = currOverview[item.Category]; } else { - currStatus = RecipeCatStatus.HasError; + currStatus = RecipeCatStatus.Unchanged; } - // se non c'è aggiungo + + // se lo stato è errore --> esco... + if (currStatus == RecipeCatStatus.HasError) + { + continue; + } + // altrimenti controllo + else + { + // se in errore --> registro... + if (currRecipe[item.Label].Status.HasError) + { + currStatus = RecipeCatStatus.HasError; + } + // FARE verificare il significato di questo changed (se è da file o da HMI/PLC) + else if (currRecipe[item.Label].SetpointHMI != currRecipe[item.Label].SetpointPLC) + { + currStatus = RecipeCatStatus.ChangedOk; + } + } + + // ora verifico overview finale: se non c'è aggiungo if (!currOverview.ContainsKey(item.Category)) { currOverview.Add(item.Category, currStatus); - countCat = 0; } else { // se il valore è maggiore --> aggiorno currOverview[item.Category] = (int)currStatus > (int)currOverview[item.Category] ? currStatus : currOverview[item.Category]; } - countCat++; } // restituisco cod errore se trovato diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 92614144..6c26cf03 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -54,8 +54,6 @@ namespace Thermo.Active.Controllers.WebApi } } - - [Route("update"), HttpPut] public IHttpActionResult WriteParameters(Dictionary parametersList) { From 112f6ed6979e9272f98129297e5249ff5862721c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 19:47:17 +0200 Subject: [PATCH 20/84] refresh state machine status --- Thermo.Active.NC/NcAdapter.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index c7b4fdd2..4bf7d963 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1648,15 +1648,12 @@ namespace Thermo.Active.NC // percorro conf ricetta... foreach (var item in recipeConfig) { + currStatus = RecipeCatStatus.Unchanged; // cerco SE ci sia già uno status... if (currOverview.ContainsKey(item.Category)) { currStatus = currOverview[item.Category]; } - else - { - currStatus = RecipeCatStatus.Unchanged; - } // se lo stato è errore --> esco... if (currStatus == RecipeCatStatus.HasError) @@ -1676,6 +1673,10 @@ namespace Thermo.Active.NC { currStatus = RecipeCatStatus.ChangedOk; } + else + { + currStatus = RecipeCatStatus.Unchanged; + } } // ora verifico overview finale: se non c'è aggiungo From a52d76bb5badb4a79e6d417f3b0976e3c5038147 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 19:54:38 +0200 Subject: [PATCH 21/84] Abbozzata gestione esterna x warmers --- Thermo.Active.NC/NcAdapter.cs | 3 - .../Controllers/WebApi/WarmersController.cs | 67 +++++++++++++++++-- 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 4bf7d963..631da85c 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1621,15 +1621,12 @@ namespace Thermo.Active.NC CmsError cmsError = NO_ERROR; currOverview = new Dictionary(); - // leggo la ricetta! var currRecipe = new Dictionary(); cmsError = ReadFullRecipe(out currRecipe); if (cmsError.IsError()) return cmsError; - // calcolo x categoria! - // leggo l'intero array delle DB... QUI FAKE sulle DB configurate... List recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel() { diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index f437f5b5..c6f7a6c6 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -38,16 +38,20 @@ namespace Thermo.Active.Controllers.WebApi } - // FIXME TODO determinare IN PRIMIS nel modello COSA e come aggiornare... -#if false [Route("update"), HttpPut] - public IHttpActionResult WriteWarmers(Dictionary parametersList) + public IHttpActionResult WriteParameters(Dictionary channelsList) { + // scrive su CHp da ricetta oppure da override x parametri utente... + using (NcAdapter ncAdapter = new NcAdapter()) { +#if false // Try connection CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + // read recipe! CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -71,13 +75,66 @@ namespace Thermo.Active.Controllers.WebApi } // scrivo sul PLC - ncAdapter.WriteRecipeParams(updtRecipe); + ncAdapter.WriteRecipeParams(updtRecipe); +#endif // ritorno solo fatto! return Ok(); } - } + } + + /// + /// Confirm recipe modification (parameters: HMI --> PLC) + /// + /// + [Route("confirm"), HttpPut] + public IHttpActionResult ConfirmEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { +#if false + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); #endif + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Cancel recipe modification (parameters: PLC --> HMI) + /// + /// + [Route("cancel"), HttpPut] + public IHttpActionResult CancelEdit() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { +#if false + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); +#endif + + // ritorno solo fatto! + return Ok(); + } + } + + } } \ No newline at end of file From 2a66160e84de794d6a0da9c0494d48f775fd0dfc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 21:28:25 +0200 Subject: [PATCH 22/84] Added warmers resistances output --- Thermo.Active.NC/NcAdapter.cs | 22 ++++++++++++++++++ .../Controllers/WebApi/WarmersController.cs | 23 ++++++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 631da85c..1b79e3f7 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1744,6 +1744,28 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Returns resistances configuration + /// + /// List of configured resistances + /// + public CmsError GetWarmersResistances(out Dictionary currWarmersResistances) + { + CmsError cmsError = NO_ERROR; + currWarmersResistances = new Dictionary(); + + // read and return config + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + foreach (var item in RiskResistConfig) + { + currWarmersResistances.Add(item.Id, item); + } + } + + // restituisco cod errore se trovato + return cmsError; + } #endregion Read Data diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index c6f7a6c6..595fd2bc 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -19,8 +19,8 @@ namespace Thermo.Active.Controllers.WebApi [RoutePrefix("api/warmers")] public class WarmersController : ApiController { - [Route("current"), HttpGet] - public IHttpActionResult GetCurrentWarmers() + [Route("channels"), HttpGet] + public IHttpActionResult GetCurrentWarmersChannels() { using (NcAdapter ncAdapter = new NcAdapter()) { @@ -36,10 +36,27 @@ namespace Thermo.Active.Controllers.WebApi return Ok(currWarmers); } } + [Route("resistances"), HttpGet] + public IHttpActionResult GetCurrentWarmersResistances() + { + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + CmsError cmsError = ncAdapter.GetWarmersResistances(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + return Ok(currWarmers); + } + } [Route("update"), HttpPut] - public IHttpActionResult WriteParameters(Dictionary channelsList) + public IHttpActionResult WriteSetpoints(Dictionary channelsList) { // scrive su CHp da ricetta oppure da override x parametri utente... From 020d8304a57824e6c16c84fb3ccafc41b6b7fbe6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 5 Jun 2020 23:13:46 +0200 Subject: [PATCH 23/84] DRAFT: Recipe local persistence file --- Thermo.Active.Config/LiveData.cs | 28 +++++ Thermo.Active.Config/ServerConfig.cs | 16 ++- .../ServerConfigController.cs | 90 +++++++++++++- .../Thermo.Active.Config.csproj | 10 ++ Thermo.Active.Config/packages.config | 4 + Thermo.Active.Model/Constants.cs | 3 + Thermo.Active.NC/NcFileAdapter.cs | 59 ++++++++- .../Controllers/WebApi/RecipeController.cs | 114 +++++++++++++++++- 8 files changed, 310 insertions(+), 14 deletions(-) create mode 100644 Thermo.Active.Config/LiveData.cs create mode 100644 Thermo.Active.Config/packages.config diff --git a/Thermo.Active.Config/LiveData.cs b/Thermo.Active.Config/LiveData.cs new file mode 100644 index 00000000..e729d7d3 --- /dev/null +++ b/Thermo.Active.Config/LiveData.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Thermo.Active.Config +{ + /// + /// Live data for Thermo Active + /// + public class LiveData + { + /// + /// Current loaded recipe + /// + public string RecipeName = "current.json"; + /// + /// Dictionary of all parameters and values + /// + public Dictionary RecipeParameters; + /// + /// Dictionary of all channels and relative setpoints + /// + public Dictionary ChannelSetpoints; + + } +} diff --git a/Thermo.Active.Config/ServerConfig.cs b/Thermo.Active.Config/ServerConfig.cs index e18c1028..3cc50e77 100644 --- a/Thermo.Active.Config/ServerConfig.cs +++ b/Thermo.Active.Config/ServerConfig.cs @@ -32,10 +32,8 @@ namespace Thermo.Active.Config public static List NcSoftKeysConfig; public static List InitialAlarmsConfig; public static List HeadsConfig; - public static List RecipeConfig; - public static List ModBlockConfig; - public static List RiskResistConfig; - public static List RiskChannelConfig; + + public static CmsConnectConfigModel CmsConnectConfig; public static AreasConfigModel ProductionConfig; @@ -55,5 +53,15 @@ namespace Thermo.Active.Config public static List MacrosConfig; public static string CMSMainProgramContent; + + + // Thermo + public static List RecipeConfig; + public static List ModBlockConfig; + public static List RiskResistConfig; + public static List RiskChannelConfig; + + public static LiveData RecipeLiveData; } + } \ No newline at end of file diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 86c811d4..5cfaad83 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -15,6 +15,7 @@ using System.Xml.Serialization; using static Thermo.Active.Config.ServerConfig; using static Thermo.Active.Model.Constants; using static Thermo.Active.Utils.SupportFunctions; +using Newtonsoft.Json; namespace Thermo.Active.Config { @@ -39,7 +40,7 @@ namespace Thermo.Active.Config // ReadCMSConnectConfig(); ReadMacros(); ReadScadaFile(); - //ReadMainProgram(); + ReadLiveData(); } catch (XmlException ex) { @@ -687,7 +688,7 @@ namespace Thermo.Active.Config { // cerco il TIPO... var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); - if(riferimento!=null) + if (riferimento != null) { RiskChannelConfig.Add(new RiskChannelModel() { @@ -790,15 +791,96 @@ namespace Thermo.Active.Config .Select(x => x.Value) .ToList(); } + /// + /// Try to load live data from json persistence file + /// + public static void ReadLiveData() + { + if (File.Exists(LIVE_RECIPE_PATH)) + { + // load all text data + var rawData = File.ReadAllText(LIVE_RECIPE_PATH); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + } + else + { + // setup new object + RecipeLiveData = new LiveData() + { + RecipeName = "current.json", + ChannelSetpoints = new Dictionary(), + RecipeParameters = new Dictionary() + }; + } + } + /// + /// Try to write live data to json persistence file + /// + public static void WriteLiveData() + { + try + { + // serialize + string rawData = JsonConvert.SerializeObject(RecipeLiveData); + // save live! + File.WriteAllText(LIVE_RECIPE_PATH, rawData); + } + catch + { } + } + /// + /// Try to load selected recipe to live data (memory and json persistence file) + /// + public static void LoadRecipe(string filePath) + { + if (File.Exists(filePath)) + { + // load all text data + var rawData = File.ReadAllText(filePath); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + // update current live data! + WriteLiveData(); + } + } + /// + /// Try to save live recipe to selected filePath + /// + public static void SaveRecipe(string filePath) + { + try + { + // serialize + string rawData = JsonConvert.SerializeObject(RecipeLiveData); + // save live! + File.WriteAllText(LIVE_RECIPE_PATH, rawData); + // save! + File.WriteAllText(filePath, rawData); + } + catch + { } + } - +#if false public static void ReadMainProgram() { if (File.Exists(MAIN_PROGRAM_CONFIG_PATH)) { CMSMainProgramContent = File.ReadAllText(MAIN_PROGRAM_CONFIG_PATH); } - } + } +#endif public static string CalculateHash(string filename) { diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index 27d70235..59b4e97b 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -32,6 +32,9 @@ 4 + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + @@ -52,6 +55,7 @@ Designer PreserveNewest + @@ -175,5 +179,11 @@ Designer + + + + + + \ No newline at end of file diff --git a/Thermo.Active.Config/packages.config b/Thermo.Active.Config/packages.config new file mode 100644 index 00000000..7c080311 --- /dev/null +++ b/Thermo.Active.Config/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index 480e679d..fb3022fa 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -210,6 +210,7 @@ namespace Thermo.Active.Model public static string WEBSITE_DIRECTORY = BASE_PATH + "\\view"; #endif public const string CONFIG_DIRECTORY = "Config\\"; + public const string RECIPE_DIRECTORY = "Recipes\\"; public const string RESOURCE_DIRECTORY = @"Thermo.Active.Config.Config."; public const string SERVER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + @"serverConfigValidator.xsd"; public const string SERVER_CONFIG_PATH = CONFIG_DIRECTORY + "serverConfig.xml"; @@ -252,6 +253,8 @@ namespace Thermo.Active.Model public const string MAIN_PROGRAM_CONFIG_PATH = CONFIG_DIRECTORY + "customMainProgram.txt"; + public const string LIVE_RECIPE_PATH = RECIPE_DIRECTORY + "current.json"; + public static string LANGUAGE_PACK_DIRECTORY = BASE_PATH + "\\languages\\"; public static string LANGUAGE_SCHEMA_PATH = BASE_PATH + "\\LanguageValidator.xsd"; diff --git a/Thermo.Active.NC/NcFileAdapter.cs b/Thermo.Active.NC/NcFileAdapter.cs index 34ea08f7..83366ebf 100644 --- a/Thermo.Active.NC/NcFileAdapter.cs +++ b/Thermo.Active.NC/NcFileAdapter.cs @@ -19,6 +19,61 @@ namespace Thermo.Active.NC { public class NcFileAdapter : NcAdapter { + /// + /// Read file from local devices ad give back string content + /// + /// + /// + /// + public CmsError ReadFileContent(string path, out string fileContent) + { + // init + fileContent = ""; + if (!string.IsNullOrEmpty(path)) + { + // check existing + if (File.Exists(path)) + { + // read all lines as string + fileContent = File.ReadAllText(path); + } + else + { + return FILE_NOT_FOUND_ERROR; + } + } + else + { + return FILE_NOT_FOUND_ERROR; + } + + return NO_ERROR; + } + /// + /// Save string content to file + /// + /// + /// + /// + public CmsError WriteFileContent(string path, string fileContent) + { + if (!string.IsNullOrEmpty(path)) + { + if (!string.IsNullOrEmpty(fileContent)) + { + File.WriteAllText(path, fileContent); + } + } + else + { + return FILE_NOT_FOUND_ERROR; + } + + return NO_ERROR; + } + + + public CmsError GetFileList(string path, out List fileList) { fileList = new List(); @@ -41,8 +96,8 @@ namespace Thermo.Active.NC if (cmsError.IsError()) return cmsError; - string [] names = fileInfo.Name.Split('/'); - if(names.Length > 0) + string[] names = fileInfo.Name.Split('/'); + if (names.Length > 0) { string name = names.Last(); if (!String.IsNullOrWhiteSpace(name)) diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 6c26cf03..7765b2ed 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -13,6 +13,7 @@ using static CMS_CORE_Library.Models.DataStructures; using static Thermo.Active.Config.ServerConfig; using static Thermo.Active.Model.Constants; using Thermo.Active.Model.DTOModels.Recipe; +using Thermo.Active.Config; namespace Thermo.Active.Controllers.WebApi { @@ -99,7 +100,7 @@ namespace Thermo.Active.Controllers.WebApi /// Confirm recipe modification (parameters: HMI --> PLC) ///
/// - [Route("confirm"), HttpPut] + [Route("Confirm"), HttpPut] public IHttpActionResult ConfirmEdit() { using (NcAdapter ncAdapter = new NcAdapter()) @@ -109,8 +110,24 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.WriteLiveData(); + // scrivo sul PLC il comando conferma! - CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + cmsError = ncAdapter.ConfirmRecipeData(true); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -123,10 +140,100 @@ namespace Thermo.Active.Controllers.WebApi /// Cancel recipe modification (parameters: PLC --> HMI) ///
/// - [Route("cancel"), HttpPut] + [Route("Cancel"), HttpPut] public IHttpActionResult CancelEdit() { using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.WriteLiveData(); + + // scrivo sul PLC il comando annula! + cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Save current recipe from PLC to default + /// + /// + [Route("Save"), HttpPut] + public IHttpActionResult Save() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // serialize current recipe as JSon + + //// scrivo sul PLC il comando annula! + //CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + //if (cmsError.IsError()) + // return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Save current recipe from PLC with new name + /// + /// + [Route("SaveAs"), HttpPut] + public IHttpActionResult SaveAs(string newName) + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // ritorno solo fatto! + return Ok(); + } + } + /// + /// load recipe from file and send to PLC + /// + /// + [Route("Load"), HttpPut] + public IHttpActionResult Load(string newName) + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) { // Try connection CmsError libraryError = ncAdapter.Connect(); @@ -143,6 +250,5 @@ namespace Thermo.Active.Controllers.WebApi } } - } } \ No newline at end of file From 3dedafd43fdfeb7fa101b7dcfd7660e15c46391f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 11:02:18 +0200 Subject: [PATCH 24/84] update load/save call from WebApi --- .../ServerConfigController.cs | 13 ++ .../Controllers/WebApi/RecipeController.cs | 114 ++++++++++-------- 2 files changed, 79 insertions(+), 48 deletions(-) diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 5cfaad83..b9c4c7be 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -841,6 +841,13 @@ namespace Thermo.Active.Config { if (File.Exists(filePath)) { + // check filePath... + if (!filePath.Contains(RECIPE_DIRECTORY)) + { + // aggiungo base path! + filePath = RECIPE_DIRECTORY + filePath; + } + // load all text data var rawData = File.ReadAllText(filePath); try @@ -865,6 +872,12 @@ namespace Thermo.Active.Config string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! File.WriteAllText(LIVE_RECIPE_PATH, rawData); + // check filePath... + if (!filePath.Contains(RECIPE_DIRECTORY)) + { + // aggiungo base path! + filePath = RECIPE_DIRECTORY + filePath; + } // save! File.WriteAllText(filePath, rawData); } diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 7765b2ed..8466f6a0 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -100,7 +100,7 @@ namespace Thermo.Active.Controllers.WebApi /// Confirm recipe modification (parameters: HMI --> PLC) ///
/// - [Route("Confirm"), HttpPut] + [Route("confirm"), HttpPut] public IHttpActionResult ConfirmEdit() { using (NcAdapter ncAdapter = new NcAdapter()) @@ -110,11 +110,17 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); - // recupero i dati LIVE dei parametri HMI della ricetta... - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + // scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // rileggo la ricetta var currParams = new Dictionary(); foreach (var item in currRecipe) { @@ -126,11 +132,6 @@ namespace Thermo.Active.Controllers.WebApi // e salvo su disco ServerConfigController.WriteLiveData(); - // scrivo sul PLC il comando conferma! - cmsError = ncAdapter.ConfirmRecipeData(true); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - // ritorno solo fatto! return Ok(); } @@ -140,7 +141,7 @@ namespace Thermo.Active.Controllers.WebApi /// Cancel recipe modification (parameters: PLC --> HMI) /// /// - [Route("Cancel"), HttpPut] + [Route("cancel"), HttpPut] public IHttpActionResult CancelEdit() { using (NcAdapter ncAdapter = new NcAdapter()) @@ -150,6 +151,45 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); + // scrivo sul PLC il comando annula! + CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.WriteLiveData(); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Save current recipe from PLC to default + /// + /// + [Route("save"), HttpPut] + public IHttpActionResult Save() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); // recupero i dati LIVE dei parametri HMI della ricetta... CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); @@ -167,37 +207,6 @@ namespace Thermo.Active.Controllers.WebApi // e salvo su disco ServerConfigController.WriteLiveData(); - // scrivo sul PLC il comando annula! - cmsError = ncAdapter.ConfirmRecipeData(false); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - - // ritorno solo fatto! - return Ok(); - } - } - - /// - /// Save current recipe from PLC to default - /// - /// - [Route("Save"), HttpPut] - public IHttpActionResult Save() - { - using (NcFileAdapter ncAdapter = new NcFileAdapter()) - { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - - // serialize current recipe as JSon - - //// scrivo sul PLC il comando annula! - //CmsError cmsError = ncAdapter.ConfirmRecipeData(false); - //if (cmsError.IsError()) - // return BadRequest(cmsError.localizationKey); - // ritorno solo fatto! return Ok(); } @@ -207,7 +216,7 @@ namespace Thermo.Active.Controllers.WebApi /// Save current recipe from PLC with new name /// /// - [Route("SaveAs"), HttpPut] + [Route("saveAs"), HttpPut] public IHttpActionResult SaveAs(string newName) { using (NcFileAdapter ncAdapter = new NcFileAdapter()) @@ -217,11 +226,22 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); - // scrivo sul PLC il comando annula! - CmsError cmsError = ncAdapter.ConfirmRecipeData(false); + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.SaveRecipe(newName); + // ritorno solo fatto! return Ok(); } @@ -230,7 +250,7 @@ namespace Thermo.Active.Controllers.WebApi /// load recipe from file and send to PLC /// /// - [Route("Load"), HttpPut] + [Route("load"), HttpPut] public IHttpActionResult Load(string newName) { using (NcFileAdapter ncAdapter = new NcFileAdapter()) @@ -240,10 +260,8 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); - // scrivo sul PLC il comando annula! - CmsError cmsError = ncAdapter.ConfirmRecipeData(false); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); + // chiamo metodo di lettura... + ServerConfigController.LoadRecipe(newName); // ritorno solo fatto! return Ok(); From 698fd47177a14bbfd9dd28314f4d25fec6d77c24 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 15:44:59 +0200 Subject: [PATCH 25/84] Added file method for template/current/load/save --- .../Config/Recipes/template.json | 1 + Thermo.Active.Config/Recipes/.placeholder.txt | 1 + .../ServerConfigController.cs | 122 +++++++++++++----- .../Thermo.Active.Config.csproj | 10 +- Thermo.Active.Model/Constants.cs | 3 +- .../DTOModels/Recipe/DTOWarmers.cs | 86 ++++-------- Thermo.Active.NC/NcAdapter.cs | 34 +++-- .../Controllers/WebApi/RecipeController.cs | 116 ++++++++++++++--- 8 files changed, 247 insertions(+), 126 deletions(-) create mode 100644 Thermo.Active.Config/Config/Recipes/template.json create mode 100644 Thermo.Active.Config/Recipes/.placeholder.txt diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json new file mode 100644 index 00000000..8a58ef05 --- /dev/null +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -0,0 +1 @@ +{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":500.0,"general_sizes_mould_dim_y":200.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":0.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":0.0,"general_sizes_plate_dim_y":0.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":0.0,"general_sizes_frame_dim_y":0.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":0.0,"positions_mould_lower_speed":0.0,"positions_mould_intermediate_position":0.0,"positions_mould_upper_position":0.0,"positions_mould_upper_speed":0.0,"positions_mould_upperdeceleration_position":0.0,"positions_mould_upperdeceleration_speed":0.0,"positions_mould_lowerdeceleration_position":0.0,"positions_mould_lowerdeceleration_speed":0.0,"positions_frame_lower_position":0.0,"positions_frame_lower_speed":0.0,"positions_frame_upper_position":0.0,"positions_frame_upper_speed":0.0,"positions_frame_intermediate_position":0.0,"positions_frame_intermediate_speed":0.0,"positions_frame_unload_position":0.0,"positions_upperplate_lower_position":0.0,"positions_upperplate_lower_speed":0.0,"positions_upperplate_upper_position":0.0,"positions_upperplate_upper_speed":0.0,"positions_upperplate_upperdeceleration_position":0.0,"positions_upperplate_upperdeceleration_speed":0.0,"positions_upperplate_lowerdeceleration_position":0.0,"positions_upperplate_lowerdeceleration_speed":0.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":0.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":0.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":0.0,"cycle_loader_pallet_height":0.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":0.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":0.0,"cycle_loader_ionizer_enabled":0.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":0.0,"heats_lowerheaters_movement_enabled":0.0,"heats_lowerheaters_enabled":0.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":0.0,"heats_upperheaters_movement_enabled":0.0,"heats_upperheaters_enabled":0.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":0.0,"heats_decomsustain_decompression_flow":0.0,"heats_decomsustain_min_blowing_time":0.0,"heats_decomsustain_sustain_delay":0.0,"heats_decomsustain_decompression_delay":0.0,"heats_decomsustain_decompression_duration":0.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":0.0,"pyrometer_pyrometer_setpoint":0.0,"pyrometer_pyrometer_delay":0.0,"pyrometer_upperthermoregulator_start_adjustment":0.0,"pyrometer_upperthermoregulator_end_adjustment":0.0,"pyrometer_upperthermoregulator_min_percentage":0.0,"pyrometer_upperthermoregulator_max_percentage":0.0,"pyrometer_upperthermoregulator_sleep_enabled":0.0,"pyrometer_upperthermoregulator_sleep_percentage":0.0,"pyrometer_lowerthermoregulator_start_adjustment":0.0,"pyrometer_lowerthermoregulator_end_adjustment":0.0,"pyrometer_lowerthermoregulator_min_percentage":0.0,"pyrometer_lowerthermoregulator_max_percentage":0.0,"pyrometer_lowerthermoregulator_sleep_enabled":0.0,"pyrometer_lowerthermoregulator_sleep_percentage":0.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":0.0,"drawing_height":0.0,"drawing_delay":0.0,"drawing_1_chart_setpointx":0.0,"drawing_1_chart_setpointy":0.0,"drawing_photocell":0.0,"drawing_mantaining_flow":0.0,"drawing_manual":0.0,"drawing_mould_up_delay":0.0,"upperplate_cycle_type":0.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":0.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":0.0,"cooling_blowing_delay":0.0,"cooling_blowing_time":0.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":0.0,"cooling_pyrometer_delay":0.0,"cooling_nebulizer_type":0.0,"cooling_nebulizer_delay":0.0,"cooling_nebulizer_time":0.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":0.0,"vacuum_main_max_time":0.0,"vacuum_main_1_chart_setpointx":0.0,"vacuum_main_1_chart_setpointy":0.0,"vacuum_main_2_chart_setpointx":0.0,"vacuum_main_2_chart_setpointy":0.0,"vacuum_main_3_chart_setpointx":0.0,"vacuum_main_3_chart_setpointy":0.0,"vacuum_main_manual":0.0,"vacuum_direct_enabled":0.0,"vacuum_direct_delay":0.0,"vacuum_direct_time":0.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":0.0,"extraction_main_mould_dw_delay":0.0,"extraction_main_delay":0.0,"extraction_main_1_chart_setpointx":0.0,"extraction_main_1_chart_setpointy":0.0,"extraction_main_manual":0.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":0.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":0.0,"options_undercutmould_2_delay_acti":0.0,"options_undercutmould_2_delay_dis":0.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":0.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":0.0,"options_undercutupperplate_2_delay_acti":0.0,"options_undercutupperplate_2_delay_dis":0.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":0.0,"options_thermoregulator_1_setpoint":0.0,"options_thermoregulator_2_enabled":0.0,"options_thermoregulator_2_setpoint":0.0,"options_thermoregulator_3_enabled":0.0,"options_thermoregulator_3_setpoint":0.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":80.0,"44":80.0,"81":80.0,"118":80.0,"155":80.0,"192":80.0,"229":80.0,"266":80.0,"303":80.0,"340":80.0,"377":80.0,"414":80.0,"1":80.0,"8":80.0,"45":80.0,"82":80.0,"119":80.0,"156":80.0,"193":80.0,"230":80.0,"267":80.0,"304":80.0,"341":80.0,"378":80.0,"415":80.0,"9":80.0,"46":80.0,"83":80.0,"120":80.0,"157":80.0,"194":80.0,"231":80.0,"268":80.0,"305":80.0,"342":80.0,"379":80.0,"416":80.0,"10":80.0,"47":80.0,"84":80.0,"121":80.0,"158":80.0,"195":80.0,"232":80.0,"269":80.0,"306":80.0,"343":80.0,"380":80.0,"11":80.0,"48":80.0,"85":80.0,"122":80.0,"159":80.0,"196":80.0,"233":80.0,"270":80.0,"307":80.0,"344":80.0,"381":80.0,"417":80.0,"12":80.0,"49":80.0,"86":80.0,"123":80.0,"160":80.0,"197":80.0,"234":80.0,"271":80.0,"308":80.0,"345":80.0,"382":80.0,"13":80.0,"50":80.0,"87":80.0,"124":80.0,"161":80.0,"198":80.0,"235":80.0,"272":80.0,"309":80.0,"346":80.0,"383":80.0,"418":80.0,"2":80.0,"14":80.0,"51":80.0,"88":80.0,"125":80.0,"162":80.0,"199":80.0,"236":80.0,"273":80.0,"310":80.0,"347":80.0,"384":80.0,"419":80.0,"15":80.0,"52":80.0,"89":80.0,"126":80.0,"163":80.0,"200":80.0,"237":80.0,"274":80.0,"311":80.0,"348":80.0,"385":80.0,"420":80.0,"16":80.0,"53":80.0,"90":80.0,"127":80.0,"164":80.0,"201":80.0,"238":80.0,"275":80.0,"312":80.0,"349":80.0,"386":80.0,"17":80.0,"54":80.0,"91":80.0,"128":80.0,"165":80.0,"202":80.0,"239":80.0,"276":80.0,"313":80.0,"350":80.0,"387":80.0,"421":80.0,"18":80.0,"55":80.0,"92":80.0,"129":80.0,"166":80.0,"203":80.0,"240":80.0,"277":80.0,"314":80.0,"351":80.0,"388":80.0,"19":80.0,"56":80.0,"93":80.0,"130":80.0,"167":80.0,"204":80.0,"241":80.0,"278":80.0,"315":80.0,"352":80.0,"389":80.0,"422":80.0,"3":80.0,"20":80.0,"57":80.0,"94":80.0,"131":80.0,"168":80.0,"205":80.0,"242":80.0,"279":80.0,"316":80.0,"353":80.0,"390":80.0,"423":80.0,"21":80.0,"58":80.0,"95":80.0,"132":80.0,"169":80.0,"206":80.0,"243":80.0,"280":80.0,"317":80.0,"354":80.0,"391":80.0,"424":80.0,"22":80.0,"59":80.0,"96":80.0,"133":80.0,"170":80.0,"207":80.0,"244":80.0,"281":80.0,"318":80.0,"355":80.0,"392":80.0,"23":80.0,"60":80.0,"97":80.0,"134":80.0,"171":80.0,"208":80.0,"245":80.0,"282":80.0,"319":80.0,"356":80.0,"393":80.0,"425":80.0,"24":80.0,"61":80.0,"98":80.0,"135":80.0,"172":80.0,"209":80.0,"246":80.0,"283":80.0,"320":80.0,"357":80.0,"394":80.0,"25":80.0,"62":80.0,"99":80.0,"136":80.0,"173":80.0,"210":80.0,"247":80.0,"284":80.0,"321":80.0,"358":80.0,"395":80.0,"426":80.0,"4":80.0,"26":80.0,"63":80.0,"100":80.0,"137":80.0,"174":80.0,"211":80.0,"248":80.0,"285":80.0,"322":80.0,"359":80.0,"396":80.0,"427":80.0,"27":80.0,"64":80.0,"101":80.0,"138":80.0,"175":80.0,"212":80.0,"249":80.0,"286":80.0,"323":80.0,"360":80.0,"397":80.0,"428":80.0,"28":80.0,"65":80.0,"102":80.0,"139":80.0,"176":80.0,"213":80.0,"250":80.0,"287":80.0,"324":80.0,"361":80.0,"398":80.0,"29":80.0,"66":80.0,"103":80.0,"140":80.0,"177":80.0,"214":80.0,"251":80.0,"288":80.0,"325":80.0,"362":80.0,"399":80.0,"429":80.0,"30":80.0,"67":80.0,"104":80.0,"141":80.0,"178":80.0,"215":80.0,"252":80.0,"289":80.0,"326":80.0,"363":80.0,"400":80.0,"31":80.0,"68":80.0,"105":80.0,"142":80.0,"179":80.0,"216":80.0,"253":80.0,"290":80.0,"327":80.0,"364":80.0,"401":80.0,"430":80.0,"5":80.0,"32":80.0,"69":80.0,"106":80.0,"143":80.0,"180":80.0,"217":80.0,"254":80.0,"291":80.0,"328":80.0,"365":80.0,"402":80.0,"431":80.0,"33":80.0,"70":80.0,"107":80.0,"144":80.0,"181":80.0,"218":80.0,"255":80.0,"292":80.0,"329":80.0,"366":80.0,"403":80.0,"432":80.0,"34":80.0,"71":80.0,"108":80.0,"145":80.0,"182":80.0,"219":80.0,"256":80.0,"293":80.0,"330":80.0,"367":80.0,"404":80.0,"35":80.0,"72":80.0,"109":80.0,"146":80.0,"183":80.0,"220":80.0,"257":80.0,"294":80.0,"331":80.0,"368":80.0,"405":80.0,"433":80.0,"36":80.0,"73":80.0,"110":80.0,"147":80.0,"184":80.0,"221":80.0,"258":80.0,"295":80.0,"332":80.0,"369":80.0,"406":80.0,"37":80.0,"74":80.0,"111":80.0,"148":80.0,"185":80.0,"222":80.0,"259":80.0,"296":80.0,"333":80.0,"370":80.0,"407":80.0,"434":80.0,"6":80.0,"38":80.0,"75":80.0,"112":80.0,"149":80.0,"186":80.0,"223":80.0,"260":80.0,"297":80.0,"334":80.0,"371":80.0,"408":80.0,"435":80.0,"39":80.0,"76":80.0,"113":80.0,"150":80.0,"187":80.0,"224":80.0,"261":80.0,"298":80.0,"335":80.0,"372":80.0,"409":80.0,"436":80.0,"40":80.0,"77":80.0,"114":80.0,"151":80.0,"188":80.0,"225":80.0,"262":80.0,"299":80.0,"336":80.0,"373":80.0,"410":80.0,"41":80.0,"78":80.0,"115":80.0,"152":80.0,"189":80.0,"226":80.0,"263":80.0,"300":80.0,"337":80.0,"374":80.0,"411":80.0,"437":80.0,"42":80.0,"79":80.0,"116":80.0,"153":80.0,"190":80.0,"227":80.0,"264":80.0,"301":80.0,"338":80.0,"375":80.0,"412":80.0,"43":80.0,"80":80.0,"117":80.0,"154":80.0,"191":80.0,"228":80.0,"265":80.0,"302":80.0,"339":80.0,"376":80.0,"413":80.0,"438":80.0,"513":80.0,"520":80.0,"557":80.0,"594":80.0,"631":80.0,"668":80.0,"705":80.0,"742":80.0,"779":80.0,"816":80.0,"853":80.0,"890":80.0,"927":80.0,"521":80.0,"558":80.0,"595":80.0,"632":80.0,"669":80.0,"706":80.0,"743":80.0,"780":80.0,"817":80.0,"854":80.0,"891":80.0,"928":80.0,"522":80.0,"559":80.0,"596":80.0,"633":80.0,"670":80.0,"707":80.0,"744":80.0,"781":80.0,"818":80.0,"855":80.0,"892":80.0,"523":80.0,"560":80.0,"597":80.0,"634":80.0,"671":80.0,"708":80.0,"745":80.0,"782":80.0,"819":80.0,"856":80.0,"893":80.0,"929":80.0,"524":80.0,"561":80.0,"598":80.0,"635":80.0,"672":80.0,"709":80.0,"746":80.0,"783":80.0,"820":80.0,"857":80.0,"894":80.0,"525":80.0,"562":80.0,"599":80.0,"636":80.0,"673":80.0,"710":80.0,"747":80.0,"784":80.0,"821":80.0,"858":80.0,"895":80.0,"930":80.0,"514":80.0,"526":80.0,"563":80.0,"600":80.0,"637":80.0,"674":80.0,"711":80.0,"748":80.0,"785":80.0,"822":80.0,"859":80.0,"896":80.0,"931":80.0,"527":80.0,"564":80.0,"601":80.0,"638":80.0,"675":80.0,"712":80.0,"749":80.0,"786":80.0,"823":80.0,"860":80.0,"897":80.0,"932":80.0,"528":80.0,"565":80.0,"602":80.0,"639":80.0,"676":80.0,"713":80.0,"750":80.0,"787":80.0,"824":80.0,"861":80.0,"898":80.0,"529":80.0,"566":80.0,"603":80.0,"640":80.0,"677":80.0,"714":80.0,"751":80.0,"788":80.0,"825":80.0,"862":80.0,"899":80.0,"933":80.0,"530":80.0,"567":80.0,"604":80.0,"641":80.0,"678":80.0,"715":80.0,"752":80.0,"789":80.0,"826":80.0,"863":80.0,"900":80.0,"531":80.0,"568":80.0,"605":80.0,"642":80.0,"679":80.0,"716":80.0,"753":80.0,"790":80.0,"827":80.0,"864":80.0,"901":80.0,"934":80.0,"515":80.0,"532":80.0,"569":80.0,"606":80.0,"643":80.0,"680":80.0,"717":80.0,"754":80.0,"791":80.0,"828":80.0,"865":80.0,"902":80.0,"935":80.0,"533":80.0,"570":80.0,"607":80.0,"644":80.0,"681":80.0,"718":80.0,"755":80.0,"792":80.0,"829":80.0,"866":80.0,"903":80.0,"936":80.0,"534":80.0,"571":80.0,"608":80.0,"645":80.0,"682":80.0,"719":80.0,"756":80.0,"793":80.0,"830":80.0,"867":80.0,"904":80.0,"535":80.0,"572":80.0,"609":80.0,"646":80.0,"683":80.0,"720":80.0,"757":80.0,"794":80.0,"831":80.0,"868":80.0,"905":80.0,"937":80.0,"536":80.0,"573":80.0,"610":80.0,"647":80.0,"684":80.0,"721":80.0,"758":80.0,"795":80.0,"832":80.0,"869":80.0,"906":80.0,"537":80.0,"574":80.0,"611":80.0,"648":80.0,"685":80.0,"722":80.0,"759":80.0,"796":80.0,"833":80.0,"870":80.0,"907":80.0,"938":80.0,"516":80.0,"538":80.0,"575":80.0,"612":80.0,"649":80.0,"686":80.0,"723":80.0,"760":80.0,"797":80.0,"834":80.0,"871":80.0,"908":80.0,"939":80.0,"539":80.0,"576":80.0,"613":80.0,"650":80.0,"687":80.0,"724":80.0,"761":80.0,"798":80.0,"835":80.0,"872":80.0,"909":80.0,"940":80.0,"517":80.0,"540":80.0,"577":80.0,"614":80.0,"651":80.0,"688":80.0,"725":80.0,"762":80.0,"799":80.0,"836":80.0,"873":80.0,"910":80.0,"941":80.0,"541":80.0,"578":80.0,"615":80.0,"652":80.0,"689":80.0,"726":80.0,"763":80.0,"800":80.0,"837":80.0,"874":80.0,"911":80.0,"942":80.0,"542":80.0,"579":80.0,"616":80.0,"653":80.0,"690":80.0,"727":80.0,"764":80.0,"801":80.0,"838":80.0,"875":80.0,"912":80.0,"543":80.0,"580":80.0,"617":80.0,"654":80.0,"691":80.0,"728":80.0,"765":80.0,"802":80.0,"839":80.0,"876":80.0,"913":80.0,"943":80.0,"544":80.0,"581":80.0,"618":80.0,"655":80.0,"692":80.0,"729":80.0,"766":80.0,"803":80.0,"840":80.0,"877":80.0,"914":80.0,"545":80.0,"582":80.0,"619":80.0,"656":80.0,"693":80.0,"730":80.0,"767":80.0,"804":80.0,"841":80.0,"878":80.0,"915":80.0,"944":80.0,"518":80.0,"546":80.0,"583":80.0,"620":80.0,"657":80.0,"694":80.0,"731":80.0,"768":80.0,"805":80.0,"842":80.0,"879":80.0,"916":80.0,"945":80.0,"547":80.0,"584":80.0,"621":80.0,"658":80.0,"695":80.0,"732":80.0,"769":80.0,"806":80.0,"843":80.0,"880":80.0,"917":80.0,"946":80.0,"548":80.0,"585":80.0,"622":80.0,"659":80.0,"696":80.0,"733":80.0,"770":80.0,"807":80.0,"844":80.0,"881":80.0,"918":80.0,"549":80.0,"586":80.0,"623":80.0,"660":80.0,"697":80.0,"734":80.0,"771":80.0,"808":80.0,"845":80.0,"882":80.0,"919":80.0,"947":80.0,"550":80.0,"587":80.0,"624":80.0,"661":80.0,"698":80.0,"735":80.0,"772":80.0,"809":80.0,"846":80.0,"883":80.0,"920":80.0,"551":80.0,"588":80.0,"625":80.0,"662":80.0,"699":80.0,"736":80.0,"773":80.0,"810":80.0,"847":80.0,"884":80.0,"921":80.0,"948":80.0,"519":80.0,"552":80.0,"589":80.0,"626":80.0,"663":80.0,"700":80.0,"737":80.0,"774":80.0,"811":80.0,"848":80.0,"885":80.0,"922":80.0,"949":80.0,"553":80.0,"590":80.0,"627":80.0,"664":80.0,"701":80.0,"738":80.0,"775":80.0,"812":80.0,"849":80.0,"886":80.0,"923":80.0,"950":80.0,"554":80.0,"591":80.0,"628":80.0,"665":80.0,"702":80.0,"739":80.0,"776":80.0,"813":80.0,"850":80.0,"887":80.0,"924":80.0,"555":80.0,"592":80.0,"629":80.0,"666":80.0,"703":80.0,"740":80.0,"777":80.0,"814":80.0,"851":80.0,"888":80.0,"925":80.0,"951":80.0,"556":80.0,"593":80.0,"630":80.0,"667":80.0,"704":80.0,"741":80.0,"778":80.0,"815":80.0,"852":80.0,"889":80.0,"926":80.0}} \ No newline at end of file diff --git a/Thermo.Active.Config/Recipes/.placeholder.txt b/Thermo.Active.Config/Recipes/.placeholder.txt new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Thermo.Active.Config/Recipes/.placeholder.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index b9c4c7be..fad9ff1e 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -794,8 +794,9 @@ namespace Thermo.Active.Config /// /// Try to load live data from json persistence file /// - public static void ReadLiveData() + public static bool ReadLiveData() { + bool answ = false; if (File.Exists(LIVE_RECIPE_PATH)) { // load all text data @@ -807,46 +808,39 @@ namespace Thermo.Active.Config } catch { } + answ = true; } else { - // setup new object - RecipeLiveData = new LiveData() + // reload from template... + var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH); + try { - RecipeName = "current.json", - ChannelSetpoints = new Dictionary(), - RecipeParameters = new Dictionary() - }; + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + } + catch + { } + answ = true; } - } - /// - /// Try to write live data to json persistence file - /// - public static void WriteLiveData() - { - try - { - // serialize - string rawData = JsonConvert.SerializeObject(RecipeLiveData); - // save live! - File.WriteAllText(LIVE_RECIPE_PATH, rawData); - } - catch - { } + // rendo se fatto + return answ; } /// /// Try to load selected recipe to live data (memory and json persistence file) /// - public static void LoadRecipe(string filePath) + public static bool LoadRecipe(string filePath) { + bool answ = false; + // check filePath... + if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH) + { + // aggiungo base path! + filePath = RECIPE_DIRECTORY + filePath; + } if (File.Exists(filePath)) { - // check filePath... - if (!filePath.Contains(RECIPE_DIRECTORY)) - { - // aggiungo base path! - filePath = RECIPE_DIRECTORY + filePath; - } + answ = true; // load all text data var rawData = File.ReadAllText(filePath); @@ -858,22 +852,84 @@ namespace Thermo.Active.Config catch { } // update current live data! - WriteLiveData(); + SaveRecipeCurrent(); } + // rendo se fatto + return answ; + } + /// + /// Try to load template recipe + /// + public static bool LoadTemplate() + { + bool answ = false; + // check filePath... + if (File.Exists(RECIPE_TEMPLATE_PATH)) + { + answ = true; + + // load all text data + var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH); + try + { + // deserialize to object + RecipeLiveData = JsonConvert.DeserializeObject(rawData); + // update NAME + RecipeLiveData.RecipeName = $"{DateTime.Now:yyyyMMss_HHmmss}.json"; + } + catch + { } + // update current live data! + SaveRecipeCurrent(); + } + // rendo se fatto + return answ; + } + /// + /// Try to write live data to json persistence file + /// + public static bool SaveRecipeCurrent() + { + bool answ = false; + try + { + answ = true; + // serialize + string rawData = JsonConvert.SerializeObject(RecipeLiveData); + // save live! + File.WriteAllText(LIVE_RECIPE_PATH, rawData); + } + catch + { } + // rendo se fatto + return answ; + } + /// + /// Try to save live recipe as NEW template + /// + public static bool SaveRecipeTemplate() + { + + RecipeLiveData.RecipeName = "template.json"; + return SaveRecipe(RECIPE_TEMPLATE_PATH); } /// /// Try to save live recipe to selected filePath /// - public static void SaveRecipe(string filePath) + public static bool SaveRecipe(string filePath) { + bool answ = false; try { + answ = true; + // fix name! + RecipeLiveData.RecipeName= Path.GetFileName(filePath); // serialize string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! File.WriteAllText(LIVE_RECIPE_PATH, rawData); // check filePath... - if (!filePath.Contains(RECIPE_DIRECTORY)) + if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH) { // aggiungo base path! filePath = RECIPE_DIRECTORY + filePath; @@ -883,6 +939,8 @@ namespace Thermo.Active.Config } catch { } + // rendo se fatto + return answ; } #if false diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index 59b4e97b..b8528379 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -59,6 +59,9 @@ + + Always + Always @@ -179,10 +182,11 @@ Designer + - - - + + PreserveNewest + diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index fb3022fa..cfd49200 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -211,6 +211,8 @@ namespace Thermo.Active.Model #endif public const string CONFIG_DIRECTORY = "Config\\"; public const string RECIPE_DIRECTORY = "Recipes\\"; + public const string RECIPE_TEMPLATE_PATH = CONFIG_DIRECTORY + RECIPE_DIRECTORY + "template.json"; + public const string LIVE_RECIPE_PATH = TEMP_FOLDER + RECIPE_DIRECTORY + "current.json"; public const string RESOURCE_DIRECTORY = @"Thermo.Active.Config.Config."; public const string SERVER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + @"serverConfigValidator.xsd"; public const string SERVER_CONFIG_PATH = CONFIG_DIRECTORY + "serverConfig.xml"; @@ -253,7 +255,6 @@ namespace Thermo.Active.Model public const string MAIN_PROGRAM_CONFIG_PATH = CONFIG_DIRECTORY + "customMainProgram.txt"; - public const string LIVE_RECIPE_PATH = RECIPE_DIRECTORY + "current.json"; public static string LANGUAGE_PACK_DIRECTORY = BASE_PATH + "\\languages\\"; public static string LANGUAGE_SCHEMA_PATH = BASE_PATH + "\\LanguageValidator.xsd"; diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs index 66fb0f79..bab4dd6c 100644 --- a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs @@ -8,32 +8,39 @@ namespace Thermo.Active.Model.DTOModels.Recipe { public class DTOWarmers { - public int Id { get; set; } = 0; - public double SetpointHMI { get; set; } = 0; - public double SetpointPLC { get; set; } = 0; - //public RPRange Range { get; set; } - //public RPStatus Status { get; set; } - public string UnitMeasure { get; set; } - public double ValueAct { get; set; } + public int IdChannel { get; set; } = 0; + public int IdReflector { get; set; } = 0; + public int SetpointRecipe { get; set; } = 0; + public int SetpointTermocam { get; set; } = 0; + public int SetpointPLC { get; set; } = 0; + public int ChannelStatus { get; set; } = 0; + public double ActualCurrent { get; set; } = 0; + public int ActualPerc { get; set; } = 0; + public int MaxPower { get; set; } = 0; + public override bool Equals(object obj) { if (!(obj is DTOWarmers item)) return false; - if (Id!= item.Id) + if (IdChannel != item.IdChannel) return false; - if (SetpointHMI != item.SetpointHMI) + if (IdReflector != item.IdReflector) + return false; + if (SetpointRecipe != item.SetpointRecipe) + return false; + if (SetpointTermocam != item.SetpointTermocam) return false; if (SetpointPLC != item.SetpointPLC) return false; - //if (!Range.Equals(item.Range)) - // return false; - //if (!Status.Equals(item.Status)) - // return false; - if (UnitMeasure != item.UnitMeasure) + if (ChannelStatus != item.ChannelStatus) return false; - if (ValueAct != item.ValueAct) + if (ActualCurrent != item.ActualCurrent) + return false; + if (ActualPerc != item.ActualPerc) + return false; + if (MaxPower != item.MaxPower) return false; return true; @@ -45,53 +52,4 @@ namespace Thermo.Active.Model.DTOModels.Recipe } } -#if false - public struct RPRange - { - public double Min { get; set; } - public double Max { get; set; } - public override bool Equals(object obj) - { - if (!(obj is RPRange item)) - return false; - - if (Min != item.Min) - return false; - if (Max != item.Max) - return false; - - return true; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - } - public struct RPStatus - { - public bool Visible { get; set; } - public bool Enabled { get; set; } - public bool HasError { get; set; } - public override bool Equals(object obj) - { - if (!(obj is RPStatus item)) - return false; - - if (Visible != item.Visible) - return false; - if (Enabled != item.Enabled) - return false; - if (HasError != item.HasError) - return false; - - return true; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - } -#endif } diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 1b79e3f7..c2566cac 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1719,26 +1719,40 @@ namespace Thermo.Active.NC } /// - /// Legge tutti i parametri della ricetta + /// GEt all warmers data by channel /// - /// Oggetto elenco 1024 ch riscaldi + /// List of <= 1024 warmers channels /// public CmsError ReadWarmers(out Dictionary currWarmers) { CmsError cmsError = NO_ERROR; currWarmers = new Dictionary(); + DTOWarmers currVal = new DTOWarmers(); - // FIXME TODO -#if false - DTORecipeParam currParam = new DTORecipeParam(); - RPRange currRange = new RPRange(); - RPStatus currStatus = new RPStatus(); + // read and return config + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + foreach (var item in RiskChannelConfig) + { + currVal = new DTOWarmers() + { + IdChannel = item.IdChannel, + IdReflector = item.IdReflector, + SetpointRecipe = 80, // leggere da NUOVA area PLC? + SetpointTermocam = 0, // per ora a zero + SetpointPLC = 0, // leggere da PLC! + ChannelStatus = 0, // leggere da PLC + ActualCurrent = 0, // leggere da PLC + ActualPerc = 0, // leggere da PLC + MaxPower = item.MaxPower + }; + currWarmers.Add(item.IdChannel, currVal); + } + } // gestione errore - cmsError = ReadRecipeData(false, true, out currModules); if (cmsError.IsError()) - return cmsError; -#endif + return cmsError; // restituisco cod errore se trovato return cmsError; diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 8466f6a0..62dcbcf3 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -127,10 +127,7 @@ namespace Thermo.Active.Controllers.WebApi currParams.Add(item.Key, item.Value.SetpointHMI); } - // ora salvo ANCHE i dati live... - RecipeLiveData.RecipeParameters = currParams; - // e salvo su disco - ServerConfigController.WriteLiveData(); + saveCurrentRecipeParams(currParams); // ritorno solo fatto! return Ok(); @@ -168,9 +165,56 @@ namespace Thermo.Active.Controllers.WebApi } // ora salvo ANCHE i dati live... - RecipeLiveData.RecipeParameters = currParams; - // e salvo su disco - ServerConfigController.WriteLiveData(); + saveCurrentRecipeParams(currParams); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// load recipe from file and send to PLC + /// + /// + [Route("load"), HttpPut] + public IHttpActionResult Load(string newName) + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // chiamo metodo di lettura... + //CmsError cmsError = ServerConfigController.LoadRecipe(newName); + bool fatto = ServerConfigController.LoadRecipe(newName); + if (!fatto) + return NotFound(); + + // ritorno solo fatto! + return Ok(); + } + } + + /// + /// Load tempalte recipe from file and save as new current... + /// + /// + [Route("new"), HttpPut] + public IHttpActionResult NewRecipe() + { + using (NcFileAdapter ncAdapter = new NcFileAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // chiamo metodo di lettura... + bool fatto = ServerConfigController.LoadTemplate(); + if (!fatto) + return NotFound(); // ritorno solo fatto! return Ok(); @@ -203,15 +247,12 @@ namespace Thermo.Active.Controllers.WebApi } // ora salvo ANCHE i dati live... - RecipeLiveData.RecipeParameters = currParams; - // e salvo su disco - ServerConfigController.WriteLiveData(); + saveCurrentRecipeParams(currParams); // ritorno solo fatto! return Ok(); } } - /// /// Save current recipe from PLC with new name /// @@ -247,11 +288,11 @@ namespace Thermo.Active.Controllers.WebApi } } /// - /// load recipe from file and send to PLC + /// Save current recipe from PLC to Template /// /// - [Route("load"), HttpPut] - public IHttpActionResult Load(string newName) + [Route("saveTemplate"), HttpPut] + public IHttpActionResult SaveTemplate() { using (NcFileAdapter ncAdapter = new NcFileAdapter()) { @@ -260,13 +301,56 @@ namespace Thermo.Active.Controllers.WebApi if (libraryError.errorCode != 0) return NotFound(); - // chiamo metodo di lettura... - ServerConfigController.LoadRecipe(newName); + // recupero i dati LIVE dei parametri HMI della ricetta... + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + + // recupero i dati LIVE dei carichi load dei cahnnels di riscaldo... + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // uso i valopri HMI... + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + // ora salvo nei dati live... + RecipeLiveData.RecipeParameters = currParams; + + // carico i dati dei riscaldi... + var currChSet = new Dictionary(); + foreach (var item in currWarmers) + { + currChSet.Add(item.Key, item.Value.SetpointRecipe); + } + RecipeLiveData.ChannelSetpoints = currChSet; + + + // e salvo su disco + ServerConfigController.SaveRecipeTemplate(); // ritorno solo fatto! return Ok(); } } + + /// + /// Do actual recipe parameters save + /// + /// + private static void saveCurrentRecipeParams(Dictionary currParams) + { + // ora salvo ANCHE i dati live... + RecipeLiveData.RecipeParameters = currParams; + // e salvo su disco + ServerConfigController.SaveRecipeCurrent(); + } + } } \ No newline at end of file From 8ccd5fc06b53e4b5900f6a24b5baf4ec11d40c73 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 19:41:02 +0200 Subject: [PATCH 26/84] Added load save update methods --- .../Config/Recipes/template.json | 2 +- .../ServerConfigController.cs | 22 +++++- .../Thermo.Active.Config.csproj | 2 +- Thermo.Active.NC/NcAdapter.cs | 55 +++++++++++++- .../Controllers/WebApi/RecipeController.cs | 75 ++++++++++++++++++- 5 files changed, 148 insertions(+), 8 deletions(-) diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json index 8a58ef05..a63cae56 100644 --- a/Thermo.Active.Config/Config/Recipes/template.json +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -1 +1 @@ -{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":500.0,"general_sizes_mould_dim_y":200.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":0.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":0.0,"general_sizes_plate_dim_y":0.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":0.0,"general_sizes_frame_dim_y":0.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":0.0,"positions_mould_lower_speed":0.0,"positions_mould_intermediate_position":0.0,"positions_mould_upper_position":0.0,"positions_mould_upper_speed":0.0,"positions_mould_upperdeceleration_position":0.0,"positions_mould_upperdeceleration_speed":0.0,"positions_mould_lowerdeceleration_position":0.0,"positions_mould_lowerdeceleration_speed":0.0,"positions_frame_lower_position":0.0,"positions_frame_lower_speed":0.0,"positions_frame_upper_position":0.0,"positions_frame_upper_speed":0.0,"positions_frame_intermediate_position":0.0,"positions_frame_intermediate_speed":0.0,"positions_frame_unload_position":0.0,"positions_upperplate_lower_position":0.0,"positions_upperplate_lower_speed":0.0,"positions_upperplate_upper_position":0.0,"positions_upperplate_upper_speed":0.0,"positions_upperplate_upperdeceleration_position":0.0,"positions_upperplate_upperdeceleration_speed":0.0,"positions_upperplate_lowerdeceleration_position":0.0,"positions_upperplate_lowerdeceleration_speed":0.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":0.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":0.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":0.0,"cycle_loader_pallet_height":0.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":0.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":0.0,"cycle_loader_ionizer_enabled":0.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":0.0,"heats_lowerheaters_movement_enabled":0.0,"heats_lowerheaters_enabled":0.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":0.0,"heats_upperheaters_movement_enabled":0.0,"heats_upperheaters_enabled":0.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":0.0,"heats_decomsustain_decompression_flow":0.0,"heats_decomsustain_min_blowing_time":0.0,"heats_decomsustain_sustain_delay":0.0,"heats_decomsustain_decompression_delay":0.0,"heats_decomsustain_decompression_duration":0.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":0.0,"pyrometer_pyrometer_setpoint":0.0,"pyrometer_pyrometer_delay":0.0,"pyrometer_upperthermoregulator_start_adjustment":0.0,"pyrometer_upperthermoregulator_end_adjustment":0.0,"pyrometer_upperthermoregulator_min_percentage":0.0,"pyrometer_upperthermoregulator_max_percentage":0.0,"pyrometer_upperthermoregulator_sleep_enabled":0.0,"pyrometer_upperthermoregulator_sleep_percentage":0.0,"pyrometer_lowerthermoregulator_start_adjustment":0.0,"pyrometer_lowerthermoregulator_end_adjustment":0.0,"pyrometer_lowerthermoregulator_min_percentage":0.0,"pyrometer_lowerthermoregulator_max_percentage":0.0,"pyrometer_lowerthermoregulator_sleep_enabled":0.0,"pyrometer_lowerthermoregulator_sleep_percentage":0.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":0.0,"drawing_height":0.0,"drawing_delay":0.0,"drawing_1_chart_setpointx":0.0,"drawing_1_chart_setpointy":0.0,"drawing_photocell":0.0,"drawing_mantaining_flow":0.0,"drawing_manual":0.0,"drawing_mould_up_delay":0.0,"upperplate_cycle_type":0.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":0.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":0.0,"cooling_blowing_delay":0.0,"cooling_blowing_time":0.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":0.0,"cooling_pyrometer_delay":0.0,"cooling_nebulizer_type":0.0,"cooling_nebulizer_delay":0.0,"cooling_nebulizer_time":0.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":0.0,"vacuum_main_max_time":0.0,"vacuum_main_1_chart_setpointx":0.0,"vacuum_main_1_chart_setpointy":0.0,"vacuum_main_2_chart_setpointx":0.0,"vacuum_main_2_chart_setpointy":0.0,"vacuum_main_3_chart_setpointx":0.0,"vacuum_main_3_chart_setpointy":0.0,"vacuum_main_manual":0.0,"vacuum_direct_enabled":0.0,"vacuum_direct_delay":0.0,"vacuum_direct_time":0.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":0.0,"extraction_main_mould_dw_delay":0.0,"extraction_main_delay":0.0,"extraction_main_1_chart_setpointx":0.0,"extraction_main_1_chart_setpointy":0.0,"extraction_main_manual":0.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":0.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":0.0,"options_undercutmould_2_delay_acti":0.0,"options_undercutmould_2_delay_dis":0.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":0.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":0.0,"options_undercutupperplate_2_delay_acti":0.0,"options_undercutupperplate_2_delay_dis":0.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":0.0,"options_thermoregulator_1_setpoint":0.0,"options_thermoregulator_2_enabled":0.0,"options_thermoregulator_2_setpoint":0.0,"options_thermoregulator_3_enabled":0.0,"options_thermoregulator_3_setpoint":0.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":80.0,"44":80.0,"81":80.0,"118":80.0,"155":80.0,"192":80.0,"229":80.0,"266":80.0,"303":80.0,"340":80.0,"377":80.0,"414":80.0,"1":80.0,"8":80.0,"45":80.0,"82":80.0,"119":80.0,"156":80.0,"193":80.0,"230":80.0,"267":80.0,"304":80.0,"341":80.0,"378":80.0,"415":80.0,"9":80.0,"46":80.0,"83":80.0,"120":80.0,"157":80.0,"194":80.0,"231":80.0,"268":80.0,"305":80.0,"342":80.0,"379":80.0,"416":80.0,"10":80.0,"47":80.0,"84":80.0,"121":80.0,"158":80.0,"195":80.0,"232":80.0,"269":80.0,"306":80.0,"343":80.0,"380":80.0,"11":80.0,"48":80.0,"85":80.0,"122":80.0,"159":80.0,"196":80.0,"233":80.0,"270":80.0,"307":80.0,"344":80.0,"381":80.0,"417":80.0,"12":80.0,"49":80.0,"86":80.0,"123":80.0,"160":80.0,"197":80.0,"234":80.0,"271":80.0,"308":80.0,"345":80.0,"382":80.0,"13":80.0,"50":80.0,"87":80.0,"124":80.0,"161":80.0,"198":80.0,"235":80.0,"272":80.0,"309":80.0,"346":80.0,"383":80.0,"418":80.0,"2":80.0,"14":80.0,"51":80.0,"88":80.0,"125":80.0,"162":80.0,"199":80.0,"236":80.0,"273":80.0,"310":80.0,"347":80.0,"384":80.0,"419":80.0,"15":80.0,"52":80.0,"89":80.0,"126":80.0,"163":80.0,"200":80.0,"237":80.0,"274":80.0,"311":80.0,"348":80.0,"385":80.0,"420":80.0,"16":80.0,"53":80.0,"90":80.0,"127":80.0,"164":80.0,"201":80.0,"238":80.0,"275":80.0,"312":80.0,"349":80.0,"386":80.0,"17":80.0,"54":80.0,"91":80.0,"128":80.0,"165":80.0,"202":80.0,"239":80.0,"276":80.0,"313":80.0,"350":80.0,"387":80.0,"421":80.0,"18":80.0,"55":80.0,"92":80.0,"129":80.0,"166":80.0,"203":80.0,"240":80.0,"277":80.0,"314":80.0,"351":80.0,"388":80.0,"19":80.0,"56":80.0,"93":80.0,"130":80.0,"167":80.0,"204":80.0,"241":80.0,"278":80.0,"315":80.0,"352":80.0,"389":80.0,"422":80.0,"3":80.0,"20":80.0,"57":80.0,"94":80.0,"131":80.0,"168":80.0,"205":80.0,"242":80.0,"279":80.0,"316":80.0,"353":80.0,"390":80.0,"423":80.0,"21":80.0,"58":80.0,"95":80.0,"132":80.0,"169":80.0,"206":80.0,"243":80.0,"280":80.0,"317":80.0,"354":80.0,"391":80.0,"424":80.0,"22":80.0,"59":80.0,"96":80.0,"133":80.0,"170":80.0,"207":80.0,"244":80.0,"281":80.0,"318":80.0,"355":80.0,"392":80.0,"23":80.0,"60":80.0,"97":80.0,"134":80.0,"171":80.0,"208":80.0,"245":80.0,"282":80.0,"319":80.0,"356":80.0,"393":80.0,"425":80.0,"24":80.0,"61":80.0,"98":80.0,"135":80.0,"172":80.0,"209":80.0,"246":80.0,"283":80.0,"320":80.0,"357":80.0,"394":80.0,"25":80.0,"62":80.0,"99":80.0,"136":80.0,"173":80.0,"210":80.0,"247":80.0,"284":80.0,"321":80.0,"358":80.0,"395":80.0,"426":80.0,"4":80.0,"26":80.0,"63":80.0,"100":80.0,"137":80.0,"174":80.0,"211":80.0,"248":80.0,"285":80.0,"322":80.0,"359":80.0,"396":80.0,"427":80.0,"27":80.0,"64":80.0,"101":80.0,"138":80.0,"175":80.0,"212":80.0,"249":80.0,"286":80.0,"323":80.0,"360":80.0,"397":80.0,"428":80.0,"28":80.0,"65":80.0,"102":80.0,"139":80.0,"176":80.0,"213":80.0,"250":80.0,"287":80.0,"324":80.0,"361":80.0,"398":80.0,"29":80.0,"66":80.0,"103":80.0,"140":80.0,"177":80.0,"214":80.0,"251":80.0,"288":80.0,"325":80.0,"362":80.0,"399":80.0,"429":80.0,"30":80.0,"67":80.0,"104":80.0,"141":80.0,"178":80.0,"215":80.0,"252":80.0,"289":80.0,"326":80.0,"363":80.0,"400":80.0,"31":80.0,"68":80.0,"105":80.0,"142":80.0,"179":80.0,"216":80.0,"253":80.0,"290":80.0,"327":80.0,"364":80.0,"401":80.0,"430":80.0,"5":80.0,"32":80.0,"69":80.0,"106":80.0,"143":80.0,"180":80.0,"217":80.0,"254":80.0,"291":80.0,"328":80.0,"365":80.0,"402":80.0,"431":80.0,"33":80.0,"70":80.0,"107":80.0,"144":80.0,"181":80.0,"218":80.0,"255":80.0,"292":80.0,"329":80.0,"366":80.0,"403":80.0,"432":80.0,"34":80.0,"71":80.0,"108":80.0,"145":80.0,"182":80.0,"219":80.0,"256":80.0,"293":80.0,"330":80.0,"367":80.0,"404":80.0,"35":80.0,"72":80.0,"109":80.0,"146":80.0,"183":80.0,"220":80.0,"257":80.0,"294":80.0,"331":80.0,"368":80.0,"405":80.0,"433":80.0,"36":80.0,"73":80.0,"110":80.0,"147":80.0,"184":80.0,"221":80.0,"258":80.0,"295":80.0,"332":80.0,"369":80.0,"406":80.0,"37":80.0,"74":80.0,"111":80.0,"148":80.0,"185":80.0,"222":80.0,"259":80.0,"296":80.0,"333":80.0,"370":80.0,"407":80.0,"434":80.0,"6":80.0,"38":80.0,"75":80.0,"112":80.0,"149":80.0,"186":80.0,"223":80.0,"260":80.0,"297":80.0,"334":80.0,"371":80.0,"408":80.0,"435":80.0,"39":80.0,"76":80.0,"113":80.0,"150":80.0,"187":80.0,"224":80.0,"261":80.0,"298":80.0,"335":80.0,"372":80.0,"409":80.0,"436":80.0,"40":80.0,"77":80.0,"114":80.0,"151":80.0,"188":80.0,"225":80.0,"262":80.0,"299":80.0,"336":80.0,"373":80.0,"410":80.0,"41":80.0,"78":80.0,"115":80.0,"152":80.0,"189":80.0,"226":80.0,"263":80.0,"300":80.0,"337":80.0,"374":80.0,"411":80.0,"437":80.0,"42":80.0,"79":80.0,"116":80.0,"153":80.0,"190":80.0,"227":80.0,"264":80.0,"301":80.0,"338":80.0,"375":80.0,"412":80.0,"43":80.0,"80":80.0,"117":80.0,"154":80.0,"191":80.0,"228":80.0,"265":80.0,"302":80.0,"339":80.0,"376":80.0,"413":80.0,"438":80.0,"513":80.0,"520":80.0,"557":80.0,"594":80.0,"631":80.0,"668":80.0,"705":80.0,"742":80.0,"779":80.0,"816":80.0,"853":80.0,"890":80.0,"927":80.0,"521":80.0,"558":80.0,"595":80.0,"632":80.0,"669":80.0,"706":80.0,"743":80.0,"780":80.0,"817":80.0,"854":80.0,"891":80.0,"928":80.0,"522":80.0,"559":80.0,"596":80.0,"633":80.0,"670":80.0,"707":80.0,"744":80.0,"781":80.0,"818":80.0,"855":80.0,"892":80.0,"523":80.0,"560":80.0,"597":80.0,"634":80.0,"671":80.0,"708":80.0,"745":80.0,"782":80.0,"819":80.0,"856":80.0,"893":80.0,"929":80.0,"524":80.0,"561":80.0,"598":80.0,"635":80.0,"672":80.0,"709":80.0,"746":80.0,"783":80.0,"820":80.0,"857":80.0,"894":80.0,"525":80.0,"562":80.0,"599":80.0,"636":80.0,"673":80.0,"710":80.0,"747":80.0,"784":80.0,"821":80.0,"858":80.0,"895":80.0,"930":80.0,"514":80.0,"526":80.0,"563":80.0,"600":80.0,"637":80.0,"674":80.0,"711":80.0,"748":80.0,"785":80.0,"822":80.0,"859":80.0,"896":80.0,"931":80.0,"527":80.0,"564":80.0,"601":80.0,"638":80.0,"675":80.0,"712":80.0,"749":80.0,"786":80.0,"823":80.0,"860":80.0,"897":80.0,"932":80.0,"528":80.0,"565":80.0,"602":80.0,"639":80.0,"676":80.0,"713":80.0,"750":80.0,"787":80.0,"824":80.0,"861":80.0,"898":80.0,"529":80.0,"566":80.0,"603":80.0,"640":80.0,"677":80.0,"714":80.0,"751":80.0,"788":80.0,"825":80.0,"862":80.0,"899":80.0,"933":80.0,"530":80.0,"567":80.0,"604":80.0,"641":80.0,"678":80.0,"715":80.0,"752":80.0,"789":80.0,"826":80.0,"863":80.0,"900":80.0,"531":80.0,"568":80.0,"605":80.0,"642":80.0,"679":80.0,"716":80.0,"753":80.0,"790":80.0,"827":80.0,"864":80.0,"901":80.0,"934":80.0,"515":80.0,"532":80.0,"569":80.0,"606":80.0,"643":80.0,"680":80.0,"717":80.0,"754":80.0,"791":80.0,"828":80.0,"865":80.0,"902":80.0,"935":80.0,"533":80.0,"570":80.0,"607":80.0,"644":80.0,"681":80.0,"718":80.0,"755":80.0,"792":80.0,"829":80.0,"866":80.0,"903":80.0,"936":80.0,"534":80.0,"571":80.0,"608":80.0,"645":80.0,"682":80.0,"719":80.0,"756":80.0,"793":80.0,"830":80.0,"867":80.0,"904":80.0,"535":80.0,"572":80.0,"609":80.0,"646":80.0,"683":80.0,"720":80.0,"757":80.0,"794":80.0,"831":80.0,"868":80.0,"905":80.0,"937":80.0,"536":80.0,"573":80.0,"610":80.0,"647":80.0,"684":80.0,"721":80.0,"758":80.0,"795":80.0,"832":80.0,"869":80.0,"906":80.0,"537":80.0,"574":80.0,"611":80.0,"648":80.0,"685":80.0,"722":80.0,"759":80.0,"796":80.0,"833":80.0,"870":80.0,"907":80.0,"938":80.0,"516":80.0,"538":80.0,"575":80.0,"612":80.0,"649":80.0,"686":80.0,"723":80.0,"760":80.0,"797":80.0,"834":80.0,"871":80.0,"908":80.0,"939":80.0,"539":80.0,"576":80.0,"613":80.0,"650":80.0,"687":80.0,"724":80.0,"761":80.0,"798":80.0,"835":80.0,"872":80.0,"909":80.0,"940":80.0,"517":80.0,"540":80.0,"577":80.0,"614":80.0,"651":80.0,"688":80.0,"725":80.0,"762":80.0,"799":80.0,"836":80.0,"873":80.0,"910":80.0,"941":80.0,"541":80.0,"578":80.0,"615":80.0,"652":80.0,"689":80.0,"726":80.0,"763":80.0,"800":80.0,"837":80.0,"874":80.0,"911":80.0,"942":80.0,"542":80.0,"579":80.0,"616":80.0,"653":80.0,"690":80.0,"727":80.0,"764":80.0,"801":80.0,"838":80.0,"875":80.0,"912":80.0,"543":80.0,"580":80.0,"617":80.0,"654":80.0,"691":80.0,"728":80.0,"765":80.0,"802":80.0,"839":80.0,"876":80.0,"913":80.0,"943":80.0,"544":80.0,"581":80.0,"618":80.0,"655":80.0,"692":80.0,"729":80.0,"766":80.0,"803":80.0,"840":80.0,"877":80.0,"914":80.0,"545":80.0,"582":80.0,"619":80.0,"656":80.0,"693":80.0,"730":80.0,"767":80.0,"804":80.0,"841":80.0,"878":80.0,"915":80.0,"944":80.0,"518":80.0,"546":80.0,"583":80.0,"620":80.0,"657":80.0,"694":80.0,"731":80.0,"768":80.0,"805":80.0,"842":80.0,"879":80.0,"916":80.0,"945":80.0,"547":80.0,"584":80.0,"621":80.0,"658":80.0,"695":80.0,"732":80.0,"769":80.0,"806":80.0,"843":80.0,"880":80.0,"917":80.0,"946":80.0,"548":80.0,"585":80.0,"622":80.0,"659":80.0,"696":80.0,"733":80.0,"770":80.0,"807":80.0,"844":80.0,"881":80.0,"918":80.0,"549":80.0,"586":80.0,"623":80.0,"660":80.0,"697":80.0,"734":80.0,"771":80.0,"808":80.0,"845":80.0,"882":80.0,"919":80.0,"947":80.0,"550":80.0,"587":80.0,"624":80.0,"661":80.0,"698":80.0,"735":80.0,"772":80.0,"809":80.0,"846":80.0,"883":80.0,"920":80.0,"551":80.0,"588":80.0,"625":80.0,"662":80.0,"699":80.0,"736":80.0,"773":80.0,"810":80.0,"847":80.0,"884":80.0,"921":80.0,"948":80.0,"519":80.0,"552":80.0,"589":80.0,"626":80.0,"663":80.0,"700":80.0,"737":80.0,"774":80.0,"811":80.0,"848":80.0,"885":80.0,"922":80.0,"949":80.0,"553":80.0,"590":80.0,"627":80.0,"664":80.0,"701":80.0,"738":80.0,"775":80.0,"812":80.0,"849":80.0,"886":80.0,"923":80.0,"950":80.0,"554":80.0,"591":80.0,"628":80.0,"665":80.0,"702":80.0,"739":80.0,"776":80.0,"813":80.0,"850":80.0,"887":80.0,"924":80.0,"555":80.0,"592":80.0,"629":80.0,"666":80.0,"703":80.0,"740":80.0,"777":80.0,"814":80.0,"851":80.0,"888":80.0,"925":80.0,"951":80.0,"556":80.0,"593":80.0,"630":80.0,"667":80.0,"704":80.0,"741":80.0,"778":80.0,"815":80.0,"852":80.0,"889":80.0,"926":80.0}} \ No newline at end of file +{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":400.0,"general_sizes_mould_dim_y":150.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":3.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":1000.0,"general_sizes_plate_dim_y":900.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":1100.0,"general_sizes_frame_dim_y":600.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":150.0,"positions_mould_lower_speed":350.0,"positions_mould_intermediate_position":800.0,"positions_mould_upper_position":850.0,"positions_mould_upper_speed":350.0,"positions_mould_upperdeceleration_position":820.0,"positions_mould_upperdeceleration_speed":150.0,"positions_mould_lowerdeceleration_position":830.0,"positions_mould_lowerdeceleration_speed":150.0,"positions_frame_lower_position":40.0,"positions_frame_lower_speed":500.0,"positions_frame_upper_position":980.0,"positions_frame_upper_speed":450.0,"positions_frame_intermediate_position":700.0,"positions_frame_intermediate_speed":400.0,"positions_frame_unload_position":650.0,"positions_upperplate_lower_position":245.0,"positions_upperplate_lower_speed":150.0,"positions_upperplate_upper_position":1150.0,"positions_upperplate_upper_speed":350.0,"positions_upperplate_upperdeceleration_position":270.0,"positions_upperplate_upperdeceleration_speed":150.0,"positions_upperplate_lowerdeceleration_position":250.0,"positions_upperplate_lowerdeceleration_speed":50.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":4000.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":15000.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":400.0,"cycle_loader_pallet_height":110.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":1.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":1.0,"cycle_loader_ionizer_enabled":1.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":20000.0,"heats_lowerheaters_movement_enabled":1.0,"heats_lowerheaters_enabled":1.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":20000.0,"heats_upperheaters_movement_enabled":1.0,"heats_upperheaters_enabled":1.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":1.0,"heats_decomsustain_decompression_flow":50.0,"heats_decomsustain_min_blowing_time":300.0,"heats_decomsustain_sustain_delay":1000.0,"heats_decomsustain_decompression_delay":1000.0,"heats_decomsustain_decompression_duration":1000.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":1.0,"pyrometer_pyrometer_setpoint":250.0,"pyrometer_pyrometer_delay":10000.0,"pyrometer_upperthermoregulator_start_adjustment":100.0,"pyrometer_upperthermoregulator_end_adjustment":200.0,"pyrometer_upperthermoregulator_min_percentage":70.0,"pyrometer_upperthermoregulator_max_percentage":100.0,"pyrometer_upperthermoregulator_sleep_enabled":1.0,"pyrometer_upperthermoregulator_sleep_percentage":25.0,"pyrometer_lowerthermoregulator_start_adjustment":100.0,"pyrometer_lowerthermoregulator_end_adjustment":200.0,"pyrometer_lowerthermoregulator_min_percentage":70.0,"pyrometer_lowerthermoregulator_max_percentage":100.0,"pyrometer_lowerthermoregulator_sleep_enabled":1.0,"pyrometer_lowerthermoregulator_sleep_percentage":25.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":4.0,"drawing_height":100.0,"drawing_delay":2000.0,"drawing_1_chart_setpointx":6000.0,"drawing_1_chart_setpointy":100.0,"drawing_photocell":1.0,"drawing_mantaining_flow":20.0,"drawing_manual":50.0,"drawing_mould_up_delay":3000.0,"upperplate_cycle_type":1.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":3000.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":4.0,"cooling_blowing_delay":5000.0,"cooling_blowing_time":10000.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":50.0,"cooling_pyrometer_delay":8000.0,"cooling_nebulizer_type":1.0,"cooling_nebulizer_delay":2000.0,"cooling_nebulizer_time":2000.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":1000.0,"vacuum_main_max_time":30000.0,"vacuum_main_1_chart_setpointx":2000.0,"vacuum_main_1_chart_setpointy":30.0,"vacuum_main_2_chart_setpointx":3000.0,"vacuum_main_2_chart_setpointy":60.0,"vacuum_main_3_chart_setpointx":15000.0,"vacuum_main_3_chart_setpointy":90.0,"vacuum_main_manual":40.0,"vacuum_direct_enabled":1.0,"vacuum_direct_delay":2000.0,"vacuum_direct_time":3000.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":2.0,"extraction_main_mould_dw_delay":3000.0,"extraction_main_delay":2000.0,"extraction_main_1_chart_setpointx":3000.0,"extraction_main_1_chart_setpointy":85.0,"extraction_main_manual":60.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":500.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":500.0,"options_undercutmould_2_delay_acti":1000.0,"options_undercutmould_2_delay_dis":1000.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":600.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":600.0,"options_undercutupperplate_2_delay_acti":1000.0,"options_undercutupperplate_2_delay_dis":1000.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":1.0,"options_thermoregulator_1_setpoint":55.0,"options_thermoregulator_2_enabled":1.0,"options_thermoregulator_2_setpoint":60.0,"options_thermoregulator_3_enabled":1.0,"options_thermoregulator_3_setpoint":65.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":80.0,"44":80.0,"81":80.0,"118":80.0,"155":80.0,"192":80.0,"229":80.0,"266":80.0,"303":80.0,"340":80.0,"377":80.0,"414":80.0,"1":80.0,"8":80.0,"45":80.0,"82":80.0,"119":80.0,"156":80.0,"193":80.0,"230":80.0,"267":80.0,"304":80.0,"341":80.0,"378":80.0,"415":80.0,"9":80.0,"46":80.0,"83":80.0,"120":80.0,"157":80.0,"194":80.0,"231":80.0,"268":80.0,"305":80.0,"342":80.0,"379":80.0,"416":80.0,"10":80.0,"47":80.0,"84":80.0,"121":80.0,"158":80.0,"195":80.0,"232":80.0,"269":80.0,"306":80.0,"343":80.0,"380":80.0,"11":80.0,"48":80.0,"85":80.0,"122":80.0,"159":80.0,"196":80.0,"233":80.0,"270":80.0,"307":80.0,"344":80.0,"381":80.0,"417":80.0,"12":80.0,"49":80.0,"86":80.0,"123":80.0,"160":80.0,"197":80.0,"234":80.0,"271":80.0,"308":80.0,"345":80.0,"382":80.0,"13":80.0,"50":80.0,"87":80.0,"124":80.0,"161":80.0,"198":80.0,"235":80.0,"272":80.0,"309":80.0,"346":80.0,"383":80.0,"418":80.0,"2":80.0,"14":80.0,"51":80.0,"88":80.0,"125":80.0,"162":80.0,"199":80.0,"236":80.0,"273":80.0,"310":80.0,"347":80.0,"384":80.0,"419":80.0,"15":80.0,"52":80.0,"89":80.0,"126":80.0,"163":80.0,"200":80.0,"237":80.0,"274":80.0,"311":80.0,"348":80.0,"385":80.0,"420":80.0,"16":80.0,"53":80.0,"90":80.0,"127":80.0,"164":80.0,"201":80.0,"238":80.0,"275":80.0,"312":80.0,"349":80.0,"386":80.0,"17":80.0,"54":80.0,"91":80.0,"128":80.0,"165":80.0,"202":80.0,"239":80.0,"276":80.0,"313":80.0,"350":80.0,"387":80.0,"421":80.0,"18":80.0,"55":80.0,"92":80.0,"129":80.0,"166":80.0,"203":80.0,"240":80.0,"277":80.0,"314":80.0,"351":80.0,"388":80.0,"19":80.0,"56":80.0,"93":80.0,"130":80.0,"167":80.0,"204":80.0,"241":80.0,"278":80.0,"315":80.0,"352":80.0,"389":80.0,"422":80.0,"3":80.0,"20":80.0,"57":80.0,"94":80.0,"131":80.0,"168":80.0,"205":80.0,"242":80.0,"279":80.0,"316":80.0,"353":80.0,"390":80.0,"423":80.0,"21":80.0,"58":80.0,"95":80.0,"132":80.0,"169":80.0,"206":80.0,"243":80.0,"280":80.0,"317":80.0,"354":80.0,"391":80.0,"424":80.0,"22":80.0,"59":80.0,"96":80.0,"133":80.0,"170":80.0,"207":80.0,"244":80.0,"281":80.0,"318":80.0,"355":80.0,"392":80.0,"23":80.0,"60":80.0,"97":80.0,"134":80.0,"171":80.0,"208":80.0,"245":80.0,"282":80.0,"319":80.0,"356":80.0,"393":80.0,"425":80.0,"24":80.0,"61":80.0,"98":80.0,"135":80.0,"172":80.0,"209":80.0,"246":80.0,"283":80.0,"320":80.0,"357":80.0,"394":80.0,"25":80.0,"62":80.0,"99":80.0,"136":80.0,"173":80.0,"210":80.0,"247":80.0,"284":80.0,"321":80.0,"358":80.0,"395":80.0,"426":80.0,"4":80.0,"26":80.0,"63":80.0,"100":80.0,"137":80.0,"174":80.0,"211":80.0,"248":80.0,"285":80.0,"322":80.0,"359":80.0,"396":80.0,"427":80.0,"27":80.0,"64":80.0,"101":80.0,"138":80.0,"175":80.0,"212":80.0,"249":80.0,"286":80.0,"323":80.0,"360":80.0,"397":80.0,"428":80.0,"28":80.0,"65":80.0,"102":80.0,"139":80.0,"176":80.0,"213":80.0,"250":80.0,"287":80.0,"324":80.0,"361":80.0,"398":80.0,"29":80.0,"66":80.0,"103":80.0,"140":80.0,"177":80.0,"214":80.0,"251":80.0,"288":80.0,"325":80.0,"362":80.0,"399":80.0,"429":80.0,"30":80.0,"67":80.0,"104":80.0,"141":80.0,"178":80.0,"215":80.0,"252":80.0,"289":80.0,"326":80.0,"363":80.0,"400":80.0,"31":80.0,"68":80.0,"105":80.0,"142":80.0,"179":80.0,"216":80.0,"253":80.0,"290":80.0,"327":80.0,"364":80.0,"401":80.0,"430":80.0,"5":80.0,"32":80.0,"69":80.0,"106":80.0,"143":80.0,"180":80.0,"217":80.0,"254":80.0,"291":80.0,"328":80.0,"365":80.0,"402":80.0,"431":80.0,"33":80.0,"70":80.0,"107":80.0,"144":80.0,"181":80.0,"218":80.0,"255":80.0,"292":80.0,"329":80.0,"366":80.0,"403":80.0,"432":80.0,"34":80.0,"71":80.0,"108":80.0,"145":80.0,"182":80.0,"219":80.0,"256":80.0,"293":80.0,"330":80.0,"367":80.0,"404":80.0,"35":80.0,"72":80.0,"109":80.0,"146":80.0,"183":80.0,"220":80.0,"257":80.0,"294":80.0,"331":80.0,"368":80.0,"405":80.0,"433":80.0,"36":80.0,"73":80.0,"110":80.0,"147":80.0,"184":80.0,"221":80.0,"258":80.0,"295":80.0,"332":80.0,"369":80.0,"406":80.0,"37":80.0,"74":80.0,"111":80.0,"148":80.0,"185":80.0,"222":80.0,"259":80.0,"296":80.0,"333":80.0,"370":80.0,"407":80.0,"434":80.0,"6":80.0,"38":80.0,"75":80.0,"112":80.0,"149":80.0,"186":80.0,"223":80.0,"260":80.0,"297":80.0,"334":80.0,"371":80.0,"408":80.0,"435":80.0,"39":80.0,"76":80.0,"113":80.0,"150":80.0,"187":80.0,"224":80.0,"261":80.0,"298":80.0,"335":80.0,"372":80.0,"409":80.0,"436":80.0,"40":80.0,"77":80.0,"114":80.0,"151":80.0,"188":80.0,"225":80.0,"262":80.0,"299":80.0,"336":80.0,"373":80.0,"410":80.0,"41":80.0,"78":80.0,"115":80.0,"152":80.0,"189":80.0,"226":80.0,"263":80.0,"300":80.0,"337":80.0,"374":80.0,"411":80.0,"437":80.0,"42":80.0,"79":80.0,"116":80.0,"153":80.0,"190":80.0,"227":80.0,"264":80.0,"301":80.0,"338":80.0,"375":80.0,"412":80.0,"43":80.0,"80":80.0,"117":80.0,"154":80.0,"191":80.0,"228":80.0,"265":80.0,"302":80.0,"339":80.0,"376":80.0,"413":80.0,"438":80.0,"513":80.0,"520":80.0,"557":80.0,"594":80.0,"631":80.0,"668":80.0,"705":80.0,"742":80.0,"779":80.0,"816":80.0,"853":80.0,"890":80.0,"927":80.0,"521":80.0,"558":80.0,"595":80.0,"632":80.0,"669":80.0,"706":80.0,"743":80.0,"780":80.0,"817":80.0,"854":80.0,"891":80.0,"928":80.0,"522":80.0,"559":80.0,"596":80.0,"633":80.0,"670":80.0,"707":80.0,"744":80.0,"781":80.0,"818":80.0,"855":80.0,"892":80.0,"523":80.0,"560":80.0,"597":80.0,"634":80.0,"671":80.0,"708":80.0,"745":80.0,"782":80.0,"819":80.0,"856":80.0,"893":80.0,"929":80.0,"524":80.0,"561":80.0,"598":80.0,"635":80.0,"672":80.0,"709":80.0,"746":80.0,"783":80.0,"820":80.0,"857":80.0,"894":80.0,"525":80.0,"562":80.0,"599":80.0,"636":80.0,"673":80.0,"710":80.0,"747":80.0,"784":80.0,"821":80.0,"858":80.0,"895":80.0,"930":80.0,"514":80.0,"526":80.0,"563":80.0,"600":80.0,"637":80.0,"674":80.0,"711":80.0,"748":80.0,"785":80.0,"822":80.0,"859":80.0,"896":80.0,"931":80.0,"527":80.0,"564":80.0,"601":80.0,"638":80.0,"675":80.0,"712":80.0,"749":80.0,"786":80.0,"823":80.0,"860":80.0,"897":80.0,"932":80.0,"528":80.0,"565":80.0,"602":80.0,"639":80.0,"676":80.0,"713":80.0,"750":80.0,"787":80.0,"824":80.0,"861":80.0,"898":80.0,"529":80.0,"566":80.0,"603":80.0,"640":80.0,"677":80.0,"714":80.0,"751":80.0,"788":80.0,"825":80.0,"862":80.0,"899":80.0,"933":80.0,"530":80.0,"567":80.0,"604":80.0,"641":80.0,"678":80.0,"715":80.0,"752":80.0,"789":80.0,"826":80.0,"863":80.0,"900":80.0,"531":80.0,"568":80.0,"605":80.0,"642":80.0,"679":80.0,"716":80.0,"753":80.0,"790":80.0,"827":80.0,"864":80.0,"901":80.0,"934":80.0,"515":80.0,"532":80.0,"569":80.0,"606":80.0,"643":80.0,"680":80.0,"717":80.0,"754":80.0,"791":80.0,"828":80.0,"865":80.0,"902":80.0,"935":80.0,"533":80.0,"570":80.0,"607":80.0,"644":80.0,"681":80.0,"718":80.0,"755":80.0,"792":80.0,"829":80.0,"866":80.0,"903":80.0,"936":80.0,"534":80.0,"571":80.0,"608":80.0,"645":80.0,"682":80.0,"719":80.0,"756":80.0,"793":80.0,"830":80.0,"867":80.0,"904":80.0,"535":80.0,"572":80.0,"609":80.0,"646":80.0,"683":80.0,"720":80.0,"757":80.0,"794":80.0,"831":80.0,"868":80.0,"905":80.0,"937":80.0,"536":80.0,"573":80.0,"610":80.0,"647":80.0,"684":80.0,"721":80.0,"758":80.0,"795":80.0,"832":80.0,"869":80.0,"906":80.0,"537":80.0,"574":80.0,"611":80.0,"648":80.0,"685":80.0,"722":80.0,"759":80.0,"796":80.0,"833":80.0,"870":80.0,"907":80.0,"938":80.0,"516":80.0,"538":80.0,"575":80.0,"612":80.0,"649":80.0,"686":80.0,"723":80.0,"760":80.0,"797":80.0,"834":80.0,"871":80.0,"908":80.0,"939":80.0,"539":80.0,"576":80.0,"613":80.0,"650":80.0,"687":80.0,"724":80.0,"761":80.0,"798":80.0,"835":80.0,"872":80.0,"909":80.0,"940":80.0,"517":80.0,"540":80.0,"577":80.0,"614":80.0,"651":80.0,"688":80.0,"725":80.0,"762":80.0,"799":80.0,"836":80.0,"873":80.0,"910":80.0,"941":80.0,"541":80.0,"578":80.0,"615":80.0,"652":80.0,"689":80.0,"726":80.0,"763":80.0,"800":80.0,"837":80.0,"874":80.0,"911":80.0,"942":80.0,"542":80.0,"579":80.0,"616":80.0,"653":80.0,"690":80.0,"727":80.0,"764":80.0,"801":80.0,"838":80.0,"875":80.0,"912":80.0,"543":80.0,"580":80.0,"617":80.0,"654":80.0,"691":80.0,"728":80.0,"765":80.0,"802":80.0,"839":80.0,"876":80.0,"913":80.0,"943":80.0,"544":80.0,"581":80.0,"618":80.0,"655":80.0,"692":80.0,"729":80.0,"766":80.0,"803":80.0,"840":80.0,"877":80.0,"914":80.0,"545":80.0,"582":80.0,"619":80.0,"656":80.0,"693":80.0,"730":80.0,"767":80.0,"804":80.0,"841":80.0,"878":80.0,"915":80.0,"944":80.0,"518":80.0,"546":80.0,"583":80.0,"620":80.0,"657":80.0,"694":80.0,"731":80.0,"768":80.0,"805":80.0,"842":80.0,"879":80.0,"916":80.0,"945":80.0,"547":80.0,"584":80.0,"621":80.0,"658":80.0,"695":80.0,"732":80.0,"769":80.0,"806":80.0,"843":80.0,"880":80.0,"917":80.0,"946":80.0,"548":80.0,"585":80.0,"622":80.0,"659":80.0,"696":80.0,"733":80.0,"770":80.0,"807":80.0,"844":80.0,"881":80.0,"918":80.0,"549":80.0,"586":80.0,"623":80.0,"660":80.0,"697":80.0,"734":80.0,"771":80.0,"808":80.0,"845":80.0,"882":80.0,"919":80.0,"947":80.0,"550":80.0,"587":80.0,"624":80.0,"661":80.0,"698":80.0,"735":80.0,"772":80.0,"809":80.0,"846":80.0,"883":80.0,"920":80.0,"551":80.0,"588":80.0,"625":80.0,"662":80.0,"699":80.0,"736":80.0,"773":80.0,"810":80.0,"847":80.0,"884":80.0,"921":80.0,"948":80.0,"519":80.0,"552":80.0,"589":80.0,"626":80.0,"663":80.0,"700":80.0,"737":80.0,"774":80.0,"811":80.0,"848":80.0,"885":80.0,"922":80.0,"949":80.0,"553":80.0,"590":80.0,"627":80.0,"664":80.0,"701":80.0,"738":80.0,"775":80.0,"812":80.0,"849":80.0,"886":80.0,"923":80.0,"950":80.0,"554":80.0,"591":80.0,"628":80.0,"665":80.0,"702":80.0,"739":80.0,"776":80.0,"813":80.0,"850":80.0,"887":80.0,"924":80.0,"555":80.0,"592":80.0,"629":80.0,"666":80.0,"703":80.0,"740":80.0,"777":80.0,"814":80.0,"851":80.0,"888":80.0,"925":80.0,"951":80.0,"556":80.0,"593":80.0,"630":80.0,"667":80.0,"704":80.0,"741":80.0,"778":80.0,"815":80.0,"852":80.0,"889":80.0,"926":80.0}} \ No newline at end of file diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index fad9ff1e..58f3b771 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -832,6 +832,15 @@ namespace Thermo.Active.Config public static bool LoadRecipe(string filePath) { bool answ = false; + + // check file extension + string fileName = Path.GetFileName(filePath); + if (!fileName.EndsWith(".json")) + { + fileName += ".json"; + filePath += ".json"; + } + // check filePath... if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH) { @@ -897,6 +906,11 @@ namespace Thermo.Active.Config // serialize string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! + var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH); + if(!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } File.WriteAllText(LIVE_RECIPE_PATH, rawData); } catch @@ -922,8 +936,14 @@ namespace Thermo.Active.Config try { answ = true; + string fileName = Path.GetFileName(filePath); + if(!fileName.EndsWith(".json")) + { + fileName += ".json"; + filePath += ".json"; + } // fix name! - RecipeLiveData.RecipeName= Path.GetFileName(filePath); + RecipeLiveData.RecipeName=fileName; // serialize string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index b8528379..aab7c136 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -184,7 +184,7 @@ - + PreserveNewest diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index c2566cac..391117d9 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1170,11 +1170,11 @@ namespace Thermo.Active.NC return NO_ERROR; } /// - /// Scrittura memoria (SOLO SetpointHMI invero) + /// Recipe Parameters write to PLC (only SetpointHMI) /// /// /// - public CmsError WriteRecipeData(Dictionary updtRecipe) + public CmsError WriteRecipeParametersToPLC(Dictionary updtRecipe) { // solo x S7... if (NcConfig.NcVendor == NC_VENDOR.S7NET) @@ -1225,6 +1225,43 @@ namespace Thermo.Active.NC return NO_ERROR; } + /// + /// Recipe Parameters write to PLC (only SetpointHMI) + /// + /// + /// + public CmsError WriteRecipeWarmersToPLC(Dictionary updtRecipe) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) @@ -1606,7 +1643,7 @@ namespace Thermo.Active.NC /// public CmsError WriteRecipeParams(Dictionary updtRecipe) { - CmsError cmsError = WriteRecipeData(updtRecipe); + CmsError cmsError = WriteRecipeParametersToPLC(updtRecipe); return cmsError; } @@ -1781,6 +1818,18 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Write all warmers load for recipe + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmers(Dictionary updtRecipe) + { + CmsError cmsError = WriteRecipeWarmersToPLC(updtRecipe); + + return cmsError; + } + #endregion Read Data #region Write data diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 62dcbcf3..9da46752 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -192,6 +192,11 @@ namespace Thermo.Active.Controllers.WebApi if (!fatto) return NotFound(); + + CmsError cmsError = writeCurrentRecipeToPlc(); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + // ritorno solo fatto! return Ok(); } @@ -213,9 +218,14 @@ namespace Thermo.Active.Controllers.WebApi // chiamo metodo di lettura... bool fatto = ServerConfigController.LoadTemplate(); + if (!fatto) return NotFound(); + CmsError cmsError = writeCurrentRecipeToPlc(); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + // ritorno solo fatto! return Ok(); } @@ -308,7 +318,7 @@ namespace Thermo.Active.Controllers.WebApi // recupero i dati LIVE dei carichi load dei cahnnels di riscaldo... - cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -341,7 +351,7 @@ namespace Thermo.Active.Controllers.WebApi /// - /// Do actual recipe parameters save + /// Do actual recipe parameters FileSave /// /// private static void saveCurrentRecipeParams(Dictionary currParams) @@ -352,5 +362,66 @@ namespace Thermo.Active.Controllers.WebApi ServerConfigController.SaveRecipeCurrent(); } + protected static CmsError writeCurrentRecipeToPlc() + { + CmsError checkError = NO_ERROR; + + using (NcAdapter ncAdapter = new NcAdapter()) + { + // copy data to PLC + checkError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (checkError.IsError()) + return checkError; + + // save parameters to PLC!!! + Dictionary updtRecipe = new Dictionary(); + foreach (var item in RecipeLiveData.RecipeParameters) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + else + { + return NOT_FOUND_ERROR; + } + } + + // write to PLC + checkError = ncAdapter.WriteRecipeParams(updtRecipe); + + // FIXME TODO warmers to be completed!!! +#if false + // reading warmers data... + cmsError = ncAdapter.ReadWarmers(out Dictionary prevWarmers); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // save warmers to PLC + foreach (var item in RecipeLiveData.ChannelSetpoints) + { + //if (prevRecipe.ContainsKey(item.Key)) + //{ + // // aggiorno il valore HMI nel parametro + // var currParam = prevRecipe[item.Key]; + // currParam.SetpointHMI = item.Value; + // // salvo (1 parametro, potrei fare N...) + // updtRecipe.Add(item.Key, currParam); + //} + //else + //{ + // return NotFound(); + //} + } + // write to PLC + ncAdapter.WriteRecipeWarmers(updtRecipe); +#endif + } + return checkError; + } } } \ No newline at end of file From 04f9a8155e5d7a893e7c704f5871e2300897f683 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 8 Jun 2020 19:46:04 +0200 Subject: [PATCH 27/84] Update vers number --- Thermo.Active/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index 61cf208b..0d19cd13 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.3.2")] +[assembly: AssemblyVersion("0.4.3")] From 0cfbbe069abb6f1528c7dd2e7adebb97978404f8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 21:22:14 +0200 Subject: [PATCH 28/84] Fix Filesystem IO 4 recipe --- .../Thermo.Active.Config.csproj | 2 +- .../Controllers/WebApi/RecipeController.cs | 29 +++++-------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/Thermo.Active.Config/Thermo.Active.Config.csproj b/Thermo.Active.Config/Thermo.Active.Config.csproj index aab7c136..bfee6bae 100644 --- a/Thermo.Active.Config/Thermo.Active.Config.csproj +++ b/Thermo.Active.Config/Thermo.Active.Config.csproj @@ -185,7 +185,7 @@ - PreserveNewest + Always diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 9da46752..29f895ce 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -211,11 +211,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcFileAdapter ncAdapter = new NcFileAdapter()) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - // chiamo metodo di lettura... bool fatto = ServerConfigController.LoadTemplate(); @@ -226,9 +221,9 @@ namespace Thermo.Active.Controllers.WebApi if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - // ritorno solo fatto! - return Ok(); } + // ritorno solo fatto! + return Ok(); } /// @@ -240,10 +235,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcFileAdapter ncAdapter = new NcFileAdapter()) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); // recupero i dati LIVE dei parametri HMI della ricetta... CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); @@ -272,11 +263,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcFileAdapter ncAdapter = new NcFileAdapter()) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - // recupero i dati LIVE dei parametri HMI della ricetta... CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); if (cmsError.IsError()) @@ -306,11 +292,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcFileAdapter ncAdapter = new NcFileAdapter()) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - // recupero i dati LIVE dei parametri HMI della ricetta... CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); if (cmsError.IsError()) @@ -368,6 +349,12 @@ namespace Thermo.Active.Controllers.WebApi using (NcAdapter ncAdapter = new NcAdapter()) { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return libraryError; + + // copy data to PLC checkError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); if (checkError.IsError()) From 31519c303bcac339bf327a2642ebcb50d717dcae Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 22:07:37 +0200 Subject: [PATCH 29/84] Added signal-r prod data push --- .../Config/Recipes/template.json | 2 +- .../Listeners/SignalR/SignalRListener.cs | 28 +++++++++++++++++++ .../Listeners/SignalRStaticObjects.cs | 4 +++ Thermo.Active/Properties/AssemblyInfo.cs | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json index a63cae56..7752ebf9 100644 --- a/Thermo.Active.Config/Config/Recipes/template.json +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -1 +1 @@ -{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":400.0,"general_sizes_mould_dim_y":150.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":3.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":1000.0,"general_sizes_plate_dim_y":900.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":1100.0,"general_sizes_frame_dim_y":600.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":150.0,"positions_mould_lower_speed":350.0,"positions_mould_intermediate_position":800.0,"positions_mould_upper_position":850.0,"positions_mould_upper_speed":350.0,"positions_mould_upperdeceleration_position":820.0,"positions_mould_upperdeceleration_speed":150.0,"positions_mould_lowerdeceleration_position":830.0,"positions_mould_lowerdeceleration_speed":150.0,"positions_frame_lower_position":40.0,"positions_frame_lower_speed":500.0,"positions_frame_upper_position":980.0,"positions_frame_upper_speed":450.0,"positions_frame_intermediate_position":700.0,"positions_frame_intermediate_speed":400.0,"positions_frame_unload_position":650.0,"positions_upperplate_lower_position":245.0,"positions_upperplate_lower_speed":150.0,"positions_upperplate_upper_position":1150.0,"positions_upperplate_upper_speed":350.0,"positions_upperplate_upperdeceleration_position":270.0,"positions_upperplate_upperdeceleration_speed":150.0,"positions_upperplate_lowerdeceleration_position":250.0,"positions_upperplate_lowerdeceleration_speed":50.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":4000.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":15000.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":400.0,"cycle_loader_pallet_height":110.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":1.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":1.0,"cycle_loader_ionizer_enabled":1.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":20000.0,"heats_lowerheaters_movement_enabled":1.0,"heats_lowerheaters_enabled":1.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":20000.0,"heats_upperheaters_movement_enabled":1.0,"heats_upperheaters_enabled":1.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":1.0,"heats_decomsustain_decompression_flow":50.0,"heats_decomsustain_min_blowing_time":300.0,"heats_decomsustain_sustain_delay":1000.0,"heats_decomsustain_decompression_delay":1000.0,"heats_decomsustain_decompression_duration":1000.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":1.0,"pyrometer_pyrometer_setpoint":250.0,"pyrometer_pyrometer_delay":10000.0,"pyrometer_upperthermoregulator_start_adjustment":100.0,"pyrometer_upperthermoregulator_end_adjustment":200.0,"pyrometer_upperthermoregulator_min_percentage":70.0,"pyrometer_upperthermoregulator_max_percentage":100.0,"pyrometer_upperthermoregulator_sleep_enabled":1.0,"pyrometer_upperthermoregulator_sleep_percentage":25.0,"pyrometer_lowerthermoregulator_start_adjustment":100.0,"pyrometer_lowerthermoregulator_end_adjustment":200.0,"pyrometer_lowerthermoregulator_min_percentage":70.0,"pyrometer_lowerthermoregulator_max_percentage":100.0,"pyrometer_lowerthermoregulator_sleep_enabled":1.0,"pyrometer_lowerthermoregulator_sleep_percentage":25.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":4.0,"drawing_height":100.0,"drawing_delay":2000.0,"drawing_1_chart_setpointx":6000.0,"drawing_1_chart_setpointy":100.0,"drawing_photocell":1.0,"drawing_mantaining_flow":20.0,"drawing_manual":50.0,"drawing_mould_up_delay":3000.0,"upperplate_cycle_type":1.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":3000.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":4.0,"cooling_blowing_delay":5000.0,"cooling_blowing_time":10000.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":50.0,"cooling_pyrometer_delay":8000.0,"cooling_nebulizer_type":1.0,"cooling_nebulizer_delay":2000.0,"cooling_nebulizer_time":2000.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":1000.0,"vacuum_main_max_time":30000.0,"vacuum_main_1_chart_setpointx":2000.0,"vacuum_main_1_chart_setpointy":30.0,"vacuum_main_2_chart_setpointx":3000.0,"vacuum_main_2_chart_setpointy":60.0,"vacuum_main_3_chart_setpointx":15000.0,"vacuum_main_3_chart_setpointy":90.0,"vacuum_main_manual":40.0,"vacuum_direct_enabled":1.0,"vacuum_direct_delay":2000.0,"vacuum_direct_time":3000.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":2.0,"extraction_main_mould_dw_delay":3000.0,"extraction_main_delay":2000.0,"extraction_main_1_chart_setpointx":3000.0,"extraction_main_1_chart_setpointy":85.0,"extraction_main_manual":60.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":500.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":500.0,"options_undercutmould_2_delay_acti":1000.0,"options_undercutmould_2_delay_dis":1000.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":600.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":600.0,"options_undercutupperplate_2_delay_acti":1000.0,"options_undercutupperplate_2_delay_dis":1000.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":1.0,"options_thermoregulator_1_setpoint":55.0,"options_thermoregulator_2_enabled":1.0,"options_thermoregulator_2_setpoint":60.0,"options_thermoregulator_3_enabled":1.0,"options_thermoregulator_3_setpoint":65.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":80.0,"44":80.0,"81":80.0,"118":80.0,"155":80.0,"192":80.0,"229":80.0,"266":80.0,"303":80.0,"340":80.0,"377":80.0,"414":80.0,"1":80.0,"8":80.0,"45":80.0,"82":80.0,"119":80.0,"156":80.0,"193":80.0,"230":80.0,"267":80.0,"304":80.0,"341":80.0,"378":80.0,"415":80.0,"9":80.0,"46":80.0,"83":80.0,"120":80.0,"157":80.0,"194":80.0,"231":80.0,"268":80.0,"305":80.0,"342":80.0,"379":80.0,"416":80.0,"10":80.0,"47":80.0,"84":80.0,"121":80.0,"158":80.0,"195":80.0,"232":80.0,"269":80.0,"306":80.0,"343":80.0,"380":80.0,"11":80.0,"48":80.0,"85":80.0,"122":80.0,"159":80.0,"196":80.0,"233":80.0,"270":80.0,"307":80.0,"344":80.0,"381":80.0,"417":80.0,"12":80.0,"49":80.0,"86":80.0,"123":80.0,"160":80.0,"197":80.0,"234":80.0,"271":80.0,"308":80.0,"345":80.0,"382":80.0,"13":80.0,"50":80.0,"87":80.0,"124":80.0,"161":80.0,"198":80.0,"235":80.0,"272":80.0,"309":80.0,"346":80.0,"383":80.0,"418":80.0,"2":80.0,"14":80.0,"51":80.0,"88":80.0,"125":80.0,"162":80.0,"199":80.0,"236":80.0,"273":80.0,"310":80.0,"347":80.0,"384":80.0,"419":80.0,"15":80.0,"52":80.0,"89":80.0,"126":80.0,"163":80.0,"200":80.0,"237":80.0,"274":80.0,"311":80.0,"348":80.0,"385":80.0,"420":80.0,"16":80.0,"53":80.0,"90":80.0,"127":80.0,"164":80.0,"201":80.0,"238":80.0,"275":80.0,"312":80.0,"349":80.0,"386":80.0,"17":80.0,"54":80.0,"91":80.0,"128":80.0,"165":80.0,"202":80.0,"239":80.0,"276":80.0,"313":80.0,"350":80.0,"387":80.0,"421":80.0,"18":80.0,"55":80.0,"92":80.0,"129":80.0,"166":80.0,"203":80.0,"240":80.0,"277":80.0,"314":80.0,"351":80.0,"388":80.0,"19":80.0,"56":80.0,"93":80.0,"130":80.0,"167":80.0,"204":80.0,"241":80.0,"278":80.0,"315":80.0,"352":80.0,"389":80.0,"422":80.0,"3":80.0,"20":80.0,"57":80.0,"94":80.0,"131":80.0,"168":80.0,"205":80.0,"242":80.0,"279":80.0,"316":80.0,"353":80.0,"390":80.0,"423":80.0,"21":80.0,"58":80.0,"95":80.0,"132":80.0,"169":80.0,"206":80.0,"243":80.0,"280":80.0,"317":80.0,"354":80.0,"391":80.0,"424":80.0,"22":80.0,"59":80.0,"96":80.0,"133":80.0,"170":80.0,"207":80.0,"244":80.0,"281":80.0,"318":80.0,"355":80.0,"392":80.0,"23":80.0,"60":80.0,"97":80.0,"134":80.0,"171":80.0,"208":80.0,"245":80.0,"282":80.0,"319":80.0,"356":80.0,"393":80.0,"425":80.0,"24":80.0,"61":80.0,"98":80.0,"135":80.0,"172":80.0,"209":80.0,"246":80.0,"283":80.0,"320":80.0,"357":80.0,"394":80.0,"25":80.0,"62":80.0,"99":80.0,"136":80.0,"173":80.0,"210":80.0,"247":80.0,"284":80.0,"321":80.0,"358":80.0,"395":80.0,"426":80.0,"4":80.0,"26":80.0,"63":80.0,"100":80.0,"137":80.0,"174":80.0,"211":80.0,"248":80.0,"285":80.0,"322":80.0,"359":80.0,"396":80.0,"427":80.0,"27":80.0,"64":80.0,"101":80.0,"138":80.0,"175":80.0,"212":80.0,"249":80.0,"286":80.0,"323":80.0,"360":80.0,"397":80.0,"428":80.0,"28":80.0,"65":80.0,"102":80.0,"139":80.0,"176":80.0,"213":80.0,"250":80.0,"287":80.0,"324":80.0,"361":80.0,"398":80.0,"29":80.0,"66":80.0,"103":80.0,"140":80.0,"177":80.0,"214":80.0,"251":80.0,"288":80.0,"325":80.0,"362":80.0,"399":80.0,"429":80.0,"30":80.0,"67":80.0,"104":80.0,"141":80.0,"178":80.0,"215":80.0,"252":80.0,"289":80.0,"326":80.0,"363":80.0,"400":80.0,"31":80.0,"68":80.0,"105":80.0,"142":80.0,"179":80.0,"216":80.0,"253":80.0,"290":80.0,"327":80.0,"364":80.0,"401":80.0,"430":80.0,"5":80.0,"32":80.0,"69":80.0,"106":80.0,"143":80.0,"180":80.0,"217":80.0,"254":80.0,"291":80.0,"328":80.0,"365":80.0,"402":80.0,"431":80.0,"33":80.0,"70":80.0,"107":80.0,"144":80.0,"181":80.0,"218":80.0,"255":80.0,"292":80.0,"329":80.0,"366":80.0,"403":80.0,"432":80.0,"34":80.0,"71":80.0,"108":80.0,"145":80.0,"182":80.0,"219":80.0,"256":80.0,"293":80.0,"330":80.0,"367":80.0,"404":80.0,"35":80.0,"72":80.0,"109":80.0,"146":80.0,"183":80.0,"220":80.0,"257":80.0,"294":80.0,"331":80.0,"368":80.0,"405":80.0,"433":80.0,"36":80.0,"73":80.0,"110":80.0,"147":80.0,"184":80.0,"221":80.0,"258":80.0,"295":80.0,"332":80.0,"369":80.0,"406":80.0,"37":80.0,"74":80.0,"111":80.0,"148":80.0,"185":80.0,"222":80.0,"259":80.0,"296":80.0,"333":80.0,"370":80.0,"407":80.0,"434":80.0,"6":80.0,"38":80.0,"75":80.0,"112":80.0,"149":80.0,"186":80.0,"223":80.0,"260":80.0,"297":80.0,"334":80.0,"371":80.0,"408":80.0,"435":80.0,"39":80.0,"76":80.0,"113":80.0,"150":80.0,"187":80.0,"224":80.0,"261":80.0,"298":80.0,"335":80.0,"372":80.0,"409":80.0,"436":80.0,"40":80.0,"77":80.0,"114":80.0,"151":80.0,"188":80.0,"225":80.0,"262":80.0,"299":80.0,"336":80.0,"373":80.0,"410":80.0,"41":80.0,"78":80.0,"115":80.0,"152":80.0,"189":80.0,"226":80.0,"263":80.0,"300":80.0,"337":80.0,"374":80.0,"411":80.0,"437":80.0,"42":80.0,"79":80.0,"116":80.0,"153":80.0,"190":80.0,"227":80.0,"264":80.0,"301":80.0,"338":80.0,"375":80.0,"412":80.0,"43":80.0,"80":80.0,"117":80.0,"154":80.0,"191":80.0,"228":80.0,"265":80.0,"302":80.0,"339":80.0,"376":80.0,"413":80.0,"438":80.0,"513":80.0,"520":80.0,"557":80.0,"594":80.0,"631":80.0,"668":80.0,"705":80.0,"742":80.0,"779":80.0,"816":80.0,"853":80.0,"890":80.0,"927":80.0,"521":80.0,"558":80.0,"595":80.0,"632":80.0,"669":80.0,"706":80.0,"743":80.0,"780":80.0,"817":80.0,"854":80.0,"891":80.0,"928":80.0,"522":80.0,"559":80.0,"596":80.0,"633":80.0,"670":80.0,"707":80.0,"744":80.0,"781":80.0,"818":80.0,"855":80.0,"892":80.0,"523":80.0,"560":80.0,"597":80.0,"634":80.0,"671":80.0,"708":80.0,"745":80.0,"782":80.0,"819":80.0,"856":80.0,"893":80.0,"929":80.0,"524":80.0,"561":80.0,"598":80.0,"635":80.0,"672":80.0,"709":80.0,"746":80.0,"783":80.0,"820":80.0,"857":80.0,"894":80.0,"525":80.0,"562":80.0,"599":80.0,"636":80.0,"673":80.0,"710":80.0,"747":80.0,"784":80.0,"821":80.0,"858":80.0,"895":80.0,"930":80.0,"514":80.0,"526":80.0,"563":80.0,"600":80.0,"637":80.0,"674":80.0,"711":80.0,"748":80.0,"785":80.0,"822":80.0,"859":80.0,"896":80.0,"931":80.0,"527":80.0,"564":80.0,"601":80.0,"638":80.0,"675":80.0,"712":80.0,"749":80.0,"786":80.0,"823":80.0,"860":80.0,"897":80.0,"932":80.0,"528":80.0,"565":80.0,"602":80.0,"639":80.0,"676":80.0,"713":80.0,"750":80.0,"787":80.0,"824":80.0,"861":80.0,"898":80.0,"529":80.0,"566":80.0,"603":80.0,"640":80.0,"677":80.0,"714":80.0,"751":80.0,"788":80.0,"825":80.0,"862":80.0,"899":80.0,"933":80.0,"530":80.0,"567":80.0,"604":80.0,"641":80.0,"678":80.0,"715":80.0,"752":80.0,"789":80.0,"826":80.0,"863":80.0,"900":80.0,"531":80.0,"568":80.0,"605":80.0,"642":80.0,"679":80.0,"716":80.0,"753":80.0,"790":80.0,"827":80.0,"864":80.0,"901":80.0,"934":80.0,"515":80.0,"532":80.0,"569":80.0,"606":80.0,"643":80.0,"680":80.0,"717":80.0,"754":80.0,"791":80.0,"828":80.0,"865":80.0,"902":80.0,"935":80.0,"533":80.0,"570":80.0,"607":80.0,"644":80.0,"681":80.0,"718":80.0,"755":80.0,"792":80.0,"829":80.0,"866":80.0,"903":80.0,"936":80.0,"534":80.0,"571":80.0,"608":80.0,"645":80.0,"682":80.0,"719":80.0,"756":80.0,"793":80.0,"830":80.0,"867":80.0,"904":80.0,"535":80.0,"572":80.0,"609":80.0,"646":80.0,"683":80.0,"720":80.0,"757":80.0,"794":80.0,"831":80.0,"868":80.0,"905":80.0,"937":80.0,"536":80.0,"573":80.0,"610":80.0,"647":80.0,"684":80.0,"721":80.0,"758":80.0,"795":80.0,"832":80.0,"869":80.0,"906":80.0,"537":80.0,"574":80.0,"611":80.0,"648":80.0,"685":80.0,"722":80.0,"759":80.0,"796":80.0,"833":80.0,"870":80.0,"907":80.0,"938":80.0,"516":80.0,"538":80.0,"575":80.0,"612":80.0,"649":80.0,"686":80.0,"723":80.0,"760":80.0,"797":80.0,"834":80.0,"871":80.0,"908":80.0,"939":80.0,"539":80.0,"576":80.0,"613":80.0,"650":80.0,"687":80.0,"724":80.0,"761":80.0,"798":80.0,"835":80.0,"872":80.0,"909":80.0,"940":80.0,"517":80.0,"540":80.0,"577":80.0,"614":80.0,"651":80.0,"688":80.0,"725":80.0,"762":80.0,"799":80.0,"836":80.0,"873":80.0,"910":80.0,"941":80.0,"541":80.0,"578":80.0,"615":80.0,"652":80.0,"689":80.0,"726":80.0,"763":80.0,"800":80.0,"837":80.0,"874":80.0,"911":80.0,"942":80.0,"542":80.0,"579":80.0,"616":80.0,"653":80.0,"690":80.0,"727":80.0,"764":80.0,"801":80.0,"838":80.0,"875":80.0,"912":80.0,"543":80.0,"580":80.0,"617":80.0,"654":80.0,"691":80.0,"728":80.0,"765":80.0,"802":80.0,"839":80.0,"876":80.0,"913":80.0,"943":80.0,"544":80.0,"581":80.0,"618":80.0,"655":80.0,"692":80.0,"729":80.0,"766":80.0,"803":80.0,"840":80.0,"877":80.0,"914":80.0,"545":80.0,"582":80.0,"619":80.0,"656":80.0,"693":80.0,"730":80.0,"767":80.0,"804":80.0,"841":80.0,"878":80.0,"915":80.0,"944":80.0,"518":80.0,"546":80.0,"583":80.0,"620":80.0,"657":80.0,"694":80.0,"731":80.0,"768":80.0,"805":80.0,"842":80.0,"879":80.0,"916":80.0,"945":80.0,"547":80.0,"584":80.0,"621":80.0,"658":80.0,"695":80.0,"732":80.0,"769":80.0,"806":80.0,"843":80.0,"880":80.0,"917":80.0,"946":80.0,"548":80.0,"585":80.0,"622":80.0,"659":80.0,"696":80.0,"733":80.0,"770":80.0,"807":80.0,"844":80.0,"881":80.0,"918":80.0,"549":80.0,"586":80.0,"623":80.0,"660":80.0,"697":80.0,"734":80.0,"771":80.0,"808":80.0,"845":80.0,"882":80.0,"919":80.0,"947":80.0,"550":80.0,"587":80.0,"624":80.0,"661":80.0,"698":80.0,"735":80.0,"772":80.0,"809":80.0,"846":80.0,"883":80.0,"920":80.0,"551":80.0,"588":80.0,"625":80.0,"662":80.0,"699":80.0,"736":80.0,"773":80.0,"810":80.0,"847":80.0,"884":80.0,"921":80.0,"948":80.0,"519":80.0,"552":80.0,"589":80.0,"626":80.0,"663":80.0,"700":80.0,"737":80.0,"774":80.0,"811":80.0,"848":80.0,"885":80.0,"922":80.0,"949":80.0,"553":80.0,"590":80.0,"627":80.0,"664":80.0,"701":80.0,"738":80.0,"775":80.0,"812":80.0,"849":80.0,"886":80.0,"923":80.0,"950":80.0,"554":80.0,"591":80.0,"628":80.0,"665":80.0,"702":80.0,"739":80.0,"776":80.0,"813":80.0,"850":80.0,"887":80.0,"924":80.0,"555":80.0,"592":80.0,"629":80.0,"666":80.0,"703":80.0,"740":80.0,"777":80.0,"814":80.0,"851":80.0,"888":80.0,"925":80.0,"951":80.0,"556":80.0,"593":80.0,"630":80.0,"667":80.0,"704":80.0,"741":80.0,"778":80.0,"815":80.0,"852":80.0,"889":80.0,"926":80.0}} \ No newline at end of file +{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":400.0,"general_sizes_mould_dim_y":150.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":3.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":1000.0,"general_sizes_plate_dim_y":900.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":1100.0,"general_sizes_frame_dim_y":600.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":150.0,"positions_mould_lower_speed":350.0,"positions_mould_intermediate_position":800.0,"positions_mould_upper_position":850.0,"positions_mould_upper_speed":350.0,"positions_mould_upperdeceleration_position":820.0,"positions_mould_upperdeceleration_speed":150.0,"positions_mould_lowerdeceleration_position":830.0,"positions_mould_lowerdeceleration_speed":150.0,"positions_frame_lower_position":40.0,"positions_frame_lower_speed":500.0,"positions_frame_upper_position":980.0,"positions_frame_upper_speed":450.0,"positions_frame_intermediate_position":700.0,"positions_frame_intermediate_speed":400.0,"positions_frame_unload_position":650.0,"positions_upperplate_lower_position":245.0,"positions_upperplate_lower_speed":150.0,"positions_upperplate_upper_position":1150.0,"positions_upperplate_upper_speed":350.0,"positions_upperplate_upperdeceleration_position":270.0,"positions_upperplate_upperdeceleration_speed":150.0,"positions_upperplate_lowerdeceleration_position":250.0,"positions_upperplate_lowerdeceleration_speed":50.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":4000.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":15000.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":400.0,"cycle_loader_pallet_height":110.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":1.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":1.0,"cycle_loader_ionizer_enabled":1.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":20000.0,"heats_lowerheaters_movement_enabled":1.0,"heats_lowerheaters_enabled":1.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":20000.0,"heats_upperheaters_movement_enabled":1.0,"heats_upperheaters_enabled":1.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":1.0,"heats_decomsustain_decompression_flow":50.0,"heats_decomsustain_min_blowing_time":300.0,"heats_decomsustain_sustain_delay":1000.0,"heats_decomsustain_decompression_delay":1000.0,"heats_decomsustain_decompression_duration":1000.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":1.0,"pyrometer_pyrometer_setpoint":250.0,"pyrometer_pyrometer_delay":10000.0,"pyrometer_upperthermoregulator_start_adjustment":100.0,"pyrometer_upperthermoregulator_end_adjustment":200.0,"pyrometer_upperthermoregulator_min_percentage":70.0,"pyrometer_upperthermoregulator_max_percentage":100.0,"pyrometer_upperthermoregulator_sleep_enabled":1.0,"pyrometer_upperthermoregulator_sleep_percentage":25.0,"pyrometer_lowerthermoregulator_start_adjustment":100.0,"pyrometer_lowerthermoregulator_end_adjustment":200.0,"pyrometer_lowerthermoregulator_min_percentage":70.0,"pyrometer_lowerthermoregulator_max_percentage":100.0,"pyrometer_lowerthermoregulator_sleep_enabled":1.0,"pyrometer_lowerthermoregulator_sleep_percentage":25.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":4.0,"drawing_height":100.0,"drawing_delay":2000.0,"drawing_1_chart_setpointx":6000.0,"drawing_1_chart_setpointy":100.0,"drawing_photocell":1.0,"drawing_mantaining_flow":20.0,"drawing_manual":50.0,"drawing_mould_up_delay":3000.0,"upperplate_cycle_type":1.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":3000.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":4.0,"cooling_blowing_delay":5000.0,"cooling_blowing_time":10000.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":50.0,"cooling_pyrometer_delay":8000.0,"cooling_nebulizer_type":1.0,"cooling_nebulizer_delay":2000.0,"cooling_nebulizer_time":2000.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":1000.0,"vacuum_main_max_time":30000.0,"vacuum_main_1_chart_setpointx":2000.0,"vacuum_main_1_chart_setpointy":30.0,"vacuum_main_2_chart_setpointx":3000.0,"vacuum_main_2_chart_setpointy":60.0,"vacuum_main_3_chart_setpointx":15000.0,"vacuum_main_3_chart_setpointy":90.0,"vacuum_main_manual":40.0,"vacuum_direct_enabled":1.0,"vacuum_direct_delay":2000.0,"vacuum_direct_time":3000.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":2.0,"extraction_main_mould_dw_delay":3000.0,"extraction_main_delay":2000.0,"extraction_main_1_chart_setpointx":3000.0,"extraction_main_1_chart_setpointy":85.0,"extraction_main_manual":60.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":500.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":500.0,"options_undercutmould_2_delay_acti":1000.0,"options_undercutmould_2_delay_dis":1000.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":600.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":600.0,"options_undercutupperplate_2_delay_acti":1000.0,"options_undercutupperplate_2_delay_dis":1000.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":1.0,"options_thermoregulator_1_setpoint":55.0,"options_thermoregulator_2_enabled":1.0,"options_thermoregulator_2_setpoint":60.0,"options_thermoregulator_3_enabled":1.0,"options_thermoregulator_3_setpoint":65.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":81.0,"44":81.0,"81":81.0,"118":81.0,"155":81.0,"192":81.0,"229":81.0,"266":81.0,"303":81.0,"340":81.0,"377":81.0,"414":81.0,"1":81.0,"8":81.0,"45":81.0,"82":81.0,"119":81.0,"156":81.0,"193":81.0,"230":81.0,"267":81.0,"304":81.0,"341":81.0,"378":81.0,"415":81.0,"9":81.0,"46":81.0,"83":81.0,"120":81.0,"157":81.0,"194":81.0,"231":81.0,"268":81.0,"305":81.0,"342":81.0,"379":81.0,"416":81.0,"10":81.0,"47":81.0,"84":81.0,"121":81.0,"158":81.0,"195":81.0,"232":81.0,"269":81.0,"306":81.0,"343":81.0,"380":81.0,"11":81.0,"48":81.0,"85":81.0,"122":81.0,"159":81.0,"196":81.0,"233":81.0,"270":81.0,"307":81.0,"344":81.0,"381":81.0,"417":81.0,"12":81.0,"49":81.0,"86":81.0,"123":81.0,"160":81.0,"197":81.0,"234":81.0,"271":81.0,"308":81.0,"345":81.0,"382":81.0,"13":81.0,"50":81.0,"87":81.0,"124":81.0,"161":81.0,"198":81.0,"235":81.0,"272":81.0,"309":81.0,"346":81.0,"383":81.0,"418":81.0,"2":81.0,"14":81.0,"51":81.0,"88":81.0,"125":81.0,"162":81.0,"199":81.0,"236":81.0,"273":81.0,"310":81.0,"347":81.0,"384":81.0,"419":81.0,"15":81.0,"52":81.0,"89":81.0,"126":81.0,"163":81.0,"200":81.0,"237":81.0,"274":81.0,"311":81.0,"348":81.0,"385":81.0,"420":81.0,"16":81.0,"53":81.0,"90":81.0,"127":81.0,"164":81.0,"201":81.0,"238":81.0,"275":81.0,"312":81.0,"349":81.0,"386":81.0,"17":81.0,"54":81.0,"91":81.0,"128":81.0,"165":81.0,"202":81.0,"239":81.0,"276":81.0,"313":81.0,"350":81.0,"387":81.0,"421":81.0,"18":81.0,"55":81.0,"92":81.0,"129":81.0,"166":81.0,"203":81.0,"240":81.0,"277":81.0,"314":81.0,"351":81.0,"388":81.0,"19":81.0,"56":81.0,"93":81.0,"130":81.0,"167":81.0,"204":81.0,"241":81.0,"278":81.0,"315":81.0,"352":81.0,"389":81.0,"422":81.0,"3":81.0,"20":81.0,"57":81.0,"94":81.0,"131":81.0,"168":81.0,"205":81.0,"242":81.0,"279":81.0,"316":81.0,"353":81.0,"390":81.0,"423":81.0,"21":81.0,"58":81.0,"95":81.0,"132":81.0,"169":81.0,"206":81.0,"243":81.0,"280":81.0,"317":81.0,"354":81.0,"391":81.0,"424":81.0,"22":81.0,"59":81.0,"96":81.0,"133":81.0,"170":81.0,"207":81.0,"244":81.0,"281":81.0,"318":81.0,"355":81.0,"392":81.0,"23":81.0,"60":81.0,"97":81.0,"134":81.0,"171":81.0,"208":81.0,"245":81.0,"282":81.0,"319":81.0,"356":81.0,"393":81.0,"425":81.0,"24":81.0,"61":81.0,"98":81.0,"135":81.0,"172":81.0,"209":81.0,"246":81.0,"283":81.0,"320":81.0,"357":81.0,"394":81.0,"25":81.0,"62":81.0,"99":81.0,"136":81.0,"173":81.0,"210":81.0,"247":81.0,"284":81.0,"321":81.0,"358":81.0,"395":81.0,"426":81.0,"4":81.0,"26":81.0,"63":81.0,"100":81.0,"137":81.0,"174":81.0,"211":81.0,"248":81.0,"285":81.0,"322":81.0,"359":81.0,"396":81.0,"427":81.0,"27":81.0,"64":81.0,"101":81.0,"138":81.0,"175":81.0,"212":81.0,"249":81.0,"286":81.0,"323":81.0,"360":81.0,"397":81.0,"428":81.0,"28":81.0,"65":81.0,"102":81.0,"139":81.0,"176":81.0,"213":81.0,"250":81.0,"287":81.0,"324":81.0,"361":81.0,"398":81.0,"29":81.0,"66":81.0,"103":81.0,"140":81.0,"177":81.0,"214":81.0,"251":81.0,"288":81.0,"325":81.0,"362":81.0,"399":81.0,"429":81.0,"30":81.0,"67":81.0,"104":81.0,"141":81.0,"178":81.0,"215":81.0,"252":81.0,"289":81.0,"326":81.0,"363":81.0,"400":81.0,"31":81.0,"68":81.0,"105":81.0,"142":81.0,"179":81.0,"216":81.0,"253":81.0,"290":81.0,"327":81.0,"364":81.0,"401":81.0,"430":81.0,"5":81.0,"32":81.0,"69":81.0,"106":81.0,"143":81.0,"180":81.0,"217":81.0,"254":81.0,"291":81.0,"328":81.0,"365":81.0,"402":81.0,"431":81.0,"33":81.0,"70":81.0,"107":81.0,"144":81.0,"181":81.0,"218":81.0,"255":81.0,"292":81.0,"329":81.0,"366":81.0,"403":81.0,"432":81.0,"34":81.0,"71":81.0,"108":81.0,"145":81.0,"182":81.0,"219":81.0,"256":81.0,"293":81.0,"330":81.0,"367":81.0,"404":81.0,"35":81.0,"72":81.0,"109":81.0,"146":81.0,"183":81.0,"220":81.0,"257":81.0,"294":81.0,"331":81.0,"368":81.0,"405":81.0,"433":81.0,"36":81.0,"73":81.0,"110":81.0,"147":81.0,"184":81.0,"221":81.0,"258":81.0,"295":81.0,"332":81.0,"369":81.0,"406":81.0,"37":81.0,"74":81.0,"111":81.0,"148":81.0,"185":81.0,"222":81.0,"259":81.0,"296":81.0,"333":81.0,"370":81.0,"407":81.0,"434":81.0,"6":81.0,"38":81.0,"75":81.0,"112":81.0,"149":81.0,"186":81.0,"223":81.0,"260":81.0,"297":81.0,"334":81.0,"371":81.0,"408":81.0,"435":81.0,"39":81.0,"76":81.0,"113":81.0,"150":81.0,"187":81.0,"224":81.0,"261":81.0,"298":81.0,"335":81.0,"372":81.0,"409":81.0,"436":81.0,"40":81.0,"77":81.0,"114":81.0,"151":81.0,"188":81.0,"225":81.0,"262":81.0,"299":81.0,"336":81.0,"373":81.0,"410":81.0,"41":81.0,"78":81.0,"115":81.0,"152":81.0,"189":81.0,"226":81.0,"263":81.0,"300":81.0,"337":81.0,"374":81.0,"411":81.0,"437":81.0,"42":81.0,"79":81.0,"116":81.0,"153":81.0,"190":81.0,"227":81.0,"264":81.0,"301":81.0,"338":81.0,"375":81.0,"412":81.0,"43":81.0,"80":81.0,"117":81.0,"154":81.0,"191":81.0,"228":81.0,"265":81.0,"302":81.0,"339":81.0,"376":81.0,"413":81.0,"438":81.0,"513":81.0,"520":81.0,"557":81.0,"594":81.0,"631":81.0,"668":81.0,"705":81.0,"742":81.0,"779":81.0,"816":81.0,"853":81.0,"890":81.0,"927":81.0,"521":81.0,"558":81.0,"595":81.0,"632":81.0,"669":81.0,"706":81.0,"743":81.0,"780":81.0,"817":81.0,"854":81.0,"891":81.0,"928":81.0,"522":81.0,"559":81.0,"596":81.0,"633":81.0,"670":81.0,"707":81.0,"744":81.0,"781":81.0,"818":81.0,"855":81.0,"892":81.0,"523":81.0,"560":81.0,"597":81.0,"634":81.0,"671":81.0,"708":81.0,"745":81.0,"782":81.0,"819":81.0,"856":81.0,"893":81.0,"929":81.0,"524":81.0,"561":81.0,"598":81.0,"635":81.0,"672":81.0,"709":81.0,"746":81.0,"783":81.0,"820":81.0,"857":81.0,"894":81.0,"525":81.0,"562":81.0,"599":81.0,"636":81.0,"673":81.0,"710":81.0,"747":81.0,"784":81.0,"821":81.0,"858":81.0,"895":81.0,"930":81.0,"514":81.0,"526":81.0,"563":81.0,"600":81.0,"637":81.0,"674":81.0,"711":81.0,"748":81.0,"785":81.0,"822":81.0,"859":81.0,"896":81.0,"931":81.0,"527":81.0,"564":81.0,"601":81.0,"638":81.0,"675":81.0,"712":81.0,"749":81.0,"786":81.0,"823":81.0,"860":81.0,"897":81.0,"932":81.0,"528":81.0,"565":81.0,"602":81.0,"639":81.0,"676":81.0,"713":81.0,"750":81.0,"787":81.0,"824":81.0,"861":81.0,"898":81.0,"529":81.0,"566":81.0,"603":81.0,"640":81.0,"677":81.0,"714":81.0,"751":81.0,"788":81.0,"825":81.0,"862":81.0,"899":81.0,"933":81.0,"530":81.0,"567":81.0,"604":81.0,"641":81.0,"678":81.0,"715":81.0,"752":81.0,"789":81.0,"826":81.0,"863":81.0,"900":81.0,"531":81.0,"568":81.0,"605":81.0,"642":81.0,"679":81.0,"716":81.0,"753":81.0,"790":81.0,"827":81.0,"864":81.0,"901":81.0,"934":81.0,"515":81.0,"532":81.0,"569":81.0,"606":81.0,"643":81.0,"680":81.0,"717":81.0,"754":81.0,"791":81.0,"828":81.0,"865":81.0,"902":81.0,"935":81.0,"533":81.0,"570":81.0,"607":81.0,"644":81.0,"681":81.0,"718":81.0,"755":81.0,"792":81.0,"829":81.0,"866":81.0,"903":81.0,"936":81.0,"534":81.0,"571":81.0,"608":81.0,"645":81.0,"682":81.0,"719":81.0,"756":81.0,"793":81.0,"830":81.0,"867":81.0,"904":81.0,"535":81.0,"572":81.0,"609":81.0,"646":81.0,"683":81.0,"720":81.0,"757":81.0,"794":81.0,"831":81.0,"868":81.0,"905":81.0,"937":81.0,"536":81.0,"573":81.0,"610":81.0,"647":81.0,"684":81.0,"721":81.0,"758":81.0,"795":81.0,"832":81.0,"869":81.0,"906":81.0,"537":81.0,"574":81.0,"611":81.0,"648":81.0,"685":81.0,"722":81.0,"759":81.0,"796":81.0,"833":81.0,"870":81.0,"907":81.0,"938":81.0,"516":81.0,"538":81.0,"575":81.0,"612":81.0,"649":81.0,"686":81.0,"723":81.0,"760":81.0,"797":81.0,"834":81.0,"871":81.0,"908":81.0,"939":81.0,"539":81.0,"576":81.0,"613":81.0,"650":81.0,"687":81.0,"724":81.0,"761":81.0,"798":81.0,"835":81.0,"872":81.0,"909":81.0,"940":81.0,"517":81.0,"540":81.0,"577":81.0,"614":81.0,"651":81.0,"688":81.0,"725":81.0,"762":81.0,"799":81.0,"836":81.0,"873":81.0,"910":81.0,"941":81.0,"541":81.0,"578":81.0,"615":81.0,"652":81.0,"689":81.0,"726":81.0,"763":81.0,"800":81.0,"837":81.0,"874":81.0,"911":81.0,"942":81.0,"542":81.0,"579":81.0,"616":81.0,"653":81.0,"690":81.0,"727":81.0,"764":81.0,"801":81.0,"838":81.0,"875":81.0,"912":81.0,"543":81.0,"580":81.0,"617":81.0,"654":81.0,"691":81.0,"728":81.0,"765":81.0,"802":81.0,"839":81.0,"876":81.0,"913":81.0,"943":81.0,"544":81.0,"581":81.0,"618":81.0,"655":81.0,"692":81.0,"729":81.0,"766":81.0,"803":81.0,"840":81.0,"877":81.0,"914":81.0,"545":81.0,"582":81.0,"619":81.0,"656":81.0,"693":81.0,"730":81.0,"767":81.0,"804":81.0,"841":81.0,"878":81.0,"915":81.0,"944":81.0,"518":81.0,"546":81.0,"583":81.0,"620":81.0,"657":81.0,"694":81.0,"731":81.0,"768":81.0,"805":81.0,"842":81.0,"879":81.0,"916":81.0,"945":81.0,"547":81.0,"584":81.0,"621":81.0,"658":81.0,"695":81.0,"732":81.0,"769":81.0,"806":81.0,"843":81.0,"880":81.0,"917":81.0,"946":81.0,"548":81.0,"585":81.0,"622":81.0,"659":81.0,"696":81.0,"733":81.0,"770":81.0,"807":81.0,"844":81.0,"881":81.0,"918":81.0,"549":81.0,"586":81.0,"623":81.0,"660":81.0,"697":81.0,"734":81.0,"771":81.0,"808":81.0,"845":81.0,"882":81.0,"919":81.0,"947":81.0,"550":81.0,"587":81.0,"624":81.0,"661":81.0,"698":81.0,"735":81.0,"772":81.0,"809":81.0,"846":81.0,"883":81.0,"920":81.0,"551":81.0,"588":81.0,"625":81.0,"662":81.0,"699":81.0,"736":81.0,"773":81.0,"810":81.0,"847":81.0,"884":81.0,"921":81.0,"948":81.0,"519":81.0,"552":81.0,"589":81.0,"626":81.0,"663":81.0,"700":81.0,"737":81.0,"774":81.0,"811":81.0,"848":81.0,"885":81.0,"922":81.0,"949":81.0,"553":81.0,"590":81.0,"627":81.0,"664":81.0,"701":81.0,"738":81.0,"775":81.0,"812":81.0,"849":81.0,"886":81.0,"923":81.0,"950":81.0,"554":81.0,"591":81.0,"628":81.0,"665":81.0,"702":81.0,"739":81.0,"776":81.0,"813":81.0,"850":81.0,"887":81.0,"924":81.0,"555":81.0,"592":81.0,"629":81.0,"666":81.0,"703":81.0,"740":81.0,"777":81.0,"814":81.0,"851":81.0,"888":81.0,"925":81.0,"951":81.0,"556":81.0,"593":81.0,"630":81.0,"667":81.0,"704":81.0,"741":81.0,"778":81.0,"815":81.0,"852":81.0,"889":81.0,"926":80.0}} \ No newline at end of file diff --git a/Thermo.Active/Listeners/SignalR/SignalRListener.cs b/Thermo.Active/Listeners/SignalR/SignalRListener.cs index 7da335f9..99df14c5 100644 --- a/Thermo.Active/Listeners/SignalR/SignalRListener.cs +++ b/Thermo.Active/Listeners/SignalR/SignalRListener.cs @@ -359,6 +359,30 @@ namespace Thermo.Active.Listeners.SignalR context.Clients.Group("ncData").gaugeData(currGauge); } } + public static void SendProdInfoData(object prodInfoData) + { + ProdInfoModel currProdInfo = prodInfoData as ProdInfoModel; + + if (!LastProdInfoData.Equals(currProdInfo)) + { + LastProdInfoData = currProdInfo; + + var context = GlobalHost.ConnectionManager.GetHubContext(); + context.Clients.Group("ncData").prodInfoData(currProdInfo); + } + } + public static void SendProdCycleData(object prodCycleData) + { + ProdCycleModel currProdCycle = prodCycleData as ProdCycleModel; + + if (!LastProdCycleData.Equals(currProdCycle)) + { + LastProdCycleData = currProdCycle; + + var context = GlobalHost.ConnectionManager.GetHubContext(); + context.Clients.Group("ncData").prodCycleData(currProdCycle); + } + } public static void SetGatewayRebootStatus(object status) { @@ -433,6 +457,10 @@ namespace Thermo.Active.Listeners.SignalR group.recipeWarmersData(LastWarmersData); // THERMO Gauges group.gaugeData(LastGaugeData); + // THERMO prod info data + group.prodInfoData(LastProdInfoData); + // THERMO prod cycle data + group.prodCycleData(LastProdCycleData); Debug.WriteLine(string.Format("{0} {1} Broadcast..completed", DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), DateTime.Now.Millisecond)); Monitor.Exit(_broadcastlock); diff --git a/Thermo.Active/Listeners/SignalRStaticObjects.cs b/Thermo.Active/Listeners/SignalRStaticObjects.cs index 4f98fc8d..060d9bf3 100644 --- a/Thermo.Active/Listeners/SignalRStaticObjects.cs +++ b/Thermo.Active/Listeners/SignalRStaticObjects.cs @@ -33,6 +33,10 @@ namespace Thermo.Active.Listeners public static List LastModulesData = new List(); public static List LastWarmersData = new List(); public static ThermoModels.GaugeModel LastGaugeData = new ThermoModels.GaugeModel(); + public static ThermoModels.ProdCycleModel LastProdCycleData = new ThermoModels.ProdCycleModel(); + public static ThermoModels.ProdInfoModel LastProdInfoData = new ThermoModels.ProdInfoModel(); + + public static bool LastIsNcConnected = false; diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index 0d19cd13..90deca67 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.4.3")] +[assembly: AssemblyVersion("0.5.4")] From bdc0ce1aa571d97daad2dee5bb5ecfa80ef0be25 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 Jun 2020 22:30:37 +0200 Subject: [PATCH 30/84] Added method for Prod Info & Cycle data read --- Thermo.Active.Core/ThreadsFunctions.cs | 88 +++++++++++++++++++ Thermo.Active.Core/ThreadsHandler.cs | 8 +- Thermo.Active.Model/Constants.cs | 2 + Thermo.Active.NC/NcAdapter.cs | 14 +++ Thermo.Active/Listeners/ListenersHandler.cs | 12 ++- .../Listeners/SignalR/SignalRListener.cs | 4 +- 6 files changed, 119 insertions(+), 9 deletions(-) diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs index cf558517..47b10f28 100644 --- a/Thermo.Active.Core/ThreadsFunctions.cs +++ b/Thermo.Active.Core/ThreadsFunctions.cs @@ -694,6 +694,94 @@ public static class ThreadsFunctions ncAdapter.Dispose(); } } + public static void ReadProdInfoData() + { + NcAdapter ncAdapter = new NcAdapter(); + Stopwatch sw = new Stopwatch(); + + try + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + ManageLibraryError(libraryError); + + while (true) + { + sw.Restart(); + + // Check if client is connected + if (ncAdapter.numericalControl.NC_IsConnected()) + { + + // Get new data from PLC + libraryError = ncAdapter.ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData); + if (libraryError.IsError()) + ManageLibraryError(libraryError); + + MessageServices.Current.Publish(SEND_THERMO_PROD_INFO_DATA, null, prodInfoData); + } + else + RestoreConnection(); + + sw.Stop(); + + //Update thread timer + UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds); + // Wait + Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds)); + } + } + catch (ThreadAbortException) + { + ncAdapter.Dispose(); + } + } + public static void ReadProdCycleData() + { + NcAdapter ncAdapter = new NcAdapter(); + Stopwatch sw = new Stopwatch(); + + try + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + ManageLibraryError(libraryError); + + while (true) + { + sw.Restart(); + + // Check if client is connected + if (ncAdapter.numericalControl.NC_IsConnected()) + { + +#if false + // Get new data from PLC + libraryError = ncAdapter.ReadProdCycle(out ThermoModels.GaugeModel gaugeData); + if (libraryError.IsError()) + ManageLibraryError(libraryError); + + MessageServices.Current.Publish(SEND_THERMO_GAUGE_DATA, null, gaugeData); +#endif + } + else + RestoreConnection(); + + sw.Stop(); + + //Update thread timer + UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds); + // Wait + Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds)); + } + } + catch (ThreadAbortException) + { + ncAdapter.Dispose(); + } + } public static void ReadRecipeData() { NcAdapter ncAdapter = new NcAdapter(); diff --git a/Thermo.Active.Core/ThreadsHandler.cs b/Thermo.Active.Core/ThreadsHandler.cs index ff2a4420..5b7b22b3 100644 --- a/Thermo.Active.Core/ThreadsHandler.cs +++ b/Thermo.Active.Core/ThreadsHandler.cs @@ -14,19 +14,21 @@ namespace Thermo.Active.Core ThreadsFunctions.ReadAlarms, ThreadsFunctions.ReadPowerOnData, ThreadsFunctions.StatThread, - ThreadsFunctions.ReadProcessesPPStatus, + //ThreadsFunctions.ReadProcessesPPStatus, ThreadsFunctions.ReadEnabledFunctionality, ThreadsFunctions.ReadExpiredMaintenances, - ThreadsFunctions.ReadAxesPositionsData, + //ThreadsFunctions.ReadAxesPositionsData, ThreadsFunctions.ReadUserSoftKeysData, //ThreadsFunctions.ReadHeadsData, - ThreadsFunctions.ReadAxesNamesData, + //ThreadsFunctions.ReadAxesNamesData, //ThreadsFunctions.ReadActiveProgramData, //ThreadsFunctions.ReadPartProgramQueueData, ThreadsFunctions.ReadScadaData, ThreadsFunctions.ReadM154Data, // levare? // ThreadsFunctions.ReadNcSoftKeysData, ThreadsFunctions.ReadGaugeData, + ThreadsFunctions.ReadProdInfoData, + ThreadsFunctions.ReadProdCycleData, ThreadsFunctions.ReadRecipeData, ThreadsFunctions.ReadWarmersData, ThreadsFunctions.ReadModulesData diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index cfd49200..a9e7be3f 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -299,6 +299,8 @@ namespace Thermo.Active.Model public const string SEND_THERMO_MODULE_DATA = "SEND_THERMO_MODULE_DATA"; public const string SEND_THERMO_WARMERS_DATA = "SEND_THERMO_WARMERS_DATA"; public const string SEND_THERMO_GAUGE_DATA = "SEND_THERMO_GAUGE_DATA"; + public const string SEND_THERMO_PROD_INFO_DATA = "SEND_THERMO_PROD_INFO_DATA"; + public const string SEND_THERMO_PROD_CYCLE_DATA = "SEND_THERMO_PROD_CYCLE_DATA"; public const string BROADCAST_DATA = "BROADCAST_DATA"; diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 391117d9..ef664d97 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1063,6 +1063,20 @@ namespace Thermo.Active.NC return cmsError; } + public CmsError ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData) + { + prodInfoData = new ThermoModels.ProdInfoModel(); + CmsError cmsError = numericalControl.PLC_RProdInfo(ref prodInfoData); + + return cmsError; + } + public CmsError ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData) + { + prodCycleData = new ThermoModels.ProdCycleModel(); + CmsError cmsError = numericalControl.PLC_RProdCycle(ref prodCycleData); + + return cmsError; + } /// /// Vero metodo lettura ricetta da 2 aree memoria PLC /// diff --git a/Thermo.Active/Listeners/ListenersHandler.cs b/Thermo.Active/Listeners/ListenersHandler.cs index 47bb4851..5acea833 100644 --- a/Thermo.Active/Listeners/ListenersHandler.cs +++ b/Thermo.Active/Listeners/ListenersHandler.cs @@ -113,10 +113,14 @@ namespace Thermo.Active.Listeners { SignalRListener.SendThermoGaugeData(a); })); - - // FIXME TODO ADD ProdCycle - - // FIXME TODO ADD ProdInfo + infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) => + { + SignalRListener.SendThermoProdInfoData(a); + })); + infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_CYCLE_DATA, (a, b) => + { + SignalRListener.SendThermoProdCycleData(a); + })); // Broadcast infos.Add(MessageServices.Current.Subscribe(BROADCAST_DATA, (a, b) => diff --git a/Thermo.Active/Listeners/SignalR/SignalRListener.cs b/Thermo.Active/Listeners/SignalR/SignalRListener.cs index 99df14c5..5d0a8a4e 100644 --- a/Thermo.Active/Listeners/SignalR/SignalRListener.cs +++ b/Thermo.Active/Listeners/SignalR/SignalRListener.cs @@ -359,7 +359,7 @@ namespace Thermo.Active.Listeners.SignalR context.Clients.Group("ncData").gaugeData(currGauge); } } - public static void SendProdInfoData(object prodInfoData) + public static void SendThermoProdInfoData(object prodInfoData) { ProdInfoModel currProdInfo = prodInfoData as ProdInfoModel; @@ -371,7 +371,7 @@ namespace Thermo.Active.Listeners.SignalR context.Clients.Group("ncData").prodInfoData(currProdInfo); } } - public static void SendProdCycleData(object prodCycleData) + public static void SendThermoProdCycleData(object prodCycleData) { ProdCycleModel currProdCycle = prodCycleData as ProdCycleModel; From 6d52ccdc9ccdd2db29934de06d97d36222211ab5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 9 Jun 2020 19:13:57 +0200 Subject: [PATCH 31/84] Continuing warmers & recipe fix & config --- Thermo.Active.Core/ThreadsFunctions.cs | 10 ++--- .../ConfigModels/RiskConfigModel.cs | 1 + Thermo.Active.NC/NcAdapter.cs | 44 +++++++++++++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs index 47b10f28..2731f119 100644 --- a/Thermo.Active.Core/ThreadsFunctions.cs +++ b/Thermo.Active.Core/ThreadsFunctions.cs @@ -713,13 +713,12 @@ public static class ThreadsFunctions // Check if client is connected if (ncAdapter.numericalControl.NC_IsConnected()) { - // Get new data from PLC libraryError = ncAdapter.ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData); if (libraryError.IsError()) ManageLibraryError(libraryError); - MessageServices.Current.Publish(SEND_THERMO_PROD_INFO_DATA, null, prodInfoData); + MessageServices.Current.Publish(SEND_THERMO_PROD_INFO_DATA, null, prodInfoData); } else RestoreConnection(); @@ -756,15 +755,12 @@ public static class ThreadsFunctions // Check if client is connected if (ncAdapter.numericalControl.NC_IsConnected()) { - -#if false // Get new data from PLC - libraryError = ncAdapter.ReadProdCycle(out ThermoModels.GaugeModel gaugeData); + libraryError = ncAdapter.ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData); if (libraryError.IsError()) ManageLibraryError(libraryError); - MessageServices.Current.Publish(SEND_THERMO_GAUGE_DATA, null, gaugeData); -#endif + MessageServices.Current.Publish(SEND_THERMO_PROD_CYCLE_DATA, null, prodCycleData); } else RestoreConnection(); diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs index 7c1f6d30..7a8b9144 100644 --- a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -35,5 +35,6 @@ namespace Thermo.Active.Model.ConfigModels public int SetpointRecipe; public int SetpointThermo; public int MaxPower; + //public int MinCurrent; } } diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index ef664d97..fca8b583 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1240,6 +1240,48 @@ namespace Thermo.Active.NC return NO_ERROR; } /// + /// Vero metodo lettura Warmers data da memoria PLC + /// + /// + /// + public CmsError ReadWarmersData(out Dictionary currentWarmers) + { + // init obj + currentWarmers = new Dictionary(); + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + CmsError cmsError = NO_ERROR; + + // leggo stato ricetta da PLC + Dictionary currPlcWarmers = new Dictionary(); + cmsError = numericalControl.PLC_RWarmerChannelList(ref currPlcWarmers); + + if (cmsError.IsError()) + return cmsError; + + // compongo con il resto delle info da config... do x scontato di avere TUTIT i 1024 channels + List warmersConfig = RiskChannelConfig.Select(x => new DTOWarmers() + { + IdChannel = x.IdChannel, + IdReflector= x.IdReflector, + SetpointRecipe = x.SetpointRecipe, + SetpointTermocam = 0, // FIXME TODO x.SetpointTer, + SetpointPLC = currPlcWarmers[x.IdChannel].SetpointPLC, + ChannelStatus = currPlcWarmers[x.IdChannel].ChStatus, + ActualCurrent = currPlcWarmers[x.IdChannel].CurrAct, + ActualPerc = currPlcWarmers[x.IdChannel].PercAct, + MaxPower = x.MaxPower + }).ToList(); + } + else + { + currentWarmers = new Dictionary(); + } + + return NO_ERROR; + } + /// /// Recipe Parameters write to PLC (only SetpointHMI) /// /// @@ -1278,6 +1320,8 @@ namespace Thermo.Active.NC } + + public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue) { //ReadScadaDataSiemens(scadaSchema, out scadaValue); From 1862fe641b24f4affc94768853906b4d23e239c0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 10 Jun 2020 16:29:27 +0200 Subject: [PATCH 32/84] Fix & test write for CH load (1..1024) --- .../Config/Recipes/template.json | 1191 ++++++++++++++++- Thermo.Active.NC/NcAdapter.cs | 94 +- .../Controllers/WebApi/RecipeController.cs | 67 +- .../Controllers/WebApi/WarmersController.cs | 29 +- 4 files changed, 1318 insertions(+), 63 deletions(-) diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json index 7752ebf9..2a884d8a 100644 --- a/Thermo.Active.Config/Config/Recipes/template.json +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -1 +1,1190 @@ -{"RecipeName":"template.json","RecipeParameters":{"general_sizes_mould_dim_x":400.0,"general_sizes_mould_dim_y":150.0,"general_sizes_mould_max_height":0.0,"general_sizes_mould_min_height":0.0,"general_sizes_mould_base_height":0.0,"general_sizes_sheet_material":0.0,"general_sizes_sheet_dim_x":0.0,"general_sizes_sheet_dim_y":0.0,"general_sizes_sheet_thickness":3.0,"general_sizes_plate_type":0.0,"general_sizes_plate_dim_x":1000.0,"general_sizes_plate_dim_y":900.0,"general_sizes_frame_traverses":0.0,"general_sizes_frame_dim_x":1100.0,"general_sizes_frame_dim_y":600.0,"general_sizes_upperplate_max_height":0.0,"general_area_working_dxsx":0.0,"positions_mould_lower_position":150.0,"positions_mould_lower_speed":350.0,"positions_mould_intermediate_position":800.0,"positions_mould_upper_position":850.0,"positions_mould_upper_speed":350.0,"positions_mould_upperdeceleration_position":820.0,"positions_mould_upperdeceleration_speed":150.0,"positions_mould_lowerdeceleration_position":830.0,"positions_mould_lowerdeceleration_speed":150.0,"positions_frame_lower_position":40.0,"positions_frame_lower_speed":500.0,"positions_frame_upper_position":980.0,"positions_frame_upper_speed":450.0,"positions_frame_intermediate_position":700.0,"positions_frame_intermediate_speed":400.0,"positions_frame_unload_position":650.0,"positions_upperplate_lower_position":245.0,"positions_upperplate_lower_speed":150.0,"positions_upperplate_upper_position":1150.0,"positions_upperplate_upper_speed":350.0,"positions_upperplate_upperdeceleration_position":270.0,"positions_upperplate_upperdeceleration_speed":150.0,"positions_upperplate_lowerdeceleration_position":250.0,"positions_upperplate_lowerdeceleration_speed":50.0,"cycle_forming_type":0.0,"cycle_forming_pause_cycle":0.0,"cycle_forming_cooling_enabled":0.0,"cycle_forming_blowingbox_enabled":0.0,"cycle_acrylicframe_enabled":0.0,"cycle_acrylicframe_time":4000.0,"cycle_upperoverheating_enabled":0.0,"cycle_upperoverheating_time":15000.0,"cycle_crystallisation_type":0.0,"cycle_crystallisation_time":0.0,"cycle_loader_enable":0.0,"cycle_loader_lifter_lowerposition_delay":0.0,"cycle_loader_lifter_upperposition_delay":0.0,"cycle_loader_split_sheet_time":0.0,"cycle_loader_ejector_position":400.0,"cycle_loader_pallet_height":110.0,"cycle_loader_center_x":0.0,"cycle_loader_center_y":1.0,"cycle_loader_checktichness_enabled":0.0,"cycle_loader_suckers_vacuum":1.0,"cycle_loader_ionizer_enabled":1.0,"cycle_loader_manualunloading_enabled":0.0,"heats_lowerheaters_max_time":20000.0,"heats_lowerheaters_movement_enabled":1.0,"heats_lowerheaters_enabled":1.0,"heats_lowerheaters_oscillation":0.0,"heats_upperheaters_max_time":20000.0,"heats_upperheaters_movement_enabled":1.0,"heats_upperheaters_enabled":1.0,"heats_upperheaters_oscillation":0.0,"heats_decomsustain_type":1.0,"heats_decomsustain_decompression_flow":50.0,"heats_decomsustain_min_blowing_time":300.0,"heats_decomsustain_sustain_delay":1000.0,"heats_decomsustain_decompression_delay":1000.0,"heats_decomsustain_decompression_duration":1000.0,"heats_decomsustain_smoke_function_enabled":0.0,"pyrometer_pyrometer_enabled":1.0,"pyrometer_pyrometer_setpoint":250.0,"pyrometer_pyrometer_delay":10000.0,"pyrometer_upperthermoregulator_start_adjustment":100.0,"pyrometer_upperthermoregulator_end_adjustment":200.0,"pyrometer_upperthermoregulator_min_percentage":70.0,"pyrometer_upperthermoregulator_max_percentage":100.0,"pyrometer_upperthermoregulator_sleep_enabled":1.0,"pyrometer_upperthermoregulator_sleep_percentage":25.0,"pyrometer_lowerthermoregulator_start_adjustment":100.0,"pyrometer_lowerthermoregulator_end_adjustment":200.0,"pyrometer_lowerthermoregulator_min_percentage":70.0,"pyrometer_lowerthermoregulator_max_percentage":100.0,"pyrometer_lowerthermoregulator_sleep_enabled":1.0,"pyrometer_lowerthermoregulator_sleep_percentage":25.0,"pyrometer_upperthermoregulator_sleep_temperature":0.0,"pyrometer_upperthermoregulator_working_temperature":0.0,"pyrometer_lowerthermoregulator_sleep_temperature":0.0,"pyrometer_lowerthermoregulator_working_temperature":0.0,"drawing_type":4.0,"drawing_height":100.0,"drawing_delay":2000.0,"drawing_1_chart_setpointx":6000.0,"drawing_1_chart_setpointy":100.0,"drawing_photocell":1.0,"drawing_mantaining_flow":20.0,"drawing_manual":50.0,"drawing_mould_up_delay":3000.0,"upperplate_cycle_type":1.0,"upperplate_cycle_delay":0.0,"upperplate_cycle_time":3000.0,"upperplate_air_enable":0.0,"upperplate_air_delay":0.0,"upperplate_air_max_time":0.0,"upperplate_air_1_chart_setpointx":0.0,"upperplate_air_1_chart_setpointy":0.0,"upperplate_air_2_chart_setpointx":0.0,"upperplate_air_2_chart_setpointy":0.0,"upperplate_air_3_chart_setpointx":0.0,"upperplate_air_3_chart_setpointy":0.0,"upperplate_air_manual":0.0,"upperplate_vacuum_enable":0.0,"upperplate_vacuum_delay":0.0,"upperplate_vacuum_max_time":0.0,"upperplate_vacuum_1_chart_setpointx":0.0,"upperplate_vacuum_1_chart_setpointy":0.0,"upperplate_vacuum_2_chart_setpointx":0.0,"upperplate_vacuum_2_chart_setpointy":0.0,"upperplate_vacuum_3_chart_setpointx":0.0,"upperplate_vacuum_3_chart_setpointy":0.0,"upperplate_vacuum_manual":0.0,"upperplate_extraction_enable":0.0,"upperplate_extraction_delay":0.0,"upperplate_extraction_1_chart_setpointx":0.0,"upperplate_extraction_1_chart_setpointy":0.0,"upperplate_extraction_manual":0.0,"cooling_blowing_type":4.0,"cooling_blowing_delay":5000.0,"cooling_blowing_time":10000.0,"cooling_pyrometer_enabled":0.0,"cooling_pyrometer_setpoint":50.0,"cooling_pyrometer_delay":8000.0,"cooling_nebulizer_type":1.0,"cooling_nebulizer_delay":2000.0,"cooling_nebulizer_time":2000.0,"cooling_telescopic_enable":0.0,"cooling_telescopic_position":0.0,"cooling_telescopic_swing_enable":0.0,"cooling_telescopic_swing_stroke":0.0,"cooling_shutter_1_opening_perc":0.0,"cooling_shutter_2_opening_perc":0.0,"cooling_shutter_3_opening_perc":0.0,"cooling_shutter_4_opening_perc":0.0,"cooling_shutter_5_opening_perc":0.0,"cooling_shutter_6_opening_perc":0.0,"cooling_shutter_7_opening_perc":0.0,"cooling_shutter_8_opening_perc":0.0,"cooling_shutter_9_opening_perc":0.0,"cooling_shutter_10_opening_perc":0.0,"cooling_shutter_11_opening_perc":0.0,"cooling_shutter_12_opening_perc":0.0,"cooling_shutter_13_opening_perc":0.0,"cooling_shutter_14_opening_perc":0.0,"cooling_shutter_15_opening_perc":0.0,"cooling_shutter_16_opening_perc":0.0,"vacuum_main_start":0.0,"vacuum_main_delay":1000.0,"vacuum_main_max_time":30000.0,"vacuum_main_1_chart_setpointx":2000.0,"vacuum_main_1_chart_setpointy":30.0,"vacuum_main_2_chart_setpointx":3000.0,"vacuum_main_2_chart_setpointy":60.0,"vacuum_main_3_chart_setpointx":15000.0,"vacuum_main_3_chart_setpointy":90.0,"vacuum_main_manual":40.0,"vacuum_direct_enabled":1.0,"vacuum_direct_delay":2000.0,"vacuum_direct_time":3000.0,"vacuum_aux_enabled":0.0,"vacuum_aux_delay":0.0,"vacuum_aux_max_time":0.0,"vacuum_aux_1_chart_setpointx":0.0,"vacuum_aux_1_chart_setpointy":0.0,"vacuum_aux_2_chart_setpointx":0.0,"vacuum_aux_2_chart_setpointy":0.0,"vacuum_aux_3_chart_setpointx":0.0,"vacuum_aux_3_chart_setpointy":0.0,"vacuum_aux_manual":0.0,"vacuum_pre_enabled":0.0,"vacuum_pre_delay":0.0,"vacuum_pre_max_time":0.0,"vacuum_pre_1_chart_setpointx":0.0,"vacuum_pre_1_chart_setpointy":0.0,"vacuum_pre_2_chart_setpointx":0.0,"vacuum_pre_2_chart_setpointy":0.0,"vacuum_pre_3_chart_setpointx":0.0,"vacuum_pre_3_chart_setpointy":0.0,"extraction_main_type":2.0,"extraction_main_mould_dw_delay":3000.0,"extraction_main_delay":2000.0,"extraction_main_1_chart_setpointx":3000.0,"extraction_main_1_chart_setpointy":85.0,"extraction_main_manual":60.0,"extraction_aux_enabled":0.0,"extraction_aux_delay":0.0,"extraction_aux_1_chart_setpointx":0.0,"extraction_aux_1_chart_setpointy":0.0,"extraction_aux_manual":0.0,"options_undercutmould_1_mode":0.0,"options_undercutmould_1_position":500.0,"options_undercutmould_1_delay_acti":0.0,"options_undercutmould_1_delay_dis":0.0,"options_undercutmould_2_mode":0.0,"options_undercutmould_2_position":500.0,"options_undercutmould_2_delay_acti":1000.0,"options_undercutmould_2_delay_dis":1000.0,"options_undercutmould_3_mode":0.0,"options_undercutmould_3_position":0.0,"options_undercutmould_3_delay_acti":0.0,"options_undercutmould_3_delay_dis":0.0,"options_undercutmould_4_mode":0.0,"options_undercutmould_4_position":0.0,"options_undercutmould_4_delay_acti":0.0,"options_undercutmould_4_delay_dis":0.0,"options_undercutmould_5_mode":0.0,"options_undercutmould_5_position":0.0,"options_undercutmould_5_delay_acti":0.0,"options_undercutmould_5_delay_dis":0.0,"options_undercutmould_6_mode":0.0,"options_undercutmould_6_position":0.0,"options_undercutmould_6_delay_acti":0.0,"options_undercutmould_6_delay_dis":0.0,"options_undercutmould_7_mode":0.0,"options_undercutmould_7_position":0.0,"options_undercutmould_7_delay_acti":0.0,"options_undercutmould_7_delay_dis":0.0,"options_undercutmould_8_mode":0.0,"options_undercutmould_8_position":0.0,"options_undercutmould_8_delay_acti":0.0,"options_undercutmould_8_delay_dis":0.0,"options_undercutmould_9_mode":0.0,"options_undercutmould_9_position":0.0,"options_undercutmould_9_delay_acti":0.0,"options_undercutmould_9_delay_dis":0.0,"options_undercutmould_10_mode":0.0,"options_undercutmould_10_position":0.0,"options_undercutmould_10_delay_acti":0.0,"options_undercutmould_10_delay_dis":0.0,"options_undercutupperplate_1_mode":0.0,"options_undercutupperplate_1_position":600.0,"options_undercutupperplate_1_delay_acti":0.0,"options_undercutupperplate_1_delay_dis":0.0,"options_undercutupperplate_2_mode":0.0,"options_undercutupperplate_2_position":600.0,"options_undercutupperplate_2_delay_acti":1000.0,"options_undercutupperplate_2_delay_dis":1000.0,"options_undercutupperplate_3_mode":0.0,"options_undercutupperplate_3_position":0.0,"options_undercutupperplate_3_delay_acti":0.0,"options_undercutupperplate_3_delay_dis":0.0,"options_undercutupperplate_4_mode":0.0,"options_undercutupperplate_4_position":0.0,"options_undercutupperplate_4_delay_acti":0.0,"options_undercutupperplate_4_delay_dis":0.0,"options_undercutupperplate_5_mode":0.0,"options_undercutupperplate_5_position":0.0,"options_undercutupperplate_5_delay_acti":0.0,"options_undercutupperplate_5_delay_dis":0.0,"options_undercutupperplate_6_mode":0.0,"options_undercutupperplate_6_position":0.0,"options_undercutupperplate_6_delay_acti":0.0,"options_undercutupperplate_6_delay_dis":0.0,"options_undercutupperplate_7_mode":0.0,"options_undercutupperplate_7_position":0.0,"options_undercutupperplate_7_delay_acti":0.0,"options_undercutupperplate_7_delay_dis":0.0,"options_undercutupperplate_8_mode":0.0,"options_undercutupperplate_8_position":0.0,"options_undercutupperplate_8_delay_acti":0.0,"options_undercutupperplate_8_delay_dis":0.0,"options_undercutupperplate_9_mode":0.0,"options_undercutupperplate_9_position":0.0,"options_undercutupperplate_9_delay_acti":0.0,"options_undercutupperplate_9_delay_dis":0.0,"options_undercutupperplate_10_mode":0.0,"options_undercutupperplate_10_position":0.0,"options_undercutupperplate_10_delay_acti":0.0,"options_undercutupperplate_10_delay_dis":0.0,"options_thermoregulator_1_enabled":1.0,"options_thermoregulator_1_setpoint":55.0,"options_thermoregulator_2_enabled":1.0,"options_thermoregulator_2_setpoint":60.0,"options_thermoregulator_3_enabled":1.0,"options_thermoregulator_3_setpoint":65.0,"options_thermoregulator_4_enabled":0.0,"options_thermoregulator_4_setpoint":0.0,"options_thermoregulator_5_enabled":0.0,"options_thermoregulator_5_setpoint":0.0,"options_thermoregulator_6_enabled":0.0,"options_thermoregulator_6_setpoint":0.0,"options_thermoregulator_7_enabled":0.0,"options_thermoregulator_7_setpoint":0.0,"options_thermoregulator_8_enabled":0.0,"options_thermoregulator_8_setpoint":0.0,"options_thermoregulator_9_enabled":0.0,"options_thermoregulator_9_setpoint":0.0,"options_thermoregulator_10_enabled":0.0,"options_thermoregulator_10_setpoint":0.0},"ChannelSetpoints":{"7":81.0,"44":81.0,"81":81.0,"118":81.0,"155":81.0,"192":81.0,"229":81.0,"266":81.0,"303":81.0,"340":81.0,"377":81.0,"414":81.0,"1":81.0,"8":81.0,"45":81.0,"82":81.0,"119":81.0,"156":81.0,"193":81.0,"230":81.0,"267":81.0,"304":81.0,"341":81.0,"378":81.0,"415":81.0,"9":81.0,"46":81.0,"83":81.0,"120":81.0,"157":81.0,"194":81.0,"231":81.0,"268":81.0,"305":81.0,"342":81.0,"379":81.0,"416":81.0,"10":81.0,"47":81.0,"84":81.0,"121":81.0,"158":81.0,"195":81.0,"232":81.0,"269":81.0,"306":81.0,"343":81.0,"380":81.0,"11":81.0,"48":81.0,"85":81.0,"122":81.0,"159":81.0,"196":81.0,"233":81.0,"270":81.0,"307":81.0,"344":81.0,"381":81.0,"417":81.0,"12":81.0,"49":81.0,"86":81.0,"123":81.0,"160":81.0,"197":81.0,"234":81.0,"271":81.0,"308":81.0,"345":81.0,"382":81.0,"13":81.0,"50":81.0,"87":81.0,"124":81.0,"161":81.0,"198":81.0,"235":81.0,"272":81.0,"309":81.0,"346":81.0,"383":81.0,"418":81.0,"2":81.0,"14":81.0,"51":81.0,"88":81.0,"125":81.0,"162":81.0,"199":81.0,"236":81.0,"273":81.0,"310":81.0,"347":81.0,"384":81.0,"419":81.0,"15":81.0,"52":81.0,"89":81.0,"126":81.0,"163":81.0,"200":81.0,"237":81.0,"274":81.0,"311":81.0,"348":81.0,"385":81.0,"420":81.0,"16":81.0,"53":81.0,"90":81.0,"127":81.0,"164":81.0,"201":81.0,"238":81.0,"275":81.0,"312":81.0,"349":81.0,"386":81.0,"17":81.0,"54":81.0,"91":81.0,"128":81.0,"165":81.0,"202":81.0,"239":81.0,"276":81.0,"313":81.0,"350":81.0,"387":81.0,"421":81.0,"18":81.0,"55":81.0,"92":81.0,"129":81.0,"166":81.0,"203":81.0,"240":81.0,"277":81.0,"314":81.0,"351":81.0,"388":81.0,"19":81.0,"56":81.0,"93":81.0,"130":81.0,"167":81.0,"204":81.0,"241":81.0,"278":81.0,"315":81.0,"352":81.0,"389":81.0,"422":81.0,"3":81.0,"20":81.0,"57":81.0,"94":81.0,"131":81.0,"168":81.0,"205":81.0,"242":81.0,"279":81.0,"316":81.0,"353":81.0,"390":81.0,"423":81.0,"21":81.0,"58":81.0,"95":81.0,"132":81.0,"169":81.0,"206":81.0,"243":81.0,"280":81.0,"317":81.0,"354":81.0,"391":81.0,"424":81.0,"22":81.0,"59":81.0,"96":81.0,"133":81.0,"170":81.0,"207":81.0,"244":81.0,"281":81.0,"318":81.0,"355":81.0,"392":81.0,"23":81.0,"60":81.0,"97":81.0,"134":81.0,"171":81.0,"208":81.0,"245":81.0,"282":81.0,"319":81.0,"356":81.0,"393":81.0,"425":81.0,"24":81.0,"61":81.0,"98":81.0,"135":81.0,"172":81.0,"209":81.0,"246":81.0,"283":81.0,"320":81.0,"357":81.0,"394":81.0,"25":81.0,"62":81.0,"99":81.0,"136":81.0,"173":81.0,"210":81.0,"247":81.0,"284":81.0,"321":81.0,"358":81.0,"395":81.0,"426":81.0,"4":81.0,"26":81.0,"63":81.0,"100":81.0,"137":81.0,"174":81.0,"211":81.0,"248":81.0,"285":81.0,"322":81.0,"359":81.0,"396":81.0,"427":81.0,"27":81.0,"64":81.0,"101":81.0,"138":81.0,"175":81.0,"212":81.0,"249":81.0,"286":81.0,"323":81.0,"360":81.0,"397":81.0,"428":81.0,"28":81.0,"65":81.0,"102":81.0,"139":81.0,"176":81.0,"213":81.0,"250":81.0,"287":81.0,"324":81.0,"361":81.0,"398":81.0,"29":81.0,"66":81.0,"103":81.0,"140":81.0,"177":81.0,"214":81.0,"251":81.0,"288":81.0,"325":81.0,"362":81.0,"399":81.0,"429":81.0,"30":81.0,"67":81.0,"104":81.0,"141":81.0,"178":81.0,"215":81.0,"252":81.0,"289":81.0,"326":81.0,"363":81.0,"400":81.0,"31":81.0,"68":81.0,"105":81.0,"142":81.0,"179":81.0,"216":81.0,"253":81.0,"290":81.0,"327":81.0,"364":81.0,"401":81.0,"430":81.0,"5":81.0,"32":81.0,"69":81.0,"106":81.0,"143":81.0,"180":81.0,"217":81.0,"254":81.0,"291":81.0,"328":81.0,"365":81.0,"402":81.0,"431":81.0,"33":81.0,"70":81.0,"107":81.0,"144":81.0,"181":81.0,"218":81.0,"255":81.0,"292":81.0,"329":81.0,"366":81.0,"403":81.0,"432":81.0,"34":81.0,"71":81.0,"108":81.0,"145":81.0,"182":81.0,"219":81.0,"256":81.0,"293":81.0,"330":81.0,"367":81.0,"404":81.0,"35":81.0,"72":81.0,"109":81.0,"146":81.0,"183":81.0,"220":81.0,"257":81.0,"294":81.0,"331":81.0,"368":81.0,"405":81.0,"433":81.0,"36":81.0,"73":81.0,"110":81.0,"147":81.0,"184":81.0,"221":81.0,"258":81.0,"295":81.0,"332":81.0,"369":81.0,"406":81.0,"37":81.0,"74":81.0,"111":81.0,"148":81.0,"185":81.0,"222":81.0,"259":81.0,"296":81.0,"333":81.0,"370":81.0,"407":81.0,"434":81.0,"6":81.0,"38":81.0,"75":81.0,"112":81.0,"149":81.0,"186":81.0,"223":81.0,"260":81.0,"297":81.0,"334":81.0,"371":81.0,"408":81.0,"435":81.0,"39":81.0,"76":81.0,"113":81.0,"150":81.0,"187":81.0,"224":81.0,"261":81.0,"298":81.0,"335":81.0,"372":81.0,"409":81.0,"436":81.0,"40":81.0,"77":81.0,"114":81.0,"151":81.0,"188":81.0,"225":81.0,"262":81.0,"299":81.0,"336":81.0,"373":81.0,"410":81.0,"41":81.0,"78":81.0,"115":81.0,"152":81.0,"189":81.0,"226":81.0,"263":81.0,"300":81.0,"337":81.0,"374":81.0,"411":81.0,"437":81.0,"42":81.0,"79":81.0,"116":81.0,"153":81.0,"190":81.0,"227":81.0,"264":81.0,"301":81.0,"338":81.0,"375":81.0,"412":81.0,"43":81.0,"80":81.0,"117":81.0,"154":81.0,"191":81.0,"228":81.0,"265":81.0,"302":81.0,"339":81.0,"376":81.0,"413":81.0,"438":81.0,"513":81.0,"520":81.0,"557":81.0,"594":81.0,"631":81.0,"668":81.0,"705":81.0,"742":81.0,"779":81.0,"816":81.0,"853":81.0,"890":81.0,"927":81.0,"521":81.0,"558":81.0,"595":81.0,"632":81.0,"669":81.0,"706":81.0,"743":81.0,"780":81.0,"817":81.0,"854":81.0,"891":81.0,"928":81.0,"522":81.0,"559":81.0,"596":81.0,"633":81.0,"670":81.0,"707":81.0,"744":81.0,"781":81.0,"818":81.0,"855":81.0,"892":81.0,"523":81.0,"560":81.0,"597":81.0,"634":81.0,"671":81.0,"708":81.0,"745":81.0,"782":81.0,"819":81.0,"856":81.0,"893":81.0,"929":81.0,"524":81.0,"561":81.0,"598":81.0,"635":81.0,"672":81.0,"709":81.0,"746":81.0,"783":81.0,"820":81.0,"857":81.0,"894":81.0,"525":81.0,"562":81.0,"599":81.0,"636":81.0,"673":81.0,"710":81.0,"747":81.0,"784":81.0,"821":81.0,"858":81.0,"895":81.0,"930":81.0,"514":81.0,"526":81.0,"563":81.0,"600":81.0,"637":81.0,"674":81.0,"711":81.0,"748":81.0,"785":81.0,"822":81.0,"859":81.0,"896":81.0,"931":81.0,"527":81.0,"564":81.0,"601":81.0,"638":81.0,"675":81.0,"712":81.0,"749":81.0,"786":81.0,"823":81.0,"860":81.0,"897":81.0,"932":81.0,"528":81.0,"565":81.0,"602":81.0,"639":81.0,"676":81.0,"713":81.0,"750":81.0,"787":81.0,"824":81.0,"861":81.0,"898":81.0,"529":81.0,"566":81.0,"603":81.0,"640":81.0,"677":81.0,"714":81.0,"751":81.0,"788":81.0,"825":81.0,"862":81.0,"899":81.0,"933":81.0,"530":81.0,"567":81.0,"604":81.0,"641":81.0,"678":81.0,"715":81.0,"752":81.0,"789":81.0,"826":81.0,"863":81.0,"900":81.0,"531":81.0,"568":81.0,"605":81.0,"642":81.0,"679":81.0,"716":81.0,"753":81.0,"790":81.0,"827":81.0,"864":81.0,"901":81.0,"934":81.0,"515":81.0,"532":81.0,"569":81.0,"606":81.0,"643":81.0,"680":81.0,"717":81.0,"754":81.0,"791":81.0,"828":81.0,"865":81.0,"902":81.0,"935":81.0,"533":81.0,"570":81.0,"607":81.0,"644":81.0,"681":81.0,"718":81.0,"755":81.0,"792":81.0,"829":81.0,"866":81.0,"903":81.0,"936":81.0,"534":81.0,"571":81.0,"608":81.0,"645":81.0,"682":81.0,"719":81.0,"756":81.0,"793":81.0,"830":81.0,"867":81.0,"904":81.0,"535":81.0,"572":81.0,"609":81.0,"646":81.0,"683":81.0,"720":81.0,"757":81.0,"794":81.0,"831":81.0,"868":81.0,"905":81.0,"937":81.0,"536":81.0,"573":81.0,"610":81.0,"647":81.0,"684":81.0,"721":81.0,"758":81.0,"795":81.0,"832":81.0,"869":81.0,"906":81.0,"537":81.0,"574":81.0,"611":81.0,"648":81.0,"685":81.0,"722":81.0,"759":81.0,"796":81.0,"833":81.0,"870":81.0,"907":81.0,"938":81.0,"516":81.0,"538":81.0,"575":81.0,"612":81.0,"649":81.0,"686":81.0,"723":81.0,"760":81.0,"797":81.0,"834":81.0,"871":81.0,"908":81.0,"939":81.0,"539":81.0,"576":81.0,"613":81.0,"650":81.0,"687":81.0,"724":81.0,"761":81.0,"798":81.0,"835":81.0,"872":81.0,"909":81.0,"940":81.0,"517":81.0,"540":81.0,"577":81.0,"614":81.0,"651":81.0,"688":81.0,"725":81.0,"762":81.0,"799":81.0,"836":81.0,"873":81.0,"910":81.0,"941":81.0,"541":81.0,"578":81.0,"615":81.0,"652":81.0,"689":81.0,"726":81.0,"763":81.0,"800":81.0,"837":81.0,"874":81.0,"911":81.0,"942":81.0,"542":81.0,"579":81.0,"616":81.0,"653":81.0,"690":81.0,"727":81.0,"764":81.0,"801":81.0,"838":81.0,"875":81.0,"912":81.0,"543":81.0,"580":81.0,"617":81.0,"654":81.0,"691":81.0,"728":81.0,"765":81.0,"802":81.0,"839":81.0,"876":81.0,"913":81.0,"943":81.0,"544":81.0,"581":81.0,"618":81.0,"655":81.0,"692":81.0,"729":81.0,"766":81.0,"803":81.0,"840":81.0,"877":81.0,"914":81.0,"545":81.0,"582":81.0,"619":81.0,"656":81.0,"693":81.0,"730":81.0,"767":81.0,"804":81.0,"841":81.0,"878":81.0,"915":81.0,"944":81.0,"518":81.0,"546":81.0,"583":81.0,"620":81.0,"657":81.0,"694":81.0,"731":81.0,"768":81.0,"805":81.0,"842":81.0,"879":81.0,"916":81.0,"945":81.0,"547":81.0,"584":81.0,"621":81.0,"658":81.0,"695":81.0,"732":81.0,"769":81.0,"806":81.0,"843":81.0,"880":81.0,"917":81.0,"946":81.0,"548":81.0,"585":81.0,"622":81.0,"659":81.0,"696":81.0,"733":81.0,"770":81.0,"807":81.0,"844":81.0,"881":81.0,"918":81.0,"549":81.0,"586":81.0,"623":81.0,"660":81.0,"697":81.0,"734":81.0,"771":81.0,"808":81.0,"845":81.0,"882":81.0,"919":81.0,"947":81.0,"550":81.0,"587":81.0,"624":81.0,"661":81.0,"698":81.0,"735":81.0,"772":81.0,"809":81.0,"846":81.0,"883":81.0,"920":81.0,"551":81.0,"588":81.0,"625":81.0,"662":81.0,"699":81.0,"736":81.0,"773":81.0,"810":81.0,"847":81.0,"884":81.0,"921":81.0,"948":81.0,"519":81.0,"552":81.0,"589":81.0,"626":81.0,"663":81.0,"700":81.0,"737":81.0,"774":81.0,"811":81.0,"848":81.0,"885":81.0,"922":81.0,"949":81.0,"553":81.0,"590":81.0,"627":81.0,"664":81.0,"701":81.0,"738":81.0,"775":81.0,"812":81.0,"849":81.0,"886":81.0,"923":81.0,"950":81.0,"554":81.0,"591":81.0,"628":81.0,"665":81.0,"702":81.0,"739":81.0,"776":81.0,"813":81.0,"850":81.0,"887":81.0,"924":81.0,"555":81.0,"592":81.0,"629":81.0,"666":81.0,"703":81.0,"740":81.0,"777":81.0,"814":81.0,"851":81.0,"888":81.0,"925":81.0,"951":81.0,"556":81.0,"593":81.0,"630":81.0,"667":81.0,"704":81.0,"741":81.0,"778":81.0,"815":81.0,"852":81.0,"889":81.0,"926":80.0}} \ No newline at end of file +{ + "RecipeName": "template.json", + "RecipeParameters": { + "general_sizes_mould_dim_x": 400.0, + "general_sizes_mould_dim_y": 150.0, + "general_sizes_mould_max_height": 0.0, + "general_sizes_mould_min_height": 0.0, + "general_sizes_mould_base_height": 0.0, + "general_sizes_sheet_material": 0.0, + "general_sizes_sheet_dim_x": 0.0, + "general_sizes_sheet_dim_y": 0.0, + "general_sizes_sheet_thickness": 3.0, + "general_sizes_plate_type": 0.0, + "general_sizes_plate_dim_x": 1000.0, + "general_sizes_plate_dim_y": 900.0, + "general_sizes_frame_traverses": 0.0, + "general_sizes_frame_dim_x": 1100.0, + "general_sizes_frame_dim_y": 600.0, + "general_sizes_upperplate_max_height": 0.0, + "general_area_working_dxsx": 0.0, + "positions_mould_lower_position": 150.0, + "positions_mould_lower_speed": 350.0, + "positions_mould_intermediate_position": 800.0, + "positions_mould_upper_position": 850.0, + "positions_mould_upper_speed": 350.0, + "positions_mould_upperdeceleration_position": 820.0, + "positions_mould_upperdeceleration_speed": 150.0, + "positions_mould_lowerdeceleration_position": 830.0, + "positions_mould_lowerdeceleration_speed": 150.0, + "positions_frame_lower_position": 40.0, + "positions_frame_lower_speed": 500.0, + "positions_frame_upper_position": 980.0, + "positions_frame_upper_speed": 450.0, + "positions_frame_intermediate_position": 700.0, + "positions_frame_intermediate_speed": 400.0, + "positions_frame_unload_position": 650.0, + "positions_upperplate_lower_position": 245.0, + "positions_upperplate_lower_speed": 150.0, + "positions_upperplate_upper_position": 1150.0, + "positions_upperplate_upper_speed": 350.0, + "positions_upperplate_upperdeceleration_position": 270.0, + "positions_upperplate_upperdeceleration_speed": 150.0, + "positions_upperplate_lowerdeceleration_position": 250.0, + "positions_upperplate_lowerdeceleration_speed": 50.0, + "cycle_forming_type": 0.0, + "cycle_forming_pause_cycle": 0.0, + "cycle_forming_cooling_enabled": 0.0, + "cycle_forming_blowingbox_enabled": 0.0, + "cycle_acrylicframe_enabled": 0.0, + "cycle_acrylicframe_time": 4000.0, + "cycle_upperoverheating_enabled": 0.0, + "cycle_upperoverheating_time": 15000.0, + "cycle_crystallisation_type": 0.0, + "cycle_crystallisation_time": 0.0, + "cycle_loader_enable": 0.0, + "cycle_loader_lifter_lowerposition_delay": 0.0, + "cycle_loader_lifter_upperposition_delay": 0.0, + "cycle_loader_split_sheet_time": 0.0, + "cycle_loader_ejector_position": 400.0, + "cycle_loader_pallet_height": 110.0, + "cycle_loader_center_x": 0.0, + "cycle_loader_center_y": 1.0, + "cycle_loader_checktichness_enabled": 0.0, + "cycle_loader_suckers_vacuum": 1.0, + "cycle_loader_ionizer_enabled": 1.0, + "cycle_loader_manualunloading_enabled": 0.0, + "heats_lowerheaters_max_time": 20000.0, + "heats_lowerheaters_movement_enabled": 1.0, + "heats_lowerheaters_enabled": 1.0, + "heats_lowerheaters_oscillation": 0.0, + "heats_upperheaters_max_time": 20000.0, + "heats_upperheaters_movement_enabled": 1.0, + "heats_upperheaters_enabled": 1.0, + "heats_upperheaters_oscillation": 0.0, + "heats_decomsustain_type": 1.0, + "heats_decomsustain_decompression_flow": 50.0, + "heats_decomsustain_min_blowing_time": 300.0, + "heats_decomsustain_sustain_delay": 1000.0, + "heats_decomsustain_decompression_delay": 1000.0, + "heats_decomsustain_decompression_duration": 1000.0, + "heats_decomsustain_smoke_function_enabled": 0.0, + "pyrometer_pyrometer_enabled": 1.0, + "pyrometer_pyrometer_setpoint": 250.0, + "pyrometer_pyrometer_delay": 10000.0, + "pyrometer_upperthermoregulator_start_adjustment": 100.0, + "pyrometer_upperthermoregulator_end_adjustment": 200.0, + "pyrometer_upperthermoregulator_min_percentage": 70.0, + "pyrometer_upperthermoregulator_max_percentage": 100.0, + "pyrometer_upperthermoregulator_sleep_enabled": 1.0, + "pyrometer_upperthermoregulator_sleep_percentage": 25.0, + "pyrometer_lowerthermoregulator_start_adjustment": 100.0, + "pyrometer_lowerthermoregulator_end_adjustment": 200.0, + "pyrometer_lowerthermoregulator_min_percentage": 70.0, + "pyrometer_lowerthermoregulator_max_percentage": 100.0, + "pyrometer_lowerthermoregulator_sleep_enabled": 1.0, + "pyrometer_lowerthermoregulator_sleep_percentage": 25.0, + "pyrometer_upperthermoregulator_sleep_temperature": 0.0, + "pyrometer_upperthermoregulator_working_temperature": 0.0, + "pyrometer_lowerthermoregulator_sleep_temperature": 0.0, + "pyrometer_lowerthermoregulator_working_temperature": 0.0, + "drawing_type": 4.0, + "drawing_height": 100.0, + "drawing_delay": 2000.0, + "drawing_1_chart_setpointx": 6000.0, + "drawing_1_chart_setpointy": 100.0, + "drawing_photocell": 1.0, + "drawing_mantaining_flow": 20.0, + "drawing_manual": 50.0, + "drawing_mould_up_delay": 3000.0, + "upperplate_cycle_type": 1.0, + "upperplate_cycle_delay": 0.0, + "upperplate_cycle_time": 3000.0, + "upperplate_air_enable": 0.0, + "upperplate_air_delay": 0.0, + "upperplate_air_max_time": 0.0, + "upperplate_air_1_chart_setpointx": 0.0, + "upperplate_air_1_chart_setpointy": 0.0, + "upperplate_air_2_chart_setpointx": 0.0, + "upperplate_air_2_chart_setpointy": 0.0, + "upperplate_air_3_chart_setpointx": 0.0, + "upperplate_air_3_chart_setpointy": 0.0, + "upperplate_air_manual": 0.0, + "upperplate_vacuum_enable": 0.0, + "upperplate_vacuum_delay": 0.0, + "upperplate_vacuum_max_time": 0.0, + "upperplate_vacuum_1_chart_setpointx": 0.0, + "upperplate_vacuum_1_chart_setpointy": 0.0, + "upperplate_vacuum_2_chart_setpointx": 0.0, + "upperplate_vacuum_2_chart_setpointy": 0.0, + "upperplate_vacuum_3_chart_setpointx": 0.0, + "upperplate_vacuum_3_chart_setpointy": 0.0, + "upperplate_vacuum_manual": 0.0, + "upperplate_extraction_enable": 0.0, + "upperplate_extraction_delay": 0.0, + "upperplate_extraction_1_chart_setpointx": 0.0, + "upperplate_extraction_1_chart_setpointy": 0.0, + "upperplate_extraction_manual": 0.0, + "cooling_blowing_type": 4.0, + "cooling_blowing_delay": 5000.0, + "cooling_blowing_time": 10000.0, + "cooling_pyrometer_enabled": 0.0, + "cooling_pyrometer_setpoint": 50.0, + "cooling_pyrometer_delay": 8000.0, + "cooling_nebulizer_type": 1.0, + "cooling_nebulizer_delay": 2000.0, + "cooling_nebulizer_time": 2000.0, + "cooling_telescopic_enable": 0.0, + "cooling_telescopic_position": 0.0, + "cooling_telescopic_swing_enable": 0.0, + "cooling_telescopic_swing_stroke": 0.0, + "cooling_shutter_1_opening_perc": 0.0, + "cooling_shutter_2_opening_perc": 0.0, + "cooling_shutter_3_opening_perc": 0.0, + "cooling_shutter_4_opening_perc": 0.0, + "cooling_shutter_5_opening_perc": 0.0, + "cooling_shutter_6_opening_perc": 0.0, + "cooling_shutter_7_opening_perc": 0.0, + "cooling_shutter_8_opening_perc": 0.0, + "cooling_shutter_9_opening_perc": 0.0, + "cooling_shutter_10_opening_perc": 0.0, + "cooling_shutter_11_opening_perc": 0.0, + "cooling_shutter_12_opening_perc": 0.0, + "cooling_shutter_13_opening_perc": 0.0, + "cooling_shutter_14_opening_perc": 0.0, + "cooling_shutter_15_opening_perc": 0.0, + "cooling_shutter_16_opening_perc": 0.0, + "vacuum_main_start": 0.0, + "vacuum_main_delay": 1000.0, + "vacuum_main_max_time": 30000.0, + "vacuum_main_1_chart_setpointx": 2000.0, + "vacuum_main_1_chart_setpointy": 30.0, + "vacuum_main_2_chart_setpointx": 3000.0, + "vacuum_main_2_chart_setpointy": 60.0, + "vacuum_main_3_chart_setpointx": 15000.0, + "vacuum_main_3_chart_setpointy": 90.0, + "vacuum_main_manual": 40.0, + "vacuum_direct_enabled": 1.0, + "vacuum_direct_delay": 2000.0, + "vacuum_direct_time": 3000.0, + "vacuum_aux_enabled": 0.0, + "vacuum_aux_delay": 0.0, + "vacuum_aux_max_time": 0.0, + "vacuum_aux_1_chart_setpointx": 0.0, + "vacuum_aux_1_chart_setpointy": 0.0, + "vacuum_aux_2_chart_setpointx": 0.0, + "vacuum_aux_2_chart_setpointy": 0.0, + "vacuum_aux_3_chart_setpointx": 0.0, + "vacuum_aux_3_chart_setpointy": 0.0, + "vacuum_aux_manual": 0.0, + "vacuum_pre_enabled": 0.0, + "vacuum_pre_delay": 0.0, + "vacuum_pre_max_time": 0.0, + "vacuum_pre_1_chart_setpointx": 0.0, + "vacuum_pre_1_chart_setpointy": 0.0, + "vacuum_pre_2_chart_setpointx": 0.0, + "vacuum_pre_2_chart_setpointy": 0.0, + "vacuum_pre_3_chart_setpointx": 0.0, + "vacuum_pre_3_chart_setpointy": 0.0, + "extraction_main_type": 2.0, + "extraction_main_mould_dw_delay": 3000.0, + "extraction_main_delay": 2000.0, + "extraction_main_1_chart_setpointx": 3000.0, + "extraction_main_1_chart_setpointy": 85.0, + "extraction_main_manual": 60.0, + "extraction_aux_enabled": 0.0, + "extraction_aux_delay": 0.0, + "extraction_aux_1_chart_setpointx": 0.0, + "extraction_aux_1_chart_setpointy": 0.0, + "extraction_aux_manual": 0.0, + "options_undercutmould_1_mode": 0.0, + "options_undercutmould_1_position": 500.0, + "options_undercutmould_1_delay_acti": 0.0, + "options_undercutmould_1_delay_dis": 0.0, + "options_undercutmould_2_mode": 0.0, + "options_undercutmould_2_position": 500.0, + "options_undercutmould_2_delay_acti": 1000.0, + "options_undercutmould_2_delay_dis": 1000.0, + "options_undercutmould_3_mode": 0.0, + "options_undercutmould_3_position": 0.0, + "options_undercutmould_3_delay_acti": 0.0, + "options_undercutmould_3_delay_dis": 0.0, + "options_undercutmould_4_mode": 0.0, + "options_undercutmould_4_position": 0.0, + "options_undercutmould_4_delay_acti": 0.0, + "options_undercutmould_4_delay_dis": 0.0, + "options_undercutmould_5_mode": 0.0, + "options_undercutmould_5_position": 0.0, + "options_undercutmould_5_delay_acti": 0.0, + "options_undercutmould_5_delay_dis": 0.0, + "options_undercutmould_6_mode": 0.0, + "options_undercutmould_6_position": 0.0, + "options_undercutmould_6_delay_acti": 0.0, + "options_undercutmould_6_delay_dis": 0.0, + "options_undercutmould_7_mode": 0.0, + "options_undercutmould_7_position": 0.0, + "options_undercutmould_7_delay_acti": 0.0, + "options_undercutmould_7_delay_dis": 0.0, + "options_undercutmould_8_mode": 0.0, + "options_undercutmould_8_position": 0.0, + "options_undercutmould_8_delay_acti": 0.0, + "options_undercutmould_8_delay_dis": 0.0, + "options_undercutmould_9_mode": 0.0, + "options_undercutmould_9_position": 0.0, + "options_undercutmould_9_delay_acti": 0.0, + "options_undercutmould_9_delay_dis": 0.0, + "options_undercutmould_10_mode": 0.0, + "options_undercutmould_10_position": 0.0, + "options_undercutmould_10_delay_acti": 0.0, + "options_undercutmould_10_delay_dis": 0.0, + "options_undercutupperplate_1_mode": 0.0, + "options_undercutupperplate_1_position": 600.0, + "options_undercutupperplate_1_delay_acti": 0.0, + "options_undercutupperplate_1_delay_dis": 0.0, + "options_undercutupperplate_2_mode": 0.0, + "options_undercutupperplate_2_position": 600.0, + "options_undercutupperplate_2_delay_acti": 1000.0, + "options_undercutupperplate_2_delay_dis": 1000.0, + "options_undercutupperplate_3_mode": 0.0, + "options_undercutupperplate_3_position": 0.0, + "options_undercutupperplate_3_delay_acti": 0.0, + "options_undercutupperplate_3_delay_dis": 0.0, + "options_undercutupperplate_4_mode": 0.0, + "options_undercutupperplate_4_position": 0.0, + "options_undercutupperplate_4_delay_acti": 0.0, + "options_undercutupperplate_4_delay_dis": 0.0, + "options_undercutupperplate_5_mode": 0.0, + "options_undercutupperplate_5_position": 0.0, + "options_undercutupperplate_5_delay_acti": 0.0, + "options_undercutupperplate_5_delay_dis": 0.0, + "options_undercutupperplate_6_mode": 0.0, + "options_undercutupperplate_6_position": 0.0, + "options_undercutupperplate_6_delay_acti": 0.0, + "options_undercutupperplate_6_delay_dis": 0.0, + "options_undercutupperplate_7_mode": 0.0, + "options_undercutupperplate_7_position": 0.0, + "options_undercutupperplate_7_delay_acti": 0.0, + "options_undercutupperplate_7_delay_dis": 0.0, + "options_undercutupperplate_8_mode": 0.0, + "options_undercutupperplate_8_position": 0.0, + "options_undercutupperplate_8_delay_acti": 0.0, + "options_undercutupperplate_8_delay_dis": 0.0, + "options_undercutupperplate_9_mode": 0.0, + "options_undercutupperplate_9_position": 0.0, + "options_undercutupperplate_9_delay_acti": 0.0, + "options_undercutupperplate_9_delay_dis": 0.0, + "options_undercutupperplate_10_mode": 0.0, + "options_undercutupperplate_10_position": 0.0, + "options_undercutupperplate_10_delay_acti": 0.0, + "options_undercutupperplate_10_delay_dis": 0.0, + "options_thermoregulator_1_enabled": 1.0, + "options_thermoregulator_1_setpoint": 55.0, + "options_thermoregulator_2_enabled": 1.0, + "options_thermoregulator_2_setpoint": 60.0, + "options_thermoregulator_3_enabled": 1.0, + "options_thermoregulator_3_setpoint": 65.0, + "options_thermoregulator_4_enabled": 0.0, + "options_thermoregulator_4_setpoint": 0.0, + "options_thermoregulator_5_enabled": 0.0, + "options_thermoregulator_5_setpoint": 0.0, + "options_thermoregulator_6_enabled": 0.0, + "options_thermoregulator_6_setpoint": 0.0, + "options_thermoregulator_7_enabled": 0.0, + "options_thermoregulator_7_setpoint": 0.0, + "options_thermoregulator_8_enabled": 0.0, + "options_thermoregulator_8_setpoint": 0.0, + "options_thermoregulator_9_enabled": 0.0, + "options_thermoregulator_9_setpoint": 0.0, + "options_thermoregulator_10_enabled": 0.0, + "options_thermoregulator_10_setpoint": 0.0 + }, + "ChannelSetpoints": { + "7": 7, + "44": 44, + "81": 84.0, + "118": 51, + "155": 52, + "192": 53, + "229": 54, + "266": 50, + "303": 50, + "340": 50, + "377": 50, + "414": 50, + "1": 1, + "8": 8, + "45": 45, + "82": 82, + "119": 50, + "156": 50, + "193": 50, + "230": 50, + "267": 50, + "304": 50, + "341": 50, + "378": 50, + "415": 50, + "9": 9, + "46": 46, + "83": 83, + "120": 50, + "157": 50, + "194": 50, + "231": 50, + "268": 50, + "305": 50, + "342": 50, + "379": 50, + "416": 50, + "10": 10, + "47": 47, + "84": 84, + "121": 50, + "158": 50, + "195": 50, + "232": 50, + "269": 50, + "306": 50, + "343": 50, + "380": 50, + "11": 11, + "48": 48, + "85": 85, + "122": 50, + "159": 50, + "196": 50, + "233": 50, + "270": 50, + "307": 50, + "344": 50, + "381": 50, + "417": 50, + "12": 12, + "49": 49, + "86": 86, + "123": 50, + "160": 50, + "197": 50, + "234": 50, + "271": 50, + "308": 50, + "345": 50, + "382": 50, + "13": 13, + "50": 50, + "87": 87, + "124": 50, + "161": 50, + "198": 50, + "235": 50, + "272": 50, + "309": 50, + "346": 50, + "383": 50, + "418": 50, + "2": 2, + "14": 14, + "51": 51, + "88": 88, + "125": 50, + "162": 50, + "199": 50, + "236": 50, + "273": 50, + "310": 50, + "347": 50, + "384": 50, + "419": 50, + "15": 15, + "52": 52, + "89": 89, + "126": 50, + "163": 50, + "200": 50, + "237": 50, + "274": 50, + "311": 50, + "348": 50, + "385": 50, + "420": 50, + "16": 16, + "53": 53, + "90": 90, + "127": 50, + "164": 50, + "201": 50, + "238": 50, + "275": 50, + "312": 50, + "349": 50, + "386": 50, + "17": 17, + "54": 54, + "91": 91, + "128": 50, + "165": 50, + "202": 50, + "239": 50, + "276": 50, + "313": 50, + "350": 50, + "387": 50, + "421": 50, + "18": 18, + "55": 58, + "92": 92, + "129": 50, + "166": 50, + "203": 50, + "240": 50, + "277": 50, + "314": 50, + "351": 50, + "388": 50, + "19": 19, + "56": 56, + "93": 93, + "130": 50, + "167": 50, + "204": 50, + "241": 50, + "278": 50, + "315": 50, + "352": 50, + "389": 50, + "422": 50, + "3": 3, + "20": 20, + "57": 57, + "94": 94, + "131": 50, + "168": 50, + "205": 50, + "242": 50, + "279": 50, + "316": 50, + "353": 50, + "390": 50, + "423": 50, + "21": 21, + "58": 58, + "95": 95, + "132": 50, + "169": 50, + "206": 50, + "243": 50, + "280": 50, + "317": 50, + "354": 50, + "391": 50, + "424": 50, + "22": 22, + "59": 59, + "96": 96, + "133": 50, + "170": 50, + "207": 50, + "244": 50, + "281": 50, + "318": 50, + "355": 50, + "392": 50, + "23": 23, + "60": 60, + "97": 97, + "134": 50, + "171": 50, + "208": 50, + "245": 50, + "282": 50, + "319": 50, + "356": 50, + "393": 50, + "425": 50, + "24": 24, + "61": 61, + "98": 98, + "135": 50, + "172": 50, + "209": 50, + "246": 50, + "283": 50, + "320": 50, + "357": 50, + "394": 50, + "25": 25, + "62": 62, + "99": 99, + "136": 50, + "173": 50, + "210": 50, + "247": 50, + "284": 50, + "321": 50, + "358": 50, + "395": 50, + "426": 50, + "4": 4, + "26": 26, + "63": 63, + "100": 50, + "137": 50, + "174": 50, + "211": 50, + "248": 50, + "285": 50, + "322": 50, + "359": 50, + "396": 50, + "427": 50, + "27": 27, + "64": 64, + "101": 50, + "138": 50, + "175": 50, + "212": 50, + "249": 50, + "286": 50, + "323": 50, + "360": 50, + "397": 50, + "428": 50, + "28": 28, + "65": 65, + "102": 50, + "139": 50, + "176": 50, + "213": 50, + "250": 50, + "287": 50, + "324": 50, + "361": 50, + "398": 50, + "29": 29, + "66": 66, + "103": 50, + "140": 50, + "177": 50, + "214": 50, + "251": 50, + "288": 50, + "325": 50, + "362": 50, + "399": 50, + "429": 50, + "30": 30, + "67": 67, + "104": 50, + "141": 50, + "178": 50, + "215": 50, + "252": 50, + "289": 50, + "326": 50, + "363": 50, + "400": 50, + "31": 31, + "68": 68, + "105": 50, + "142": 50, + "179": 50, + "216": 50, + "253": 50, + "290": 50, + "327": 50, + "364": 50, + "401": 50, + "430": 50, + "5": 5, + "32": 32, + "69": 69, + "106": 50, + "143": 50, + "180": 50, + "217": 50, + "254": 50, + "291": 50, + "328": 50, + "365": 50, + "402": 50, + "431": 50, + "33": 33, + "70": 70, + "107": 50, + "144": 50, + "181": 50, + "218": 50, + "255": 50, + "292": 50, + "329": 50, + "366": 50, + "403": 50, + "432": 50, + "34": 34, + "71": 71, + "108": 50, + "145": 50, + "182": 50, + "219": 50, + "256": 50, + "293": 50, + "330": 50, + "367": 50, + "404": 50, + "35": 35, + "72": 72, + "109": 50, + "146": 50, + "183": 50, + "220": 50, + "257": 50, + "294": 50, + "331": 50, + "368": 50, + "405": 50, + "433": 50, + "36": 36, + "73": 73, + "110": 50, + "147": 50, + "184": 50, + "221": 50, + "258": 50, + "295": 50, + "332": 50, + "369": 50, + "406": 50, + "37": 37, + "74": 74, + "111": 50, + "148": 50, + "185": 50, + "222": 50, + "259": 50, + "296": 50, + "333": 50, + "370": 50, + "407": 50, + "434": 50, + "6": 6, + "38": 38, + "75": 75, + "112": 50, + "149": 50, + "186": 50, + "223": 50, + "260": 50, + "297": 50, + "334": 50, + "371": 50, + "408": 50, + "435": 50, + "39": 39, + "76": 76, + "113": 50, + "150": 50, + "187": 50, + "224": 50, + "261": 50, + "298": 50, + "335": 50, + "372": 50, + "409": 50, + "436": 50, + "40": 40, + "77": 77, + "114": 50, + "151": 50, + "188": 50, + "225": 50, + "262": 50, + "299": 50, + "336": 50, + "373": 50, + "410": 50, + "41": 41, + "78": 78, + "115": 50, + "152": 50, + "189": 50, + "226": 50, + "263": 50, + "300": 50, + "337": 50, + "374": 50, + "411": 50, + "437": 50, + "42": 42, + "79": 79, + "116": 50, + "153": 50, + "190": 50, + "227": 50, + "264": 50, + "301": 50, + "338": 50, + "375": 50, + "412": 50, + "43": 43, + "80": 80, + "117": 50, + "154": 50, + "191": 50, + "228": 50, + "265": 50, + "302": 50, + "339": 50, + "376": 50, + "413": 50, + "438": 50, + "513": 50, + "520": 50, + "557": 50, + "594": 50, + "631": 50, + "668": 50, + "705": 50, + "742": 50, + "779": 50, + "816": 50, + "853": 50, + "890": 50, + "927": 50, + "521": 50, + "558": 50, + "595": 50, + "632": 50, + "669": 50, + "706": 50, + "743": 50, + "780": 50, + "817": 50, + "854": 50, + "891": 50, + "928": 50, + "522": 50, + "559": 50, + "596": 50, + "633": 50, + "670": 50, + "707": 50, + "744": 50, + "781": 50, + "818": 50, + "855": 50, + "892": 50, + "523": 50, + "560": 50, + "597": 50, + "634": 50, + "671": 50, + "708": 50, + "745": 50, + "782": 50, + "819": 50, + "856": 50, + "893": 50, + "929": 50, + "524": 50, + "561": 50, + "598": 50, + "635": 50, + "672": 50, + "709": 50, + "746": 50, + "783": 50, + "820": 50, + "857": 50, + "894": 50, + "525": 50, + "562": 50, + "599": 50, + "636": 50, + "673": 50, + "710": 50, + "747": 50, + "784": 50, + "821": 50, + "858": 50, + "895": 50, + "930": 50, + "514": 50, + "526": 50, + "563": 50, + "600": 50, + "637": 50, + "674": 50, + "711": 50, + "748": 50, + "785": 50, + "822": 50, + "859": 50, + "896": 50, + "931": 50, + "527": 50, + "564": 50, + "601": 50, + "638": 50, + "675": 50, + "712": 50, + "749": 50, + "786": 50, + "823": 50, + "860": 50, + "897": 50, + "932": 50, + "528": 50, + "565": 50, + "602": 50, + "639": 50, + "676": 50, + "713": 50, + "750": 50, + "787": 50, + "824": 50, + "861": 50, + "898": 50, + "529": 50, + "566": 50, + "603": 50, + "640": 50, + "677": 50, + "714": 50, + "751": 50, + "788": 50, + "825": 50, + "862": 50, + "899": 50, + "933": 50, + "530": 50, + "567": 50, + "604": 50, + "641": 50, + "678": 50, + "715": 50, + "752": 50, + "789": 50, + "826": 50, + "863": 50, + "900": 50, + "531": 50, + "568": 50, + "605": 50, + "642": 50, + "679": 50, + "716": 50, + "753": 50, + "790": 50, + "827": 50, + "864": 50, + "901": 50, + "934": 50, + "515": 50, + "532": 50, + "569": 50, + "606": 50, + "643": 50, + "680": 50, + "717": 50, + "754": 50, + "791": 50, + "828": 50, + "865": 50, + "902": 50, + "935": 50, + "533": 50, + "570": 50, + "607": 50, + "644": 50, + "681": 50, + "718": 50, + "755": 50, + "792": 50, + "829": 50, + "866": 50, + "903": 50, + "936": 50, + "534": 50, + "571": 50, + "608": 50, + "645": 50, + "682": 50, + "719": 50, + "756": 50, + "793": 50, + "830": 50, + "867": 50, + "904": 50, + "535": 50, + "572": 50, + "609": 50, + "646": 50, + "683": 50, + "720": 50, + "757": 50, + "794": 50, + "831": 50, + "868": 50, + "905": 50, + "937": 50, + "536": 50, + "573": 50, + "610": 50, + "647": 50, + "684": 50, + "721": 50, + "758": 50, + "795": 50, + "832": 50, + "869": 50, + "906": 50, + "537": 50, + "574": 50, + "611": 50, + "648": 50, + "685": 50, + "722": 50, + "759": 50, + "796": 50, + "833": 50, + "870": 50, + "907": 50, + "938": 50, + "516": 50, + "538": 50, + "575": 50, + "612": 50, + "649": 50, + "686": 50, + "723": 50, + "760": 50, + "797": 50, + "834": 50, + "871": 50, + "908": 50, + "939": 50, + "539": 50, + "576": 50, + "613": 50, + "650": 50, + "687": 50, + "724": 50, + "761": 50, + "798": 50, + "835": 50, + "872": 50, + "909": 50, + "940": 50, + "517": 50, + "540": 50, + "577": 50, + "614": 50, + "651": 50, + "688": 50, + "725": 50, + "762": 50, + "799": 50, + "836": 50, + "873": 50, + "910": 50, + "941": 50, + "541": 50, + "578": 50, + "615": 50, + "652": 50, + "689": 50, + "726": 50, + "763": 50, + "800": 50, + "837": 50, + "874": 50, + "911": 50, + "942": 50, + "542": 50, + "579": 50, + "616": 50, + "653": 50, + "690": 50, + "727": 50, + "764": 50, + "801": 50, + "838": 50, + "875": 50, + "912": 50, + "543": 50, + "580": 50, + "617": 50, + "654": 50, + "691": 50, + "728": 50, + "765": 50, + "802": 50, + "839": 50, + "876": 50, + "913": 50, + "943": 50, + "544": 50, + "581": 50, + "618": 50, + "655": 50, + "692": 50, + "729": 50, + "766": 50, + "803": 50, + "840": 50, + "877": 50, + "914": 50, + "545": 50, + "582": 50, + "619": 50, + "656": 50, + "693": 50, + "730": 50, + "767": 50, + "804": 50, + "841": 50, + "878": 50, + "915": 50, + "944": 50, + "518": 50, + "546": 50, + "583": 50, + "620": 50, + "657": 50, + "694": 50, + "731": 50, + "768": 50, + "805": 50, + "842": 50, + "879": 50, + "916": 50, + "945": 50, + "547": 50, + "584": 50, + "621": 50, + "658": 50, + "695": 50, + "732": 50, + "769": 50, + "806": 50, + "843": 50, + "880": 50, + "917": 50, + "946": 50, + "548": 50, + "585": 50, + "622": 50, + "659": 50, + "696": 50, + "733": 50, + "770": 50, + "807": 50, + "844": 50, + "881": 50, + "918": 50, + "549": 50, + "586": 50, + "623": 50, + "660": 50, + "697": 50, + "734": 50, + "771": 50, + "808": 50, + "845": 50, + "882": 50, + "919": 50, + "947": 50, + "550": 50, + "587": 50, + "624": 50, + "661": 50, + "698": 50, + "735": 50, + "772": 50, + "809": 50, + "846": 50, + "883": 50, + "920": 50, + "551": 50, + "588": 50, + "625": 50, + "662": 50, + "699": 50, + "736": 50, + "773": 50, + "810": 50, + "847": 50, + "884": 50, + "921": 50, + "948": 50, + "519": 50, + "552": 50, + "589": 50, + "626": 50, + "663": 50, + "700": 50, + "737": 50, + "774": 50, + "811": 50, + "848": 50, + "885": 50, + "922": 50, + "949": 50, + "553": 50, + "590": 50, + "627": 50, + "664": 50, + "701": 50, + "738": 50, + "775": 50, + "812": 50, + "849": 50, + "886": 50, + "923": 50, + "950": 50, + "554": 50, + "591": 50, + "628": 50, + "665": 50, + "702": 50, + "739": 50, + "776": 50, + "813": 50, + "850": 50, + "887": 50, + "924": 50, + "555": 50, + "592": 50, + "629": 50, + "666": 50, + "703": 50, + "740": 50, + "777": 50, + "814": 50, + "851": 50, + "888": 50, + "925": 50, + "951": 50, + "556": 50, + "593": 50, + "630": 50, + "667": 50, + "704": 50, + "741": 50, + "778": 50, + "815": 50, + "852": 50, + "889": 50, + "926": 80 + } +} \ No newline at end of file diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index fca8b583..82425d30 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1282,11 +1282,11 @@ namespace Thermo.Active.NC return NO_ERROR; } /// - /// Recipe Parameters write to PLC (only SetpointHMI) + /// Write warmers configuration Parameters to PLC /// /// /// - public CmsError WriteRecipeWarmersToPLC(Dictionary updtRecipe) + public CmsError WriteRecipeWarmersConf(Dictionary updtRecipe) { // solo x S7... if (NcConfig.NcVendor == NC_VENDOR.S7NET) @@ -1318,6 +1318,79 @@ namespace Thermo.Active.NC return NO_ERROR; } + /// + /// Write warmers Setpoint to PLC + /// + /// + /// + public CmsError WriteRecipeWarmersLoad(Dictionary updtLoad) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } + /// + /// Write warmers Setpoint to PLC + /// + /// + /// + public CmsError WriteRecipeWarmersThermo(Dictionary updtLoad) + { + // solo x S7... + if (NcConfig.NcVendor == NC_VENDOR.S7NET) + { + // FIXME TODO WRITE CH LOAD DATA +#if false + // ciclo x ogni valore della ricetta aggiornata ricevuto + ThermoModels.RecipeParam currParam; + foreach (var item in updtRecipe) + { + // salvo SOLO il setpoint HMI... + currParam = new ThermoModels.RecipeParam() + { + Id = (short)item.Value.Id, + SetpointHMI = item.Value.SetpointHMI + }; + // scrivo! + CmsError cmsError = numericalControl.PLC_WRecipeParam(currParam); + if (cmsError.IsError()) + return cmsError; + } +#endif + } + else + { + return FUNCTION_NOT_ALLOWED_ERROR; + } + + return NO_ERROR; + } @@ -1879,11 +1952,22 @@ namespace Thermo.Active.NC /// /// Write all warmers load for recipe /// - /// Oggetto parametri da aggiornare (from HMI) + /// Oggetto parametri da aggiornare (from HMI) /// - public CmsError WriteRecipeWarmers(Dictionary updtRecipe) + public CmsError WriteRecipeWarmChSetpHMI(Dictionary updtSetpHmi) { - CmsError cmsError = WriteRecipeWarmersToPLC(updtRecipe); + CmsError cmsError = numericalControl.PLC_WWarmerChSetpHmi(updtSetpHmi); + + return cmsError; + } + /// + /// Write all warmers termocam data for recipe + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmChSetpTermoCam(Dictionary updtSetpTCam) + { + CmsError cmsError = numericalControl.PLC_WWarmerChSetpTCam(updtSetpTCam); return cmsError; } diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 29f895ce..689b7b9f 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -58,41 +58,48 @@ namespace Thermo.Active.Controllers.WebApi [Route("update"), HttpPut] public IHttpActionResult WriteParameters(Dictionary parametersList) { - using (NcAdapter ncAdapter = new NcAdapter()) + if (parametersList != null) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - - // read recipe! - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - - Dictionary updtRecipe = new Dictionary(); - - foreach (var item in parametersList) + using (NcAdapter ncAdapter = new NcAdapter()) { - if (prevRecipe.ContainsKey(item.Key)) - { - // aggiorno il valore HMI nel parametro - var currParam = prevRecipe[item.Key]; - currParam.SetpointHMI = item.Value; - // salvo (1 parametro, potrei fare N...) - updtRecipe.Add(item.Key, currParam); - } - else - { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) return NotFound(); + + // read recipe! + CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + Dictionary updtRecipe = new Dictionary(); + + foreach (var item in parametersList) + { + if (prevRecipe.ContainsKey(item.Key)) + { + // aggiorno il valore HMI nel parametro + var currParam = prevRecipe[item.Key]; + currParam.SetpointHMI = item.Value; + // salvo (1 parametro, potrei fare N...) + updtRecipe.Add(item.Key, currParam); + } + else + { + return NotFound(); + } } + + // scrivo sul PLC + ncAdapter.WriteRecipeParams(updtRecipe); + + // ritorno solo fatto! + return Ok(); } - - // scrivo sul PLC - ncAdapter.WriteRecipeParams(updtRecipe); - - // ritorno solo fatto! - return Ok(); + } + else + { + return NotFound(); } } diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index 595fd2bc..1eb4c67f 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -56,44 +56,19 @@ namespace Thermo.Active.Controllers.WebApi [Route("update"), HttpPut] - public IHttpActionResult WriteSetpoints(Dictionary channelsList) + public IHttpActionResult WriteSetpoints(Dictionary channelsLoad) { // scrive su CHp da ricetta oppure da override x parametri utente... using (NcAdapter ncAdapter = new NcAdapter()) { -#if false // Try connection CmsError libraryError = ncAdapter.Connect(); if (libraryError.errorCode != 0) return NotFound(); - // read recipe! - CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary prevRecipe); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - - Dictionary updtRecipe = new Dictionary(); - - foreach (var item in parametersList) - { - if (prevRecipe.ContainsKey(item.Key)) - { - // aggiorno il valore HMI nel parametro - var currParam = prevRecipe[item.Key]; - currParam.SetpointHMI = item.Value; - // salvo (1 parametro, potrei fare N...) - updtRecipe.Add(item.Key, currParam); - } - else - { - return NotFound(); - } - } - // scrivo sul PLC - ncAdapter.WriteRecipeParams(updtRecipe); -#endif + ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad); // ritorno solo fatto! return Ok(); From 339c9e1220d9fb78e6eafaedddb809717a186d7d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 10 Jun 2020 19:14:32 +0200 Subject: [PATCH 33/84] Setup params write methods added --- Thermo.Active.Config/ServerConfig.cs | 1 + .../ServerConfigController.cs | 61 +++++++++++--- .../ConfigModels/RiskConfigModel.cs | 9 ++- Thermo.Active.NC/NcAdapter.cs | 62 +++++++++++++- .../Controllers/WebApi/WarmersController.cs | 81 +++++++++++++++---- 5 files changed, 185 insertions(+), 29 deletions(-) diff --git a/Thermo.Active.Config/ServerConfig.cs b/Thermo.Active.Config/ServerConfig.cs index 3cc50e77..732926fd 100644 --- a/Thermo.Active.Config/ServerConfig.cs +++ b/Thermo.Active.Config/ServerConfig.cs @@ -60,6 +60,7 @@ namespace Thermo.Active.Config public static List ModBlockConfig; public static List RiskResistConfig; public static List RiskChannelConfig; + public static List RiskBoardConfig; public static LiveData RecipeLiveData; } diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 58f3b771..81d6bd39 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -645,7 +645,8 @@ namespace Thermo.Active.Config { Id = Convert.ToInt16(x.Value), Dimensione = Convert.ToInt16(x.Attribute("dimensione").Value), - Potenza = Convert.ToInt16(x.Attribute("potenza").Value) + Potenza = Convert.ToInt16(x.Attribute("potenza").Value), + Modello = x.Attribute("modello").Value }) .ToList(); @@ -672,19 +673,48 @@ namespace Thermo.Active.Config int numCol = -1; int ResistId = 0; int oldRow = 0; - int currRow = 0; - RiskChannelConfig = new List(); + int currIdBoard = 0; + RiskBoardConfig = new List(); RiskResistConfig = new List(); + RiskChannelConfig = new List(); + + // inizializzo le 64 schede a 0 canali... + for (int idxBoard = 0; idxBoard < 64; idxBoard++) + { + RiskBoardConfig.Add(new RiskBoardModel() + { + IdBoard = idxBoard, + NumChannels = 0 + }); + } // ciclo x calcolare i canali foreach (var riflettore in Riflettori) { - // ciclo sulle resistente + // ciclo sulle resistenze foreach (var resistenza in riflettore.Resistenze) { + // cerco la scheda dato il canale... + currIdBoard = (resistenza.Canale - 1) / 8; + // cerco se ho già la scheda + var boardFound = RiskBoardConfig.Find(item => item.IdBoard == currIdBoard); + if (boardFound == null) + { + RiskBoardConfig.Add(new RiskBoardModel() + { + IdBoard = currIdBoard, + NumChannels = 1 + }); + } + else + { + boardFound.NumChannels += 1; + } + + // cerco se ho già il canale - var found = RiskChannelConfig.Find(item => item.IdChannel == resistenza.Canale); - if (found == null) + var chanFound = RiskChannelConfig.Find(item => item.IdChannel == resistenza.Canale); + if (chanFound == null) { // cerco il TIPO... var riferimento = Riferimenti.Find(x => x.Id == resistenza.Tipo); @@ -696,10 +726,15 @@ namespace Thermo.Active.Config IdReflector = riflettore.Tipo, SetpointRecipe = 0, SetpointThermo = 0, - MaxPower = riferimento.Potenza + MaxPower = riferimento.Potenza, + NumResist = 1, + CalcIchMin=riferimento.Modello.Contains("Quarzo") }); } - + else + { + chanFound.NumResist += 1; + } } } @@ -832,7 +867,7 @@ namespace Thermo.Active.Config public static bool LoadRecipe(string filePath) { bool answ = false; - + // check file extension string fileName = Path.GetFileName(filePath); if (!fileName.EndsWith(".json")) @@ -906,8 +941,8 @@ namespace Thermo.Active.Config // serialize string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! - var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH); - if(!Directory.Exists(dir)) + var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH); + if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } @@ -937,13 +972,13 @@ namespace Thermo.Active.Config { answ = true; string fileName = Path.GetFileName(filePath); - if(!fileName.EndsWith(".json")) + if (!fileName.EndsWith(".json")) { fileName += ".json"; filePath += ".json"; } // fix name! - RecipeLiveData.RecipeName=fileName; + RecipeLiveData.RecipeName = fileName; // serialize string rawData = JsonConvert.SerializeObject(RecipeLiveData); // save live! diff --git a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs index 7a8b9144..c08c65f0 100644 --- a/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs +++ b/Thermo.Active.Model/ConfigModels/RiskConfigModel.cs @@ -19,6 +19,7 @@ namespace Thermo.Active.Model.ConfigModels public int Id; public int Potenza; public int Dimensione; + public string Modello; } public class RiskResistModel { @@ -35,6 +36,12 @@ namespace Thermo.Active.Model.ConfigModels public int SetpointRecipe; public int SetpointThermo; public int MaxPower; - //public int MinCurrent; + public int NumResist; + public bool CalcIchMin; + } + public class RiskBoardModel + { + public int IdBoard; + public int NumChannels; } } diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 82425d30..d9ed323a 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1264,7 +1264,7 @@ namespace Thermo.Active.NC List warmersConfig = RiskChannelConfig.Select(x => new DTOWarmers() { IdChannel = x.IdChannel, - IdReflector= x.IdReflector, + IdReflector = x.IdReflector, SetpointRecipe = x.SetpointRecipe, SetpointTermocam = 0, // FIXME TODO x.SetpointTer, SetpointPLC = currPlcWarmers[x.IdChannel].SetpointPLC, @@ -1971,6 +1971,66 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Write all warmers CONFIG data + /// + /// Oggetto parametri da aggiornare (from HMI) + /// + public CmsError WriteRecipeWarmConfig() + { + Dictionary newData = new Dictionary(); + CmsError cmsError = NO_ERROR; + + // scrivo l'abilitazione dei canali... + foreach (var item in RiskBoardConfig) + { + // FIXME TODO hard limit a 64... da chiarire + if (item.IdBoard < 64) + { + newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); + } + } + cmsError = numericalControl.PLC_WWarmerConfBoardEnabl(newData); + if (cmsError.IsError()) + return cmsError; + + // processo riflettori... + newData = new Dictionary(); + foreach (var item in RiskChannelConfig) + { + newData.Add(item.IdChannel, item.IdReflector); + } + cmsError = numericalControl.PLC_WWarmerConfRefl(newData); + if (cmsError.IsError()) + return cmsError; + + // recupero parametro VUMin... + ushort VUMin = 1; + cmsError = numericalControl.PLC_RWarmerConfVUMin(ref VUMin); + if (cmsError.IsError()) + return cmsError; + + // processo corrente minima! + var newFloatTData = new Dictionary(); + double minICh = 0; + int calcPower = 0; + foreach (var item in RiskChannelConfig) + { + minICh = 0; + if (item.CalcIchMin) + { + calcPower = (item.NumResist - 1) + item.MaxPower + item.MaxPower / 2; + minICh = (double)calcPower / VUMin; + } + newFloatTData.Add(item.IdChannel, minICh); + } + cmsError = numericalControl.PLC_WWarmerConfMinCurr(newFloatTData); + if (cmsError.IsError()) + return cmsError; + + + return cmsError; + } #endregion Read Data diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index 1eb4c67f..ce1f9c17 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -59,19 +59,26 @@ namespace Thermo.Active.Controllers.WebApi public IHttpActionResult WriteSetpoints(Dictionary channelsLoad) { // scrive su CHp da ricetta oppure da override x parametri utente... - - using (NcAdapter ncAdapter = new NcAdapter()) + if (channelsLoad != null) { - // Try connection - CmsError libraryError = ncAdapter.Connect(); - if (libraryError.errorCode != 0) - return NotFound(); - // scrivo sul PLC - ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad); + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); - // ritorno solo fatto! - return Ok(); + // scrivo sul PLC + ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad); + + // ritorno solo fatto! + return Ok(); + } + } + else + { + return NotFound(); } } @@ -84,7 +91,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { -#if false // Try connection CmsError libraryError = ncAdapter.Connect(); if (libraryError.errorCode != 0) @@ -93,7 +99,22 @@ namespace Thermo.Active.Controllers.WebApi // scrivo sul PLC il comando conferma! CmsError cmsError = ncAdapter.ConfirmRecipeData(true); if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); + return BadRequest(cmsError.localizationKey); + +#if false + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + // rileggo warmers + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointHMI); + } + + saveCurrentRecipeParams(currParams); #endif // ritorno solo fatto! @@ -110,7 +131,6 @@ namespace Thermo.Active.Controllers.WebApi { using (NcAdapter ncAdapter = new NcAdapter()) { -#if false // Try connection CmsError libraryError = ncAdapter.Connect(); if (libraryError.errorCode != 0) @@ -119,7 +139,22 @@ namespace Thermo.Active.Controllers.WebApi // scrivo sul PLC il comando annula! CmsError cmsError = ncAdapter.ConfirmRecipeData(false); if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); + return BadRequest(cmsError.localizationKey); + +#if false + // recupero i dati LIVE dei parametri HMI della ricetta... + cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + if (cmsError.IsError()) + return BadRequest(cmsError.localizationKey); + + var currParams = new Dictionary(); + foreach (var item in currRecipe) + { + currParams.Add(item.Key, item.Value.SetpointPLC); + } + + // ora salvo ANCHE i dati live... + saveCurrentRecipeParams(currParams); #endif // ritorno solo fatto! @@ -127,6 +162,24 @@ namespace Thermo.Active.Controllers.WebApi } } + [Route("setConfig"), HttpPut] + public IHttpActionResult SetConfig() + { + // scrive configurazioni RISK + using (NcAdapter ncAdapter = new NcAdapter()) + { + // Try connection + CmsError libraryError = ncAdapter.Connect(); + if (libraryError.errorCode != 0) + return NotFound(); + + // scrivo sul PLC + ncAdapter.WriteRecipeWarmConfig(); + + // ritorno solo fatto! + return Ok(); + } + } } } \ No newline at end of file From 54004083559a12f618cd1ff0ed7388929005b399 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 10 Jun 2020 19:21:36 +0200 Subject: [PATCH 34/84] start new versione (to check warmers config) --- Thermo.Active/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index 90deca67..ecdca942 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.5.4")] +[assembly: AssemblyVersion("0.6.0")] From d987cef604aca1c501ff5e5463cfd1f7ddd434a6 Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 10:07:40 +0200 Subject: [PATCH 35/84] add service and store for Warmers --- .../wwwroot/src/@types/warmers-channel.d.ts | 19 +++++++ .../src/@types/warmers-resistance.d.ts | 15 +++++ .../wwwroot/src/services/warmersService.ts | 25 +++++++++ .../wwwroot/src/store/warmers.store.ts | 55 +++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts create mode 100644 Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts create mode 100644 Thermo.Active/wwwroot/src/services/warmersService.ts create mode 100644 Thermo.Active/wwwroot/src/store/warmers.store.ts diff --git a/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts new file mode 100644 index 00000000..32dc9b5d --- /dev/null +++ b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts @@ -0,0 +1,19 @@ +declare module Warmers { + + interface IChannel{ + idChannel: number, + idReflector: number, + setpointRecipe: number, + setpointTermocam: number, + setpointPLC: number, + channelStatus: number, + actualCurrent: number, + actualPerc: number, + maxPower: number + } + + interface IChannels{ + channels:IChannel[] + } + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts new file mode 100644 index 00000000..bebc7b23 --- /dev/null +++ b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts @@ -0,0 +1,15 @@ +declare module Warmers { + + interface IResistance{ + id: number, + idChannel: number, + column: number, + row: number, + dimension: number + } + + interface IResistances{ + resistances:IResistance[] + } + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts new file mode 100644 index 00000000..0e153728 --- /dev/null +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -0,0 +1,25 @@ +import { baseRestService } from "../_base/baseRestService"; +import {CONFIGURATION} from "@/config"; +import { warmersActions } from "@/store/warmers.store"; +import { store } from "@/store"; + +export class WarmersService extends baseRestService { + + BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "/api/warmers/"; + + async GetChannels(){ + let result = await this.Get((await this.BASE_URL()) + "channels"); + warmersActions.setChannels(store, result); + return result; + } + + async GetResistances(){ + let result = await this.Get((await this.BASE_URL()) + "resistances"); + warmersActions.setResistances(store, result); + return result; + } + + + +} +export const warmersService = new WarmersService(); \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/store/warmers.store.ts b/Thermo.Active/wwwroot/src/store/warmers.store.ts new file mode 100644 index 00000000..453c2b29 --- /dev/null +++ b/Thermo.Active/wwwroot/src/store/warmers.store.ts @@ -0,0 +1,55 @@ +export interface WarmersStoreModel { + channels: Warmers.IChannels; + resistances: Warmers.IResistances; +} + + +export interface WarmersActions { + setChannels(context, model: Warmers.IChannels); + setResistances(context, model: Warmers.IResistances); +} + +export interface WarmersGetters{ + getChannels: () => Warmers.IChannels; + getResistances: () => Warmers.IResistances; +} + +export const warmersStore = { + + state:{ + channels:{}, + resistances:{}, + } as WarmersStoreModel, + + getters: { + getChannels: (state) => (): Warmers.IChannels => (state as WarmersStoreModel).channels, + getResistances: (state) => (): Warmers.IResistances => (state as WarmersStoreModel).resistances, + }, + + mutations: { + + SetChannels(state, model: Warmers.IChannels){ + state.channels = model; + }, + + SetResistances(state, model: Warmers.IResistances){ + state.resistances = model; + }, + + }, + + actions: { + + setChannels(context, model: Warmers.IChannels){ + context.commit("SetChannels", model); + }, + + setResistances(context, model: Warmers.IResistances){ + context.commit("SetResistances", model); + }, + + } as WarmersActions + +} + +export const warmersActions = warmersStore.actions as WarmersActions; \ No newline at end of file From 2a51a1535d64b096474787d4cf9c9917c04b8e99 Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 10:09:55 +0200 Subject: [PATCH 36/84] add put functions to the service --- .../wwwroot/src/services/warmersService.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts index 0e153728..65dbf79a 100644 --- a/Thermo.Active/wwwroot/src/services/warmersService.ts +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -19,7 +19,25 @@ export class WarmersService extends baseRestService { return result; } - + async Update(model:any){ + let result = await this.Put((await this.BASE_URL()) + "update", model, true); + return result; + } + + async Confirm(){ + let result = await this.Put((await this.BASE_URL()) + "confirm", true); + return result; + } + + async Cancel(){ + let result = await this.Put((await this.BASE_URL()) + "cancel", true); + return result; + } + + async SetConfig(){ + let result = await this.Put((await this.BASE_URL()) + "setConfig", true); + return result; + } } export const warmersService = new WarmersService(); \ No newline at end of file From 01ac4b071e18d6c36b3628a88fcae7de1338ed06 Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 10:48:03 +0200 Subject: [PATCH 37/84] fix get on the service --- Thermo.Active/wwwroot/src/services/warmersService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts index 65dbf79a..d5144e95 100644 --- a/Thermo.Active/wwwroot/src/services/warmersService.ts +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -9,13 +9,13 @@ export class WarmersService extends baseRestService { async GetChannels(){ let result = await this.Get((await this.BASE_URL()) + "channels"); - warmersActions.setChannels(store, result); + warmersActions.setChannels(store, result as Warmers.IChannels); return result; } async GetResistances(){ let result = await this.Get((await this.BASE_URL()) + "resistances"); - warmersActions.setResistances(store, result); + warmersActions.setResistances(store, result as Warmers.IResistances); return result; } From e5961d76854994666bf9561a3a2eb8a72491f65d Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 10:54:21 +0200 Subject: [PATCH 38/84] keyboard postion on focus --- .../assets/styles/base/tastierino.less | 4 + Thermo.Active/wwwroot/assets/styles/style.css | 8 +- Thermo.Active/wwwroot/src/App.vue | 93 ++++++++++++------- .../components/KeyboardHelper.ts | 25 +++++ .../app_modules_thermo/components/index.ts | 7 +- .../app_modules_thermo/components/keyboard.ts | 63 +++++++++++++ .../{tastierino.vue => keyboard.vue} | 6 +- .../app_modules_thermo/components/numeric.ts | 26 ++++++ .../app_modules_thermo/components/numeric.vue | 2 +- .../components/tastierino.ts | 44 --------- 10 files changed, 191 insertions(+), 87 deletions(-) create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts rename Thermo.Active/wwwroot/src/app_modules_thermo/components/{tastierino.vue => keyboard.vue} (85%) delete mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.ts diff --git a/Thermo.Active/wwwroot/assets/styles/base/tastierino.less b/Thermo.Active/wwwroot/assets/styles/base/tastierino.less index 236b2d09..22a2aef9 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/tastierino.less +++ b/Thermo.Active/wwwroot/assets/styles/base/tastierino.less @@ -9,6 +9,10 @@ background-color: @color-silver; display: flex; justify-content: center; + position: fixed; + top: 0; + left: 0; + z-index: 9000; .mask { display: grid; diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index de274567..38c73f75 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -2,9 +2,9 @@ @import url(../../libs/glyphicons/styles/glyphicons.css); @import "iziToast.min.css"; .setup { - /* padding-top: 50px; */ + padding-top: 50px; display: flex; - justify-content: center; + justify-content: flex-start; align-items: center; flex-flow: column nowrap; width: 100vw; @@ -4773,6 +4773,10 @@ background-color: #bbbcbc; display: flex; justify-content: center; + position: fixed; + top: 0; + left: 0; + z-index: 9000; } .keyboard .mask { display: grid; diff --git a/Thermo.Active/wwwroot/src/App.vue b/Thermo.Active/wwwroot/src/App.vue index 80244b8d..b351df02 100644 --- a/Thermo.Active/wwwroot/src/App.vue +++ b/Thermo.Active/wwwroot/src/App.vue @@ -1,42 +1,67 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts new file mode 100644 index 00000000..07dfb50a --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/KeyboardHelper.ts @@ -0,0 +1,25 @@ +export class KeyboardHelper { + + static currentKeyboard: any = null; + static setCurrentKeyboard(element) { + KeyboardHelper.currentKeyboard = element; + } + + static showKeyboard(x, y, value: Recipe.IValue) { + + if (KeyboardHelper.currentKeyboard) { + KeyboardHelper.currentKeyboard.resetTo(value); + KeyboardHelper.currentKeyboard.positionX = x; + debugger + KeyboardHelper.currentKeyboard.positionY = y; + KeyboardHelper.currentKeyboard.visible = true; + } + } + + static hideKeyboard() { + if (KeyboardHelper.currentKeyboard) { + KeyboardHelper.currentKeyboard.visible = false; + KeyboardHelper.currentKeyboard.resetTo(null); + } + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts index f2385f8f..6e9dffd6 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/index.ts @@ -1,9 +1,10 @@ import numeric from "./numeric.vue"; -import keyboard from "./tastierino.vue"; import slider from "./slider.vue"; +import Vue from "vue"; +import keyboard from "./keyboard.vue"; export default { numeric, - keyboard, - slider + slider, + keyboard } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts new file mode 100644 index 00000000..8f375810 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.ts @@ -0,0 +1,63 @@ +import Vue from 'vue'; +import { Prop } from 'vue-property-decorator'; +import Component from 'vue-class-component'; +import { KeyboardHelper } from './KeyboardHelper'; + +@Component({}) +export default class Keyboard extends Vue { + + positionX: number = 0; + positionY: number = 0; + + visible: boolean = false; + + actualValue: Recipe.IValue; + + point: string; + + @Prop() + value: string; + + del() { + this.actualValue.valueAct = 0; + } + + canc() { + let temp = String(this.actualValue.valueAct); + this.actualValue.valueAct = Number(temp.slice(0, -1)) + } + + add(num: string) { + if (this.point) { + this.point += num; + this.actualValue.valueAct = Number(this.point) + } else { + let temp = String(this.actualValue.valueAct); + temp += num; + this.actualValue.valueAct = Number(temp) + } + } + + addpoint() { + if (!this.point) { + this.point = String(this.actualValue.valueAct); + this.point += "."; + } + } + + resetTo(value) { + this.actualValue = null; + this.point = null; + + this.actualValue = value; + } + + hide() { + KeyboardHelper.hideKeyboard(); + } + + mounted() { + KeyboardHelper.setCurrentKeyboard(this); + } +} + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue similarity index 85% rename from Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue rename to Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue index b7813184..c0f23a0b 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/keyboard.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts index 523fcd3a..71198c9a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.ts @@ -1,6 +1,7 @@ import Vue from "vue"; import Component from "vue-class-component"; import { Prop } from "vue-property-decorator"; +import { KeyboardHelper } from "./KeyboardHelper"; @Component({}) export default class Numeric extends Vue { @@ -20,4 +21,29 @@ export default class Numeric extends Vue { @Prop() unitOfMeasure: string; + @Prop({ default: 'right' }) + keyboardPosition: string; + + onFocus() { + let rect = this.$el.getBoundingClientRect(); + + const keyboardsize = 262; + let x = rect.x + rect.width / 2 - keyboardsize / 2; + let y = rect.y + rect.height / 2 - keyboardsize / 2; + + + switch (this.keyboardPosition) { + case "top": y = y - rect.height - keyboardsize / 2; break; + case "bottom": y = y + rect.height + keyboardsize / 2; break; + case "left": x = x - rect.width - keyboardsize / 2; break; + case "right": x = x + rect.width + keyboardsize / 2; break; + } + + KeyboardHelper.showKeyboard(x, y, this.value); + } + + onBlur() { + // KeyboardHelper.hideKeyboard(); + } + } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue index 66d09cfa..4ded4fce 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/numeric.vue @@ -1,6 +1,6 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.ts deleted file mode 100644 index f6c8e70b..00000000 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/tastierino.ts +++ /dev/null @@ -1,44 +0,0 @@ -import Vue from 'vue'; -import { Prop } from 'vue-property-decorator'; -import Component from 'vue-class-component'; - -@Component({ name: "tastierino" }) -export default class Tastierino extends Vue { - - @Prop() - actualValue: Recipe.IValue; - - temp: string; - point: string; - - @Prop() - value: string; - - del() { - this.actualValue.valueAct = 0; - } - - canc() { - this.temp = String(this.actualValue.valueAct); - this.actualValue.valueAct = Number(this.temp.slice(0, -1)) - } - - add(num: string) { - if (this.point) { - this.point += num; - this.actualValue.valueAct = Number(this.point) - } else { - this.temp = String(this.actualValue.valueAct); - this.temp += num; - this.actualValue.valueAct = Number(this.temp) - } - } - - addpoint() { - if (!this.point) { - this.point = String(this.actualValue.valueAct); - this.point += "."; - } - } - -} \ No newline at end of file From f28cbfe2ec6d018a9078065aa27dad9186efa380 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 11:10:15 +0200 Subject: [PATCH 39/84] fix board config: 16 channels --- Thermo.Active.Config/ServerConfigController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Thermo.Active.Config/ServerConfigController.cs b/Thermo.Active.Config/ServerConfigController.cs index 81d6bd39..f3172c2b 100644 --- a/Thermo.Active.Config/ServerConfigController.cs +++ b/Thermo.Active.Config/ServerConfigController.cs @@ -694,8 +694,8 @@ namespace Thermo.Active.Config // ciclo sulle resistenze foreach (var resistenza in riflettore.Resistenze) { - // cerco la scheda dato il canale... - currIdBoard = (resistenza.Canale - 1) / 8; + // cerco la scheda dato il canale... 16 ch x ogni scheda + currIdBoard = (resistenza.Canale - 1) / 16; // cerco se ho già la scheda var boardFound = RiskBoardConfig.Find(item => item.IdBoard == currIdBoard); if (boardFound == null) From 3a17e13224cf2dd6d48deed58dc9713bbb02c10d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 11:10:39 +0200 Subject: [PATCH 40/84] fix div0 for VUMin and warmers config setup tested --- Thermo.Active.NC/NcAdapter.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index d9ed323a..dbd08eca 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1984,11 +1984,7 @@ namespace Thermo.Active.NC // scrivo l'abilitazione dei canali... foreach (var item in RiskBoardConfig) { - // FIXME TODO hard limit a 64... da chiarire - if (item.IdBoard < 64) - { - newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); - } + newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); } cmsError = numericalControl.PLC_WWarmerConfBoardEnabl(newData); if (cmsError.IsError()) @@ -2005,10 +2001,15 @@ namespace Thermo.Active.NC return cmsError; // recupero parametro VUMin... - ushort VUMin = 1; + ushort VUMin = 1; cmsError = numericalControl.PLC_RWarmerConfVUMin(ref VUMin); if (cmsError.IsError()) return cmsError; + // check div0! + if (VUMin == 0) + { + VUMin = 1; + } // processo corrente minima! var newFloatTData = new Dictionary(); From 4f947f0b65f8298fead8e070ce69b3ed6320859f Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 11:17:49 +0200 Subject: [PATCH 41/84] fix slider --- .../app_modules_thermo/components/slider.ts | 46 ++++++----------- .../app_modules_thermo/components/slider.vue | 6 +-- .../formato/components/show-formato-info.vue | 50 ++++--------------- .../setup/formato/components/stampo.ts | 10 +--- .../setup/formato/components/stampo.vue | 20 ++++---- 5 files changed, 38 insertions(+), 94 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts index b8c60332..a2bcdbd0 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -5,17 +5,10 @@ import { Prop } from 'vue-property-decorator'; @Component({ name: "slider" }) export default class Slider extends Vue { - @Prop({ default: "" }) - unitOfMeasure: string; @Prop() - value: number; + value: Recipe.IValue; - @Prop() - min: number; - - @Prop() - max: number; @Prop({ default: 9 }) lines: number; @@ -23,52 +16,41 @@ export default class Slider extends Vue { @Prop({ default: 1 }) decimal: number; - get minLabel() { - return `${this.min} ${this.unitOfMeasure}`; - } - - get averageLabel() { - return `${(this.max - this.min) / 2} ${this.unitOfMeasure}`; - } - - get maxLabel() { - return `${this.max} ${this.unitOfMeasure}`; - } get actualvalue() { - return this.value; + return this.value.valueAct; } set actualvalue(v: number) { - this.$emit('input', v); + this.value.valueAct = v; } get step() { - var s = ((this.max - this.min) / (this.lines + 1)); + var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1)); var m = Math.pow(10, this.decimal); return Math.round(s * m) / m }; increment() { - var v = this.value; - if (v < this.max) { + var v = this.value.valueAct; + if (v < this.value.range.max) { v -= (-this.step); } - if (v > this.max) { - v = this.max; + if (v > this.value.range.max) { + v = this.value.range.max; } - this.$emit('input', v); + this.actualvalue = v; }; decrement() { - var v = this.value; - if (v > this.min) { + var v = this.value.valueAct; + if (v > this.value.range.min) { v -= this.step; } - if (v < this.min) { - v = this.min; + if (v < this.value.range.min) { + v = this.value.range.min; } - this.$emit('input', v); + this.actualvalue = v; }; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue index 8f487e51..51d2a7a4 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue @@ -9,9 +9,9 @@
- {{minLabel}} - {{averageLabel}} - {{maxLabel}} + {{`${this.value.range.min} ${this.value.unitMeasure}`}} + {{`${(this.value.range.max - this.value.range.min) / 2} ${this.value.unitMeasure}`}} + {{`${this.value.range.max} ${this.value.unitMeasure}`}}
- - + +
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts index b038d57a..1205c86f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.ts @@ -6,10 +6,7 @@ import Slider from "@/app_modules_thermo/components/slider.vue" @Component({ name: "lastra" }) export default class Lastra extends Vue { - @Prop({}) - x: Recipe.IValue; - @Prop({}) - y: Recipe.IValue; - @Prop({}) - spes: Recipe.IValue; + + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue index c5220565..043e410b 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/lastra.vue @@ -1,48 +1,31 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts index cdcc994f..f8eb1bf5 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.ts @@ -3,16 +3,8 @@ import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; import Slider from "@/app_modules_thermo/components/slider.vue" -@Component({name:"piastra", components:{slider:Slider}}) +@Component({ name: "piastra", components: { slider: Slider } }) export default class Piastra extends Vue { - - @Prop({}) - x:Recipe.IValue; - @Prop({}) - y:Recipe.IValue; - @Prop({default:true}) - notsel:boolean; - - - + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue index b8ae1772..e8626b02 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue @@ -1,38 +1,28 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputTermo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputTermo.vue index f3b08936..cf1b8f9b 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputTermo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputTermo.vue @@ -6,13 +6,10 @@
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/setupSottosquadra.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/setupSottosquadra.ts index 71feb09a..2ceaa401 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/setupSottosquadra.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/setupSottosquadra.ts @@ -16,8 +16,7 @@ export default class setupSottosquadra extends Vue { @Prop() ritardoAtt: Recipe.IValue; @Prop() - ritardoDisatt: Recipe.IValue; - + ritardoDisatt: Recipe.IValue; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts index b6c3eba0..6d46dd26 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/SVG_Components/SVG-termo-superiore.ts @@ -6,15 +6,23 @@ import { Prop } from 'vue-property-decorator'; export default class SVGTermoregolazioneSuperiore extends Vue { - @Prop({}) - max: Recipe.IValue; - @Prop({}) - min: Recipe.IValue; - @Prop({}) - inizio: Recipe.IValue; - @Prop({}) - fine: Recipe.IValue; - @Prop({}) - perc_riposo: Recipe.IValue; + // @Prop({}) + // max: Recipe.IValue; + // @Prop({}) + // min: Recipe.IValue; + // @Prop({}) + // inizio: Recipe.IValue; + // @Prop({}) + // fine: Recipe.IValue; + // @Prop({}) + // perc_riposo: Recipe.IValue; + // :max="recipe.pyrometer_upperthermoregulator_max_percentage" + // :min="recipe.pyrometer_upperthermoregulator_min_percentage" + // :perc_riposo="recipe.pyrometer_upperthermoregulator_sleep_percentage" + // :inizio="recipe.pyrometer_upperthermoregulator_start_adjustment" + // :fine="recipe.pyrometer_upperthermoregulator_end_adjustment" + + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue index ad572013..b9f9acca 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue @@ -74,13 +74,7 @@
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts index 6df39382..6d6ecf1e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts @@ -4,15 +4,17 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - + // @Prop({}) + // corsa: Recipe.IValue; + // @Prop({}) + // vel_salita: Recipe.IValue; + // @Prop({}) + // vel_salita_lenta: number; + // @Prop({}) + // rall_salita: number; + // :corsa="recipe.positions_frame_upper_position" + // :vel_salita="recipe.positions_frame_upper_speed" @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: number; - @Prop({}) - rall_salita: number; - + recipe:Recipe.IRecipe } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts index 69414fde..acdb1c7c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts @@ -4,16 +4,20 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - - + // @Prop({}) + // corsa: Recipe.IValue; + // @Prop({}) + // vel_salita: Recipe.IValue; + // @Prop({}) + // vel_salita_lenta: Recipe.IValue; + // @Prop({}) + // rall_salita: Recipe.IValue; + // :corsa="recipe.positions_mould_upper_position" + // :vel_salita="recipe.positions_mould_upper_speed" + // :rall_salita="recipe.positions_mould_upperdeceleration_position" + // :vel_salita_lenta="recipe.positions_mould_upperdeceleration_speed" @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: Recipe.IValue; - @Prop({}) - rall_salita: Recipe.IValue; + recipe:Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts index 62dfff11..35095993 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts @@ -4,16 +4,18 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class Controstamposvg extends Vue { - - + // @Prop({}) + // corsa: Recipe.IValue; + // @Prop({}) + // vel_discesa: Recipe.IValue; + // @Prop({}) + // vel_discesa_lenta: number; + // @Prop({}) + // rall_discesa: number; + // :corsa="recipe.positions_upperplate_lower_position" + // :vel_discesa="recipe.positions_upperplate_lower_speed" @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_discesa: Recipe.IValue; - @Prop({}) - vel_discesa_lenta: number; - @Prop({}) - rall_discesa: number; + recipe:Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue index 36cd6057..671c2177 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue @@ -59,10 +59,7 @@
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue index 5558bb20..daac299d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue @@ -59,10 +59,7 @@
- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue index 03013480..a4bd1c69 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue @@ -71,12 +71,7 @@
- + From 61a5c504769379d3d3281173532c823d809530e2 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 12:29:30 +0200 Subject: [PATCH 44/84] formato & quote. --- .../app_modules_thermo/components/slider.vue | 7 +- .../formato/components/piastra_riduzione.vue | 4 +- .../setup/formato/components/stampo.vue | 8 +- .../SVG_Components/quote-velocita.ts | 11 +-- .../components/SVG_Components/stampo.ts | 11 +-- .../SVG_Components/svgcontrostampo.ts | 11 +-- .../quote-velocita/components/controstampo.ts | 17 ---- .../components/controstampo.vue | 29 +++--- .../components/discesa-cornice.ts | 11 --- .../components/discesa-cornice.vue | 29 +++--- .../components/salita-stampo.ts | 2 - .../components/salita-stampo.vue | 90 ++++++++----------- 12 files changed, 81 insertions(+), 149 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue index 51d2a7a4..48eae723 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue @@ -4,7 +4,12 @@
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue index e8626b02..35b82a4d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/piastra_riduzione.vue @@ -16,14 +16,14 @@
- +
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue index 4ef8f777..a3890af6 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue @@ -9,20 +9,24 @@
+
- + s
+ +
- + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts index 6df39382..81ad7b7c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts @@ -5,14 +5,7 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: number; - @Prop({}) - rall_salita: number; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts index 69414fde..c7a88272 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts @@ -6,14 +6,7 @@ import { Prop } from 'vue-property-decorator'; export default class QuoteVelocita extends Vue { - - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_salita: Recipe.IValue; - @Prop({}) - vel_salita_lenta: Recipe.IValue; - @Prop({}) - rall_salita: Recipe.IValue; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts index 62dfff11..cdd2358a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts @@ -6,14 +6,7 @@ import { Prop } from 'vue-property-decorator'; export default class Controstamposvg extends Vue { - - @Prop({}) - corsa: Recipe.IValue; - @Prop({}) - vel_discesa: Recipe.IValue; - @Prop({}) - vel_discesa_lenta: number; - @Prop({}) - rall_discesa: number; + @Prop() + recipe: Recipe.IRecipe; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts index 0072d813..cf558dc8 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.ts @@ -15,23 +15,6 @@ import Tastierino from "@/app_modules_thermo/components/tastierino.vue"; }) export default class Controstampo extends Vue { - - @Prop() recipe: Recipe.IRecipe; - - @Prop({}) - ritardo: number; - - mockR: number = this.ritardo; - - @Prop({}) - rallentamento_discesa: number; - - mockRD: number = this.rallentamento_discesa; - - @Prop({}) - velocità_discesa_lenta: number; - - mockVDL: number = this.velocità_discesa_lenta; } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue index 36cd6057..93fb1f33 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue @@ -9,35 +9,31 @@
- +
- +
- +
- +

@@ -45,24 +41,21 @@
- +
- +
- +
- +

- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts index 71f9a761..42b4db9a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.ts @@ -12,15 +12,4 @@ export default class DiscesaCornice extends Vue { @Prop() recipe: Recipe.IRecipe; - @Prop({}) - ritardo: number; - @Prop({}) - ralSalita: number; - @Prop({}) - velSalitaLenta: number; - - mock_ritardo: number = this.ritardo; - mock_ral_salita: number = this.ralSalita; - mock_vel_salita_lenta: number = this.velSalitaLenta; - } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue index 5558bb20..0a31eac3 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue @@ -9,35 +9,31 @@
- +
- +
- +
- +

@@ -45,24 +41,21 @@
- +
- +
- +
- +

- + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts index 4ee37fe0..9b708084 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.ts @@ -8,8 +8,6 @@ import Tastierino from "@/app_modules_thermo/components/tastierino.vue"; @Component({ name: "salita-stampo", components: { stampoSVG: StampoSVG } }) export default class DiscesaCornice extends Vue { - @Prop({}) - ritardo: number; @Prop() recipe: Recipe.IRecipe; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue index 03013480..21e7a5cc 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue @@ -3,80 +3,68 @@
- + From 782caef28a74270bc1a40a27222c5d503120a8cb Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 12:42:39 +0200 Subject: [PATCH 45/84] quote --- .../components/controstampo.vue | 69 ++++++++++--------- .../components/discesa-cornice.vue | 61 ++++++++-------- .../components/salita-stampo.vue | 1 + .../components/show-quote-velocita-info.ts | 2 +- 4 files changed, 71 insertions(+), 62 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue index 93fb1f33..8a550e52 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/controstampo.vue @@ -3,53 +3,58 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue index 0a31eac3..8397c2ad 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/discesa-cornice.vue @@ -3,53 +3,56 @@ diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue index 21e7a5cc..9fee70f2 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/salita-stampo.vue @@ -11,6 +11,7 @@
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts index 1af1a07f..816a022d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts @@ -23,7 +23,7 @@ import { Deferred } from "@/services"; export default class ShowQuoteVelocitaInfo extends Vue { recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); - show: string = "QC"; + show: string = "QS"; @Prop() deferred: Deferred; From 73be1bb58bb3ae59d3f166ff9a6b8c6d352f69e9 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 12:44:33 +0200 Subject: [PATCH 46/84] =?UTF-8?q?rimozione=20commenti=20di=20property=20no?= =?UTF-8?q?n=20pi=C3=B9=20usate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SVG_Components/quote-velocita.ts | 11 +---------- .../components/SVG_Components/stampo.ts | 13 ------------- .../components/SVG_Components/svgcontrostampo.ts | 11 ----------- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts index a86f343e..c7a88272 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/quote-velocita.ts @@ -4,16 +4,7 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - // @Prop({}) - // corsa: Recipe.IValue; - // @Prop({}) - // vel_salita: Recipe.IValue; - // @Prop({}) - // vel_salita_lenta: number; - // @Prop({}) - // rall_salita: number; - // :corsa="recipe.positions_frame_upper_position" - // :vel_salita="recipe.positions_frame_upper_speed" + @Prop() recipe: Recipe.IRecipe; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts index 5a6e9c84..81ad7b7c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/stampo.ts @@ -4,19 +4,6 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class QuoteVelocita extends Vue { - // @Prop({}) - // corsa: Recipe.IValue; - // @Prop({}) - // vel_salita: Recipe.IValue; - // @Prop({}) - // vel_salita_lenta: Recipe.IValue; - // @Prop({}) - // rall_salita: Recipe.IValue; - // :corsa="recipe.positions_mould_upper_position" - // :vel_salita="recipe.positions_mould_upper_speed" - // :rall_salita="recipe.positions_mould_upperdeceleration_position" - // :vel_salita_lenta="recipe.positions_mould_upperdeceleration_speed" - @Prop() recipe: Recipe.IRecipe; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts index d673de3c..14ed376f 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/SVG_Components/svgcontrostampo.ts @@ -4,17 +4,6 @@ import { Prop } from 'vue-property-decorator'; @Component({}) export default class Controstamposvg extends Vue { - // @Prop({}) - // corsa: Recipe.IValue; - // @Prop({}) - // vel_discesa: Recipe.IValue; - // @Prop({}) - // vel_discesa_lenta: number; - // @Prop({}) - // rall_discesa: number; - // :corsa="recipe.positions_upperplate_lower_position" - // :vel_discesa="recipe.positions_upperplate_lower_speed" - @Prop() recipe: Recipe.IRecipe; From 1d77adc01cfd82a0bb16b5cae116b632d5c19fd2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 13:17:33 +0200 Subject: [PATCH 47/84] Fix recipe load / save with warmers --- .../Config/Recipes/template.json | 2 +- Thermo.Active.Config/LiveData.cs | 2 +- Thermo.Active.NC/NcAdapter.cs | 2 -- .../Controllers/WebApi/RecipeController.cs | 33 +++++++------------ 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/Thermo.Active.Config/Config/Recipes/template.json b/Thermo.Active.Config/Config/Recipes/template.json index 2a884d8a..cb38ff29 100644 --- a/Thermo.Active.Config/Config/Recipes/template.json +++ b/Thermo.Active.Config/Config/Recipes/template.json @@ -311,7 +311,7 @@ "ChannelSetpoints": { "7": 7, "44": 44, - "81": 84.0, + "81": 84, "118": 51, "155": 52, "192": 53, diff --git a/Thermo.Active.Config/LiveData.cs b/Thermo.Active.Config/LiveData.cs index e729d7d3..e129a251 100644 --- a/Thermo.Active.Config/LiveData.cs +++ b/Thermo.Active.Config/LiveData.cs @@ -22,7 +22,7 @@ namespace Thermo.Active.Config /// /// Dictionary of all channels and relative setpoints /// - public Dictionary ChannelSetpoints; + public Dictionary ChannelSetpoints; } } diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index dbd08eca..daae2a8f 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1755,8 +1755,6 @@ namespace Thermo.Active.NC currRecipe = new Dictionary(); DTORecipeParam currParam = new DTORecipeParam(); - RPRange currRange = new RPRange(); - RPStatus currStatus = new RPStatus(); // gestione errore cmsError = ReadRecipeData(false, true, out currRecipe); diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 689b7b9f..46497dee 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -321,7 +321,7 @@ namespace Thermo.Active.Controllers.WebApi RecipeLiveData.RecipeParameters = currParams; // carico i dati dei riscaldi... - var currChSet = new Dictionary(); + var currChSet = new Dictionary(); foreach (var item in currWarmers) { currChSet.Add(item.Key, item.Value.SetpointRecipe); @@ -388,32 +388,21 @@ namespace Thermo.Active.Controllers.WebApi // write to PLC checkError = ncAdapter.WriteRecipeParams(updtRecipe); - // FIXME TODO warmers to be completed!!! -#if false - // reading warmers data... - cmsError = ncAdapter.ReadWarmers(out Dictionary prevWarmers); - if (cmsError.IsError()) - return BadRequest(cmsError.localizationKey); - // save warmers to PLC + // process ch load setup... + Dictionary newRisk = new Dictionary(); foreach (var item in RecipeLiveData.ChannelSetpoints) { - //if (prevRecipe.ContainsKey(item.Key)) - //{ - // // aggiorno il valore HMI nel parametro - // var currParam = prevRecipe[item.Key]; - // currParam.SetpointHMI = item.Value; - // // salvo (1 parametro, potrei fare N...) - // updtRecipe.Add(item.Key, currParam); - //} - //else - //{ - // return NotFound(); - //} + newRisk.Add(item.Key, item.Value); } + // write to PLC - ncAdapter.WriteRecipeWarmers(updtRecipe); -#endif + checkError = ncAdapter.WriteRecipeWarmChSetpHMI(newRisk); + + // enable recipe! scrivo sul PLC il comando conferma! + CmsError cmsError = ncAdapter.ConfirmRecipeData(true); + if (cmsError.IsError()) + return checkError; } return checkError; } From a03571793e43bc62a70b9a367aed209b2f55fb06 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 13:18:08 +0200 Subject: [PATCH 48/84] Added partial methods for warmers sale post edit --- Thermo.Active.NC/NcAdapter.cs | 2 + .../Controllers/WebApi/WarmersController.cs | 42 ++++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index daae2a8f..3c878db0 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1895,6 +1895,8 @@ namespace Thermo.Active.NC currWarmers = new Dictionary(); DTOWarmers currVal = new DTOWarmers(); + // FIXME TODO !!! + // read and return config if (NcConfig.NcVendor == NC_VENDOR.S7NET) { diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index ce1f9c17..e4026046 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -13,6 +13,7 @@ using static CMS_CORE_Library.Models.DataStructures; using static Thermo.Active.Config.ServerConfig; using static Thermo.Active.Model.Constants; using Thermo.Active.Model.DTOModels.Recipe; +using Thermo.Active.Config; namespace Thermo.Active.Controllers.WebApi { @@ -101,21 +102,19 @@ namespace Thermo.Active.Controllers.WebApi if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); -#if false // recupero i dati LIVE dei parametri HMI della ricetta... - cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - // rileggo warmers - var currParams = new Dictionary(); - foreach (var item in currRecipe) + // rileggo la ricetta + var currParams = new Dictionary(); + foreach (var item in currWarmers) { - currParams.Add(item.Key, item.Value.SetpointHMI); + currParams.Add(item.Key, item.Value.SetpointRecipe); } - saveCurrentRecipeParams(currParams); -#endif + saveCurrentRecipeWarmers(currParams); // ritorno solo fatto! return Ok(); @@ -141,21 +140,19 @@ namespace Thermo.Active.Controllers.WebApi if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); -#if false // recupero i dati LIVE dei parametri HMI della ricetta... - cmsError = ncAdapter.ReadFullRecipe(out Dictionary currRecipe); + cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - var currParams = new Dictionary(); - foreach (var item in currRecipe) + // rileggo la ricetta + var currParams = new Dictionary(); + foreach (var item in currWarmers) { - currParams.Add(item.Key, item.Value.SetpointPLC); + currParams.Add(item.Key, item.Value.SetpointRecipe); } - // ora salvo ANCHE i dati live... - saveCurrentRecipeParams(currParams); -#endif + saveCurrentRecipeWarmers(currParams); // ritorno solo fatto! return Ok(); @@ -181,5 +178,18 @@ namespace Thermo.Active.Controllers.WebApi return Ok(); } } + + + /// + /// Do actual recipe warmers setpoints FileSave + /// + /// + private static void saveCurrentRecipeWarmers(Dictionary chSetpoints) + { + // ora salvo ANCHE i dati live... + RecipeLiveData.ChannelSetpoints = chSetpoints; + // e salvo su disco + ServerConfigController.SaveRecipeCurrent(); + } } } \ No newline at end of file From 8dd26f73d1284c7ee71333177665f23c23d49e1e Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 14:00:00 +0200 Subject: [PATCH 49/84] fix numerics, sliders and labels --- .../app_modules_thermo/components/scheda.vue | 10 ++-- .../base-components/inputSottosquadra.vue | 6 +-- .../components/base-components/inputTermo.vue | 4 +- .../components/base-components/pirometro.vue | 20 +++----- .../base-components/termo-superiore.vue | 47 +++++++------------ .../base-components/ventilatori.vue | 18 +++---- .../base-components/riscaldi-superiori.vue | 19 ++++---- .../sostentamento-decompressione.vue | 20 +++----- .../base-components/vuoto-principale.vue | 27 ++++------- 9 files changed, 64 insertions(+), 107 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue index 7c6e02ae..134edef9 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/scheda.vue @@ -3,14 +3,14 @@
- +
- +
- - + +
- +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue index a592af6c..c8217275 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/components/base-components/inputSottosquadra.vue @@ -8,21 +8,21 @@
- +
- +
- +
- +
- +
- +
- +
- +
- - + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue index b9f9acca..0402e832 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/base-components/termo-superiore.vue @@ -2,74 +2,59 @@

diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue index 6dfa77f4..f3d8b9af 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/base-components/ventilatori.vue @@ -9,24 +9,18 @@
- - + +
- - + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue index 38f61409..7ef0a340 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue @@ -2,26 +2,25 @@

@@ -52,14 +46,11 @@
- - + +
From 82e400b08d768135315c2daac717b28ada79e344 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 14:31:03 +0200 Subject: [PATCH 50/84] COmpleted warmers read/save data --- .../DTOModels/Recipe/DTOWarmers.cs | 4 +- Thermo.Active.NC/NcAdapter.cs | 41 +++++++++++-------- .../Controllers/WebApi/RecipeController.cs | 2 +- .../Controllers/WebApi/WarmersController.cs | 8 ++-- Thermo.Active/Properties/AssemblyInfo.cs | 2 +- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs index bab4dd6c..3207553f 100644 --- a/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs +++ b/Thermo.Active.Model/DTOModels/Recipe/DTOWarmers.cs @@ -10,7 +10,7 @@ namespace Thermo.Active.Model.DTOModels.Recipe { public int IdChannel { get; set; } = 0; public int IdReflector { get; set; } = 0; - public int SetpointRecipe { get; set; } = 0; + public int SetpointHMI { get; set; } = 0; public int SetpointTermocam { get; set; } = 0; public int SetpointPLC { get; set; } = 0; public int ChannelStatus { get; set; } = 0; @@ -28,7 +28,7 @@ namespace Thermo.Active.Model.DTOModels.Recipe return false; if (IdReflector != item.IdReflector) return false; - if (SetpointRecipe != item.SetpointRecipe) + if (SetpointHMI != item.SetpointHMI) return false; if (SetpointTermocam != item.SetpointTermocam) return false; diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 3c878db0..529de3b2 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -901,6 +901,7 @@ namespace Thermo.Active.NC return cmsError; } +#if false // !!!FARE!!! è copia delle heads public CmsError GetRecipeData(out List heads) { @@ -973,6 +974,7 @@ namespace Thermo.Active.NC return cmsError; } +#endif public CmsError GetM155Data(out List data) { data = new List(); @@ -1265,7 +1267,7 @@ namespace Thermo.Active.NC { IdChannel = x.IdChannel, IdReflector = x.IdReflector, - SetpointRecipe = x.SetpointRecipe, + SetpointHMI = x.SetpointRecipe, SetpointTermocam = 0, // FIXME TODO x.SetpointTer, SetpointPLC = currPlcWarmers[x.IdChannel].SetpointPLC, ChannelStatus = currPlcWarmers[x.IdChannel].ChStatus, @@ -1895,26 +1897,33 @@ namespace Thermo.Active.NC currWarmers = new Dictionary(); DTOWarmers currVal = new DTOWarmers(); - // FIXME TODO !!! - - // read and return config + // read and return warmers data if (NcConfig.NcVendor == NC_VENDOR.S7NET) { + Dictionary currPlcWarmChan = new Dictionary(); + cmsError = numericalControl.PLC_RWarmerChannelList(ref currPlcWarmChan); + foreach (var item in RiskChannelConfig) { - currVal = new DTOWarmers() + try { - IdChannel = item.IdChannel, - IdReflector = item.IdReflector, - SetpointRecipe = 80, // leggere da NUOVA area PLC? - SetpointTermocam = 0, // per ora a zero - SetpointPLC = 0, // leggere da PLC! - ChannelStatus = 0, // leggere da PLC - ActualCurrent = 0, // leggere da PLC - ActualPerc = 0, // leggere da PLC - MaxPower = item.MaxPower - }; - currWarmers.Add(item.IdChannel, currVal); + ThermoModels.WarmerChannel currWarm = currPlcWarmChan[item.IdChannel]; + currVal = new DTOWarmers() + { + IdChannel = item.IdChannel, + IdReflector = item.IdReflector, + SetpointHMI = currWarm.SetpointHMI, + SetpointTermocam = currWarm.SetpointThermoCam, + SetpointPLC = currWarm.SetpointPLC, + ChannelStatus = currWarm.ChStatus, + ActualCurrent = currWarm.CurrAct, + ActualPerc = currWarm.PercAct, + MaxPower = item.MaxPower + }; + currWarmers.Add(item.IdChannel, currVal); + } + catch + { } } } diff --git a/Thermo.Active/Controllers/WebApi/RecipeController.cs b/Thermo.Active/Controllers/WebApi/RecipeController.cs index 46497dee..bed83865 100644 --- a/Thermo.Active/Controllers/WebApi/RecipeController.cs +++ b/Thermo.Active/Controllers/WebApi/RecipeController.cs @@ -324,7 +324,7 @@ namespace Thermo.Active.Controllers.WebApi var currChSet = new Dictionary(); foreach (var item in currWarmers) { - currChSet.Add(item.Key, item.Value.SetpointRecipe); + currChSet.Add(item.Key, item.Value.SetpointHMI); } RecipeLiveData.ChannelSetpoints = currChSet; diff --git a/Thermo.Active/Controllers/WebApi/WarmersController.cs b/Thermo.Active/Controllers/WebApi/WarmersController.cs index e4026046..4e989bfc 100644 --- a/Thermo.Active/Controllers/WebApi/WarmersController.cs +++ b/Thermo.Active/Controllers/WebApi/WarmersController.cs @@ -102,7 +102,7 @@ namespace Thermo.Active.Controllers.WebApi if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - // recupero i dati LIVE dei parametri HMI della ricetta... + // recupero i dati LIVE dei parametri HMI dei riscaldi... cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -111,7 +111,7 @@ namespace Thermo.Active.Controllers.WebApi var currParams = new Dictionary(); foreach (var item in currWarmers) { - currParams.Add(item.Key, item.Value.SetpointRecipe); + currParams.Add(item.Key, item.Value.SetpointHMI); } saveCurrentRecipeWarmers(currParams); @@ -140,7 +140,7 @@ namespace Thermo.Active.Controllers.WebApi if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); - // recupero i dati LIVE dei parametri HMI della ricetta... + // recupero i dati LIVE dei parametri HMI dei riscaldi... cmsError = ncAdapter.ReadWarmers(out Dictionary currWarmers); if (cmsError.IsError()) return BadRequest(cmsError.localizationKey); @@ -149,7 +149,7 @@ namespace Thermo.Active.Controllers.WebApi var currParams = new Dictionary(); foreach (var item in currWarmers) { - currParams.Add(item.Key, item.Value.SetpointRecipe); + currParams.Add(item.Key, item.Value.SetpointHMI); } saveCurrentRecipeWarmers(currParams); diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index ecdca942..9425cccd 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.6.0")] +[assembly: AssemblyVersion("0.6.2")] From ccf8cd265ed2e5923211cfa61ac342277ee7b9bf Mon Sep 17 00:00:00 2001 From: = Date: Thu, 11 Jun 2020 14:31:20 +0200 Subject: [PATCH 51/84] warmers --- .../wwwroot/src/@types/warmers-channel.d.ts | 26 +++---- .../src/@types/warmers-resistance.d.ts | 18 ++--- .../wwwroot/src/store/warmers.store.ts | 77 ++++++++++--------- 3 files changed, 61 insertions(+), 60 deletions(-) diff --git a/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts index 32dc9b5d..3f0384fe 100644 --- a/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts +++ b/Thermo.Active/wwwroot/src/@types/warmers-channel.d.ts @@ -1,19 +1,15 @@ declare module Warmers { - interface IChannel{ - idChannel: number, - idReflector: number, - setpointRecipe: number, - setpointTermocam: number, - setpointPLC: number, - channelStatus: number, - actualCurrent: number, - actualPerc: number, - maxPower: number - } - - interface IChannels{ - channels:IChannel[] - } + interface IChannel { + idChannel: number, + idReflector: number, + setpointRecipe: number, + setpointTermocam: number, + setpointPLC: number, + channelStatus: number, + actualCurrent: number, + actualPerc: number, + maxPower: number + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts index bebc7b23..92fd5656 100644 --- a/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts +++ b/Thermo.Active/wwwroot/src/@types/warmers-resistance.d.ts @@ -1,15 +1,13 @@ declare module Warmers { - interface IResistance{ - id: number, - idChannel: number, - column: number, - row: number, - dimension: number - } + interface IResistance { + id: number, + idChannel: number, + column: number, + row: number, + dimension: number + } + - interface IResistances{ - resistances:IResistance[] - } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/store/warmers.store.ts b/Thermo.Active/wwwroot/src/store/warmers.store.ts index 453c2b29..f464ec52 100644 --- a/Thermo.Active/wwwroot/src/store/warmers.store.ts +++ b/Thermo.Active/wwwroot/src/store/warmers.store.ts @@ -1,54 +1,61 @@ export interface WarmersStoreModel { - channels: Warmers.IChannels; - resistances: Warmers.IResistances; + channels: Warmers.IChannel[]; + resistances: Warmers.IResistance[]; } export interface WarmersActions { - setChannels(context, model: Warmers.IChannels); - setResistances(context, model: Warmers.IResistances); + setChannels(context, model: { [id: number]: Warmers.IChannel }); + setResistances(context, model: { [id: number]: Warmers.IResistance }); } -export interface WarmersGetters{ - getChannels: () => Warmers.IChannels; - getResistances: () => Warmers.IResistances; +export interface WarmersGetters { + getChannels: () => Warmers.IChannel[]; + getResistances: () => Warmers.IResistance[]; } export const warmersStore = { - - state:{ - channels:{}, - resistances:{}, - } as WarmersStoreModel, - getters: { - getChannels: (state) => (): Warmers.IChannels => (state as WarmersStoreModel).channels, - getResistances: (state) => (): Warmers.IResistances => (state as WarmersStoreModel).resistances, + state: { + channels: [], + resistances: [], + } as WarmersStoreModel, + + getters: { + getChannels: (state) => (): Warmers.IChannel[] => (state as WarmersStoreModel).channels, + getResistances: (state) => (): Warmers.IResistance[] => (state as WarmersStoreModel).resistances, + }, + + mutations: { + + SetChannels(state, model: { [id: number]: Warmers.IChannel }) { + for (const key in model) { + if (model.hasOwnProperty(key)) { + const element = model[key]; + state.channels.push(element); + } + } }, - mutations: { - - SetChannels(state, model: Warmers.IChannels){ - state.channels = model; - }, - - SetResistances(state, model: Warmers.IResistances){ - state.resistances = model; - }, - + SetResistances(state, model: { [id: number]: Warmers.IResistance }) { + for (const key in model) { + if (model.hasOwnProperty(key)) { + const element = model[key]; + state.resistances.push(element); + } + } }, - actions: { + }, + actions: { + setChannels(context, model: { [id: number]: Warmers.IChannel }) { + context.commit("SetChannels", model); + }, + setResistances(context, model: { [id: number]: Warmers.IResistance }) { + context.commit("SetResistances", model); + }, - setChannels(context, model: Warmers.IChannels){ - context.commit("SetChannels", model); - }, - - setResistances(context, model: Warmers.IResistances){ - context.commit("SetResistances", model); - }, - - } as WarmersActions + } as WarmersActions } From 2f8c6d643a6d2e5c27c801b0d37730e849b97f36 Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 15:04:35 +0200 Subject: [PATCH 52/84] add some property --- .../components/base-components/caricatore.vue | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/caricatore.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/caricatore.vue index 05a28914..74d99ed0 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/caricatore.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/caricatore.vue @@ -46,6 +46,30 @@ v-model="recipe.cycle_loader_pallet_height" >
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +

From f9de12a97140a5f94f7b10ec652338fe3c08221b Mon Sep 17 00:00:00 2001 From: Alessio Date: Thu, 11 Jun 2020 16:38:28 +0200 Subject: [PATCH 53/84] various fix in the modals --- .../wwwroot/src/@types/recipe-current.d.ts | 647 +++++++++--------- .../base-components/ciclo-formatura.vue | 5 +- .../formatura-cristallizzazione.vue | 5 +- .../base-components/formatura-riscaldo.ts | 3 +- .../base-components/formatura-riscaldo.vue | 4 + .../base-components/aria-controstampo.ts | 3 +- .../base-components/aria-controstampo.vue | 11 + .../base-components/ciclo-controstampo.vue | 9 +- .../base-components/estrazione-principale.vue | 21 +- .../setup/imbutitura/show-imbutitura-info.vue | 19 +- .../base-components/inputSottosquadra.ts | 4 +- .../base-components/inputSottosquadra.vue | 17 +- .../components/base-components/inputTermo.vue | 2 +- .../base-components/setupSottosquadra.ts | 2 +- .../base-components/setupSottosquadra.vue | 2 +- .../components/sottosquadra-stampo.vue | 110 ++- .../base-components/termo-superiore.vue | 24 +- .../base-components/ventilatori.vue | 5 +- .../base-components/vuoto-principale.vue | 7 +- 19 files changed, 509 insertions(+), 391 deletions(-) diff --git a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts index 8f1ab5ec..9fe02824 100644 --- a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts +++ b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts @@ -1,338 +1,331 @@ declare module Recipe { - interface IRange{ - min:number, - max:number + interface IRange { + min: number, + max: number } - interface IStatus{ - visible:boolean, - enabled:boolean, - hasError:boolean + interface IStatus { + visible: boolean, + enabled: boolean, + hasError: boolean } - interface IValue{ - range:IRange, - status:IStatus, - unitMeasure:string, - valueAct:number + interface IValue { + range: IRange, + status: IStatus, + unitMeasure: string, + valueAct: number } - - interface IRecipe{ - general_sizes_mould_dim_x?:IValue, - general_sizes_mould_dim_y?:IValue, - general_sizes_mould_max_height?:IValue, - general_sizes_mould_min_height?:IValue, - general_sizes_mould_base_height?:IValue, - general_sizes_sheet_material?:IValue, - general_sizes_sheet_dim_x?:IValue, - general_sizes_sheet_dim_y?:IValue, - general_sizes_sheet_thickness?:IValue, - general_sizes_plate_type?:IValue, - general_sizes_plate_dim_x?:IValue, - general_sizes_plate_dim_y?:IValue, - general_sizes_frame_traverses?:IValue, - general_sizes_frame_dim_x?:IValue, - general_sizes_frame_dim_y?:IValue, - general_sizes_upperplate_max_height?:IValue, - general_area_working_dxsx?:IValue, - positions_mould_lower_position?:IValue, - positions_mould_lower_speed?:IValue, - positions_mould_intermediate_position?:IValue, - positions_mould_upper_position?:IValue, - positions_mould_upper_speed?:IValue, - positions_mould_upperdeceleration_position?:IValue, - positions_mould_upperdeceleration_speed?:IValue, - positions_mould_lowerdeceleration_speed?:IValue, - positions_mould_lowerdeceleration_position?:IValue, - positions_frame_lower_position?:IValue, - positions_frame_lower_speed?:IValue, - positions_frame_upper_speed?:IValue, - positions_frame_upper_position?:IValue, - positions_frame_intermediate_position?:IValue, - positions_frame_intermediate_speed?:IValue, - positions_frame_unload_position?:IValue, - positions_upperplate_lower_position?:IValue, - positions_upperplate_lower_speed?:IValue, - positions_upperplate_upper_position?:IValue, - positions_upperplate_upper_speed?:IValue, - positions_upperplate_upperdeceleration_position?:IValue, - positions_upperplate_upperdeceleration_speed?:IValue, - positions_upperplate_lowerdeceleration_position?:IValue, - positions_upperplate_lowerdeceleration_speed?:IValue, - cycle_forming_type?:IValue, - cycle_forming_pause_cycle?:IValue, - cycle_forming_cooling_enabled?:IValue, - cycle_forming_blowingbox_enabled?:IValue, - cycle_acrylicframe_enabled?:IValue, - cycle_acrylicframe_time?:IValue, - cycle_upperoverheating_enabled?:IValue, - cycle_upperoverheating_time?:IValue, - cycle_crystallisation_type?:IValue, - cycle_crystallisation_enabled?:IValue, - cycle_crystallisation_time?:IValue, - cycle_loader_enable?:IValue, - cycle_loader_lifter_lowerposition_delay?:IValue, - cycle_loader_lifter_upperposition_delay?:IValue, - cycle_loader_split_sheet_time?:IValue, - cycle_loader_ejector_position?:IValue, - cycle_loader_pallet_height?:IValue - cycle_loader_center_x?:IValue, - cycle_loader_center_y?:IValue, - cycle_loader_checktichness_enabled?:IValue, - cycle_loader_suckers_vacuum?:IValue, - cycle_loader_ionizer_enabled?:IValue, - cycle_loader_manualunloading_enabled?:IValue, - heats_lowerheaters_max_time?:IValue, - heats_lowerheaters_movement_enabled?:IValue, - heats_lowerheaters_enabled?:IValue, - heats_lowerheaters_oscillation?:IValue, - heats_upperheaters_max_time?:IValue, - heats_upperheaters_movement_enabled?:IValue, - heats_upperheaters_enabled?:IValue, - heats_upperheaters_oscillation?:IValue, - heats_decomsustain_type?:IValue, - heats_decomsustain_decompression_flow?:IValue, - heats_decomsustain_min_blowing_time?:IValue, - heats_decomsustain_sustain_delay?:IValue, - heats_decomsustain_decompression_delay?:IValue, - heats_decomsustain_decompression_duration?:IValue, - heats_decomsustain_smoke_function_enabled?:IValue, - pyrometer_pyrometer_enabled?:IValue, - pyrometer_pyrometer_setpoint?:IValue, - pyrometer_pyrometer_delay?:IValue, - pyrometer_upperthermoregulator_start_adjustment?:IValue, - pyrometer_upperthermoregulator_end_adjustment?:IValue, - pyrometer_upperthermoregulator_min_percentage?:IValue, - pyrometer_upperthermoregulator_max_percentage?:IValue, - pyrometer_upperthermoregulator_sleep_enabled?:IValue, - pyrometer_upperthermoregulator_sleep_percentage?:IValue, - pyrometer_lowerthermoregulator_start_adjustment?:IValue, - pyrometer_lowerthermoregulator_end_adjustment?:IValue, - pyrometer_lowerthermoregulator_min_percentage?:IValue, - pyrometer_lowerthermoregulator_max_percentage?:IValue, - pyrometer_lowerthermoregulator_sleep_enabled?:IValue, - pyrometer_lowerthermoregulator_sleep_percentage?:IValue, - pyrometer_upperthermoregulator_sleep_temperature?:IValue, - pyrometer_upperthermoregulator_working_temperature?:IValue, - pyrometer_lowerthermoregulator_sleep_temperature?:IValue, - pyrometer_lowerthermoregulator_working_temperature?:IValue, - drawing_type?:IValue, - drawing_height?:IValue, - drawing_delay?:IValue, - drawing_1_chart_setpointx?:IValue, - drawing_1_chart_setpointy?:IValue, - drawing_photocell?:IValue, - drawing_mantaining_flow?:IValue, - drawing_manual?:IValue, - drawing_mould_up_delay?:IValue, - upperplate_cycle_type?:IValue, - upperplate_cycle_delay?:IValue, - upperplate_cycle_time?:IValue, - upperplate_air_enable?:IValue, - upperplate_air_delay?:IValue, - upperplate_air_max_time?:IValue, - upperplate_air_1_chart_setpointx?:IValue, - upperplate_air_1_chart_setpointy?:IValue, - upperplate_air_2_chart_setpointx?:IValue, - upperplate_air_2_chart_setpointy?:IValue, - upperplate_air_3_chart_setpointx?:IValue, - upperplate_air_3_chart_setpointy?:IValue, - upperplate_air_manual?:IValue, - upperplate_vacuum_enable?:IValue, - upperplate_vacuum_delay?:IValue, - upperplate_vacuum_max_time?:IValue, - upperplate_vacuum_1_chart_setpointx?:IValue, - upperplate_vacuum_1_chart_setpointy?:IValue, - upperplate_vacuum_2_chart_setpointx?:IValue, - upperplate_vacuum_2_chart_setpointy?:IValue, - upperplate_vacuum_3_chart_setpointx?:IValue, - upperplate_vacuum_3_chart_setpointy?:IValue, - upperplate_vacuum_manual?:IValue, - upperplate_extraction_enable?:IValue, - upperplate_extraction_delay?:IValue, - upperplate_extraction_1_chart_setpointx?:IValue, - upperplate_extraction_1_chart_setpointy?:IValue, - upperplate_extraction_manual?:IValue, - cooling_blowing_type?:IValue, - cooling_blowing_delay?:IValue, - cooling_blowing_time?:IValue, - cooling_pyrometer_enabled?:IValue, - cooling_pyrometer_setpoint?:IValue, - cooling_pyrometer_delay?:IValue, - cooling_nebulizer_type?:IValue, - cooling_nebulizer_delay?:IValue, - cooling_nebulizer_time?:IValue, - cooling_telescopic_enable?:IValue, - cooling_telescopic_position?:IValue, - cooling_telescopic_swing_enable?:IValue, - cooling_telescopic_swing_stroke?:IValue, - cooling_shutter_1_opening_perc?:IValue, - cooling_shutter_2_opening_perc?:IValue, - cooling_shutter_3_opening_perc?:IValue, - cooling_shutter_4_opening_perc?:IValue, - cooling_shutter_5_opening_perc?:IValue, - cooling_shutter_6_opening_perc?:IValue, - cooling_shutter_7_opening_perc?:IValue, - cooling_shutter_8_opening_perc?:IValue, - cooling_shutter_9_opening_perc?:IValue, - cooling_shutter_10_opening_perc?:IValue, - cooling_shutter_11_opening_perc?:IValue, - cooling_shutter_12_opening_perc?:IValue, - cooling_shutter_13_opening_perc?:IValue, - cooling_shutter_14_opening_perc?:IValue, - cooling_shutter_15_opening_perc?:IValue, - cooling_shutter_16_opening_perc?:IValue, - - vacuum_main_start?:IValue, - vacuum_main_delay?:IValue, - vacuum_main_max_time?:IValue, - vacuum_main_1_chart_setpointx?:IValue, - vacuum_main_1_chart_setpointy?:IValue, - vacuum_main_2_chart_setpointx?:IValue, - vacuum_main_2_chart_setpointy?:IValue, - vacuum_main_3_chart_setpointx?:IValue, - vacuum_main_3_chart_setpointy?:IValue, - vacuum_main_manual?:IValue, - vacuum_direct_enabled?:IValue, - vacuum_direct_delay?:IValue, - vacuum_direct_time?:IValue, - vacuum_aux_enabled?:IValue, - vacuum_aux_delay?:IValue, - vacuum_aux_max_time?:IValue, - vacuum_aux_1_chart_setpointx?:IValue, - vacuum_aux_1_chart_setpointy?:IValue, - vacuum_aux_2_chart_setpointx?:IValue, - vacuum_aux_2_chart_setpointy?:IValue, - vacuum_aux_3_chart_setpointx?:IValue, - vacuum_aux_3_chart_setpointy?:IValue, - vacuum_aux_manual?:IValue, - vacuum_pre_enabled?:IValue, - vacuum_pre_delay?:IValue, - vacuum_pre_max_time?:IValue, - vacuum_pre_1_chart_setpointx?:IValue, - vacuum_pre_1_chart_setpointy?:IValue, - vacuum_pre_2_chart_setpointx?:IValue, - vacuum_pre_2_chart_setpointy?:IValue, - vacuum_pre_3_chart_setpointx?:IValue, - vacuum_pre_3_chart_setpointy?:IValue, - - - extraction_main_type?:IValue, - extraction_main_mould_dw_delay?:IValue, - extraction_main_delay?:IValue, - extraction_main_1_chart_setpointx?:IValue, - extraction_main_1_chart_setpointy?:IValue, - extraction_main_manual?:IValue, - extraction_aux_enabled?:IValue, - extraction_aux_delay?:IValue, - extraction_aux_1_chart_setpointx?:IValue, - extraction_aux_1_chart_setpointy?:IValue, - extraction_aux_manual?:IValue, - - options_undercutmould_1_mode?:IValue, - options_undercutmould_1_position?:IValue, - options_undercutmould_1_delay_acti?:IValue, - options_undercutmould_1_delay_dis?:IValue, - options_undercutmould_2_mode?:IValue, - options_undercutmould_2_position?:IValue, - options_undercutmould_2_delay_acti?:IValue, - options_undercutmould_2_delay_dis?:IValue, - options_undercutmould_3_mode?:IValue, - options_undercutmould_3_position?:IValue, - options_undercutmould_3_delay_acti?:IValue, - options_undercutmould_3_delay_dis?:IValue, - options_undercutmould_4_mode?:IValue, - options_undercutmould_4_position?:IValue, - options_undercutmould_4_delay_acti?:IValue, - options_undercutmould_4_delay_dis?:IValue, - options_undercutmould_5_mode?:IValue, - options_undercutmould_5_position?:IValue, - options_undercutmould_5_delay_acti?:IValue, - options_undercutmould_5_delay_dis?:IValue, - options_undercutmould_6_mode?:IValue, - options_undercutmould_6_position?:IValue, - options_undercutmould_6_delay_acti?:IValue, - options_undercutmould_6_delay_dis?:IValue, - options_undercutmould_7_mode?:IValue, - options_undercutmould_7_position?:IValue, - options_undercutmould_7_delay_acti?:IValue, - options_undercutmould_7_delay_dis?:IValue, - options_undercutmould_8_mode?:IValue, - options_undercutmould_8_position?:IValue, - options_undercutmould_8_delay_acti?:IValue, - options_undercutmould_8_delay_dis?:IValue, - options_undercutmould_9_mode?:IValue, - options_undercutmould_9_position?:IValue, - options_undercutmould_9_delay_acti?:IValue, - options_undercutmould_9_delay_dis?:IValue, - options_undercutmould_10_mode?:IValue, - options_undercutmould_10_position?:IValue, - options_undercutmould_10_delay_acti?:IValue, - options_undercutmould_10_delay_dis?:IValue, - - options_undercutupperplate_1_mode?:IValue, - options_undercutupperplate_1_position?:IValue, - options_undercutupperplate_1_delay_acti?:IValue, - options_undercutupperplate_1_delay_dis?:IValue, - options_undercutupperplate_2_mode?:IValue, - options_undercutupperplate_2_position?:IValue, - options_undercutupperplate_2_delay_acti?:IValue, - options_undercutupperplate_2_delay_dis?:IValue, - options_undercutupperplate_3_mode?:IValue, - options_undercutupperplate_3_position?:IValue, - options_undercutupperplate_3_delay_acti?:IValue, - options_undercutupperplate_3_delay_dis?:IValue, - options_undercutupperplate_4_mode?:IValue, - options_undercutupperplate_4_position?:IValue, - options_undercutupperplate_4_delay_acti?:IValue, - options_undercutupperplate_4_delay_dis?:IValue, - options_undercutupperplate_5_mode?:IValue, - options_undercutupperplate_5_position?:IValue, - options_undercutupperplate_5_delay_acti?:IValue, - options_undercutupperplate_5_delay_dis?:IValue, - options_undercutupperplate_6_mode?:IValue, - options_undercutupperplate_6_position?:IValue, - options_undercutupperplate_6_delay_acti?:IValue, - options_undercutupperplate_6_delay_dis?:IValue, - options_undercutupperplate_7_mode?:IValue, - options_undercutupperplate_7_position?:IValue, - options_undercutupperplate_7_delay_acti?:IValue, - options_undercutupperplate_7_delay_dis?:IValue, - options_undercutupperplate_8_mode?:IValue, - options_undercutupperplate_8_position?:IValue, - options_undercutupperplate_8_delay_acti?:IValue, - options_undercutupperplate_8_delay_dis?:IValue, - options_undercutupperplate_9_mode?:IValue, - options_undercutupperplate_9_position?:IValue, - options_undercutupperplate_9_delay_acti?:IValue, - options_undercutupperplate_9_delay_dis?:IValue, - options_undercutupperplate_10_mode?:IValue, - options_undercutupperplate_10_position?:IValue, - options_undercutupperplate_10_delay_acti?:IValue, - options_undercutupperplate_10_delay_dis?:IValue, - - options_thermoregulator_1_enabled?:IValue, - options_thermoregulator_1_setpoint?:IValue, - options_thermoregulator_2_enabled?:IValue, - options_thermoregulator_2_setpoint?:IValue, - options_thermoregulator_3_enabled?:IValue, - options_thermoregulator_3_setpoint?:IValue, - options_thermoregulator_4_enabled?:IValue, - options_thermoregulator_4_setpoint?:IValue, - options_thermoregulator_5_enabled?:IValue, - options_thermoregulator_5_setpoint?:IValue, - options_thermoregulator_6_enabled?:IValue, - options_thermoregulator_6_setpoint?:IValue, - options_thermoregulator_7_enabled?:IValue, - options_thermoregulator_7_setpoint?:IValue, - options_thermoregulator_8_enabled?:IValue, - options_thermoregulator_8_setpoint?:IValue, - options_thermoregulator_9_enabled?:IValue, - options_thermoregulator_9_setpoint?:IValue, - options_thermoregulator_10_enabled?:IValue, - options_thermoregulator_10_setpoint?:IValue, + interface IRecipe { + general_sizes_mould_dim_x?: IValue, + general_sizes_mould_dim_y?: IValue, + general_sizes_mould_max_height?: IValue, + general_sizes_mould_min_height?: IValue, + general_sizes_mould_base_height?: IValue, + general_sizes_sheet_material?: IValue, + general_sizes_sheet_dim_x?: IValue, + general_sizes_sheet_dim_y?: IValue, + general_sizes_sheet_thickness?: IValue, + general_sizes_plate_type?: IValue, + general_sizes_plate_dim_x?: IValue, + general_sizes_plate_dim_y?: IValue, + general_sizes_frame_traverses?: IValue, + general_sizes_frame_dim_x?: IValue, + general_sizes_frame_dim_y?: IValue, + general_sizes_upperplate_max_height?: IValue, + general_area_working_dxsx?: IValue, + positions_mould_lower_position?: IValue, + positions_mould_lower_speed?: IValue, + positions_mould_intermediate_position?: IValue, + positions_mould_upper_position?: IValue, + positions_mould_upper_speed?: IValue, + positions_mould_upperdeceleration_position?: IValue, + positions_mould_upperdeceleration_speed?: IValue, + positions_mould_lowerdeceleration_speed?: IValue, + positions_mould_lowerdeceleration_position?: IValue, + positions_frame_lower_position?: IValue, + positions_frame_lower_speed?: IValue, + positions_frame_upper_speed?: IValue, + positions_frame_upper_position?: IValue, + positions_frame_intermediate_position?: IValue, + positions_frame_intermediate_speed?: IValue, + positions_frame_unload_position?: IValue, + positions_upperplate_lower_position?: IValue, + positions_upperplate_lower_speed?: IValue, + positions_upperplate_upper_position?: IValue, + positions_upperplate_upper_speed?: IValue, + positions_upperplate_upperdeceleration_position?: IValue, + positions_upperplate_upperdeceleration_speed?: IValue, + positions_upperplate_lowerdeceleration_position?: IValue, + positions_upperplate_lowerdeceleration_speed?: IValue, + cycle_forming_type?: IValue, + cycle_forming_pause_cycle?: IValue, + cycle_forming_cooling_enabled?: IValue, + cycle_forming_blowingbox_enabled?: IValue, + cycle_acrylicframe_enabled?: IValue, + cycle_acrylicframe_time?: IValue, + cycle_upperoverheating_enabled?: IValue, + cycle_upperoverheating_time?: IValue, + cycle_crystallisation_type?: IValue, + cycle_crystallisation_enabled?: IValue, + cycle_crystallisation_time?: IValue, + cycle_loader_enable?: IValue, + cycle_loader_lifter_lowerposition_delay?: IValue, + cycle_loader_lifter_upperposition_delay?: IValue, + cycle_loader_split_sheet_time?: IValue, + cycle_loader_ejector_position?: IValue, + cycle_loader_pallet_height?: IValue + cycle_loader_center_x?: IValue, + cycle_loader_center_y?: IValue, + cycle_loader_checktichness_enabled?: IValue, + cycle_loader_suckers_vacuum?: IValue, + cycle_loader_ionizer_enabled?: IValue, + cycle_loader_manualunloading_enabled?: IValue, + heats_lowerheaters_max_time?: IValue, + heats_lowerheaters_movement_enabled?: IValue, + heats_lowerheaters_enabled?: IValue, + heats_lowerheaters_oscillation?: IValue, + heats_upperheaters_max_time?: IValue, + heats_upperheaters_movement_enabled?: IValue, + heats_upperheaters_enabled?: IValue, + heats_upperheaters_oscillation?: IValue, + heats_decomsustain_type?: IValue, + heats_decomsustain_decompression_flow?: IValue, + heats_decomsustain_min_blowing_time?: IValue, + heats_decomsustain_sustain_delay?: IValue, + heats_decomsustain_decompression_delay?: IValue, + heats_decomsustain_decompression_duration?: IValue, + heats_decomsustain_smoke_function_enabled?: IValue, + pyrometer_pyrometer_enabled?: IValue, + pyrometer_pyrometer_setpoint?: IValue, + pyrometer_pyrometer_delay?: IValue, + pyrometer_upperthermoregulator_start_adjustment?: IValue, + pyrometer_upperthermoregulator_end_adjustment?: IValue, + pyrometer_upperthermoregulator_min_percentage?: IValue, + pyrometer_upperthermoregulator_max_percentage?: IValue, + pyrometer_upperthermoregulator_sleep_enabled?: IValue, + pyrometer_upperthermoregulator_sleep_percentage?: IValue, + pyrometer_lowerthermoregulator_start_adjustment?: IValue, + pyrometer_lowerthermoregulator_end_adjustment?: IValue, + pyrometer_lowerthermoregulator_min_percentage?: IValue, + pyrometer_lowerthermoregulator_max_percentage?: IValue, + pyrometer_lowerthermoregulator_sleep_enabled?: IValue, + pyrometer_lowerthermoregulator_sleep_percentage?: IValue, + pyrometer_upperthermoregulator_sleep_temperature?: IValue, + pyrometer_upperthermoregulator_working_temperature?: IValue, + pyrometer_lowerthermoregulator_sleep_temperature?: IValue, + pyrometer_lowerthermoregulator_working_temperature?: IValue, + drawing_type?: IValue, + drawing_height?: IValue, + drawing_delay?: IValue, + drawing_1_chart_setpointx?: IValue, + drawing_1_chart_setpointy?: IValue, + drawing_photocell?: IValue, + drawing_mantaining_flow?: IValue, + drawing_manual?: IValue, + drawing_mould_up_delay?: IValue, + upperplate_cycle_type?: IValue, + upperplate_cycle_delay?: IValue, + upperplate_cycle_time?: IValue, + upperplate_air_enable?: IValue, + upperplate_air_delay?: IValue, + upperplate_air_max_time?: IValue, + upperplate_air_1_chart_setpointx?: IValue, + upperplate_air_1_chart_setpointy?: IValue, + upperplate_air_2_chart_setpointx?: IValue, + upperplate_air_2_chart_setpointy?: IValue, + upperplate_air_3_chart_setpointx?: IValue, + upperplate_air_3_chart_setpointy?: IValue, + upperplate_air_manual?: IValue, + upperplate_vacuum_enable?: IValue, + upperplate_vacuum_delay?: IValue, + upperplate_vacuum_max_time?: IValue, + upperplate_vacuum_1_chart_setpointx?: IValue, + upperplate_vacuum_1_chart_setpointy?: IValue, + upperplate_vacuum_2_chart_setpointx?: IValue, + upperplate_vacuum_2_chart_setpointy?: IValue, + upperplate_vacuum_3_chart_setpointx?: IValue, + upperplate_vacuum_3_chart_setpointy?: IValue, + upperplate_vacuum_manual?: IValue, + upperplate_extraction_enable?: IValue, + upperplate_extraction_delay?: IValue, + upperplate_extraction_1_chart_setpointx?: IValue, + upperplate_extraction_1_chart_setpointy?: IValue, + upperplate_extraction_manual?: IValue, + cooling_blowing_type?: IValue, + cooling_blowing_delay?: IValue, + cooling_blowing_time?: IValue, + cooling_pyrometer_enabled?: IValue, + cooling_pyrometer_setpoint?: IValue, + cooling_pyrometer_delay?: IValue, + cooling_nebulizer_type?: IValue, + cooling_nebulizer_delay?: IValue, + cooling_nebulizer_time?: IValue, + cooling_telescopic_enable?: IValue, + cooling_telescopic_position?: IValue, + cooling_telescopic_swing_enable?: IValue, + cooling_telescopic_swing_stroke?: IValue, + cooling_shutter_1_opening_perc?: IValue, + cooling_shutter_2_opening_perc?: IValue, + cooling_shutter_3_opening_perc?: IValue, + cooling_shutter_4_opening_perc?: IValue, + cooling_shutter_5_opening_perc?: IValue, + cooling_shutter_6_opening_perc?: IValue, + cooling_shutter_7_opening_perc?: IValue, + cooling_shutter_8_opening_perc?: IValue, + cooling_shutter_9_opening_perc?: IValue, + cooling_shutter_10_opening_perc?: IValue, + cooling_shutter_11_opening_perc?: IValue, + cooling_shutter_12_opening_perc?: IValue, + cooling_shutter_13_opening_perc?: IValue, + cooling_shutter_14_opening_perc?: IValue, + cooling_shutter_15_opening_perc?: IValue, + cooling_shutter_16_opening_perc?: IValue, + vacuum_main_start?: IValue, + vacuum_main_delay?: IValue, + vacuum_main_max_time?: IValue, + vacuum_main_1_chart_setpointx?: IValue, + vacuum_main_1_chart_setpointy?: IValue, + vacuum_main_2_chart_setpointx?: IValue, + vacuum_main_2_chart_setpointy?: IValue, + vacuum_main_3_chart_setpointx?: IValue, + vacuum_main_3_chart_setpointy?: IValue, + vacuum_main_manual?: IValue, + vacuum_direct_enabled?: IValue, + vacuum_direct_delay?: IValue, + vacuum_direct_time?: IValue, + vacuum_aux_enabled?: IValue, + vacuum_aux_delay?: IValue, + vacuum_aux_max_time?: IValue, + vacuum_aux_1_chart_setpointx?: IValue, + vacuum_aux_1_chart_setpointy?: IValue, + vacuum_aux_2_chart_setpointx?: IValue, + vacuum_aux_2_chart_setpointy?: IValue, + vacuum_aux_3_chart_setpointx?: IValue, + vacuum_aux_3_chart_setpointy?: IValue, + vacuum_aux_manual?: IValue, + vacuum_pre_enabled?: IValue, + vacuum_pre_delay?: IValue, + vacuum_pre_max_time?: IValue, + vacuum_pre_1_chart_setpointx?: IValue, + vacuum_pre_1_chart_setpointy?: IValue, + vacuum_pre_2_chart_setpointx?: IValue, + vacuum_pre_2_chart_setpointy?: IValue, + vacuum_pre_3_chart_setpointx?: IValue, + vacuum_pre_3_chart_setpointy?: IValue, + extraction_main_type?: IValue, + extraction_main_mould_dw_delay?: IValue, + extraction_main_delay?: IValue, + extraction_main_1_chart_setpointx?: IValue, + extraction_main_1_chart_setpointy?: IValue, + extraction_main_manual?: IValue, + extraction_aux_enabled?: IValue, + extraction_aux_delay?: IValue, + extraction_aux_1_chart_setpointx?: IValue, + extraction_aux_1_chart_setpointy?: IValue, + extraction_aux_manual?: IValue, + options_undercutmould_1_mode?: IValue, + options_undercutmould_1_position?: IValue, + options_undercutmould_1_delay_acti?: IValue, + options_undercutmould_1_delay_dis?: IValue, + options_undercutmould_2_mode?: IValue, + options_undercutmould_2_position?: IValue, + options_undercutmould_2_delay_acti?: IValue, + options_undercutmould_2_delay_dis?: IValue, + options_undercutmould_3_mode?: IValue, + options_undercutmould_3_position?: IValue, + options_undercutmould_3_delay_acti?: IValue, + options_undercutmould_3_delay_dis?: IValue, + options_undercutmould_4_mode?: IValue, + options_undercutmould_4_position?: IValue, + options_undercutmould_4_delay_acti?: IValue, + options_undercutmould_4_delay_dis?: IValue, + options_undercutmould_5_mode?: IValue, + options_undercutmould_5_position?: IValue, + options_undercutmould_5_delay_acti?: IValue, + options_undercutmould_5_delay_dis?: IValue, + options_undercutmould_6_mode?: IValue, + options_undercutmould_6_position?: IValue, + options_undercutmould_6_delay_acti?: IValue, + options_undercutmould_6_delay_dis?: IValue, + options_undercutmould_7_mode?: IValue, + options_undercutmould_7_position?: IValue, + options_undercutmould_7_delay_acti?: IValue, + options_undercutmould_7_delay_dis?: IValue, + options_undercutmould_8_mode?: IValue, + options_undercutmould_8_position?: IValue, + options_undercutmould_8_delay_acti?: IValue, + options_undercutmould_8_delay_dis?: IValue, + options_undercutmould_9_mode?: IValue, + options_undercutmould_9_position?: IValue, + options_undercutmould_9_delay_acti?: IValue, + options_undercutmould_9_delay_dis?: IValue, + options_undercutmould_10_mode?: IValue, + options_undercutmould_10_position?: IValue, + options_undercutmould_10_delay_acti?: IValue, + options_undercutmould_10_delay_dis?: IValue, + options_undercutupperplate_1_mode?: IValue, + options_undercutupperplate_1_position?: IValue, + options_undercutupperplate_1_delay_acti?: IValue, + options_undercutupperplate_1_delay_dis?: IValue, + options_undercutupperplate_2_mode?: IValue, + options_undercutupperplate_2_position?: IValue, + options_undercutupperplate_2_delay_acti?: IValue, + options_undercutupperplate_2_delay_dis?: IValue, + options_undercutupperplate_3_mode?: IValue, + options_undercutupperplate_3_position?: IValue, + options_undercutupperplate_3_delay_acti?: IValue, + options_undercutupperplate_3_delay_dis?: IValue, + options_undercutupperplate_4_mode?: IValue, + options_undercutupperplate_4_position?: IValue, + options_undercutupperplate_4_delay_acti?: IValue, + options_undercutupperplate_4_delay_dis?: IValue, + options_undercutupperplate_5_mode?: IValue, + options_undercutupperplate_5_position?: IValue, + options_undercutupperplate_5_delay_acti?: IValue, + options_undercutupperplate_5_delay_dis?: IValue, + options_undercutupperplate_6_mode?: IValue, + options_undercutupperplate_6_position?: IValue, + options_undercutupperplate_6_delay_acti?: IValue, + options_undercutupperplate_6_delay_dis?: IValue, + options_undercutupperplate_7_mode?: IValue, + options_undercutupperplate_7_position?: IValue, + options_undercutupperplate_7_delay_acti?: IValue, + options_undercutupperplate_7_delay_dis?: IValue, + options_undercutupperplate_8_mode?: IValue, + options_undercutupperplate_8_position?: IValue, + options_undercutupperplate_8_delay_acti?: IValue, + options_undercutupperplate_8_delay_dis?: IValue, + options_undercutupperplate_9_mode?: IValue, + options_undercutupperplate_9_position?: IValue, + options_undercutupperplate_9_delay_acti?: IValue, + options_undercutupperplate_9_delay_dis?: IValue, + options_undercutupperplate_10_mode?: IValue, + options_undercutupperplate_10_position?: IValue, + options_undercutupperplate_10_delay_acti?: IValue, + options_undercutupperplate_10_delay_dis?: IValue, + options_thermoregulator_1_enabled?: IValue, + options_thermoregulator_1_setpoint?: IValue, + options_thermoregulator_2_enabled?: IValue, + options_thermoregulator_2_setpoint?: IValue, + options_thermoregulator_3_enabled?: IValue, + options_thermoregulator_3_setpoint?: IValue, + options_thermoregulator_4_enabled?: IValue, + options_thermoregulator_4_setpoint?: IValue, + options_thermoregulator_5_enabled?: IValue, + options_thermoregulator_5_setpoint?: IValue, + options_thermoregulator_6_enabled?: IValue, + options_thermoregulator_6_setpoint?: IValue, + options_thermoregulator_7_enabled?: IValue, + options_thermoregulator_7_setpoint?: IValue, + options_thermoregulator_8_enabled?: IValue, + options_thermoregulator_8_setpoint?: IValue, + options_thermoregulator_9_enabled?: IValue, + options_thermoregulator_9_setpoint?: IValue, + options_thermoregulator_10_enabled?: IValue, + options_thermoregulator_10_setpoint?: IValue, } } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/ciclo-formatura.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/ciclo-formatura.vue index 10825390..517cd038 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/ciclo-formatura.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/base-components/ciclo-formatura.vue @@ -2,9 +2,8 @@
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts index 2529c43f..966a5305 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts @@ -35,6 +35,12 @@ export default class Raffreddamento extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue index 9fc2fa07..3a793441 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue @@ -17,7 +17,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts index fb276190..fcc6fb28 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts @@ -30,6 +30,12 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue index 58cfcc84..568141ce 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue @@ -25,7 +25,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts index 359b6529..2fe3e675 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts @@ -29,6 +29,12 @@ export default class ShowVuotoInfo extends Vue { this.deferred.resolve(1); }; + goTo(step) { + recipeActions.setCurrent(store, this.recipe); + ModalHelper.HideModal(); + this.deferred.resolve(step); + } + async beforeMount() { // this.contactInfo = await awaiter(new machineService().getContactConfiguration()); messageService.subscribeToChannel("esc_pressed", args => { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue index 959bc7fe..dc3f4ba1 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.vue @@ -18,7 +18,7 @@ - + From 8a1b28020e0cdddf4adcd6db38d01c1bcf2f6348 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 09:51:30 +0200 Subject: [PATCH 56/84] pan & zoom su riscaldi --- .../base-components/riscaldi-superiori.vue | 8 ++++ .../components/base-components/warmers.ts | 37 +++---------------- .../components/base-components/warmers.vue | 2 +- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue index a0ee9588..146a1727 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-superiori.vue @@ -67,6 +67,14 @@
+
+ + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts index 7d74c6d8..14ba365d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts @@ -54,48 +54,23 @@ export default class Warmers extends Vue { return result; } - maxWidth: number = 0; - maxHeight: number = 0; - currentViewBoxX: number = 0; - currentViewBoxY: number = 0; - currentZoomX: number = 0; - currentZoomY: number = 0; - - - calcSizes() { - this.maxWidth = Math.max(...this.rows.map(r => this.resistancesPerRow(r).reduce((p, c) => p + c.dimension, 0))) * this.width; - this.maxHeight = this.rows.length * this.height; - - this.currentViewBoxX = this.maxWidth / 2; - this.currentViewBoxY = this.maxHeight / 2; - - this.currentZoomX = this.maxWidth / 2; - this.currentZoomY = this.maxHeight / 2; - } - - get viewBox() { - return [this.currentViewBoxX - this.currentZoomX, this.currentViewBoxY - this.currentZoomY, - this.currentZoomX * 2, this.currentZoomY * 2]; - } + zoomController: any = null; zoomIn() { - this.currentZoomY /= 2; - this.currentZoomX /= 2; + this.zoomController?.zoomIn(); } zoomOut() { - this.currentZoomY *= 2; - this.currentZoomX *= 2; + this.zoomController?.zoomOut(); } - mounted() { - this.calcSizes(); + let $this = this; setTimeout(() => { - svgPanZoom('#warmer', { + $this.zoomController = svgPanZoom('#warmer', { zoomEnabled: true, - controlIconsEnabled: true, + controlIconsEnabled: false, fit: true, center: true, }); diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue index 31a681f8..3700788c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue @@ -1,5 +1,5 @@ From 8abc6f00c0c907626ce46d5a55a7dc928c4766fb Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 10:55:58 +0200 Subject: [PATCH 60/84] fix modal height --- Thermo.Active/wwwroot/assets/styles/base/setup.less | 4 ++-- Thermo.Active/wwwroot/assets/styles/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index cde9d34b..43cf4009 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -4,7 +4,7 @@ @import "fonts.less"; .setup { - padding-top: 50px; + padding-top: 25px; display: flex; justify-content: flex-start; align-items: center; @@ -23,7 +23,7 @@ .modal { width: 1820px; - height: 949px; + height: 980px; section.body { height: calc(~'100% - 66px'); diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index b4bdba51..085f6195 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -2,7 +2,7 @@ @import url(../../libs/glyphicons/styles/glyphicons.css); @import "iziToast.min.css"; .setup { - padding-top: 50px; + padding-top: 25px; display: flex; justify-content: flex-start; align-items: center; @@ -20,7 +20,7 @@ } .setup .modal { width: 1820px; - height: 949px; + height: 980px; } .setup .modal section.body { height: calc(100% - 66px); From 2f9dbd81112451eaa422c11517ed99d40771b83a Mon Sep 17 00:00:00 2001 From: Alessio Date: Fri, 12 Jun 2020 11:12:02 +0200 Subject: [PATCH 61/84] fix --- .../wwwroot/assets/styles/base/ciclo.less | 30 ++++++++----------- Thermo.Active/wwwroot/assets/styles/style.css | 6 +--- .../base-components/riscaldi-inferiori.vue | 8 +++++ 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Thermo.Active/wwwroot/assets/styles/base/ciclo.less b/Thermo.Active/wwwroot/assets/styles/base/ciclo.less index e2b531e5..9ae7d076 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/ciclo.less +++ b/Thermo.Active/wwwroot/assets/styles/base/ciclo.less @@ -13,18 +13,18 @@ .caricatore-buttons { button { - margin-right: 5px; - margin-left: 5px; - width: 48px; - height: 48px; - object-fit: contain; - border-radius: 2px; - box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); - border: none; + margin-right : 5px; + margin-left : 5px; + width : 48px; + height : 48px; + object-fit : contain; + border-radius : 2px; + box-shadow : 0 0 3px 0 rgba(0, 0, 0, 0.5); + border : none; background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%); &:last-of-type { - border: solid 1px #001e48; + border : solid 1px #001e48; background-image: linear-gradient(to bottom, #1756ad, #002680); } @@ -32,19 +32,13 @@ } - - } - - .box { - margin: unset; - width: 500px; - - .body { - padding: unset; + .box { + width: 500px; } } + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 085f6195..5ce6417e 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -5287,13 +5287,9 @@ body { border: solid 1px #001e48; background-image: linear-gradient(to bottom, #1756ad, #002680); } -.modal.ciclo-info section .box { - margin: unset; +.modal.ciclo-info section .specific .box { width: 500px; } -.modal.ciclo-info section .box .body { - padding: unset; -} .modal.raffreddamento-info { width: 626px; height: 569px; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue index 128772bb..b5fe9b07 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue @@ -61,6 +61,14 @@
+
+ + +
From a5436bb7176f77becb03c0d81e0c21aa4848d426 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 11:33:00 +0200 Subject: [PATCH 62/84] fix layout formato --- .../assets/styles/base/controstamposetup.less | 3 - .../wwwroot/assets/styles/base/formato.less | 59 ---- .../wwwroot/assets/styles/base/input.less | 257 +++++++++++++----- .../wwwroot/assets/styles/base/layout.less | 1 - .../assets/styles/base/quote-velocita.less | 4 - .../wwwroot/assets/styles/base/scheda.less | 14 +- .../wwwroot/assets/styles/base/setup.less | 95 +------ .../wwwroot/assets/styles/base/slider.less | 8 +- .../wwwroot/assets/styles/base/vuoto.less | 3 - Thermo.Active/wwwroot/assets/styles/style.css | 234 +++++++--------- .../setup/formato/components/stampo.vue | 2 +- 11 files changed, 306 insertions(+), 374 deletions(-) delete mode 100644 Thermo.Active/wwwroot/assets/styles/base/formato.less diff --git a/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less b/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less index 7a85575b..2ab29f24 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/controstamposetup.less @@ -29,9 +29,6 @@ } - .input-area { - width: 480px; - } } diff --git a/Thermo.Active/wwwroot/assets/styles/base/formato.less b/Thermo.Active/wwwroot/assets/styles/base/formato.less deleted file mode 100644 index 00dc6852..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/formato.less +++ /dev/null @@ -1,59 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - -.modal.formato-info { - - section { - .tast { - margin-left: -300px; - } - } - - - .radio-buttons { - display: flex; - justify-content: flex-start; - align-items: center; - - input { - - width: 24px; - height: 24px; - object-fit: contain; - border-radius: 12px; - background-color: #f1f1f1; - - } - - label { - - font-size: 18px; - font-weight: normal; - font-stretch: normal; - font-style: normal; - line-height: 1.11; - letter-spacing: normal; - text-align: right; - color: #4b4b4b; - - &:first-of-type { - font-size: 24px; - font-weight: 500; - font-stretch: normal; - font-style: normal; - line-height: normal; - letter-spacing: normal; - text-align: center; - color: @color-darkish-blue; - padding-right: 200px; - padding-left: 20px; - } - - } - - } - - -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/input.less b/Thermo.Active/wwwroot/assets/styles/base/input.less index e6c23959..c3927f2b 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/input.less +++ b/Thermo.Active/wwwroot/assets/styles/base/input.less @@ -2,7 +2,7 @@ @import "colors.less"; @import "fonts.less"; @font-family: 'Work Sans', - sans-serif; + sans-serif; @font-size: 18px; @font-size-small: 14px; @input-height: 48px; @@ -10,97 +10,218 @@ .form-group { + display: block; + margin-bottom: 33px; + + label { display: block; - margin-bottom: 33px; + color: @color-label-grey; + font-size: @font-size; + line-height: 1; + font-family: @font-family; + text-align: left; + margin-bottom: 13px; + } - label { - display: block; - color: @color-label-grey; - font-size: @font-size; - line-height: 1; - font-family: @font-family; - text-align: left; - margin-bottom: 13px; - } + input, + select { + display: block; + border-radius: 2px; + border: solid 1px #dfdfdf; + height: @input-height; + line-height: 1.1; + font-family: @font-family; + color: @color-input-light; + font-size: @font-size; + background-color: @color-input-background; + margin: 0 0px; + padding-right: 0; + padding-left: 20px; + width: calc(~'100% - 20px'); + } - input, - select { - display: block; - border-radius: 2px; - border: solid 1px #dfdfdf; - height: @input-height; - line-height: 1.1; - font-family: @font-family; - color: @color-input-light; - font-size: @font-size; - background-color: @color-input-background; - margin: 0 0px; - padding-right: 0; - padding-left: 20px; - width: calc(~'100% - 20px'); - } + textarea { + box-sizing: border-box; + resize: none; + display: block; + border-radius: 2px; + border: solid 1px #dfdfdf; + height: 120px; + font-family: @font-family; + color: @color-input-light; + font-size: 16px; + background-color: @color-input-background; + margin: 0 0px; + padding-right: 0; + width: 100%; + padding: 10px 5px; + } - textarea { - box-sizing: border-box; - resize: none; - display: block; - border-radius: 2px; - border: solid 1px #dfdfdf; - height: 120px; - font-family: @font-family; - color: @color-input-light; - font-size: 16px; - background-color: @color-input-background; - margin: 0 0px; - padding-right: 0; - width: 100%; - padding: 10px 5px; - } + select { + padding: 0; + width: 100%; + } - select { - padding: 0; - width: 100%; - } + input.invalid:not([readonly]), + input[aria-invalid="true"]:not([readonly]) { + box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; + } - input.invalid:not([readonly]), - input[aria-invalid="true"]:not([readonly]) { - box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; - } - - small.error { - text-align: left; - display: block; - color: @color-scarlet; - font-size: @font-size-small; - font-family: @font-family; - line-height: 1; - padding-left: 16px; - margin: 2px 0; - } + small.error { + text-align: left; + display: block; + color: @color-scarlet; + font-size: @font-size-small; + font-family: @font-family; + line-height: 1; + padding-left: 16px; + margin: 2px 0; + } } .text-center { - text-align: center; + text-align: center; } .block { - display: block; + display: block; } .block-center { - margin: auto !important; + margin: auto !important; } input.invalid:not([readonly]), input[aria-invalid="true"]:not([readonly]) { - box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; + box-shadow: inset 0px 0px 0px 1px @color-scarlet !important; } input:focus { - outline: 5px #1791ff auto; + outline: 5px #1791ff auto; } select:focus { - outline: 5px #1791ff auto; + outline: 5px #1791ff auto; +} + + +.radio-buttons { + display: flex; + justify-content: flex-start; + align-items: center; + + input { + + width: 24px; + height: 24px; + object-fit: contain; + border-radius: 12px; + background-color: #f1f1f1; + margin: 0 5px; + } + + label { + + font-size: 18px; + + line-height: 1.11; + color: #4b4b4b; + + &:first-of-type { + font-size: 24px; + font-weight: 500; + color: @color-darkish-blue; + flex: 1; + } + + } + +} + + +.input-area { + width: 100%; + display: flex; + flex-flow: row; + align-items: center; + justify-content: space-between; + + + &.col { + flex-flow: column; + align-items: flex-start; + height: auto; + } + + h3 { + color: #002680; + margin: 18px 0; + } + + .buttons { + width: 100%; + display: flex; + flex-flow: row; + margin-bottom: 18px; + + &:last-child { + margin-bottom: 0; + } + } + + label { + color: #002680; + font-size: 24px; + font-weight: 500; + flex: 1; + } + + .numeric { + font-size: 18px; + font-weight: 500; + color: #6d6d6d; + + width: 100px; + height: 48px; + border-radius: 2px; + box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); + border: none; + + display: flex; + flex-flow: row nowrap; + padding: 4px; + align-items: center; + justify-content: stretch; + + input { + border: none; + font-size: 16px; + text-align: right; + height: 100%; + width: 100%; + outline: none !important; + background-color: transparent; + + &[type=number]::-webkit-inner-spin-button, + &[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; + } + } + + span { + padding: 0 3px; + font-size: 14px; + } + } + + select { + min-width: 150px; + height: 48px; + background-color: #fff; + padding: 0 20px; + font-size: 1rem; + + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/layout.less b/Thermo.Active/wwwroot/assets/styles/base/layout.less index fdd22a9b..a7f5a7dc 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/layout.less +++ b/Thermo.Active/wwwroot/assets/styles/base/layout.less @@ -6,7 +6,6 @@ @import "dashboard.less"; @import "pirometro.less"; @import "riscaldi.less"; -@import "formato.less"; @import "slider.less"; @import "tastierino.less"; @import "preriscaldo-dashboard.less"; diff --git a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less b/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less index d12e764b..60d50f8b 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less +++ b/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less @@ -17,10 +17,6 @@ .box { .body { padding: 4.5px; - - .input-area { - margin: 5px auto; - } } } } diff --git a/Thermo.Active/wwwroot/assets/styles/base/scheda.less b/Thermo.Active/wwwroot/assets/styles/base/scheda.less index 01ff405c..356e91d9 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/scheda.less +++ b/Thermo.Active/wwwroot/assets/styles/base/scheda.less @@ -3,17 +3,11 @@ @import "colors.less"; @import "fonts.less"; -.scheda{ +.scheda { - .body{ - padding: 0px; + .body { + padding: 0px; - .input-area{ - width: 480px; - margin: 4px; - margin-bottom: 0px; - } - - } + } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index 43cf4009..1704192c 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -346,7 +346,7 @@ .box { - margin-bottom: 30px; + margin-bottom: 20px; box-sizing: border-box; clear: both; @@ -363,8 +363,9 @@ } .body { - padding: 20px; - display: flex; + padding: 1rem; + display: grid; + grid-row-gap: 1rem; flex-flow: column; justify-items: center; padding-bottom: 10px; @@ -401,94 +402,6 @@ -.input-area { - margin: 10px auto; - display: flex; - flex-flow: row; - align-items: center; - justify-content: space-between; - width: 100%; - height: 48px; - - &.col { - flex-flow: column; - align-items: flex-start; - height: auto; - } - - h3 { - font-weight: normal; - color: #002680; - margin: 18px 0; - } - - .buttons { - width: 100%; - display: flex; - flex-flow: row; - margin-bottom: 18px; - - &:last-child { - margin-bottom: 0; - } - } - - label { - color: #002680; - font-size: 24px; - font-weight: 500; - flex: 1; - } - - .numeric { - font-size: 18px; - font-weight: 500; - color: #6d6d6d; - - width: 100px; - height: 48px; - border-radius: 2px; - box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - border: none; - - display: flex; - flex-flow: row nowrap; - padding: 4px; - align-items: center; - justify-content: stretch; - - input { - border: none; - font-size: 16px; - text-align: right; - height: 100%; - width: 100%; - outline: none !important; - background-color: transparent; - - &[type=number]::-webkit-inner-spin-button, - &[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; - } - } - - span { - padding: 0 3px; - font-size: 14px; - } - } - - select { - min-width: 150px; - height: 48px; - background-color: #fff; - padding: 0 20px; - font-size: 1rem; - - } -} - .setup-play { cursor: pointer; diff --git a/Thermo.Active/wwwroot/assets/styles/base/slider.less b/Thermo.Active/wwwroot/assets/styles/base/slider.less index 885d7373..74358b71 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/slider.less +++ b/Thermo.Active/wwwroot/assets/styles/base/slider.less @@ -4,13 +4,16 @@ @import "fonts.less"; .slider { - display: flex; + display: grid; + grid-template-columns: 48px 1fr 48px; + grid-column-gap: 1rem; + width: 100%; flex-flow: row wrap; justify-content: space-between; align-items: center; + .control { - margin: 0 10px; position: relative; flex: 1; @@ -101,6 +104,5 @@ border: none; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); background-image: linear-gradient(to bottom, #fff 0%, #bbbcbc 98%); - margin: 16px; } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/vuoto.less b/Thermo.Active/wwwroot/assets/styles/base/vuoto.less index 4ba23907..3daf69dd 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/vuoto.less +++ b/Thermo.Active/wwwroot/assets/styles/base/vuoto.less @@ -25,9 +25,6 @@ } - .input-area { - width: 480px; - } } diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 085f6195..4f42e86d 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -279,7 +279,7 @@ transform: skewX(-20deg); } .box { - margin-bottom: 30px; + margin-bottom: 20px; box-sizing: border-box; clear: both; } @@ -295,8 +295,9 @@ background-color: #979797; } .box .body { - padding: 20px; - display: flex; + padding: 1rem; + display: grid; + grid-row-gap: 1rem; flex-flow: column; justify-items: center; padding-bottom: 10px; @@ -323,80 +324,6 @@ text-align: center; color: #002680; } -.input-area { - margin: 10px auto; - display: flex; - flex-flow: row; - align-items: center; - justify-content: space-between; - width: 100%; - height: 48px; -} -.input-area.col { - flex-flow: column; - align-items: flex-start; - height: auto; -} -.input-area h3 { - font-weight: normal; - color: #002680; - margin: 18px 0; -} -.input-area .buttons { - width: 100%; - display: flex; - flex-flow: row; - margin-bottom: 18px; -} -.input-area .buttons:last-child { - margin-bottom: 0; -} -.input-area label { - color: #002680; - font-size: 24px; - font-weight: 500; - flex: 1; -} -.input-area .numeric { - font-size: 18px; - font-weight: 500; - color: #6d6d6d; - width: 100px; - height: 48px; - border-radius: 2px; - box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - border: none; - display: flex; - flex-flow: row nowrap; - padding: 4px; - align-items: center; - justify-content: stretch; -} -.input-area .numeric input { - border: none; - font-size: 16px; - text-align: right; - height: 100%; - width: 100%; - outline: none !important; - background-color: transparent; -} -.input-area .numeric input[type=number]::-webkit-inner-spin-button, -.input-area .numeric input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; -} -.input-area .numeric span { - padding: 0 3px; - font-size: 14px; -} -.input-area select { - min-width: 150px; - height: 48px; - background-color: #fff; - padding: 0 20px; - font-size: 1rem; -} .setup-play { cursor: pointer; margin: auto; @@ -4665,51 +4592,16 @@ bottom: 1rem; right: 1rem; } -.modal.formato-info section .tast { - margin-left: -300px; -} -.modal.formato-info .radio-buttons { - display: flex; - justify-content: flex-start; - align-items: center; -} -.modal.formato-info .radio-buttons input { - width: 24px; - height: 24px; - object-fit: contain; - border-radius: 12px; - background-color: #f1f1f1; -} -.modal.formato-info .radio-buttons label { - font-size: 18px; - font-weight: normal; - font-stretch: normal; - font-style: normal; - line-height: 1.11; - letter-spacing: normal; - text-align: right; - color: #4b4b4b; -} -.modal.formato-info .radio-buttons label:first-of-type { - font-size: 24px; - font-weight: 500; - font-stretch: normal; - font-style: normal; - line-height: normal; - letter-spacing: normal; - text-align: center; - color: #002680; - padding-right: 200px; - padding-left: 20px; -} .slider { - display: flex; + display: grid; + grid-template-columns: 48px 1fr 48px; + grid-column-gap: 1rem; + width: 100%; flex-flow: row wrap; justify-content: space-between; align-items: center; } .slider .control { - margin: 0 10px; position: relative; flex: 1; } @@ -4787,7 +4679,6 @@ border: none; box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); background-image: linear-gradient(to bottom, #fff 0%, #bbbcbc 98%); - margin: 16px; } .keyboard { height: 262px; @@ -5564,18 +5455,12 @@ body { .modal.controstamposetup-info section .specific .box:last-of-type { background-color: #b3dbff; } -.modal.controstamposetup-info section .specific .input-area { - width: 480px; -} .modal.quote-velocita-info section.cornice .tast { margin-left: 125px; } .modal.quote-velocita-info section aside .box .body { padding: 4.5px; } -.modal.quote-velocita-info section aside .box .body .input-area { - margin: 5px auto; -} .modal.quote-velocita-info section .specific button { width: 48px; height: 48px; @@ -5659,11 +5544,6 @@ body { .scheda .body { padding: 0px; } -.scheda .body .input-area { - width: 480px; - margin: 4px; - margin-bottom: 0px; -} .modal.vuoto-info section .specific { padding-left: 5px; } @@ -5677,9 +5557,6 @@ body { .modal.vuoto-info section .specific .box:last-of-type { background-color: #b3dbff; } -.modal.vuoto-info section .specific .input-area { - width: 480px; -} .popup { width: 288px; height: 218px; @@ -5853,6 +5730,101 @@ input:focus { select:focus { outline: 5px #1791ff auto; } +.radio-buttons { + display: flex; + justify-content: flex-start; + align-items: center; +} +.radio-buttons input { + width: 24px; + height: 24px; + object-fit: contain; + border-radius: 12px; + background-color: #f1f1f1; + margin: 0 5px; +} +.radio-buttons label { + font-size: 18px; + line-height: 1.11; + color: #4b4b4b; +} +.radio-buttons label:first-of-type { + font-size: 24px; + font-weight: 500; + color: #002680; + flex: 1; +} +.input-area { + width: 100%; + display: flex; + flex-flow: row; + align-items: center; + justify-content: space-between; +} +.input-area.col { + flex-flow: column; + align-items: flex-start; + height: auto; +} +.input-area h3 { + color: #002680; + margin: 18px 0; +} +.input-area .buttons { + width: 100%; + display: flex; + flex-flow: row; + margin-bottom: 18px; +} +.input-area .buttons:last-child { + margin-bottom: 0; +} +.input-area label { + color: #002680; + font-size: 24px; + font-weight: 500; + flex: 1; +} +.input-area .numeric { + font-size: 18px; + font-weight: 500; + color: #6d6d6d; + width: 100px; + height: 48px; + border-radius: 2px; + box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); + border: none; + display: flex; + flex-flow: row nowrap; + padding: 4px; + align-items: center; + justify-content: stretch; +} +.input-area .numeric input { + border: none; + font-size: 16px; + text-align: right; + height: 100%; + width: 100%; + outline: none !important; + background-color: transparent; +} +.input-area .numeric input[type=number]::-webkit-inner-spin-button, +.input-area .numeric input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +.input-area .numeric span { + padding: 0 3px; + font-size: 14px; +} +.input-area select { + min-width: 150px; + height: 48px; + background-color: #fff; + padding: 0 20px; + font-size: 1rem; +} button:focus { outline: none; } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue index a3890af6..3752e9c3 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/stampo.vue @@ -14,7 +14,7 @@ - s +
From c80cdb8644ef9d36fee7c033e0031892f30800f4 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 12 Jun 2020 11:48:18 +0200 Subject: [PATCH 63/84] fix layout quote --- .../wwwroot/assets/styles/base/buttons.less | 715 +++++++++--------- .../wwwroot/assets/styles/base/layout.less | 1 - .../assets/styles/base/quote-velocita.less | 38 - .../wwwroot/assets/styles/base/setup.less | 2 +- Thermo.Active/wwwroot/assets/styles/style.css | 47 +- .../formato/components/show-formato-info.vue | 4 +- .../components/controstampo.vue | 6 +- .../components/discesa-cornice.vue | 6 +- .../components/salita-stampo.vue | 6 +- 9 files changed, 410 insertions(+), 415 deletions(-) delete mode 100644 Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less diff --git a/Thermo.Active/wwwroot/assets/styles/base/buttons.less b/Thermo.Active/wwwroot/assets/styles/base/buttons.less index f88799b5..6ba4a9c7 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/buttons.less +++ b/Thermo.Active/wwwroot/assets/styles/base/buttons.less @@ -8,495 +8,522 @@ @button-machine-color-to : #404040; button:focus { - outline: none; + outline: none; } button { - cursor: pointer; - -webkit-tap-highlight-color: transparent; + cursor: pointer; + -webkit-tap-highlight-color: transparent; } button[disabled] { - cursor: not-allowed !important; + cursor: not-allowed !important; - * { - cursor: not-allowed !important; - } + * { + cursor: not-allowed !important; + } } button.btn[disabled] { - border-radius: 2px; - border-radius: 2px; - background-color: #dddddd; - background-image: none; - box-shadow: none; - color: @color-warm-grey; + border-radius: 2px; + border-radius: 2px; + background-color: #dddddd; + background-image: none; + box-shadow: none; + color: @color-warm-grey; - &:hover { - box-shadow: none !important; - } + &:hover { + box-shadow: none !important; + } } .btn-demo { - color: #fff; - font-size: 22px; - font-weight: bold; + color: #fff; + font-size: 22px; + font-weight: bold; } .button.btn { - max-height: 48px; - display: inline-flex; - padding: 12px 20px !important; - min-height: 48px; + max-height: 48px; + display: inline-flex; + padding: 12px 20px !important; + min-height: 48px; } button.btn, .button.btn { - height: @button-height; - box-sizing: border-box; - border-radius: 2px; - margin: 0 8px; - text-align: center; - font-size: 18px; - font-weight: bold; - box-shadow: @button-shadow; - padding: 0 20px; - border: none; - background-image: linear-gradient(to bottom, @color-white2, @color-silver); - color: @color-darkish-blue; + height: @button-height; + box-sizing: border-box; + border-radius: 2px; + margin: 0 8px; + text-align: center; + font-size: 18px; + font-weight: bold; + box-shadow: @button-shadow; + padding: 0 20px; + border: none; + background-image: linear-gradient(to bottom, @color-white2, @color-silver); + color: @color-darkish-blue; - // display: inline-block; - // align-items: flex-start; - &:active:not([disabled]) { - background-image: linear-gradient(to bottom, @color-silver, @color-white2); - border: none !important; - box-shadow: inset @button-shadow !important; - } + // display: inline-block; + // align-items: flex-start; + &:active:not([disabled]) { + background-image: linear-gradient(to bottom, @color-silver, @color-white2); + border: none !important; + box-shadow: inset @button-shadow !important; + } - &:hover { - box-shadow: inset 0px 0px 0px 2px #8eb5e2; - } + &:hover { + box-shadow: inset 0px 0px 0px 2px #8eb5e2; + } - &.dark-blue { - background-color: @color-blue; - color: white; - } - - &.btn-danger { - color: @color-scarlet; - } - - &.dark-blue:active { - background-color: @color-darkish-blue-two !important; - } - - &.pressed { - background-image: linear-gradient(to bottom, @color-silver, @color-white2); - border: none !important; - box-shadow: inset @button-shadow !important; - } - -} - -button.btn.btn-success { - background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to); + &.dark-blue { + background-color: @color-blue; color: white; - border: #001e48 1px solid; + } + + &.btn-danger { + color: @color-scarlet; + } + + &.dark-blue:active { + background-color: @color-darkish-blue-two !important; + } + + &.pressed { + background-image: linear-gradient(to bottom, @color-silver, @color-white2); + border: none !important; + box-shadow: inset @button-shadow !important; + } - &:active { - background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important; - box-shadow: inset @button-shadow; - border: #001e48 1px solid !important; - color: #8eb5e2 - } } -button.btn.btn-success[disabled] { - border-radius: 2px; - border-radius: 2px; - box-shadow: none; - color: @color-warm-grey; - border: none; - - &:hover { - box-shadow: none !important; - background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to) !important; - } +button.absolute { + position: absolute; } -button.under { - width: 208px; - height: 45px; - object-fit: contain; - border-radius: 100px; - background-image: linear-gradient(to bottom, @button-machine-color-from, @button-machine-color-to); - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); - border: none; - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; +button.bottom { + bottom: 1rem; +} - img { - max-width: 178px; - max-height: 45px; - } +button.left { + left: 1rem; +} - &.pressed:active, - &:active { - background-image: none; - background-color: @button-machine-color-to; - } +button.right { + right: 1rem; +} - &.pressed { - background-image: linear-gradient(to bottom, @button-machine-color-to, @button-machine-color-from); - box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4); - } +button.top { + top: 1rem; } button.square { - // width: @button-height; - // height: @button-height; - border-radius: 2px !important; // background-color: #4b4b4b; + height: @button-height; + width: @button-height; + padding: 0; + margin: 0; +} - &:hover { - background-color: @button-success-color-to; - } +button.btn.btn-success { + background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to); + color: white; + border: #001e48 1px solid; + + &:active { + background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important; + box-shadow: inset @button-shadow; + border: #001e48 1px solid !important; + color: #8eb5e2 + } +} + +button.btn.btn-success[disabled] { + border-radius: 2px; + border-radius: 2px; + box-shadow: none; + color: @color-warm-grey; + border: none; + + &:hover { + box-shadow: none !important; + background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to) !important; + } +} + +button.under { + width: 208px; + height: 45px; + object-fit: contain; + border-radius: 100px; + background-image: linear-gradient(to bottom, @button-machine-color-from, @button-machine-color-to); + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4); + border: none; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + + img { + max-width: 178px; + max-height: 45px; + } + + &.pressed:active, + &:active { + background-image: none; + background-color: @button-machine-color-to; + } + + &.pressed { + background-image: linear-gradient(to bottom, @button-machine-color-to, @button-machine-color-from); + box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4); + } +} + +button.square { + // width: @button-height; + // height: @button-height; + border-radius: 2px !important; // background-color: #4b4b4b; + + &:hover { + background-color: @button-success-color-to; + } } .btn-spacer { - margin: 0 8px; - padding: 0 4px; - display: flex; + margin: 0 8px; + padding: 0 4px; + display: flex; - &.collapsed { - margin: 0; - padding: 0; - } + &.collapsed { + margin: 0; + padding: 0; + } } button.modal-close { - width: 28px; - height: 28px; - padding: none; - border-radius: 50%; - border: none; - background-color: #002680; - color: #fff; + width: 28px; + height: 28px; + padding: none; + border-radius: 50%; + border: none; + background-color: #002680; + color: #fff; - i { - font-size: 18px; - } + i { + font-size: 18px; + } } .btn-group { - margin: 0 8px; - padding: 0; - display: flex; + margin: 0 8px; + padding: 0; + display: flex; - button { - border-radius: 0 !important; - margin-left: 0 !important; - margin-right: 0 !important; + button { + border-radius: 0 !important; + margin-left: 0 !important; + margin-right: 0 !important; - &:first-child { - border-top-left-radius: 2px !important; - border-bottom-left-radius: 2px !important; - } - - &:last-child { - border-top-right-radius: 2px !important; - border-bottom-right-radius: 2px !important; - } + &:first-child { + border-top-left-radius: 2px !important; + border-bottom-left-radius: 2px !important; } + + &:last-child { + border-top-right-radius: 2px !important; + border-bottom-right-radius: 2px !important; + } + } } button.soft { - width: 96px; - height: 48px; - margin: 4px; - background-image: linear-gradient(to bottom, #f1f1f1, @color-silver); - box-sizing: border-box; - border: none; - box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.5); - color: @color-darkish-blue; - font-size: 14px; - border-radius: 2px; + width: 96px; + height: 48px; + margin: 4px; + background-image: linear-gradient(to bottom, #f1f1f1, @color-silver); + box-sizing: border-box; + border: none; + box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + color: @color-darkish-blue; + font-size: 14px; + border-radius: 2px; - &.icon { - display: flex; - padding: 1px 12px; - align-items: center; - text-align: left; - } + &.icon { + display: flex; + padding: 1px 12px; + align-items: center; + text-align: left; + } - &.axes { - width: 54px; - font-size: 1.8em; - display: block; - font-weight: 600; - padding: 0px; - text-align: center; - } + &.axes { + width: 54px; + font-size: 1.8em; + display: block; + font-weight: 600; + padding: 0px; + text-align: center; + } + + img { + width: 18px; + image-rendering: -webkit-optimize-contrast; + display: inline; + vertical-align: bottom; + margin-right: 6px; + } + + &.active { + background-image: linear-gradient(to bottom, @color-cerulean, @color-clear-blue) !important; + color: white !important; + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); img { - width: 18px; - image-rendering: -webkit-optimize-contrast; - display: inline; - vertical-align: bottom; - margin-right: 6px; + filter: grayscale(100%) invert(100) saturate(200); } + } - &.active { - background-image: linear-gradient(to bottom, @color-cerulean, @color-clear-blue) !important; - color: white !important; - box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + &:active { + background-image: linear-gradient(to bottom, @color-silver, #f1f1f1); + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); + } - img { - filter: grayscale(100%) invert(100) saturate(200); - } + &.spaced { + margin: 4px 8px; + } + + &[disabled]:not(.readonly) { + background-color: #dddddd !important; + // background-image: none !important; + box-shadow: none !important; + color: @color-warm-grey; + + img { + filter: grayscale(100%) invert(44%); } + } - &:active { - background-image: linear-gradient(to bottom, @color-silver, #f1f1f1); - box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); - } + &.square { + width: 60px; + } - &.spaced { - margin: 4px 8px; - } + &.incremental { + padding: 0px 2px; + margin-right: 0px; + margin-left: 0px; + } - &[disabled]:not(.readonly) { - background-color: #dddddd !important; - // background-image: none !important; - box-shadow: none !important; - color: @color-warm-grey; + &.firstIncr { + margin-left: 4px; + border-radius: 2px 0px 0px 2px !important + } - img { - filter: grayscale(100%) invert(44%); - } - } + &.middleIncr { + border-radius: 0px !important + } - &.square { - width: 60px; - } + &.lastIncr { + border-radius: 0px 2px 2px 0px !important + } - &.incremental { - padding: 0px 2px; - margin-right: 0px; - margin-left: 0px; - } + i.fa { + font-size: 24px; + } - &.firstIncr { - margin-left: 4px; - border-radius: 2px 0px 0px 2px !important - } + &.readonly { + background: transparent; + box-shadow: none; + border: 3px solid #4e585e; + color: #ddd; + cursor: default; + } - &.middleIncr { - border-radius: 0px !important - } - - &.lastIncr { - border-radius: 0px 2px 2px 0px !important - } - - i.fa { - font-size: 24px; - } - - &.readonly { - background: transparent; - box-shadow: none; - border: 3px solid #4e585e; - color: #ddd; - cursor: default; - } - - &.inverter { - background: transparent; - box-shadow: none; - border: 3px solid #657178; - color: white - } + &.inverter { + background: transparent; + box-shadow: none; + border: 3px solid #657178; + color: white + } } .togglebutton { - vertical-align: middle; - -webkit-tap-highlight-color: transparent; + vertical-align: middle; + -webkit-tap-highlight-color: transparent; } .togglebutton, .togglebutton label, .togglebutton input, .togglebutton .toggle { - user-select: none; + user-select: none; } .togglebutton label { - cursor: pointer; - color: rgba(0, 0, 0, 0.26); + cursor: pointer; + color: rgba(0, 0, 0, 0.26); } .form-group.is-focused .togglebutton label { - color: rgba(0, 0, 0, 0.26); + color: rgba(0, 0, 0, 0.26); } .form-group.is-focused .togglebutton label:hover, .form-group.is-focused .togglebutton label:focus { - color: rgba(0, 0, 0, .54); + color: rgba(0, 0, 0, .54); } fieldset[disabled] .form-group.is-focused .togglebutton label { - color: rgba(0, 0, 0, 0.26); + color: rgba(0, 0, 0, 0.26); } .togglebutton label input[type=checkbox] { - opacity: 0; - width: 0; - height: 0; + opacity: 0; + width: 0; + height: 0; } .togglebutton label .toggle { - text-align: left; - margin-left: 5px; + text-align: left; + margin-left: 5px; } .togglebutton label .toggle, .togglebutton label input[type=checkbox][disabled]+.toggle { - content: ""; - display: inline-block; - width: 70px; - height: 24px; - background-color: #ddd; - border-radius: 15px; - margin-right: 15px; - transition: background 0.3s ease; - vertical-align: middle; - position: relative; - box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.5); - line-height: 24px; - text-align: center; - color: #979797; - font-size: 10px; - text-transform: uppercase; + content: ""; + display: inline-block; + width: 70px; + height: 24px; + background-color: #ddd; + border-radius: 15px; + margin-right: 15px; + transition: background 0.3s ease; + vertical-align: middle; + position: relative; + box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.5); + line-height: 24px; + text-align: center; + color: #979797; + font-size: 10px; + text-transform: uppercase; } .togglebutton label .toggle:after { - content: ""; - display: inline-block; - width: 20px; - height: 20px; - background-image: linear-gradient(to bottom, #1756ad, #002680); - border-radius: 20px; - position: relative; - box-shadow: 0 1px 1px 0px rgba(0, 0, 0, 0.4); - left: 1px; - top: 2px; - position: absolute; - border: none; - transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; + content: ""; + display: inline-block; + width: 20px; + height: 20px; + background-image: linear-gradient(to bottom, #1756ad, #002680); + border-radius: 20px; + position: relative; + box-shadow: 0 1px 1px 0px rgba(0, 0, 0, 0.4); + left: 1px; + top: 2px; + position: absolute; + border: none; + transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease; } .togglebutton label input[type=checkbox][disabled]+.toggle:after, .togglebutton label input[type=checkbox][disabled]:checked+.toggle:after { - background-color: #BDBDBD; + background-color: #BDBDBD; } .togglebutton label input[type=checkbox]+.toggle:active:after, .togglebutton label input[type=checkbox][disabled]+.toggle:active:after { - box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.6), 0 0 0 20px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.6), 0 0 0 20px rgba(0, 0, 0, 0.2); } .togglebutton label input[type=checkbox]:checked+.toggle:after { - left: 48px; + left: 48px; } .togglebutton label input[type=checkbox]:checked+.toggle { - content: ""; - background-image: linear-gradient(to bottom, #3fa4ff, #1791ff); - color: #fff; + content: ""; + background-image: linear-gradient(to bottom, #3fa4ff, #1791ff); + color: #fff; } .togglebutton.big { - span.toggle { - height: 40px; - width: 112px; - border-radius: 20px; - font-size: 17px; - line-height: 40px; - font-weight: bold; + span.toggle { + height: 40px; + width: 112px; + border-radius: 20px; + font-size: 17px; + line-height: 40px; + font-weight: bold; - &:after { - width: 36px; - height: 36px; - } + &:after { + width: 36px; + height: 36px; } + } - input[type=checkbox]:checked+.toggle:after { - left: 74px; - } + input[type=checkbox]:checked+.toggle:after { + left: 74px; + } } .custom-checkbox { - width: 22px; - height: 22px; - display: flex; - // margin-left: 16px; - align-items: center; - position: relative; + width: 22px; + height: 22px; + display: flex; + // margin-left: 16px; + align-items: center; + position: relative; } .custom-checkbox label { - cursor: pointer; - position: absolute; - width: 22px; - height: 22px; - top: 0; - left: 0; - background-color: @color-white2; - box-shadow: inset 0 1px 3px @color-black-50; - border-radius: 2px; + cursor: pointer; + position: absolute; + width: 22px; + height: 22px; + top: 0; + left: 0; + background-color: @color-white2; + box-shadow: inset 0 1px 3px @color-black-50; + border-radius: 2px; } .custom-checkbox label:after { - opacity: 0; - content: ''; - position: absolute; - width: 16px; - height: 9px; - background: transparent; - top: 3px; - left: 2px; - border: 5px solid #1791ff; - border-top: none; - border-right: none; - transform: rotate(-48deg); + opacity: 0; + content: ''; + position: absolute; + width: 16px; + height: 9px; + background: transparent; + top: 3px; + left: 2px; + border: 5px solid #1791ff; + border-top: none; + border-right: none; + transform: rotate(-48deg); } .custom-checkbox input[type=checkbox]:checked+label { - cursor: pointer; - position: absolute; - width: 22px; - height: 22px; - top: 0; - left: 0; - background-color: @color-white2; - border: solid 1px @color-clear-blue; - border-radius: 2px; + cursor: pointer; + position: absolute; + width: 22px; + height: 22px; + top: 0; + left: 0; + background-color: @color-white2; + border: solid 1px @color-clear-blue; + border-radius: 2px; } .custom-checkbox input[type=checkbox]:checked+label:after { - opacity: 1; + opacity: 1; } .custom-checkbox-label { - display: flex; - margin-left: 8px; - font-size: 18px; - line-height: 1.11; - color: @color-greyish-brown; + display: flex; + margin-left: 8px; + font-size: 18px; + line-height: 1.11; + color: @color-greyish-brown; } // .togglebutton label input[type=checkbox]:checked+.toggle:after { diff --git a/Thermo.Active/wwwroot/assets/styles/base/layout.less b/Thermo.Active/wwwroot/assets/styles/base/layout.less index a7f5a7dc..e2379f8b 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/layout.less +++ b/Thermo.Active/wwwroot/assets/styles/base/layout.less @@ -19,7 +19,6 @@ @import "processo.less"; @import "progrprerisc.less"; @import "controstamposetup.less"; -@import "quote-velocita.less"; @import "opzioni.less"; @import "imbutitura.less"; @import "estrazione.less"; diff --git a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less b/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less deleted file mode 100644 index 60d50f8b..00000000 --- a/Thermo.Active/wwwroot/assets/styles/base/quote-velocita.less +++ /dev/null @@ -1,38 +0,0 @@ -// out: false, sourceMap: false, main: ../style.less -@import "grid-system.less"; -@import "colors.less"; -@import "fonts.less"; - - -.modal.quote-velocita-info { - section { - - &.cornice { - .tast { - margin-left: 125px; - } - } - - aside { - .box { - .body { - padding: 4.5px; - } - } - } - - .specific { - button { - width: 48px; - height: 48px; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, @color-darkish-blue); - // position: absolute; - // bottom: 1rem; - // left: 1rem; - } - } - } -} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/assets/styles/base/setup.less b/Thermo.Active/wwwroot/assets/styles/base/setup.less index 1704192c..6291be4d 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/setup.less +++ b/Thermo.Active/wwwroot/assets/styles/base/setup.less @@ -63,7 +63,7 @@ } - .specific { + article { display: flex; flex-direction: column; width: 100%; diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 4f42e86d..b3b44990 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -55,30 +55,30 @@ height: 2px; margin-left: 0px; } -.setup .modal section.body section .specific { +.setup .modal section.body section article { display: flex; flex-direction: column; width: 100%; position: relative; } -.setup .modal section.body section .specific .slides { +.setup .modal section.body section article .slides { width: 100%; height: 160px; display: flex; justify-content: space-evenly; align-items: center; } -.setup .modal section.body section .specific .slides img { +.setup .modal section.body section article .slides img { flex-shrink: 0; width: 215px; height: 140px; border: 1px solid #bbbcbc; cursor: pointer; } -.setup .modal section.body section .specific .slides .imgborder { +.setup .modal section.body section article .slides .imgborder { border: 1px solid #002680; } -.setup .modal section.body section .specific .svg-area { +.setup .modal section.body section article .svg-area { display: flex; justify-content: center; position: relative; @@ -86,7 +86,7 @@ width: 100%; flex: 1; } -.setup .modal section.body section .specific .svg-area img { +.setup .modal section.body section article .svg-area img { width: 100%; } .setup .modal section.body footer { @@ -5455,20 +5455,6 @@ body { .modal.controstamposetup-info section .specific .box:last-of-type { background-color: #b3dbff; } -.modal.quote-velocita-info section.cornice .tast { - margin-left: 125px; -} -.modal.quote-velocita-info section aside .box .body { - padding: 4.5px; -} -.modal.quote-velocita-info section .specific button { - width: 48px; - height: 48px; - border-radius: 2px; - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5); - border: solid 1px #001e48; - background-image: linear-gradient(to bottom, #1756ad, #002680); -} .modal.opzioni-info hr { width: 2px; height: 830px; @@ -5903,6 +5889,27 @@ button.btn.pressed, border: none !important; box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4) !important; } +button.absolute { + position: absolute; +} +button.bottom { + bottom: 1rem; +} +button.left { + left: 1rem; +} +button.right { + right: 1rem; +} +button.top { + top: 1rem; +} +button.square { + height: 48px; + width: 48px; + padding: 0; + margin: 0; +} button.btn.btn-success { background-image: linear-gradient(to bottom, #1756ad, #002680); color: white; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue index 1da05c3a..ddf2d220 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.vue @@ -21,7 +21,7 @@
-
+
@@ -55,7 +55,7 @@ src="assets/icons/svg/slide-controstampo.svg" />
- +