diff --git a/Client/Browser_Tools/BrowserJSObject.cs b/Client/Browser_Tools/BrowserJSObject.cs index 7b8c2d91..dd4161dd 100644 --- a/Client/Browser_Tools/BrowserJSObject.cs +++ b/Client/Browser_Tools/BrowserJSObject.cs @@ -589,8 +589,8 @@ namespace CMS_Client.Browser_Tools using (ZipArchive archive = ZipFile.OpenRead(jobOpenFileDialog.FileName)) { // Setup main Fields - job.Name = Path.GetFileName(jobOpenFileDialog.FileName); - job.LastEditTimestamp = new FileInfo(jobOpenFileDialog.FileName).LastAccessTime; + job.name = Path.GetFileName(jobOpenFileDialog.FileName); + job.lastEditTimestamp = new FileInfo(jobOpenFileDialog.FileName).LastAccessTime; foreach (ZipArchiveEntry entry in archive.Entries) { @@ -599,7 +599,7 @@ namespace CMS_Client.Browser_Tools { using (var reader = new StreamReader(entry.Open())) { - job.IsoMainProgram = (reader.ReadToEnd()); + job.isoMainProgram = (reader.ReadToEnd()); } } // Add all images @@ -611,10 +611,10 @@ namespace CMS_Client.Browser_Tools { entry.Open().CopyTo(memstream); bytes = memstream.ToArray(); - job.Metadata.Generics.Images.Add(new ImageParam() + job.metadata.generics.images.Add(new ImageParam() { - Name = Path.GetFileNameWithoutExtension(entry.Name), - Base64 = "data:image/" + Path.GetExtension(entry.Name).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(bytes) + name = Path.GetFileNameWithoutExtension(entry.Name), + base64 = "data:image/" + Path.GetExtension(entry.Name).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(bytes) }); } } @@ -633,10 +633,10 @@ namespace CMS_Client.Browser_Tools } else { - job.Metadata.Generics.Description = metasFromFile.Description; - job.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime; - job.Metadata.Tools = metasFromFile.Tools; - job.Metadata.Customs = metasFromFile.Customs; + job.metadata.generics.Description = metasFromFile.Description; + job.metadata.generics.ExecutionTime = metasFromFile.ExecutionTime; + job.metadata.tools = metasFromFile.Tools; + job.metadata.customs = metasFromFile.Customs; } } } @@ -680,10 +680,10 @@ namespace CMS_Client.Browser_Tools } //Metadata - metafile.Description = job.Metadata.Generics.Description; - metafile.ExecutionTime = job.Metadata.Generics.ExecutionTime; - metafile.Tools = job.Metadata.Tools; - metafile.Customs = job.Metadata.Customs; + metafile.Description = job.metadata.generics.Description; + metafile.ExecutionTime = job.metadata.generics.ExecutionTime; + metafile.Tools = job.metadata.tools; + metafile.Customs = job.metadata.customs; using (StreamWriter file = System.IO.File.CreateText(JOB_OPENING_PATH + JOB_METADATA_FILENAME)) { JsonSerializer serializer = new JsonSerializer @@ -694,7 +694,7 @@ namespace CMS_Client.Browser_Tools } //Main Program - System.IO.File.WriteAllText(JOB_OPENING_PATH + JOB_MAIN_FILENAME, job.IsoMainProgram); + System.IO.File.WriteAllText(JOB_OPENING_PATH + JOB_MAIN_FILENAME, job.isoMainProgram); //delete Zip File if exists if (System.IO.File.Exists(jobSaveFileDialog.FileName)) @@ -730,8 +730,8 @@ namespace CMS_Client.Browser_Tools //Send to Step e.SetReturnValue(JsonConvert.SerializeObject(new ImageParam() { - Name = Path.GetFileNameWithoutExtension(imageOpenFileDialog.FileName), - Base64 = "data:image/" + Path.GetExtension(newImagePath).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes(newImagePath)) + name = Path.GetFileNameWithoutExtension(imageOpenFileDialog.FileName), + base64 = "data:image/" + Path.GetExtension(newImagePath).ToLower().TrimStart('.') + ";base64," + Convert.ToBase64String(System.IO.File.ReadAllBytes(newImagePath)) })); return; } @@ -790,7 +790,7 @@ namespace CMS_Client.Browser_Tools System.IO.File.Copy(PPOpenFileDialog.FileName, newPPPath); //Send to Step - e.SetReturnValue(null); + e.SetReturnValue(JsonConvert.SerializeObject(new PPContainer(Path.GetFileName(PPOpenFileDialog.FileName)))); return; } e.SetReturnValue(null); diff --git a/Client/Browser_Tools/Models/Errors/ErrorContainer.cs b/Client/Browser_Tools/Models/Errors/ErrorContainer.cs index 909b25f1..7d35b13f 100644 --- a/Client/Browser_Tools/Models/Errors/ErrorContainer.cs +++ b/Client/Browser_Tools/Models/Errors/ErrorContainer.cs @@ -8,11 +8,11 @@ namespace CMS_Client.Browser_Tools.Models.Errors { public class ErrorContainer { - public String Error; + public String error; public ErrorContainer(String Err) { - this.Error = Err; + this.error = Err; } } } diff --git a/Client/Browser_Tools/Models/JobToStep.cs b/Client/Browser_Tools/Models/JobToStep.cs index 502f0db7..7118f1f9 100644 --- a/Client/Browser_Tools/Models/JobToStep.cs +++ b/Client/Browser_Tools/Models/JobToStep.cs @@ -9,14 +9,14 @@ namespace CMS_Client.Browser_Tools.Models { public class JobToStep { - public string Name; - public DateTime LastEditTimestamp; - public string IsoMainProgram; - public Metas Metadata; + public string name; + public DateTime lastEditTimestamp; + public string isoMainProgram; + public Metas metadata; public JobToStep() { - Metadata = new Metas(); + metadata = new Metas(); } } } diff --git a/Client/Browser_Tools/Models/Metadata/CustomParam.cs b/Client/Browser_Tools/Models/Metadata/CustomParam.cs index c1fa013d..13774abc 100644 --- a/Client/Browser_Tools/Models/Metadata/CustomParam.cs +++ b/Client/Browser_Tools/Models/Metadata/CustomParam.cs @@ -10,12 +10,12 @@ namespace CMS_Client.Browser_Tools.Models.Metadata { public string Name; public string Type; - public List SelectionList; + public List selectionList; public int Value; public CustomParam() { - SelectionList = new List(); + selectionList = new List(); } } } diff --git a/Client/Browser_Tools/Models/Metadata/GenericsParam.cs b/Client/Browser_Tools/Models/Metadata/GenericsParam.cs index 6484626c..d18ba2ae 100644 --- a/Client/Browser_Tools/Models/Metadata/GenericsParam.cs +++ b/Client/Browser_Tools/Models/Metadata/GenericsParam.cs @@ -8,13 +8,13 @@ namespace CMS_Client.Browser_Tools.Models.Metadata { public class GenericsParam { - public List Images; + public List images; public string Description; public TimeSpan ExecutionTime; public GenericsParam() { - Images = new List(); + images = new List(); } } } diff --git a/Client/Browser_Tools/Models/Metadata/ImageParam.cs b/Client/Browser_Tools/Models/Metadata/ImageParam.cs index a91005e8..dec0ff12 100644 --- a/Client/Browser_Tools/Models/Metadata/ImageParam.cs +++ b/Client/Browser_Tools/Models/Metadata/ImageParam.cs @@ -8,7 +8,7 @@ namespace CMS_Client.Browser_Tools.Models.Metadata { public class ImageParam { - public string Name; - public string Base64; + public string name; + public string base64; } } diff --git a/Client/Browser_Tools/Models/Metadata/Metas.cs b/Client/Browser_Tools/Models/Metadata/Metas.cs index 3f07a344..d907b8c7 100644 --- a/Client/Browser_Tools/Models/Metadata/Metas.cs +++ b/Client/Browser_Tools/Models/Metadata/Metas.cs @@ -8,15 +8,15 @@ namespace CMS_Client.Browser_Tools.Models.Metadata { public class Metas { - public GenericsParam Generics; - public List Tools; - public List Customs; + public GenericsParam generics; + public List tools; + public List customs; public Metas() { - Generics = new GenericsParam(); - Tools = new List(); - Customs = new List(); + generics = new GenericsParam(); + tools = new List(); + customs = new List(); } } } diff --git a/Client/Browser_Tools/Models/Metadata/PPContainer.cs b/Client/Browser_Tools/Models/Metadata/PPContainer.cs new file mode 100644 index 00000000..396c6f2f --- /dev/null +++ b/Client/Browser_Tools/Models/Metadata/PPContainer.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMS_Client.Browser_Tools.Models.Metadata +{ + public class PPContainer + { + public String name; + + public PPContainer(String name) + { + this.name = name; + } + } +} diff --git a/Client/Client.csproj b/Client/Client.csproj index e3ca8c54..dffecd6b 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -162,6 +162,7 @@ + Form diff --git a/Step.Config/Config/areasConfig.xml b/Step.Config/Config/areasConfig.xml index 9fe3e547..29d70528 100644 --- a/Step.Config/Config/areasConfig.xml +++ b/Step.Config/Config/areasConfig.xml @@ -11,7 +11,7 @@ true - true + false true true @@ -31,8 +31,13 @@ false - true + false true true + + true + true + false + \ No newline at end of file diff --git a/Step.Config/Config/areasConfigValidator.xsd b/Step.Config/Config/areasConfigValidator.xsd index 386f9918..0fd034e1 100644 --- a/Step.Config/Config/areasConfigValidator.xsd +++ b/Step.Config/Config/areasConfigValidator.xsd @@ -72,6 +72,15 @@ + + + + + + + + + diff --git a/Step.Config/Config/serverConfig.xml b/Step.Config/Config/serverConfig.xml index 89178614..cd99f731 100644 --- a/Step.Config/Config/serverConfig.xml +++ b/Step.Config/Config/serverConfig.xml @@ -1,9 +1,9 @@ - DEMO + OSAI true - localhost + 192.168.157.2 8080 Ares 37 OF C:\PartPrg\ diff --git a/Step.Config/ServerConfig.cs b/Step.Config/ServerConfig.cs index 7b0610fc..9445b526 100644 --- a/Step.Config/ServerConfig.cs +++ b/Step.Config/ServerConfig.cs @@ -32,6 +32,7 @@ namespace Step.Config public static AreasConfigModel MaintenanceConfig; public static AreasConfigModel UtilitiesConfig; public static AreasConfigModel ScadaConfig; + public static AreasConfigModel JobEditorConfig; public static List MacrosConfig; } diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index 91bbd3eb..3a8953fc 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -98,6 +98,10 @@ namespace Step.Config case AREAS.SCADA_KEY: SetAreaValue(ref ScadaConfig, element); break; + + case AREAS.JOBEDITOR_KEY: + SetAreaValue(ref JobEditorConfig, element); + break; } } @@ -150,6 +154,9 @@ namespace Step.Config case AREAS.SCADA_KEY: return ScadaConfig.Enabled; + case AREAS.JOBEDITOR_KEY: + return ScadaConfig.Enabled; + case AREAS.GENERAL_KEY: case AREAS.UNDER_HOOD: return true; diff --git a/Step.Model/Constants.cs b/Step.Model/Constants.cs index fc68621a..388d6b2c 100644 --- a/Step.Model/Constants.cs +++ b/Step.Model/Constants.cs @@ -115,6 +115,7 @@ namespace Step.Model public const string SCADA_KEY = "scada"; public const string GENERAL_KEY = "general"; public const string UNDER_HOOD = "underHood"; + public const string JOBEDITOR_KEY = "jobeditor"; } // Config File Names diff --git a/Step.Model/DTOModels/DTOStartupConfigurationModel.cs b/Step.Model/DTOModels/DTOStartupConfigurationModel.cs index 986175b1..768351dc 100644 --- a/Step.Model/DTOModels/DTOStartupConfigurationModel.cs +++ b/Step.Model/DTOModels/DTOStartupConfigurationModel.cs @@ -16,5 +16,6 @@ namespace Step.Model.DTOModels public AreasConfigModel MaintenanceConfig; public AreasConfigModel UtilitiesConfig; public AreasConfigModel ScadaConfig; + public AreasConfigModel JobEditorConfig; } } diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 27139f51..8e34af15 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -383,7 +383,7 @@ namespace Step.NC // Update queue running index after move an item if (itemId < QueueRunningIndexes[processId] && newIndex >= QueueRunningIndexes[processId]) QueueRunningIndexes[processId] -= 1; - if (newIndex < QueueRunningIndexes[processId] && itemId > QueueRunningIndexes[processId]) + if (newIndex <= QueueRunningIndexes[processId] && itemId > QueueRunningIndexes[processId]) QueueRunningIndexes[processId] += 1; queue = new List(); @@ -1263,6 +1263,8 @@ namespace Step.NC { config = new ToolTableConfiguration(); CmsError cmsError = numericalControl.TOOLS_RConfiguration(ref config); + if (cmsError.IsError()) + return cmsError; if (NcConfig.NcVendor != NC_VENDOR.SIEMENS) { diff --git a/Step/Controllers/WebApi/ConfigurationController.cs b/Step/Controllers/WebApi/ConfigurationController.cs index 0a78cd85..0605e877 100644 --- a/Step/Controllers/WebApi/ConfigurationController.cs +++ b/Step/Controllers/WebApi/ConfigurationController.cs @@ -24,7 +24,8 @@ namespace Step.Controllers.WebApi MaintenanceConfig = MaintenanceConfig, ReportConfig = ReportConfig, ToolingConfig = ToolingConfig, - UtilitiesConfig = UtilitiesConfig + UtilitiesConfig = UtilitiesConfig, + JobEditorConfig = JobEditorConfig }; return Ok(startupConfiguration); diff --git a/Step/Listeners/Database/SignalRDatabaseHandler.cs b/Step/Listeners/Database/SignalRDatabaseHandler.cs index 3af9cec9..286b3e67 100644 --- a/Step/Listeners/Database/SignalRDatabaseHandler.cs +++ b/Step/Listeners/Database/SignalRDatabaseHandler.cs @@ -10,12 +10,15 @@ using Step.Model.DatabaseModels; using Step.Model.DTOModels; using Step.Model.DTOModels.ToolModels; using Step.NC; +using Step.Utils; using TeamDev.SDK.MVVM; namespace Step.Listeners.Database { public static class SignalRDatabaseHandler { + private static List LastPartProgramQueue = new List(); + public static void UpdateToolsData(object newData) { using (NcToolManagerController controller = new NcToolManagerController()) @@ -73,5 +76,29 @@ namespace Step.Listeners.Database } } } + + public static void UpdateQueue(object queue) + { + List newQueue = queue as List; + + if (!LastPartProgramQueue.SequenceEqual(newQueue)) + { + // Copy to static object + LastPartProgramQueue = new List(); + + foreach (var queueItem in newQueue) + { + DTOQueueModel tmp = new DTOQueueModel(); + SupportFunctions.CopyProperties(queueItem, tmp); + LastPartProgramQueue.Add(tmp); + } + + + using (QueueController controller = new QueueController()) + { + controller.UpdateQueue(); + } + } + } } } diff --git a/Step/Listeners/ListenersHandler.cs b/Step/Listeners/ListenersHandler.cs index 52ce0c83..c820961a 100644 --- a/Step/Listeners/ListenersHandler.cs +++ b/Step/Listeners/ListenersHandler.cs @@ -83,6 +83,7 @@ namespace Step.Listeners infos.Add(MessageServices.Current.Subscribe(SEND_QUEUE_DATA, (a, b) => { SignalRListener.SendPartProgramQueue(a); + SignalRDatabaseHandler.UpdateQueue(a); })); diff --git a/Step/wwwroot/assets/icons/png/editor-BIG@1x.png b/Step/wwwroot/assets/icons/png/editor-BIG.png similarity index 100% rename from Step/wwwroot/assets/icons/png/editor-BIG@1x.png rename to Step/wwwroot/assets/icons/png/editor-BIG.png diff --git a/Step/wwwroot/assets/styles/base/footer.less b/Step/wwwroot/assets/styles/base/footer.less index 092d91f8..a4a2c1ab 100644 --- a/Step/wwwroot/assets/styles/base/footer.less +++ b/Step/wwwroot/assets/styles/base/footer.less @@ -126,6 +126,11 @@ footer { background-size: cover; } + button.jobeditor{ + background-image: url(../icons/png/editor-BIG.png); + background-size: cover; + } + button:active{ box-shadow: 0px 0px 1px 1px #FFF; } diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 52b4dc3f..7597848a 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -2845,6 +2845,10 @@ footer .container button.scada { background-image: url(../icons/png/SCADA-big.png); background-size: cover; } +footer .container button.jobeditor { + background-image: url(../icons/png/editor-BIG.png); + background-size: cover; +} footer .container button:active { box-shadow: 0px 0px 1px 1px #FFF; } diff --git a/Step/wwwroot/src/components/job-editor-detail.ts b/Step/wwwroot/src/components/job-editor-detail.ts index 4fb3cc7f..3ff5945e 100644 --- a/Step/wwwroot/src/components/job-editor-detail.ts +++ b/Step/wwwroot/src/components/job-editor-detail.ts @@ -9,6 +9,10 @@ import "./job-editor-lang-definition" import { Container, Draggable } from "vue-smooth-dnd"; import { objectsJob } from "src/modules/base-components/cards"; import * as pf from "sprintf-js"; +import { jobService } from "../services/jobService"; +import * as iziToast from "izitoast"; + +declare var cmsClient: any; @Component({ components: { ace, Container, Draggable, objectsJob } }) export default class JobEditorDetail extends Vue { @@ -22,6 +26,8 @@ export default class JobEditorDetail extends Vue { commands = new Array(); interactive: boolean = false; + macros: Array = []; + get sortedCommands() { return Array.from(this.activeCommandSet).sort((a, b) => { if (a.order > b.order) return 1; @@ -55,9 +61,9 @@ export default class JobEditorDetail extends Vue { commandsChanged(n, o) { if (n && this.interactive) { var result = ""; - + debugger this.commands.forEach(c => { - result += pf.vsprintf(c.definition.command, c.value || "", c.value2 || "") + "\n"; + result += pf.vsprintf(c.definition.command, [c.value || "", c.value2 || ""]) + "\n"; }); this.isoProgram = result; @@ -108,6 +114,32 @@ export default class JobEditorDetail extends Vue { vScrollBarAlwaysVisible: true }) } + + selectProgram(command) { + var result = JSON.parse(cmsClient.addPPToJob()); + + if (!result) + this.showError("internal_error"); + if (result.error) + this.showError(result.error); + else + command.value = result.name; + } + + async mounted() { + this.macros = await jobService.GetMacroList(); + } + + private showError(error){ + (iziToast as any).error({ + title: "Error", + message: error, + theme: "dark", + timeout: 10000, + class: "t-error", + transitionOut: "fadeOut", + }) + } } interface commandDefinition { diff --git a/Step/wwwroot/src/components/job-editor-detail.vue b/Step/wwwroot/src/components/job-editor-detail.vue index 2170b88e..c9e1dea5 100644 --- a/Step/wwwroot/src/components/job-editor-detail.vue +++ b/Step/wwwroot/src/components/job-editor-detail.vue @@ -18,7 +18,7 @@
- +
@@ -31,7 +31,7 @@
diff --git a/Step/wwwroot/src/components/job-editor.ts b/Step/wwwroot/src/components/job-editor.ts index 89cacc09..eb83506b 100644 --- a/Step/wwwroot/src/components/job-editor.ts +++ b/Step/wwwroot/src/components/job-editor.ts @@ -13,6 +13,7 @@ export default class JobEditor extends Vue { editing: boolean = false; currentJob = ""; + // occorre uno switch per la scelta del linguaggio in base al CN jobitems = siemensJobItems; public selectedTab: string = "ParBase"; @@ -30,34 +31,34 @@ export default class JobEditor extends Vue { const siemensJobItems = [ - { title: 'job_item_part_program', layout: "big", command: 'CALL "%s"', rx: /CALL "(.+)";?|CALL "(.+)";([.]*)"/, order: 0 }, - { title: 'job_item_macro_cms', layout: "big", command: 'PCALL /_N_CMA_DIR/%s', rx: /PCALL \/_N_CMA_DIR\/(.+);?|PCALL \/_N_CMA_DIR\/(.+);?([.]*)/, order: 0 }, - { title: 'job_item_text', layout: "big", command: "%s", rx: /(.+);?|(.+);([.]*)/, order: 100 }, - { title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;?|^M0;([.]*)/, order: 0 }, - { title: 'job_item_delay', layout: "small", command: "G04 F%s;", rx: /G04 F(\d*);?|G04 F(\d*);([.]*)/, order: 0 }, - { title: 'job_item_origin', layout: "small", command: "G%s", rx: /G(.+);?|G(.+);([.]*)/, order: 0 }, - { title: 'job_item_end_program', layout: "small", command: "M30", rx: /M30;?|M30;([.]*)/, order: 0 }, + { title: 'job_item_part_program', layout: "big", command: 'CALL "%s";%s', rx: /CALL "(.+)";(.*)|CALL "(.+)";?/, order: 0 }, + { title: 'job_item_macro_cms', layout: "big", command: 'PCALL /_N_CMA_DIR/%s;%s', rx: /PCALL \/_N_CMA_DIR\/(.+);(.*)|PCALL \/_N_CMA_DIR\/(.+);?/, order: 0 }, + { title: 'job_item_text', layout: "big", command: "%s;%s", rx: /(.+);(.*)|(.+);?/, order: 100 }, + { title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 }, + { title: 'job_item_delay', layout: "small", command: "G04 F%s;%s", rx: /G04 F(\d*);(.*)|G04 F(\d*);?/, order: 0 }, + { title: 'job_item_origin', layout: "small", command: "G%s;%s", rx: /G(.+);(.*)|G(.+);?/, order: 0 }, + { title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 }, ]; // Da controllare comandi e regex const osaiJobItems = [ - { title: 'job_item_part_program', layout: "big", command: 'M198 %s', rx: /M198 (.+);?[.]*/, order: 0 }, - { title: 'job_item_macro_cms', layout: "big", command: 'M98 P%s', rx: /M98 P(.+);?[.]*/, order: 0 }, - { title: 'job_item_text', layout: "big", command: "%s", rx: /(.+);?[.]*/, order: 100 }, - { title: 'job_item_pause', layout: "small", command: "M0", rx: /^M0;?[.]*/, order: 0 }, - { title: 'job_item_delay', layout: "small", command: "G04 X%s;", rx: /G04 X(.+);?[.]*/, order: 0 }, - { title: 'job_item_origin', layout: "small", command: "G54 P%s", rx: /G54 P(.+);?[.]*/, order: 0 }, - { title: 'job_item_end_program', layout: "small", command: "M30;", rx: /M30;?[.]*/, order: 0 }, + { title: 'job_item_part_program', layout: "big", command: 'M198 %s;%s', rx: /M198 (.+);(.*)|M198 (.+);?/, order: 0 }, + { title: 'job_item_macro_cms', layout: "big", command: 'M98 P%s;%s', rx: /M98 P(.+);(.*)|M98 P(.+);?/, order: 0 }, + { title: 'job_item_text', layout: "big", command: "%s;%s", rx: /(.+);(.*)|(.+);?/, order: 100 }, + { title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 }, + { title: 'job_item_delay', layout: "small", command: "G04 X%s;%s", rx: /G04 X(.+);(.*)|G04 X(.+);?/, order: 0 }, + { title: 'job_item_origin', layout: "small", command: "G54 P%s;%s", rx: /G54 P(.+);(.*)|G54 P(.+);?/, order: 0 }, + { title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 }, ]; // Da controllare comandi e regex const fanucJobItems = [ - { title: 'job_item_part_program', layout: "big", command: 'CALL "%s"', rx: /M198 (.+);?[.]*/, order: 0 }, - { title: 'job_item_macro_cms', layout: "big", command: 'PCALL /_N_CMA_DIR/%s', rx: /M98 P(.+);?[.]*/, order: 0 }, - { title: 'job_item_text', layout: "big", command: "%s", rx: /(.+);?[.]*/, order: 100 }, - { title: 'job_item_pause', layout: "small", command: "M0", rx: /^M0;?[.]*/, order: 0 }, - { title: 'job_item_delay', layout: "small", command: "G04 F%s;", rx: /G04 X(.+);?[.]*/, order: 0 }, - { title: 'job_item_origin', layout: "small", command: "G%s", rx: /G54 P(.+);?[.]*/, order: 0 }, - { title: 'job_item_end_program', layout: "small", command: "M30", rx: /M30;?[.]*/, order: 0 }, + { title: 'job_item_part_program', layout: "big", command: '(CLT,%s);%s', rx: /\(CLT,(.+)\);(.*)|\(CLT,(.+)\);?/, order: 0 }, + { title: 'job_item_macro_cms', layout: "big", command: '(CLD,%s);%s', rx: /\(CLD,(.+)\);(.*)|\(CLD,(.+)\);?/, order: 0 }, + { title: 'job_item_text', layout: "big", command: "%s", rx: /(.+);(.*)|(.+);?/, order: 100 }, + { title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 }, + { title: 'job_item_delay', layout: "small", command: "(DLY,%s);%s", rx: /\(DLY,(.+)\);(.*)|\(DLY,(.+)\);?/, order: 0 }, + { title: 'job_item_origin', layout: "small", command: "(UAO,%s);%s", rx: /\(UAO,(.+)\);(.*)|\(UAO,(.+)\);?/, order: 0 }, + { title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 }, ]; diff --git a/Step/wwwroot/src/modules/app-footer.vue b/Step/wwwroot/src/modules/app-footer.vue index 36f55616..63adb97a 100644 --- a/Step/wwwroot/src/modules/app-footer.vue +++ b/Step/wwwroot/src/modules/app-footer.vue @@ -17,6 +17,9 @@ + +