diff --git a/AuroraDevices/AuroraACS/ACSMotor.cs b/AuroraDevices/AuroraACS/ACSMotor.cs index 440c1d9..47aa61d 100644 --- a/AuroraDevices/AuroraACS/ACSMotor.cs +++ b/AuroraDevices/AuroraACS/ACSMotor.cs @@ -116,6 +116,7 @@ namespace AuroraACS return alarms; } + // 실제 위치 읽어오는 메소드 public override double GetActualPos() { return ACSLibrary.ReadMotorPosition(AxisNo); diff --git a/AuroraDevices/AuroraLaserScanner/ScannerObj.cs b/AuroraDevices/AuroraLaserScanner/ScannerObj.cs index 52d698f..4c68573 100644 --- a/AuroraDevices/AuroraLaserScanner/ScannerObj.cs +++ b/AuroraDevices/AuroraLaserScanner/ScannerObj.cs @@ -338,8 +338,8 @@ namespace AuroraLaserScanner #region 26.04.08 NDY 오차 추적 메소드 OVERRIDE 추가 RTC6 (부모클래스 -자식클래스에서 override 가능하도록 abstract 처리 ) - public abstract void SetFlyLimit(uint portNo, int xMin, int xMax, int yMin, int yMax); - public abstract void SetFlyLimitZ(uint portNo, int zMin, int zMax); + //public abstract void SetFlyLimit(uint portNo, int xMin, int xMax, int yMin, int yMax); + //public abstract void SetFlyLimitZ(uint portNo, int zMin, int zMax); #endregion } diff --git a/AuroraDevices/AuroraLaserScanner/ScannerRTC6.cs b/AuroraDevices/AuroraLaserScanner/ScannerRTC6.cs index be7ca3e..5849202 100644 --- a/AuroraDevices/AuroraLaserScanner/ScannerRTC6.cs +++ b/AuroraDevices/AuroraLaserScanner/ScannerRTC6.cs @@ -154,23 +154,23 @@ namespace AuroraLaserScanner #region 좌표 변환 작업 수행 // 26.04.08 NDY - MOTF Tracking Error Limit 설정 추가 - 요기서 처리해야 한다고 한다. // 하드웨어 보호를 위해 실제 좌표 변환 및 가공 시작 전 울타리를 칩니다. - if (config.UseMarkingOnTheFly) - { - // 1. mm 단위를 bits 단위로 변환 - int xLimitBits = Convert.ToInt32(config.FlyLimitXmm * m_ScaleXYFactor); - int yLimitBits = Convert.ToInt32(config.FlyLimitYmm * m_ScaleXYFactor); + //if (config.UseMarkingOnTheFly) + //{ + // // 1. mm 단위를 bits 단위로 변환 + // int xLimitBits = Convert.ToInt32(config.FlyLimitXmm * m_ScaleXYFactor); + // int yLimitBits = Convert.ToInt32(config.FlyLimitYmm * m_ScaleXYFactor); - // 2. 오버라이드된 메서드 호출 (중앙 0 기준 +- 범위 설정) - this.SetFlyLimit(m_deviceNo, -xLimitBits, xLimitBits, -yLimitBits, yLimitBits); - Log.D($"[RTC6ScannerUnit] MOTF Limit 적용: ±{config.FlyLimitXmm}mm (±{xLimitBits} bits)"); + // // 2. 오버라이드된 메서드 호출 (중앙 0 기준 +- 범위 설정) + // this.SetFlyLimit(m_deviceNo, -xLimitBits, xLimitBits, -yLimitBits, yLimitBits); + // Log.D($"[RTC6ScannerUnit] MOTF Limit 적용: ±{config.FlyLimitXmm}mm (±{xLimitBits} bits)"); - if (config.Use3DMode) - { - int zLimitBits = Convert.ToInt32(config.FlyLimitZmm * m_ScaleZFactor); - this.SetFlyLimitZ(m_deviceNo, -zLimitBits, zLimitBits); - Log.D($"[RTC6ScannerUnit] MOTF Z-Limit 적용: ±{config.FlyLimitZmm}mm (±{zLimitBits} bits)"); - } - } + // if (config.Use3DMode) + // { + // int zLimitBits = Convert.ToInt32(config.FlyLimitZmm * m_ScaleZFactor); + // this.SetFlyLimitZ(m_deviceNo, -zLimitBits, zLimitBits); + // Log.D($"[RTC6ScannerUnit] MOTF Z-Limit 적용: ±{config.FlyLimitZmm}mm (±{zLimitBits} bits)"); + // } + //} @@ -1123,16 +1123,16 @@ namespace AuroraLaserScanner } #region 26.04.08 NDY - 오차 추적 메소드 OVERRIDE 추가 RTC6 (자식클래스 -실제 RTC6Wrap전달 지점) - public override void SetFlyLimit(uint portNo,int xMin, int xMax , int yMin,int yMax ) - { - // mm 를 bits로 처리해줘야한다. + //public override void SetFlyLimit(uint portNo,int xMin, int xMax , int yMin,int yMax ) + //{ + // // mm 를 bits로 처리해줘야한다. - RTC6Wrap.n_set_fly_limits(portNo, xMin, xMax, yMin, yMax); - } - public override void SetFlyLimitZ(uint portNo, int zMin, int zMax) - { - RTC6Wrap.n_set_fly_limits_z(portNo, zMin, zMax); - } + // RTC6Wrap.n_set_fly_limits(portNo, xMin, xMax, yMin, yMax); + //} + //public override void SetFlyLimitZ(uint portNo, int zMin, int zMax) + //{ + // RTC6Wrap.n_set_fly_limits_z(portNo, zMin, zMax); + //} #endregion } diff --git a/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx# b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx# new file mode 100644 index 0000000..abb5d8a --- /dev/null +++ b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx# @@ -0,0 +1 @@ +,DESKTOP-CN4O63O/User,DESKTOP-CN4O63O,09.04.2026 09:04,file:///C:/Users/User/AppData/Roaming/LibreOffice/4; \ No newline at end of file diff --git a/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx new file mode 100644 index 0000000..05e0f52 Binary files /dev/null and b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx differ diff --git a/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx new file mode 100644 index 0000000..42422a7 Binary files /dev/null and b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/각형배터리 캔캡 MOF용접 제어컨셉_260408.pptx differ diff --git a/WeldingComponents/LASA/GUI/Canvas/DrawTools/LineTool.cs b/WeldingComponents/LASA/GUI/Canvas/DrawTools/LineTool.cs index a181c8e..62e9f2c 100644 --- a/WeldingComponents/LASA/GUI/Canvas/DrawTools/LineTool.cs +++ b/WeldingComponents/LASA/GUI/Canvas/DrawTools/LineTool.cs @@ -125,6 +125,36 @@ namespace CoreUnit.Control.UserControl.Canvas public class Line : DrawObjectBase, IDrawObject, ISerialize { + #region 26.04.09 + // 26.04.09 NDY [´ë¸éÀû MOTF] Large MOTF Position ÆĶó¹ÌÅÍ Ã߰¡ + // P1 + ÀÌÀü ÆäÀÌÁöÀÇ LargeMOTFOffsetX/Y°¡ ´õÇØÁø ½ÇÁ¦ °¡°ø À§ġ + float m_largeMOTFPositionX = 0.0f; + [Browsable(false)] + [ReadOnly(true)] + [Category("Large MOTF")] + [DisplayName("Large MOTF Position X")] + [Description("P1 + Large MOTF Offset X °¡ ¹ݿµµÈ ½ÇÁ¦ °¡°ø À§ġ X")] + [XmlSerializable] + public float LargeMOTFPositionX + { + get { return m_largeMOTFPositionX; } + set { m_largeMOTFPositionX = value; } + } + + float m_largeMOTFPositionY = 0.0f; + [Browsable(false)] + [ReadOnly(true)] + [Category("Large MOTF")] + [DisplayName("Large MOTF Position Y")] + [Description("P1 + Large MOTF Offset Y °¡ ¹ݿµµÈ ½ÇÁ¦ °¡°ø À§ġ Y")] + [XmlSerializable] + public float LargeMOTFPositionY + { + get { return m_largeMOTFPositionY; } + set { m_largeMOTFPositionY = value; } + } + #endregion + UnitPoint m_p1, m_p2; [Browsable(false)] @@ -210,6 +240,11 @@ namespace CoreUnit.Control.UserControl.Canvas m_alignOffset = acopy.m_alignOffset; m_MadebyRCC = acopy.m_MadebyRCC; m_RCC_PowerRatio = acopy.m_RCC_PowerRatio; + + + // 26.04.09 NDY [´ë¸éÀû MOTF] Ã߰¡ + m_largeMOTFPositionX = acopy.m_largeMOTFPositionX; + m_largeMOTFPositionY = acopy.m_largeMOTFPositionY; } #region IDrawObject Members @@ -495,8 +530,10 @@ namespace CoreUnit.Control.UserControl.Canvas public virtual IDrawObject Clone() { + Line l = new Line(); l.Copy(this); + return l; } diff --git a/WeldingComponents/LASA/GUI/Canvas/Layers/DrawingLayer.cs b/WeldingComponents/LASA/GUI/Canvas/Layers/DrawingLayer.cs index d77e469..00976aa 100644 --- a/WeldingComponents/LASA/GUI/Canvas/Layers/DrawingLayer.cs +++ b/WeldingComponents/LASA/GUI/Canvas/Layers/DrawingLayer.cs @@ -30,6 +30,12 @@ namespace CoreUnit.Control.UserControl.Canvas set { m_name = value; } } + #region 26.04.09 + // 26.04.09 NDY [´ë¸éÀû MOTF] ÆäÀÌÁö ·¹º§ Offset ÆĶó¹ÌÅÍ Ã߰¡ + public double LargeMOTFOffsetX { get; set; } = 0.0; + public double LargeMOTFOffsetY { get; set; } = 0.0; + #endregion + public DrawingLayer(int no, string name, Color color, float width) { m_no = no; diff --git a/WeldingComponents/LASA/GUI/DB/RecipeWeldingLines.cs b/WeldingComponents/LASA/GUI/DB/RecipeWeldingLines.cs index 308e489..efb9631 100644 --- a/WeldingComponents/LASA/GUI/DB/RecipeWeldingLines.cs +++ b/WeldingComponents/LASA/GUI/DB/RecipeWeldingLines.cs @@ -16,10 +16,21 @@ using JsonSerializer = System.Text.Json.JsonSerializer; namespace DB.Recipe { + // 설명 추가 : XML 기반 저장/로딩 구조 - XmlUtil.WriteProperties 프로퍼티를 자동을 저장하는 방식이라서 프로퍼티만 추가하면 된다고 한다. + // XmlUtil.WriteProperties(this, wr) 가 this의 프로퍼티를 자동 직렬화 하니깐 Save() / Load() 수정 없이 프로퍼티 추가만으로 XML에 자동 저장 / 로딩되는 형태 + public class RecipeWeldingLines : Recipe { + + #region 26.04.09 NDY + // 26.04.09 NDY [대면적 MOTF] 레시피 레벨 파라미터 추가 + public bool UseLargeMOTF { get; set; } = false; + public int LargeMOTFPageCount { get; set; } = 1; + #endregion + DataModel m_model; - public DataModel Model { + public DataModel Model + { get { lock (this) { return m_model; } } set { lock (this) { m_model = value; } } } @@ -28,26 +39,33 @@ namespace DB.Recipe List m_powerProfiles = new List(); - public List PowerProfiles { + public List PowerProfiles + { get { lock (this) { return m_powerProfiles; } } set { lock (this) { m_powerProfiles = value; } } } + + + // 생성자 public RecipeWeldingLines() { } - + #region 메서드 영역 public void Reset() { } public override void Save(XmlWriter wr, bool includeModel) { - try { + try + { XmlUtil.WriteProperties(this, wr); SaveWeldingParam(wr); if (includeModel) Model.Save(wr); - } catch (Exception ex) { + } + catch (Exception ex) + { UtilUnit.logUnit.SetLog(LogUnit.eLogType.ALARM, MethodBase.GetCurrentMethod().Name, ex.Message); } } @@ -56,10 +74,13 @@ namespace DB.Recipe { string jsonString = string.Empty; var options = new JsonSerializerOptions { WriteIndented = true }; - try { + try + { jsonString += JsonSerializer.Serialize(ScannerCanvasUserCtrl.ScannerParams, options); jsonString += Model.Save(); - } catch (Exception ex) { + } + catch (Exception ex) + { UtilUnit.logUnit.SetLog(LogUnit.eLogType.ALARM, MethodBase.GetCurrentMethod().Name, ex.Message); } return jsonString; @@ -67,10 +88,13 @@ namespace DB.Recipe public override void Load(XmlElement xmlElement) { - try { + try + { LoadWeldingParam(xmlElement); Model.Load(xmlElement); - } catch (Exception ex) { + } + catch (Exception ex) + { UtilUnit.logUnit.SetLog(LogUnit.eLogType.ALARM, MethodBase.GetCurrentMethod().Name, ex.Message); } } @@ -86,7 +110,8 @@ namespace DB.Recipe #region 1.Scanner Objects에 대한 데이터 저장 wr.WriteStartElement("WeldingParameters"); wr.WriteStartElement("items"); - foreach (ScannerParam param in ScannerCanvasUserCtrl.ScannerParams) { + foreach (ScannerParam param in ScannerCanvasUserCtrl.ScannerParams) + { wr.WriteStartElement("WeldingParameter"); CoreUnit.Common.XmlUtil.WriteProperties(param, wr); wr.WriteEndElement(); @@ -98,18 +123,24 @@ namespace DB.Recipe private void LoadWeldingParam(XmlElement root) { - try { + try + { ScannerCanvasUserCtrl.ScannerParams.Clear(); int paramNo = 0; - foreach (XmlElement node in root.ChildNodes) { - if (node.Name == "WeldingParameters") { + foreach (XmlElement node in root.ChildNodes) + { + if (node.Name == "WeldingParameters") + { #region 1.Scanner Objects에 대한 데이터 로딩 - foreach (XmlElement subNode in node.ChildNodes) { - if (subNode.Name == "items") { + foreach (XmlElement subNode in node.ChildNodes) + { + if (subNode.Name == "items") + { //ScannerCanvasUserCtrl.ScannerParams.Clear(); - foreach (XmlElement itemNode in subNode.ChildNodes) { + foreach (XmlElement itemNode in subNode.ChildNodes) + { ScannerParam param = new ScannerParam(); CoreUnit.Common.XmlUtil.ParseProperties(itemNode, param); param.No = paramNo; @@ -122,16 +153,20 @@ namespace DB.Recipe } } - if (ScannerCanvasUserCtrl.ScannerParams.Count < 128) { + if (ScannerCanvasUserCtrl.ScannerParams.Count < 128) + { CreateScannerParams(); } - for (int i = 0; i < ScannerCanvasUserCtrl.ScannerParams.Count; i++) { + for (int i = 0; i < ScannerCanvasUserCtrl.ScannerParams.Count; i++) + { WeldingParameterIDEditor.UpdateColorList(i, ScannerCanvasUserCtrl.ScannerParams[i].Color); } - } catch (Exception e) { + } + catch (Exception e) + { throw e; } } @@ -140,7 +175,8 @@ namespace DB.Recipe { ScannerCanvasUserCtrl.ScannerParams.Clear(); - for (int i = 0; i < 128; i++) { + for (int i = 0; i < 128; i++) + { ScannerParam param = new ScannerParam(); param.No = i; ScannerCanvasUserCtrl.ScannerParams.Add(param); @@ -231,17 +267,20 @@ namespace DB.Recipe public List ReadOnlyScanParams { get; private set; } public void LoadFileReadOnly(string fileName) { - try { + try + { XmlDocument doc = new XmlDocument(); var extenstion = Path.GetExtension(fileName); - if (extenstion == ".json") { + if (extenstion == ".json") + { var jsonString = File.ReadAllText(fileName); doc = JsonConvert.DeserializeXmlNode(jsonString, "RecipeBody"); } - else { + else + { FileInfo fi = new FileInfo(fileName); StreamReader sr = new StreamReader(fileName); doc.Load(sr); @@ -250,44 +289,58 @@ namespace DB.Recipe XmlElement root = doc.DocumentElement; - foreach (XmlElement childnode in root.ChildNodes) { - foreach (Recipe recipe in recipeList) { - if (childnode.Name == recipe.GetType().Name) { + foreach (XmlElement childnode in root.ChildNodes) + { + foreach (Recipe recipe in recipeList) + { + if (childnode.Name == recipe.GetType().Name) + { recipe.LoadReadOnly(childnode); } } } - } catch (Exception ex) { + } + catch (Exception ex) + { throw ex; } } public override void LoadReadOnly(XmlElement xmlElement) { - try { + try + { ReadOnlyScanParams = LoadWeldingParamReadOnly(xmlElement); - if(Model is null) + if (Model is null) Model = new DataModel(); Model.Load(xmlElement); - } catch (Exception ex) { + } + catch (Exception ex) + { UtilUnit.logUnit.SetLog(LogUnit.eLogType.ALARM, MethodBase.GetCurrentMethod().Name, ex.Message); } } private List LoadWeldingParamReadOnly(XmlElement root) { - try { + try + { List weldingParam = new List(); weldingParam.Clear(); int paramNo = 0; - foreach (XmlElement node in root.ChildNodes) { - if (node.Name == "WeldingParameters") { + foreach (XmlElement node in root.ChildNodes) + { + if (node.Name == "WeldingParameters") + { #region 1.Scanner Objects에 대한 데이터 로딩 - foreach (XmlElement subNode in node.ChildNodes) { - if (subNode.Name == "items") { - foreach (XmlElement itemNode in subNode.ChildNodes) { + foreach (XmlElement subNode in node.ChildNodes) + { + if (subNode.Name == "items") + { + foreach (XmlElement itemNode in subNode.ChildNodes) + { ScannerParam param = new ScannerParam(); CoreUnit.Common.XmlUtil.ParseProperties(itemNode, param); param.No = paramNo; @@ -300,10 +353,14 @@ namespace DB.Recipe } } return weldingParam; - } catch (Exception e) { + } + catch (Exception e) + { throw e; } } #endregion + + #endregion } } \ No newline at end of file diff --git a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeaching.xaml b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeaching.xaml index f8d0b55..df076f4 100644 --- a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeaching.xaml +++ b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeaching.xaml @@ -23,7 +23,12 @@ + + + + + diff --git a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml index 8be4b4f..09d173f 100644 --- a/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml +++ b/WeldingComponents/WeldingCommon/Views/Recipes/UCScannerObjectTeachingControlBox.xaml @@ -18,18 +18,22 @@ + + - - - + + + + + @@ -76,6 +80,7 @@ + @@ -122,12 +127,102 @@ - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +