From 1e51cee4640c29053b2fd6efe917be6d4abe73fa Mon Sep 17 00:00:00 2001 From: NohDoyeon241104 Date: Thu, 9 Apr 2026 17:01:33 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20StageX=20=EC=A0=81=EC=9A=A9=20=EB=A9=94?= =?UTF-8?q?=EB=89=B4=EC=96=BC(=EC=8A=A4=EC=BA=90=EB=84=88)=20-=20=EB=A0=88?= =?UTF-8?q?=EC=8B=9C=ED=94=BC=20-=20=ED=98=84=EC=9E=AC=20X=EA=B0=92=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20=ED=99=95=EC=9D=B8=ED=95=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AuroraDevices/AuroraACS/ACSMotor.cs | 3 + .../.~lock.각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx# | 1 + .../Sequences/SeqAutoRunPrismaticScanner.cs | 10 ++ .../Devices/ACS/ScannerACS.Parameter.cs | 88 ++++------- .../WeldingCommon/Devices/ACS/ScannerACS.cs | 141 ++++++++++-------- .../Views/Manual/Scanner/UCScannerMotion.xaml | 7 +- 6 files changed, 126 insertions(+), 124 deletions(-) create mode 100644 Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx# diff --git a/AuroraDevices/AuroraACS/ACSMotor.cs b/AuroraDevices/AuroraACS/ACSMotor.cs index 47aa61d..e73eb8c 100644 --- a/AuroraDevices/AuroraACS/ACSMotor.cs +++ b/AuroraDevices/AuroraACS/ACSMotor.cs @@ -2,6 +2,7 @@ using Aurora; using Aurora.Api; using Aurora.Api.Devices; +using Aurora.View; using AuroraMotor; using Hermes; using PropertyTools.DataAnnotations; @@ -329,9 +330,11 @@ namespace AuroraACS { if (TargetPositionABS < _Config.MoveRange.Min) { Log.E($"Limit Over Error : Requested[{TargetPositionABS}] < - Limit[{_Config.MoveRange.Min}]"); + MessageUtil.ShowWarningToast($"Limit Over Error : Requested[{TargetPositionABS}] < - Limit[{_Config.MoveRange.Min}]"); return -1; } else if (TargetPositionABS > _Config.MoveRange.Max) { Log.E($"Limit Over Error : Requested[{TargetPositionABS}] > - Limit[{_Config.MoveRange.Max}]"); + MessageUtil.ShowWarningToast($"Limit Over Error : Requested[{TargetPositionABS}] > - Limit[{_Config.MoveRange.Max}]"); return -1; } diff --git a/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx# b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx# new file mode 100644 index 0000000..3d933f0 --- /dev/null +++ b/Doc/FromLGPRI/각형 고속등속용접 RND설비_MOF테스트관련프로그램개발컨셉및acs변수공유건/.~lock.각형고속용접단동기_ACS_Buffer&Variable_Info_20260407.xlsx# @@ -0,0 +1 @@ +,DESKTOP-CN4O63O/User,DESKTOP-CN4O63O,09.04.2026 15:52,file:///C:/Users/User/AppData/Roaming/LibreOffice/4; \ No newline at end of file diff --git a/Machines/ILSOS_PrismaticScanner/Sequences/SeqAutoRunPrismaticScanner.cs b/Machines/ILSOS_PrismaticScanner/Sequences/SeqAutoRunPrismaticScanner.cs index 1fe4a51..368cf45 100644 --- a/Machines/ILSOS_PrismaticScanner/Sequences/SeqAutoRunPrismaticScanner.cs +++ b/Machines/ILSOS_PrismaticScanner/Sequences/SeqAutoRunPrismaticScanner.cs @@ -3,6 +3,7 @@ using Aurora.Api; using Aurora.Api.Devices; using Aurora.Api.Manager; using Aurora.View; +using AuroraACS; using AuroraCellTracker; using AuroraIO; using AuroraLaser; @@ -52,6 +53,7 @@ using WeldingCommon; using WeldingCommon.Alarm; using WeldingCommon.Data; using WeldingCommon.Devices; +using WeldingCommon.Devices.ACS; using WeldingCommon.Models; using WeldingCommon.Sequences; using WeldingCommon.Sequences.Main; @@ -135,6 +137,9 @@ namespace ILSOS_PrismaticScanner.Sequences private PLCControllerPrismaticScanner _PLC; private IODevice _IO; private LightDevice _Light; + #region 26.04.09 NDY ACS와 축도 가져와야하지 않을까 ? + private ScannerACS ScannerACS; + #endregion // 비전 정의 private CameraAgentBase _CameraAgent; @@ -1110,6 +1115,11 @@ namespace ILSOS_PrismaticScanner.Sequences _Laser = context.GetLaser(); _PLC = context.GetPLC() as PLCControllerPrismaticScanner; _Light = context.GetLight(); + + #region 26.04.09 + // 26.04.09 NDY + ScannerACS = context.Devices.GetDevice(CommonDeviceIds.ACS) as ScannerACS; + #endregion } private bool CheckDeviceReady(SequenceContext context) diff --git a/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.Parameter.cs b/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.Parameter.cs index 38d36b0..71c87ee 100644 --- a/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.Parameter.cs +++ b/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.Parameter.cs @@ -17,40 +17,29 @@ namespace WeldingCommon.Devices.ACS public partial class ScannerACS { // ── 알람 ────────────────────────────────────────── - // Gun과 동일 const string AlarmReset = "iAlarmreset"; const string HeavyAlarm = "iAlarm"; const string LightAlarm = "iLightAlarm"; - const string AlarmCodes = "iPCAlarmNo"; // 10개 + const string AlarmCodes = "iPCAlarmNo"; // 10개 // ── 레이저 ─────────────────────────────────────── - // Gun과 동일 const string IsLaserOn = "LCI_DEVICE.LaserEnabled"; - const string iLaserUse = "iPCset_LASER_USE"; - const string iAStageLCType = "iPCset_ALINE_LCTYPE"; + const string iLaserUse = "iPCset_LASER_USE"; // 가공 모션 시 레이저 사용 유무 // ── 홈 ─────────────────────────────────────────── - // Gun과 동일 const string iAllAxisHomeComplete = "iPCget_ALLAXIS_HOMECOMP"; // ── 축 번호 ────────────────────────────────────── - // Gun과 동일 - const string iXAxisNumber = "iPCget_LCI_ASMASK_X"; - const string iYAxisNumber = "iPCget_LCI_ASMASK_Y"; - - // ── 레이저 모드 ─────────────────────────────────── - // Gun과 동일 - const string iALaserShotMode = "iPCset_ALASER_SHOT_MODE"; + const string iXAxisNumber = "iPCget_LCI_ASMASK_X"; // 가공 모션 이동 X축 번호 + const string iYAxisNumber = "iPCget_LCI_ASMASK_Y"; // 가공 모션 이동 Y축 번호 // ── OneShot ─────────────────────────────────────── - // Gun과 동일 const string rOneShotTime = "rPCset_ALINE_SHOT_TIME"; const string rOneShotCoreVoltage = "rPCset_ALINE_SHOT_CORE_VOLTAGE"; const string rOneShotRingVoltage = "rPCset_ALINE_SHOT_RING_VOLTAGE"; const string iOneShotComplete = "iPCget_ALINE_SHOT_COMP"; // ── LineShot ────────────────────────────────────── - // Gun과 동일 const string rLineWeldingCoreVoltage = "rPCset_ALINE_LINE_CORE_VOLTAGE"; const string rLineWeldingRingVoltage = "rPCset_ALINE_LINE_RING_VOLTAGE"; const string rLineWeldingVel = "rPCset_ALINE_LINE_VEL"; @@ -61,8 +50,7 @@ namespace WeldingCommon.Devices.ACS const string rLineWeldingLaserOffY = "rPCset_ALINE_LINE_LASEROFF_Y"; const string iLineWeldingComplete = "iPCget_ALINE_LINE_COMP"; - // ── Welding Position 1~8 ────────────────────────── - // Gun과 동일 + // ── Welding Teaching Position 1~8 ───────────────── const string rWeldingPosition1PosX = "rPCset_ALINE_WeldingPosition1_X"; const string rWeldingPosition1PosY = "rPCset_ALINE_WeldingPosition1_Y"; const string rWeldingPosition2PosX = "rPCset_ALINE_WeldingPosition2_X"; @@ -80,59 +68,53 @@ namespace WeldingCommon.Devices.ACS const string rWeldingPosition8PosX = "rPCset_ALINE_WeldingPosition8_X"; const string rWeldingPosition8PosY = "rPCset_ALINE_WeldingPosition8_Y"; - // ── Welding Arc ─────────────────────────────────── - // Gun과 동일 + // ── Welding Arc (R구간) ─────────────────────────── const string rWeldingEdgePointRad1 = "rPCset_ALINE_EdgePointRad1"; const string rWeldingEdgePointRad2 = "rPCset_ALINE_EdgePointRad2"; const string rWeldingEdgePointRad3 = "rPCset_ALINE_EdgePointRad3"; const string rWeldingEdgePointRad4 = "rPCset_ALINE_EdgePointRad4"; // ── Welding Power ───────────────────────────────── - // Gun과 동일 - const string rWeldingCorePowerMax = "rPCset_ALINE_WEL_COREPOWER_MAX"; - const string rWeldingCorePowerMin = "rPCset_ALINE_WEL_COREPOWER_MIN"; - const string rWeldingRingPowerMax = "rPCset_ALINE_WEL_RINGPOWER_MAX"; - const string rWeldingRingPowerMin = "rPCset_ALINE_WEL_RINGPOWER_MIN"; + const string rWeldingCorePowerMax = "rPCset_ALINE_WEL_COREPOWER_MAX"; // 직선구간 + const string rWeldingCorePowerMin = "rPCset_ALINE_WEL_COREPOWER_MIN"; // R구간 + const string rWeldingRingPowerMax = "rPCset_ALINE_WEL_RINGPOWER_MAX"; // 직선구간 + const string rWeldingRingPowerMin = "rPCset_ALINE_WEL_RINGPOWER_MIN"; // R구간 // ── Welding Velocity ────────────────────────────── - // Gun과 동일 const string rWeldingAcc = "rPCset_ALINE_WEL_ACC"; - const string rWeldingSVel = "rPCset_ALINE_WEL_SVEL"; - const string rWeldingCVel = "rPCset_ALINE_WEL_CVEL"; + const string rWeldingSVel = "rPCset_ALINE_WEL_SVEL"; // 직선구간 속도 + const string rWeldingCVel = "rPCset_ALINE_WEL_CVEL"; // R구간 속도 const string iWeldingComplete = "iPCget_ALINE_WEL_COMP"; - // ── Welding Position ────────────────────────────── - // Gun과 동일 + // ── Welding Motion Position ─────────────────────── const string rWeldingStartPosX = "rPCset_ALINE_WEL_ST_POS_X"; const string rWeldingStartPosY = "rPCset_ALINE_WEL_ST_POS_Y"; const string rWeldingEndPosX = "rPCset_ALINE_WEL_EN_POS_X"; const string rWeldingEndPosY = "rPCset_ALINE_WEL_EN_POS_Y"; - // ── Laser ON/OFF Position ───────────────────────── - // Gun과 동일 + // ── Laser ON Position ───────────────────────────── + // rPCset_ALINE_LASER_ON_OFFSET / LASEROFF_X / LASEROFF_OFFSET 는 + // xlsx 기준 "미사용" → 정의하지 않음 const string rLaserONPosX = "rPCset_ALINE_LASER_ONPOS_X"; - const string rLaserONOffset = "rPCset_ALINE_LASER_ON_OFFSET"; - const string rLaserOFFPosX = "rPCset_ALINE_LASER_OFFPOS_X"; - const string rLaserOFFOffset = "rPCset_ALINE_LASER_OFF_OFFSET"; // ── Ramping ─────────────────────────────────────── - // Gun과 동일 const string rRampingONOverlapDist = "rPCset_ALINE_RAMP_ON_OVERLAP_DIS"; const string rRampingONStartPower = "rPCset_ALINE_RAMP_ON_STARTPOWER"; const string rRampingOFFStartPosX = "rPCset_ALINE_RAMP_OFF_STPOS_X"; const string rRampingOFFOverlapDist = "rPCset_ALINE_RAMP_OFF_OVERLAP_DIS"; const string rRampingOFFEndPower = "rPCset_ALINE_RAMP_OFF_ENDPOWER"; - // ── MOTF (Mark On The Fly) ──────────────────────── - // Scanner 전용 추가 (Gun에 없음) - // TODO: 이정인 선임 ACS 변수 맵 수신 후 실제 변수명으로 교체 - const string iMOTFStart = "iPCset_SCANNER_MOTF_START"; // placeholder - const string iMOTFComplete = "iPCget_SCANNER_MOTF_COMP"; // placeholder - const string rMOTFVelocity = "rPCset_SCANNER_MOTF_VEL"; // placeholder - const string rMOTFAcc = "rPCset_SCANNER_MOTF_ACC"; // placeholder + // ── MOTF (Motion On The Fly) ────────────────────── + // 26.04.09 NDY xlsx 글로벌 변수 맵 기준 확정 + // iMOTFStart 변수 없음 — 시작은 RunBuffer(eBuffer.MOTF_Start)로 처리 + const string rMOTFPosX = "rPCset_MOF_WEL_PPOS_X"; // Stage X (+) 위치 + const string rMOTFNegX = "rPCset_MOF_WEL_MPOS_X"; // Stage X (-) 위치 + const string rMOTFVelocity = "rPCset_MOF_WEL_VEL"; // 이동 속도 + const string rMOTFAcc = "rPCset_MOF_WEL_ACC"; // 이동 가속도 + const string iMOTFInterval = "iPCset_MOF_WEL_MOTION_INTERVAL"; // 직선 모션 사이 Delay (msec) + const string iMOTFComplete = "iPCset_MOF_WEL_COMP"; // 용접모션 완료 bit // ── 버퍼 ───────────────────────────────────────── - // Gun과 동일 + MOTF 추가 private enum eBuffer { All_Axis_Home = 0, @@ -145,24 +127,8 @@ namespace WeldingCommon.Devices.ACS Welding_Line = 11, Welding_AllRound = 12, Welding_OneShot = 13, - - // TODO: Scanner MOTF 버퍼 번호 확인 후 수정 - MOTF_Start = 14, // placeholder + // Ramping = 14, // ACS 내부 버퍼, PC에서 직접 실행 안 함 + MOTF_Start = 17, // 26.04.09 NDY xlsx Buffer Info 기준 확정 } - - #region 변수 맵 받으면 작업 순서 - // 1. ScannerACS.Parameter.cs - // → iMOTFStart, iMOTFComplete, rMOTFVelocity, rMOTFAcc placeholder → 실제 변수명 교체 - // → eBuffer.MOTF_Start 번호 교체 - // 2. ScannerACS.cs - // → 축 번호 검증 (ACSMotor 생성 시 넣은 번호) - // 3. EquipDef.cs - // → MotorIds의 eMotorIdx 번호 검증 - // 4. SeqComponentTeachingRun.cs - // → _ACS?.MOTFStart() 주석 해제 - // → CheckMOTFComp() 주석 해제 - // → CheckDeviceReady() DeviceIds.ACS 주석 해제 - // 5. 빌드 후 실제 장비에서 동작 확인 - #endregion } } \ No newline at end of file diff --git a/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.cs b/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.cs index ea2fdd3..a7fa9b9 100644 --- a/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.cs +++ b/WeldingComponents/WeldingCommon/Devices/ACS/ScannerACS.cs @@ -3,9 +3,16 @@ // 변경점: // 1. 네임스페이스/클래스명 변경 (PrismaticGunACS → ScannerACS) // 2. MOTF 메서드 3개 추가 (MOTFStart/Stop/CheckMOTFComp) -// 3. 모터 취득 try-catch null-safe 적용 -// 4. TeachingPosition 체크 로직 단순화 (Scanner는 X2축만 사용) -// 26.04.06 NDY +// 3. MOTF 파라미터 세팅 메서드 추가 (SetMOTFParams) +// 4. 모터 취득 try-catch null-safe 적용 +// 5. TeachingPosition 체크 로직 단순화 (Scanner는 X2축만 사용) +// 6. xlsx 글로벌 변수 맵 기준 미사용 변수 제거 +// - iAStageLCType (iPCset_ALINE_LCTYPE) → SetLCILserOn stub 처리 +// - iALaserShotMode (iPCset_ALASER_SHOT_MODE) → SetWeldingType stub 처리 +// - rLaserONOffset / rLaserOFFPosX / rLaserOFFOffset → SetLaserOnOff에서 제거 +// 26.04.06 NDY 최초 작성 +// 26.04.09 NDY xlsx 글로벌 변수 맵 기준 미사용 변수 정리, SetMOTFParams 추가 + using Aurora; using Aurora.Api; using Aurora.Api.Devices; @@ -16,10 +23,10 @@ using System.Windows; using WeldingCommon.Settings; using AuroraOCT; using WeldingCommon.Device.ACS; + namespace WeldingCommon.Devices.ACS { // ── 인터페이스 ──────────────────────────────────────────────────────────── - // Gun의 IPrismaticGunACS 기반 + MOTF 3개 추가 public interface IScannerACS { bool IsActivated(); @@ -29,19 +36,19 @@ namespace WeldingCommon.Devices.ACS bool AllAxisHomeStop(); bool CheckAllAxisHome(); - // MOTF (Scanner 전용 추가 - Gun에 없음) - // TODO: 이정인 선임 변수 맵 수신 후 주석 해제하여 사용 + // MOTF (Scanner 전용 - Gun에 없음) + bool SetMOTFParams(double posX, double negX, double velocity, double acc, int interval); bool MOTFStart(); bool MOTFStop(); bool CheckMOTFComp(); - // OneShot (Gun과 동일) + // OneShot bool SetOneShot(int msecShotTime, double secPhzShotPulse1, double secPhzShotPulse2); bool OneShotStart(); bool OneShotStop(); bool CheckOneShotComp(); - // LineShot (Gun과 동일) + // LineShot bool SetLineShot(double corePower, double ringPower, double startPosX, double endPosX, double startPosY, double endPosY, @@ -50,7 +57,7 @@ namespace WeldingCommon.Devices.ACS bool LineShotStop(); bool CheckLineShotComp(); - // Welding (Gun과 동일) + // Welding bool SetWeldingVel(double acc, double svel, double cvel); bool SetWeldingPos(double startPosX, double startPosY, double endPosX, double endPosY, @@ -69,7 +76,7 @@ namespace WeldingCommon.Devices.ACS bool WeldingStop(); bool CheckWeldingComp(); - // Teaching Position (Gun과 동일) + // Teaching Position bool SetWeldingTeachingPosition1(double PosX, double PosY, double camOffsetX, double camOffsetY); bool SetWeldingTeachingPosition2(double PosX, double PosY, double camOffsetX, double camOffsetY); bool SetWeldingTeachingPosition3(double PosX, double PosY, double camOffsetX, double camOffsetY); @@ -79,13 +86,13 @@ namespace WeldingCommon.Devices.ACS bool SetWeldingTeachingPosition7(double PosX, double PosY, double camOffsetX, double camOffsetY); bool SetWeldingTeachingPosition8(double PosX, double PosY, double camOffsetX, double camOffsetY); - // 레이저 (Gun과 동일) + // 레이저 bool SetLaserIOUse(bool on); bool SetLCILserOn(bool on); bool SetWeldingAxes(int axisXnum, int axisYnum); bool IsLaserOn(); - // 알람 (Gun과 동일) + // 알람 bool ResetAlarm(); void AllAxisServoOff(); } @@ -93,7 +100,6 @@ namespace WeldingCommon.Devices.ACS // ── 구현 ────────────────────────────────────────────────────────────────── public partial class ScannerACS : ACSDevice, IScannerACS { - // Gun과 동일한 필드 private ACSDeviceSetting _setting; // Scanner는 Stage X (X2) 1축만 사용 @@ -121,11 +127,9 @@ namespace WeldingCommon.Devices.ACS var env = Application.Current.AuroraEnv(); // TODO: Scanner용 SettingIds 확정 후 교체 - // Gun: _setting = env.SettingEntry[SettingIds.ACS] as ACSDeviceSetting; // _setting = env.SettingEntry[ScannerSettingIds.ACS] as ACSDeviceSetting; // Scanner는 Stage X (X2) 1축만 취득 - // Gun은 X1, X2, Y1, Y2, Z 전부 취득 // null-safe: 변수 맵 수신 전 예외 방지 // TODO: 이정인 선임 변수 맵 수신 후 축 번호 검증 try { MotorStageX = env.DeviceManager[CommonDeviceIds.AxisX2] as ACSMotor; } @@ -140,7 +144,6 @@ namespace WeldingCommon.Devices.ACS private void UpdateACSParam() { // Scanner는 Stage X만 모니터링 - // Gun은 X1, X2, Y1, Y2, Z 전부 모니터링 if (MotorStageX != null) { _motorVariable.X2AxisPosition = MotorStageX.GetActualPos(); @@ -150,7 +153,7 @@ namespace WeldingCommon.Devices.ACS _motorVariable.IsHome = MotorStageX.GetServoStatus() == 1; } - // 알람 상태 갱신 (Gun과 동일) + // 알람 상태 갱신 HasHeavyAlarm = ReadVariableInt(HeavyAlarm) == 1; HasLightAlarm = ReadVariableInt(LightAlarm) == 1; ReadVariableIntArrRef(AlarmCodes, ref _HaveAlarmCodes, ProgramBuffer.ACSC_NONE, 0, 10); @@ -162,7 +165,7 @@ namespace WeldingCommon.Devices.ACS return base.DoDeactivate(); } - // ── 홈 (Gun과 동일) ─────────────────────────────────────────────────── + // ── 홈 ─────────────────────────────────────────────────────────────── bool IScannerACS.AllAxisHomeStart() { if (RunBuffer((ProgramBuffer)eBuffer.All_Axis_Home)) @@ -184,8 +187,26 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.CheckAllAxisHome() => ReadVariableInt(iAllAxisHomeComplete) > 0; - // ── MOTF (Scanner 전용 추가 - Gun에 없음) ──────────────────────────── - // TODO: 이정인 선임 변수 맵 수신 후 버퍼 번호 및 변수명 교체 + // ── MOTF (Scanner 전용 - Gun에 없음) ───────────────────────────────── + // 26.04.09 NDY SetMOTFParams 추가 — xlsx 글로벌 변수 맵 기준 확정 + bool IScannerACS.SetMOTFParams(double posX, double negX, + double velocity, double acc, int interval) + { + if (WriteRealVariable(rMOTFPosX, posX) & + WriteRealVariable(rMOTFNegX, negX) & + WriteRealVariable(rMOTFVelocity, velocity) & + WriteRealVariable(rMOTFAcc, acc) & + WriteVariableInt(iMOTFInterval, interval)) + { + Log.I($"SetMOTFParams >> Complete | PosX:{posX} NegX:{negX} " + + $"Vel:{velocity} Acc:{acc} Interval:{interval}ms"); + return true; + } + Log.E("SetMOTFParams >> Fail"); + return false; + } + + // TODO: 이정인 선임 변수 맵 수신 후 버퍼 번호 및 완료 변수명 검증 bool IScannerACS.MOTFStart() { if (IsSimul) return true; @@ -194,7 +215,7 @@ namespace WeldingCommon.Devices.ACS Log.I("MOTFStart >> Complete"); return true; } - Log.D("MOTFStart >> Fail"); + Log.E("MOTFStart >> Fail"); return false; } @@ -211,7 +232,7 @@ namespace WeldingCommon.Devices.ACS return ReadVariableInt(iMOTFComplete) > 0; } - // ── OneShot (Gun과 동일) ────────────────────────────────────────────── + // ── OneShot ────────────────────────────────────────────────────────── bool IScannerACS.SetOneShot(int msecShotTime, double secPhzShotPulse1, double secPhzShotPulse2) { if (WriteRealVariable(rOneShotTime, msecShotTime) & @@ -238,8 +259,8 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.OneShotStop() { - IScannerACS motion = this; - motion.SetLCILserOn(false); + IScannerACS acs = this; + acs.SetLCILserOn(false); StopBuffer((ProgramBuffer)eBuffer.Welding_OneShot); Log.D("OneShotStop >> Complete"); return true; @@ -248,7 +269,7 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.CheckOneShotComp() => ReadVariableInt(iOneShotComplete) > 0; - // ── LineShot (Gun과 동일) ───────────────────────────────────────────── + // ── LineShot ───────────────────────────────────────────────────────── bool IScannerACS.SetLineShot(double corePower, double ringPower, double startPosX, double endPosX, double startPosY, double endPosY, @@ -283,8 +304,8 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.LineShotStop() { - IScannerACS motion = this; - motion.SetLCILserOn(false); + IScannerACS acs = this; + acs.SetLCILserOn(false); StopBuffer((ProgramBuffer)eBuffer.Welding_Line); Log.D("LineShotStop >> Complete"); return true; @@ -293,7 +314,7 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.CheckLineShotComp() => ReadVariableInt(iLineWeldingComplete) > 0; - // ── Welding (Gun과 동일) ────────────────────────────────────────────── + // ── Welding ────────────────────────────────────────────────────────── bool IScannerACS.WeldingStart() { if (IsSimul) return true; @@ -308,8 +329,8 @@ namespace WeldingCommon.Devices.ACS bool IScannerACS.WeldingStop() { - IScannerACS motion = this; - motion.SetLCILserOn(false); + IScannerACS acs = this; + acs.SetLCILserOn(false); StopBuffer((ProgramBuffer)eBuffer.Welding_AllRound); Log.D("WeldingStop >> Complete"); return true; @@ -350,7 +371,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingArc(double point1, double point2, double point3, double point4) + bool IScannerACS.SetWeldingArc(double point1, double point2, + double point3, double point4) { if (WriteRealVariable(rWeldingEdgePointRad1, point1) & WriteRealVariable(rWeldingEdgePointRad2, point2) & @@ -364,15 +386,11 @@ namespace WeldingCommon.Devices.ACS return false; } + // 26.04.09 NDY iPCset_ALASER_SHOT_MODE — Scanner xlsx 기준 미사용 bool IScannerACS.SetWeldingType(eOutType type) { - if (WriteVariableInt(iALaserShotMode, (int)type)) - { - Log.D("SetWeldingType >> Complete"); - return true; - } - Log.D("SetWeldingType >> Fail"); - return false; + Log.D("SetWeldingType >> Not Used in Scanner"); + return true; } bool IScannerACS.SetWeldingPulse(double coreMaxPower, double coreMinPower, @@ -390,14 +408,13 @@ namespace WeldingCommon.Devices.ACS return false; } + // 26.04.09 NDY rLaserONOffset / rLaserOFFPosX / rLaserOFFOffset — xlsx 미사용 제거 + // rLaserONPosX (rPCset_ALINE_LASER_ONPOS_X) 만 유효 bool IScannerACS.SetLaserOnOff(double onPosX, double onOffSet, double offPosX, double offOffSet, double camOffsetX, double camOffsetY) { - if (WriteRealVariable(rLaserONPosX, onPosX + camOffsetX) & - WriteRealVariable(rLaserONOffset, onOffSet) & - WriteRealVariable(rLaserOFFPosX, offPosX + camOffsetX) & - WriteRealVariable(rLaserOFFOffset, offOffSet)) + if (WriteRealVariable(rLaserONPosX, onPosX + camOffsetX)) { Log.D("SetLaserOnOff >> Complete"); return true; @@ -432,8 +449,9 @@ namespace WeldingCommon.Devices.ACS return false; } - // ── Teaching Position (Gun과 동일) ──────────────────────────────────── - bool IScannerACS.SetWeldingTeachingPosition1(double PosX, double PosY, double camOffsetX, double camOffsetY) + // ── Teaching Position ───────────────────────────────────────────────── + bool IScannerACS.SetWeldingTeachingPosition1(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition1PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition1PosY, PosY + camOffsetY)) @@ -445,7 +463,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition2(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition2(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition2PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition2PosY, PosY + camOffsetY)) @@ -457,7 +476,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition3(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition3(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition3PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition3PosY, PosY + camOffsetY)) @@ -469,7 +489,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition4(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition4(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition4PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition4PosY, PosY + camOffsetY)) @@ -481,7 +502,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition5(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition5(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition5PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition5PosY, PosY + camOffsetY)) @@ -493,7 +515,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition6(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition6(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition6PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition6PosY, PosY + camOffsetY)) @@ -505,7 +528,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition7(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition7(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition7PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition7PosY, PosY + camOffsetY)) @@ -517,7 +541,8 @@ namespace WeldingCommon.Devices.ACS return false; } - bool IScannerACS.SetWeldingTeachingPosition8(double PosX, double PosY, double camOffsetX, double camOffsetY) + bool IScannerACS.SetWeldingTeachingPosition8(double PosX, double PosY, + double camOffsetX, double camOffsetY) { if (WriteRealVariable(rWeldingPosition8PosX, PosX + camOffsetX) & WriteRealVariable(rWeldingPosition8PosY, PosY + camOffsetY)) @@ -529,7 +554,7 @@ namespace WeldingCommon.Devices.ACS return false; } - // ── 레이저 (Gun과 동일) ─────────────────────────────────────────────── + // ── 레이저 ─────────────────────────────────────────────────────────── bool IScannerACS.SetLaserIOUse(bool on) { if (WriteRealVariable(iLaserUse, on ? 1 : 0)) @@ -541,15 +566,11 @@ namespace WeldingCommon.Devices.ACS return false; } + // 26.04.09 NDY iPCset_ALINE_LCTYPE — Scanner xlsx 기준 미사용 bool IScannerACS.SetLCILserOn(bool on) { - if (WriteRealVariable(iAStageLCType, on ? 1 : 0)) - { - Log.D($"SetLCILserOn {on} >> Complete"); - return true; - } - Log.D("SetLCILserOn >> Fail"); - return false; + Log.D("SetLCILserOn >> Not Used in Scanner"); + return true; } bool IScannerACS.SetWeldingAxes(int axisXnum, int axisYnum) @@ -570,7 +591,7 @@ namespace WeldingCommon.Devices.ACS return ReadVariableInt(IsLaserOn) > 0; } - // ── 알람 (Gun과 동일) ───────────────────────────────────────────────── + // ── 알람 ───────────────────────────────────────────────────────────── bool IScannerACS.ResetAlarm() { TerminalCommand("FCLEAR ALL"); diff --git a/WeldingComponents/WeldingCommon/Views/Manual/Scanner/UCScannerMotion.xaml b/WeldingComponents/WeldingCommon/Views/Manual/Scanner/UCScannerMotion.xaml index 35ee47d..1ce0666 100644 --- a/WeldingComponents/WeldingCommon/Views/Manual/Scanner/UCScannerMotion.xaml +++ b/WeldingComponents/WeldingCommon/Views/Manual/Scanner/UCScannerMotion.xaml @@ -64,7 +64,8 @@ + KeyHorizontalAlignment="Right" KeyTextWidth="0.9*" + ToolTip="Scanner/MotorX에 대한 Step 설정값 들어갑니다."/> @@ -179,9 +180,9 @@ Text="{Binding StageXPos, StringFormat={}{0:0.000}}"/> + Command="{Binding CMD_JogMove}" CommandParameter="Stage_X_Left" ToolTip="StageX 위치값 증가">◀ + + Command="{Binding CMD_JogMove}" CommandParameter="Stage_X_Right" ToolTip="StageX 위치값 감소">- ▶