commit ddbf638cff780e0338fb29942f389c0a53ed8cd0 Author: gudae Date: Fri Oct 30 10:30:52 2026 +0900 final_Housing diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a26b00c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.vs/ +bin/ +obj/ +.wix/ +installer/output/ +publish/ +UpgradeLog*.htm +*.Backup.tmp diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..cd2a08d --- /dev/null +++ b/App.xaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..4f609c9 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,16 @@ +using System.Windows; + +namespace Housing; + +public partial class App : Application +{ + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + ShutdownMode = ShutdownMode.OnMainWindowClose; + + var mainWindow = new MainWindow(); + MainWindow = mainWindow; + mainWindow.Show(); + } +} diff --git a/Database.ini b/Database.ini new file mode 100644 index 0000000..28e333a --- /dev/null +++ b/Database.ini @@ -0,0 +1,13 @@ +[Database] +IP=192.168.10.10,1433 +Database=NE1aW_PT_Sensor +DbId=su_user +DbPw=amotech821 +Encrypt=False +TrustServerCertificate=True +Timeout=15 + +[Login] +Procedure=dbo.CheckOperator +ProcessName=Housing +OfflinePreview=True diff --git a/Hardware.ini b/Hardware.ini new file mode 100644 index 0000000..1f0da67 --- /dev/null +++ b/Hardware.ini @@ -0,0 +1,97 @@ +[Board] +PortName=COM5 +BaudRate=115200 +ReadTimeout=5000 +PreConnectCommand=x00o +ConnectCommand=x00c_001101:owt28006727ea97c7801 +ReadIdCommand=x00c_001101:ow2800326003e +PostReadIdCommand=x00o +CalDefaultCommand=x00c_001001:owt28006727ea97c7801 +EndToken= +DtrEnable=false +RtsEnable=false + +[BarcodeScanner] +Enabled=true +PortName=Auto +BaudRate=9600 +ReadTimeout=500 +IdleCommitMilliseconds=250 +DtrEnable=true +RtsEnable=true + +[StartSignal] +; USB-6501 +Enabled=true +Connection=Ni6501 +PhysicalChannel=Dev1/port0/line0 +ActiveState=Low +PollIntervalMilliseconds=50 +; 0 = wait until the equipment start button is pressed, without a time limit. +TimeoutMilliseconds=0 +PostSignalDelayMilliseconds=2000 +RequireInactiveBeforeStart=true + +[Equipment] +; V 출력: Keysight 34465A DMM 값 +; A 출력: Keysight E36233A Power Supply CH1 Current 값 +; USB 장비는 Keysight Connection Expert 또는 NI MAX에서 보이는 VISA 주소를 Resource +Timeout=5000 +SettleMilliseconds=300 +PreBoardCommand=VOLT 5, (@2);OUTP ON, (@2) +PreBoardDelayMilliseconds=2000 +LogoutCommand=OUTP OFF, (@1) + +; 34465A DMM +VoltageConnection=LAN +VoltageResource= +VoltageIdnMatch=34465A +VoltageHost=192.168.10.13 +VoltagePort=5025 +VoltageSetupCommand= +VoltageReadCommand=MEAS:VOLT:DC? + +; Separate resistance meter. Change its address/commands here. +; Read after V/current and CH1 output OFF. Normal response: Ohm -> kOhm; overload: 999 + OL status. +; Resistance is required for inspection; Disabled stops the inspection with an error. +ResistanceConnection=LAN +ResistanceResource= +; Optional model identifier to validate with *IDN? (leave blank until the model is known). +ResistanceIdnMatch= +ResistanceHost=192.168.10.34 +ResistancePort=5025 +ResistancePortName= +ResistanceBaudRate=115200 +ResistanceTerminator=LF +ResistanceReadCommand=MEAS:RES? +ResistanceSetupCommand= +; Query the CURRENT power supply to confirm CH1 output is OFF before resistance measurement. +ResistancePowerOffQuery=OUTP? (@1) +ResistanceSettleMilliseconds=300 + +; E36233A Power Supply +CurrentConnection=LAN +CurrentResource= +CurrentIdnMatch=E36233A +; Change this to the E36233A LAN IP if the instrument uses a different address. +CurrentHost=192.168.10.12 +CurrentPort=5025 +CurrentPortName= +CurrentBaudRate=9600 +CurrentTerminator=LF +CurrentSetupCommand=OUTP ON, (@1) +CurrentCleanupCommand=OUTP OFF, (@1) +CurrentReadCommand=MEAS:CURR? (@1) + +; COM 포트로 잡히는 장비 예시: +; VoltageConnection=Serial +; VoltagePortName=Auto +; VoltageBaudRate=115200 + +; LAN 장비 예시: +; VoltageConnection=Tcp +; VoltageHost=192.168.0.10 +; VoltagePort=5025 + +; E36233A 파워서플라이에서 CH1 전압까지 읽고 싶을 때 예시: +; VoltageReadCommand=MEAS:VOLT? CH1 diff --git a/Housing.csproj b/Housing.csproj new file mode 100644 index 0000000..30bf7b3 --- /dev/null +++ b/Housing.csproj @@ -0,0 +1,40 @@ + + + WinExe + net9.0-windows + true + Housing + enable + enable + Resources\Housing_voltage_current_icon.ico + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + diff --git a/Housing.sln b/Housing.sln new file mode 100644 index 0000000..59d6d8a --- /dev/null +++ b/Housing.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11520.95 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Housing", "Housing.csproj", "{7364A567-F115-4ACE-9207-C6FDEEF0A394}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|x64.ActiveCfg = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|x64.Build.0 = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|x86.ActiveCfg = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Debug|x86.Build.0 = Debug|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|Any CPU.Build.0 = Release|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|x64.ActiveCfg = Release|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|x64.Build.0 = Release|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|x86.ActiveCfg = Release|Any CPU + {7364A567-F115-4ACE-9207-C6FDEEF0A394}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3209F145-2010-45EC-8A1A-998F1D3CAE2F} + EndGlobalSection +EndGlobal diff --git a/InspectionSettings.ini b/InspectionSettings.ini new file mode 100644 index 0000000..ad00bd1 --- /dev/null +++ b/InspectionSettings.ini @@ -0,0 +1,8 @@ +[Judgement] +VMin=0.00 +VMax=9.99 +AMin=0.00 +AMax=9.99 +; Resistance limits in kOhm. Set both values in the UI before the first inspection. +RMin= +RMax= diff --git a/Login/StartupLoginWindow.xaml b/Login/StartupLoginWindow.xaml new file mode 100644 index 0000000..4ef65a8 --- /dev/null +++ b/Login/StartupLoginWindow.xaml @@ -0,0 +1,678 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +