diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index c748a3f1..d3554a1b 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Config/Config/headsConfig.xml b/Step.Config/Config/headsConfig.xml index 31fc9e02..75f5f3e1 100644 --- a/Step.Config/Config/headsConfig.xml +++ b/Step.Config/Config/headsConfig.xml @@ -6,6 +6,7 @@ Head Spindle A SPINDLE + false 55 80 @@ -15,6 +16,7 @@ Head AWJ B AWJ + false 55 80 @@ -24,6 +26,7 @@ Head WJ C WJ + false 55 80 diff --git a/Step.Config/Config/headsConfigValidator.xsd b/Step.Config/Config/headsConfigValidator.xsd index a360acc8..9c8a9dfe 100644 --- a/Step.Config/Config/headsConfigValidator.xsd +++ b/Step.Config/Config/headsConfigValidator.xsd @@ -17,6 +17,7 @@ + diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index 6f0e6238..ea722b8d 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -406,6 +406,7 @@ namespace Step.Config Type = GetHeadType(x.Element("type").Value), WarningLimit = Convert.ToInt16(x.Element("warningLimit").Value), AlarmLimit = Convert.ToInt16(x.Element("alarmLimit").Value), + FixedHead = Convert.ToBoolean(x.Element("fixedHead").Value), LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary y => y.Attribute("langKey").Value, y => y.Value ), diff --git a/Step.Model/ConfigModels/HeadsConfigModel.cs b/Step.Model/ConfigModels/HeadsConfigModel.cs index 85ce6cf6..5c53a17f 100644 --- a/Step.Model/ConfigModels/HeadsConfigModel.cs +++ b/Step.Model/ConfigModels/HeadsConfigModel.cs @@ -9,6 +9,8 @@ namespace Step.Model.ConfigModels public HEAD_TYPE Type; public short WarningLimit; public short AlarmLimit; + public bool FixedHead; + public Dictionary LocalizedNames { get; set; } } } diff --git a/Step.Model/DTOModels/DTOHeadModel.cs b/Step.Model/DTOModels/DTOHeadModel.cs index bffbd335..9cb5f972 100644 --- a/Step.Model/DTOModels/DTOHeadModel.cs +++ b/Step.Model/DTOModels/DTOHeadModel.cs @@ -71,6 +71,7 @@ namespace Step.Model.DTOModels public ushort MountedTool; public bool Configured; public ROTATION Rotation; + public bool FixedHead; public DTOToolInSpindleModel ToolData; public override bool Equals(object obj) @@ -112,6 +113,7 @@ namespace Step.Model.DTOModels public int ActualPressure; public ushort Abrasive; public float Vacum; + public bool FixedHead; public override bool Equals(object obj) { @@ -144,6 +146,7 @@ namespace Step.Model.DTOModels public class DTOWaterJet : DTOHeadModel { public int ActualPressure; + public bool FixedHead; public override bool Equals(object obj) { diff --git a/Step.Model/DTOModels/DTOHeadsConfigModel.cs b/Step.Model/DTOModels/DTOHeadsConfigModel.cs index 51671645..d6b253b7 100644 --- a/Step.Model/DTOModels/DTOHeadsConfigModel.cs +++ b/Step.Model/DTOModels/DTOHeadsConfigModel.cs @@ -5,5 +5,6 @@ public int Id; public string Name; public string Type; + public bool FixedHead; } } \ No newline at end of file diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index a1516121..a2850ef1 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -836,6 +836,7 @@ namespace Step.NC Id = head.Id, Process = head.Process, Type = configuredHead.Type.ToString(), + FixedHead = configuredHead.FixedHead, inWarning = head.Load_Abrasive >= configuredHead.WarningLimit, inAlarm = head.Load_Abrasive >= configuredHead.AlarmLimit, OverrideEditable = head.OverrideEditable, @@ -866,6 +867,7 @@ namespace Step.NC Id = head.Id, Process = head.Process, Type = configuredHead.Type.ToString(), + FixedHead = configuredHead.FixedHead, inWarning = vacumValue >= configuredHead.WarningLimit, inAlarm = vacumValue >= configuredHead.AlarmLimit, OverrideEditable = head.OverrideEditable, @@ -888,6 +890,7 @@ namespace Step.NC Id = head.Id, Process = head.Process, Type = configuredHead.Type.ToString(), + FixedHead = configuredHead.FixedHead, inAlarm = false, inWarning = false, ActualPressure = head.ActualSpeed_Pressure, diff --git a/Step/Controllers/WebApi/ConfigurationController.cs b/Step/Controllers/WebApi/ConfigurationController.cs index 0ae3089b..e277a3ae 100644 --- a/Step/Controllers/WebApi/ConfigurationController.cs +++ b/Step/Controllers/WebApi/ConfigurationController.cs @@ -88,7 +88,8 @@ namespace Step.Controllers.WebApi { Id = x.Id, Name = "Head " + x.Id, - Type = x.Type.ToString() + Type = x.Type.ToString(), + FixedHead = x.FixedHead }).ToList(); return Ok(heads); diff --git a/Step/wwwroot/src/@types/signlar.heads.d.ts b/Step/wwwroot/src/@types/signlar.heads.d.ts index 0f4079ae..da795c09 100644 --- a/Step/wwwroot/src/@types/signlar.heads.d.ts +++ b/Step/wwwroot/src/@types/signlar.heads.d.ts @@ -5,6 +5,7 @@ declare module signalr_heads { id:number; name:string; type:string; + fixedHead:boolean; } } diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts b/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts index b6fbe1f3..7156eae4 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-depot.ts @@ -262,7 +262,7 @@ export default class depot extends Vue { for (let i = 0; i < heads.length; i++) { const head = this.$store.getters.getHeadsProperty(heads[i].id) if(head) - if(toolId === head.mountedTool){ + if(!head.fixedHead && toolId === head.mountedTool){ return head.id } } diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts index bfddc8ce..4926e441 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts @@ -520,7 +520,7 @@ public isEquipmentSelected(offset){ for (let i = 0; i < heads.length; i++) { const head = this.$store.getters.getHeadsProperty(heads[i].id) - if(this.selectedTool.id === head.mountedTool){ + if(!head.fixedHead && this.selectedTool.id === head.mountedTool){ return true } } @@ -830,7 +830,7 @@ public isEquipmentSelected(offset){ return; } - if(this.newToolId <= 0){ + if(!this.useAutoToolId && this.newToolId <= 0){ this.canAddNewTool = false; return; } @@ -840,7 +840,7 @@ public isEquipmentSelected(offset){ if(tool) this.canAddNewTool = false; else - this.canAddNewTool = true; + this.canAddNewTool = true; } } diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-families.ts b/Step/wwwroot/src/app_modules/tooling/components/tooling-families.ts index 9778608c..36f3f921 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-families.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-families.ts @@ -292,7 +292,7 @@ export default class toolingFamilies extends Vue { if(this.selectedTool.childTools) { // Check if one of the child tool is mounted in spindle for(let j = 0; j < this.selectedTool.childTools.length; j++) { - if(this.selectedTool.childTools[j].id === head.mountedTool) { + if(!head.fixedHead && this.selectedTool.childTools[j].id === head.mountedTool) { return true } } @@ -352,7 +352,7 @@ export default class toolingFamilies extends Vue { @Watch("newFamilyId") public canAddTool(){ - if(this.newFamilyId <= 0){ + if(!this.useAutoFamilyId && this.newFamilyId <= 0){ this.canAddNewFamily = false; } else { diff --git a/Step/wwwroot/src/store/machineStatus.store.ts b/Step/wwwroot/src/store/machineStatus.store.ts index 38dc99e4..ee14345b 100644 --- a/Step/wwwroot/src/store/machineStatus.store.ts +++ b/Step/wwwroot/src/store/machineStatus.store.ts @@ -20,6 +20,7 @@ export interface SoftKeyModel { export interface HeadsPropertyModel { id: number; type: string; + fixedHead: boolean; inWarning: boolean; inAlarm: boolean; overrideEditable: boolean;