From c517993e1ab7385f29051adf0f5e3f2238851f9d Mon Sep 17 00:00:00 2001 From: ksj09406 Date: Thu, 15 Oct 2026 14:36:29 +0900 Subject: [PATCH] =?UTF-8?q?RCC=20=ED=8C=A8=ED=84=B4=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=20=EC=95=8C=EB=A6=BC(B2506/B2409),=20=EC=84=9C=EB=B8=8C=20?= =?UTF-8?q?=ED=8C=A8=ED=84=B4=2010=EA=B0=9C=20=ED=99=95=EC=9E=A5=20?= =?UTF-8?q?=EB=B0=8F=20=ED=98=84=EC=9E=A5=20=EC=86=8C=EC=8A=A4=20=EB=8F=99?= =?UTF-8?q?=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 오토런 시작 시 RCC 패턴 폴더 변경 감지 → B2506 ON, PLC ACK(B2409) 수신 시 OFF - 서브 패턴 1~10, 패턴 목록에 서브 썸네일 표시(행 내 좌우 스크롤) - 서브 패턴 등록 직후 활성화 OFF - 패턴 파일이 다른 프로그램에서 열려 있으면 삭제하지 않고 안내 - 현장 소스 반영: Train ROI 슬라이더, KS 조명 밝기 저장/적용, 조명 ID 분리, 스캔 후 카메라 라이브 재시작, 레시피 21 RCC NG 우회, 오토런 상태 판단 --- AuroraDevices/AuroraLight/LightConfig.cs | 56 +++++- AuroraDevices/AuroraLight/LightDevice.cs | 14 +- AuroraDevices/AuroraLight/View/KsLight.xaml | 7 +- .../AuroraLight/View/KsLightModel.cs | 181 +++++++++++++++--- .../AuroraLight/View/UCLightViewModel.cs | 66 +++++-- .../CogUI/Camera/CameraDisplay.xaml.cs | 3 + .../Caliper/CaliperSettingViewModel.cs | 3 + .../ImageModelSettingViewModel.cs | 3 + .../LineFinder/LineSettingViewModel.cs | 3 + .../MilPattern/PatternMatching/PmParamExt.cs | 4 +- .../MilUI/Camera/CameraDisplay.xaml.cs | 92 ++++++++- .../Caliper/CaliperSettingViewModel.cs | 5 +- .../ImageModelSettingViewModel.cs | 27 +++ .../LineFinder/LineSettingViewModel.cs | 5 +- .../MultiLineParamSettingViewModel.cs | 3 + .../PatternMatchingSettingView.xaml | 12 +- .../PatternMatchingSettingViewModel.cs | 77 +++++++- .../Pattern/Agent/PatternAgentBase.cs | 69 ++++++- .../VisionCommon/Pattern/ICameraDisplay.cs | 2 + .../Pattern/IGraEventSubscriber.cs | 4 +- .../VisionCommon/Pattern/Info/PatternInfo.cs | 3 + .../VisionCommon/Pattern/PatternConstants.cs | 2 +- .../VisionUI/Pattern/PatternListViewModel.cs | 48 ++++- .../PatternRegistration/PatternListView.xaml | 60 +++++- .../PatternListView.xaml.cs | 19 ++ .../Device/PLC/PLCController.Address.cs | 2 + Machines/ILSOS_KS/EquipmentSetup.cs | 6 +- Machines/ILSOS_KS/ILSOS_KS.csproj | 4 + Machines/ILSOS_KS/Properties/AssemblyInfo.cs | 4 +- Machines/ILSOS_KS/Sequences/SeqAutoRunKS.cs | 176 ++++++++++++++++- .../Views/Main/UCMainAutoRunViewModel.cs | 6 +- 31 files changed, 878 insertions(+), 88 deletions(-) diff --git a/AuroraDevices/AuroraLight/LightConfig.cs b/AuroraDevices/AuroraLight/LightConfig.cs index 65d51b9..efe3ea0 100644 --- a/AuroraDevices/AuroraLight/LightConfig.cs +++ b/AuroraDevices/AuroraLight/LightConfig.cs @@ -1,9 +1,9 @@ -using Aurora.Api; +using Aurora.Api; using Aurora.Api.DataType; using Aurora.Api.Devices; +using PropertyTools.DataAnnotations; using System; using System.Collections.Generic; -using System.ComponentModel; using System.IO.Ports; using System.Linq; using System.Text; @@ -14,6 +14,50 @@ namespace AuroraLight public class LightConfig : IDeviceConfig { public IConnConfig ConnConfig { get; set; } + + [Category("Light Level")] + [DisplayName("Channel 1 Level (0~255)")] + [Description("Channel 1 Brightness")] + public int Ch1Level { get; set; } = 200; + + [Category("Light Level")] + [DisplayName("Channel 2 Level (0~255)")] + [Description("Channel 2 Brightness")] + public int Ch2Level { get; set; } = 200; + + [Category("Light Level")] + [DisplayName("Channel 3 Level (0~255)")] + [Description("Channel 3 Brightness")] + public int Ch3Level { get; set; } = 200; + + [Category("Light Level")] + [DisplayName("Channel 4 Level (0~255)")] + [Description("Channel 4 Brightness")] + public int Ch4Level { get; set; } = 200; + + public int GetChannelLevel(int channel) + { + switch (channel) + { + case 0: return Ch1Level; + case 1: return Ch2Level; + case 2: return Ch3Level; + case 3: return Ch4Level; + default: return Ch1Level; + } + } + + public void SetChannelLevel(int channel, int value) + { + switch (channel) + { + case 0: Ch1Level = value; break; + case 1: Ch2Level = value; break; + case 2: Ch3Level = value; break; + case 3: Ch4Level = value; break; + } + } + public LightConfig() { ConnConfig = new SerialConnConfig() { @@ -24,6 +68,10 @@ namespace AuroraLight DataBits = 8, ReadTimeout = 500 }; + Ch1Level = 200; + Ch2Level = 200; + Ch3Level = 200; + Ch4Level = 200; } public static LightConfig GetDefaultConfig() @@ -37,6 +85,10 @@ namespace AuroraLight DataBits = 8, ReadTimeout = 500 }; + config.Ch1Level = 200; + config.Ch2Level = 200; + config.Ch3Level = 200; + config.Ch4Level = 200; return config; } diff --git a/AuroraDevices/AuroraLight/LightDevice.cs b/AuroraDevices/AuroraLight/LightDevice.cs index dcfe5ca..dc34d33 100644 --- a/AuroraDevices/AuroraLight/LightDevice.cs +++ b/AuroraDevices/AuroraLight/LightDevice.cs @@ -1,4 +1,4 @@ -using Aurora.Api; +using Aurora.Api; using Aurora.Api.DataType; using Aurora.Api.Devices; using AuroraLight.ALT; @@ -25,6 +25,7 @@ namespace AuroraLight Logger Log; internal eLight _lightType; internal ILight _light; + public LightConfig Config { get; private set; } public LightDevice(string deviceId, eLight light) { @@ -38,6 +39,7 @@ namespace AuroraLight protected override int DoActivate(IDeviceConfig config) { var l_config = config as LightConfig; + Config = l_config; if (IsSimul) { return E1.OK; @@ -57,7 +59,15 @@ namespace AuroraLight break; } - return _light.InitInternal(config.ConnConfig as SerialConnConfig) ? E1.OK : E2.NOT_CONNECTED; + bool connected = _light.InitInternal(config.ConnConfig as SerialConnConfig); + if (connected && l_config != null) { + int chCount = _lightType == eLight.ALT_8CH ? 8 : 4; + for (int i = 0; i < chCount; i++) { + _light.SetLightValueInternal(i, l_config.GetChannelLevel(i)); + } + } + + return connected ? E1.OK : E2.NOT_CONNECTED; } } diff --git a/AuroraDevices/AuroraLight/View/KsLight.xaml b/AuroraDevices/AuroraLight/View/KsLight.xaml index 95341a4..adb6657 100644 --- a/AuroraDevices/AuroraLight/View/KsLight.xaml +++ b/AuroraDevices/AuroraLight/View/KsLight.xaml @@ -1,4 +1,4 @@ - - -