This commit is contained in:
최이근 2026-03-17 20:12:34 +09:00
commit 06805428c6
10 changed files with 228 additions and 154 deletions

Binary file not shown.

View File

@ -5,7 +5,7 @@
"collector_mode": "MANUAL",
"console_out": false,
"file_out": true,
"log_save_dir": "_log",
"log_save_dir": "D:\\ILSOSConfig\\_log",
"log_save_level": 0,
"log_file_prefix": "Aurora",
"log_file_size": 5,
@ -20,7 +20,7 @@
"collector_mode": "MANUAL",
"console_out": false,
"file_out": true,
"log_save_dir": "_process",
"log_save_dir": "D:\\ILSOSConfig\\_process",
"log_save_level": 0,
"log_file_prefix": "process",
"log_file_size": 5,
@ -35,7 +35,7 @@
"collector_mode": "MANUAL",
"console_out": false,
"file_out": true,
"log_save_dir": "_vision",
"log_save_dir": "D:\\ILSOSConfig\\_vision",
"log_save_level": 0,
"log_file_prefix": "vision",
"log_file_size": 5,

View File

@ -87,10 +87,10 @@ namespace ILSOS_ACW_H52A.Recipes {
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_A_POWER_2, (int)(_LineParam_1.RampingStartAPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_A_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_A_DISTANCE, (int)(_LineParam_1.RampingStartADist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_A_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_1, (int)(_LineParam_1.RampingStartPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_1.RampingStartPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_1.RampingStartPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_DISTANCE, (int)(_LineParam_1.RampingStartDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_START_B_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_1, (int)(_LineParam_1.RampingEndPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_1.RampingEndPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_1.RampingEndPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_DISTANCE, (int)(_LineParam_1.RampingEndDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_1_WELDING_RAMPING_END_DISTANCE.ToString())));
#endregion
#region PLC Upload Parameter 2
@ -104,10 +104,10 @@ namespace ILSOS_ACW_H52A.Recipes {
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_A_POWER_2, (int)(_LineParam_2.RampingStartAPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_A_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_A_DISTANCE, (int)(_LineParam_2.RampingStartADist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_A_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_1, (int)(_LineParam_2.RampingStartPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_2.RampingStartPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_2.RampingStartPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_DISTANCE, (int)(_LineParam_2.RampingStartDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_START_B_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_1, (int)(_LineParam_2.RampingEndPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_2.RampingEndPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_2.RampingEndPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_DISTANCE, (int)(_LineParam_2.RampingEndDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_2_WELDING_RAMPING_END_DISTANCE.ToString())));
#endregion
#region PLC Upload Parameter 3
@ -121,10 +121,10 @@ namespace ILSOS_ACW_H52A.Recipes {
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_A_POWER_2, (int)(_LineParam_3.RampingStartAPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_A_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_A_DISTANCE, (int)(_LineParam_3.RampingStartADist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_A_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_1, (int)(_LineParam_3.RampingStartPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_3.RampingStartPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_2, (int)(_LineParam_3.RampingStartPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_DISTANCE, (int)(_LineParam_3.RampingStartDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_START_B_DISTANCE.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_1, (int)(_LineParam_3.RampingEndPower1 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_1.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_3.RampingEndPower3 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_2, (int)(_LineParam_3.RampingEndPower2 * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_POWER_2.ToString())));
plc.WriteDWord((int)eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_DISTANCE, (int)(_LineParam_3.RampingEndDist * (plc as PLCControllerACWH52A).ConvertTo2WordDivisionIndex(eWordOutput.PC_PARAM_3_WELDING_RAMPING_END_DISTANCE.ToString())));
#endregion
@ -199,10 +199,10 @@ namespace ILSOS_ACW_H52A.Recipes {
_LineParam_1.RampingStartAPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_A_POWER_2);
_LineParam_1.RampingStartADist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_A_DISTANCE);
_LineParam_1.RampingStartPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_B_POWER_1);
_LineParam_1.RampingStartPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_B_POWER_2);
_LineParam_1.RampingStartPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_B_POWER_2);
_LineParam_1.RampingStartDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_START_B_DISTANCE);
_LineParam_1.RampingEndPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_END_POWER_1);
_LineParam_1.RampingEndPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_END_POWER_2);
_LineParam_1.RampingEndPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_END_POWER_2);
_LineParam_1.RampingEndDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_1_WELDING_RAMPING_END_DISTANCE);
#endregion
#region Scanner Upload Parameter 2
@ -216,10 +216,10 @@ namespace ILSOS_ACW_H52A.Recipes {
_LineParam_2.RampingStartAPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_A_POWER_2);
_LineParam_2.RampingStartADist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_A_DISTANCE);
_LineParam_2.RampingStartPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_B_POWER_1);
_LineParam_2.RampingStartPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_B_POWER_2);
_LineParam_2.RampingStartPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_B_POWER_2);
_LineParam_2.RampingStartDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_START_B_DISTANCE);
_LineParam_2.RampingEndPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_END_POWER_1);
_LineParam_2.RampingEndPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_END_POWER_2);
_LineParam_2.RampingEndPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_END_POWER_2);
_LineParam_2.RampingEndDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_2_WELDING_RAMPING_END_DISTANCE);
#endregion
#region Scanner Upload Parameter 3
@ -233,10 +233,10 @@ namespace ILSOS_ACW_H52A.Recipes {
_LineParam_3.RampingStartAPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_A_POWER_2);
_LineParam_3.RampingStartADist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_A_DISTANCE);
_LineParam_3.RampingStartPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_B_POWER_1);
_LineParam_3.RampingStartPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_B_POWER_2);
_LineParam_3.RampingStartPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_B_POWER_2);
_LineParam_3.RampingStartDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_START_B_DISTANCE);
_LineParam_3.RampingEndPower1 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_END_POWER_1);
_LineParam_3.RampingEndPower3 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_END_POWER_2);
_LineParam_3.RampingEndPower2 = (uint)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_END_POWER_2);
_LineParam_3.RampingEndDist = (double)(plc as PLCControllerACWH52A).ReadDWordByDivision(eWordInput.PLC_PARAM_3_WELDING_RAMPING_END_DISTANCE);
#endregion

View File

@ -23,12 +23,16 @@ using CoreUnit.Scanner.UserControl.ScannerCanvas;
using DB;
using DB.Recipe;
using GUI;
using Hermes;
using ILSOS_CCW_H52A.Alarm;
using ILSOS_CCW_H52A.Device;
using ILSOS_CCW_H52A.Models;
using ILSOS_CCW_H52A.Recipes;
using ILSOS_CCW_H52A.Sequences;
using ILSOS_CCW_H52A.Views;
using System;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using WeldingCommon;
@ -40,12 +44,10 @@ using WeldingCommon.Views;
using WeldingCommon.Vision.Factory;
using static WeldingCommon.Vision.Factory.VisionFactory;
namespace ILSOS_CCW_H52A
{
internal class EquipmentSetup : CommonEquipmentSetup, IEquipmentSetup
{
namespace ILSOS_CCW_H52A {
internal class EquipmentSetup : CommonEquipmentSetup, IEquipmentSetup {
private SequenceBuilder _SeqAutoRunCCWH52A_Builder;
public Logger Log = new Logger("EquipmentSetup");
public override void BuildMainStatusView(MainStatusBuilder builder)
{
base.BuildMainStatusView(builder);
@ -79,6 +81,69 @@ namespace ILSOS_CCW_H52A
AuroraEnv.SequenceEntry[SequenceIds.AlarmMonitoring].Start();
AuroraEnv.GetProcessManager().Init(AuroraEnv);
// 최초에 permission에 대한 값을 적용해줌
OnPermissionChanged(null);
AuroraEnv.EventObservable.AsObservable(AuroraSysEvent.SYS_PERMISSION_CHANGED)
.Subscribe(OnPermissionChanged);
var seq = AuroraEnv.SequenceEntry[SequenceIds.SeqAutoRunCCWH52A] as ISequence;
seq.RunStateChanged += AutoRunSeq_RunStateChanged;
}
private const ushort LogOut = 65535; // CMY - 급해서 해두긴 했는데 더 좋은 방향으로 바꾸어야함
private void AutoRunSeq_RunStateChanged(object sender, (string sequenceId, SequenceRunState state) e)
{
//AutoRun 상황에서 Recipe Save Lock
bool RecipeLockEnable = e.state != SequenceRunState.Idle;
if (ApplicationExt.PermissionLevel == LogOut) {
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, true);
RecipeLockEnable = true; // CMY - LogOut 되어 있으면 무조건 락
} else
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, RecipeLockEnable);
bool AutoRunState = e.state == SequenceRunState.Running;
Application.Current.Dispatcher.Invoke(() => {
if (AutoRunState)
WeldingRecipeManager.OnActiveReloaded();
else
WeldingRecipeManager.ReloadWeldingRecipe(WeldingRecipeManager.SelectedRecipe.name);
if (RecipeLockEnable == false || e.state == SequenceRunState.Running) {
_UCRecipe.IsEnabled = e.state != SequenceRunState.Running; // CMY - Recipe Lock을 풀 조건이 아니면 Enable은 건드리지 않는다.
}
if (RecipeLockEnable)
Log.E($"AutoRun Start. Recipe Lock Enable True");
else
Log.E("AutoRun End. Recipe Lock Enable False");
});
}
private void OnPermissionChanged(EventMessage message)
{
bool permissionOn = ApplicationExt.PermissionLevel <= (ushort)PermissionLevel.LEVEL3;
AuroraEnv.RecipeManager.SaveLock(CommonRecipeIds.ScannerObjectTeaching, !permissionOn);
// Login 권한이 없어지면 Active된 레시피로 변경하도록 함
Application.Current.Dispatcher.Invoke(() => {
if (!permissionOn)
WeldingRecipeManager.OnActiveReloaded();
else
WeldingRecipeManager.ReloadWeldingRecipe(WeldingRecipeManager.SelectedRecipe.name);
});
//LogOut 상황에서 Recipe Save Lock
//LogOut 상황에서 Reicpe 화면 수정할 수 없도록 함
Application.Current.Dispatcher.Invoke(() => { _UCRecipe.IsEnabled = permissionOn; });
Application.Current.Dispatcher.Invoke(() => {
if (!permissionOn)
Log.E($"User LogOut. Recipe Lock Enable True");
else
Log.E("User Login. Recipe Lock Enable False");
});
}
// For Selection LaserDevice

View File

@ -45,9 +45,9 @@ using System.Windows;
// Minor Version
// Build Number
// Revision
//
//ㄴ
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.1")]
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.2")]

View File

@ -1085,7 +1085,9 @@ namespace ILSOS_CCW_H52A.Sequences
report.JigNo, report.WeldingSpanTime.TotalMilliseconds.ToString(), lbadAvg,
wd.TodayProduct, wd.TotalProduct);
_CellTracker.SendEcsData(report.CellId, strPath, strData + "");
Log.I($"Report to CellTracker >> [LotID({report.LotId})] [CellID({report.CellId})] [LbadAvg({lbadAvg})]");
Log.I($"Report to CellTracker >> [LotID({report.LotId})] [CellID({report.CellId})] [JigNo({report.JigNo})] [LbadAvg({lbadAvg})]");
Log.I($"Cell Data : {strData}");
// 로컬 CSV 저장
string strItem = "//Date, Time, LotID, CellID, RecipeNo, LaserPower, MarkSpeed, FocalLength, HeadNo, WeldingTime, LaserPowerByLBAD, TodayCount, TotalCount";

View File

@ -78,7 +78,6 @@ namespace ILSOS_CCW_H52A.Views
_Plc = _Aurora.DeviceManager[CommonDeviceIds.PLCDevice] as PLCControllerCCWH52A;
_SeqAutoRun = _Aurora.SequenceEntry[SequenceIds.SeqAutoRunCCWH52A];
_SeqAutoRun.RunStateChanged += AutoRunSeq_RunStateChanged;
InitVariable();
@ -253,24 +252,5 @@ namespace ILSOS_CCW_H52A.Views
return;
}
}
private void AutoRunSeq_RunStateChanged(object sender, (string sequenceId, SequenceRunState state) e)
{
//AutoRun 상황에서 Recipe Save Lock
_RecipeManager.SaveLock(
CommonRecipeIds.ScannerObjectTeaching,
e.state != SequenceRunState.Idle);
//AutoRun 상황에서 Reicpe 화면 수정할 수 없도록 함
if (e.state == SequenceRunState.Running) {
Application.Current.Dispatcher.InvokeAsync(() => {
_UCRecipe.IsEnabled = false;
});
} else {
Application.Current.Dispatcher.InvokeAsync(() => {
_UCRecipe.IsEnabled = true;
});
}
}
}
}

View File

@ -1,9 +1,13 @@
using Aurora.Api;
using CoreUnit.ScannerCanvasCoreUnit;
using GUI.Properties;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Windows.Forms;
namespace CoreUnit.Control.UserControl.Canvas
@ -253,6 +257,7 @@ namespace CoreUnit.Control.UserControl.Canvas
public partial class CanvasCtrl : System.Windows.Forms.UserControl
{
public List<Color> scannerParamColorList = new List<Color>();
public Logger Log = new Logger("CanvasCtrl");
// ´õºí¹öÆÛ Å×½ºÆ®
private BufferedGraphicsContext context;
@ -1305,7 +1310,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (m_commandType == eCommandType.select || m_commandType == eCommandType.move) {
m_commandType = eCommandType.pan;
}
Log.E("Recipe View Command Pan");
UpdateCursor();
}
@ -1319,11 +1324,16 @@ namespace CoreUnit.Control.UserControl.Canvas
public void CommandDeleteSelected()
{
StringBuilder sb = new StringBuilder();
if (m_model.SelectedCount > 0) {
foreach(var layer in m_model.SelectedObjects) {
sb.Append($"{layer.No + 1} ");
}
m_model.DeleteObjects(m_model.SelectedObjects);
m_model.ClearSelectedObjects();
DoInvalidate(true);
UpdateCursor();
Log.E($"Layer Delete Success. No. [{sb}]");
}
}
@ -1340,6 +1350,7 @@ namespace CoreUnit.Control.UserControl.Canvas
public void CommandScaleToFit()
{
Model.Zoom = ((DataModel)Model).ScaleToFit;
Log.E("Recipe View Scale to Fit");
DoInvalidate(true);
}
@ -1353,6 +1364,7 @@ namespace CoreUnit.Control.UserControl.Canvas
{
SetCenter(new UnitPoint(0, 0));
DoInvalidate(true);
Log.E("Recipe View Focus Center");
}
public void CommandZoomIn()
@ -1528,14 +1540,15 @@ namespace CoreUnit.Control.UserControl.Canvas
if ((System.Windows.Forms.Control.ModifierKeys & Keys.Control) == Keys.Control) {
if (e.KeyCode >= Keys.D1 && e.KeyCode <= Keys.D9) {
int id = e.KeyCode - Keys.D0;
//int id = e.KeyCode - Keys.D0;
foreach (var obj in m_model.ActiveLayer.Objects) {
if (obj.ScannerParamID == id)
m_model.AddSelectedObject(obj);
}
DoInvalidate(true);
// CMY - Arc를 선택하려고 하면 OverFlow 뜬다.. 확인 필요
//foreach (var obj in m_model.ActiveLayer.Objects) {
// if (obj.ScannerParamID == id)
// m_model.AddSelectedObject(obj);
//}
//Log.I($"Recipe View Parameter All Select. ID : {id}");
//DoInvalidate(true);
} else {
switch (e.KeyCode) {
case Keys.G:
@ -1545,6 +1558,7 @@ namespace CoreUnit.Control.UserControl.Canvas
case Keys.S:
RunningSnapsModeChange();
Log.E("Recipe View Key Input Save!");
break;
case Keys.Right:
@ -1552,6 +1566,7 @@ namespace CoreUnit.Control.UserControl.Canvas
float offsetValue = evtGetOffsetValue();
((DataModel)Model).RotateObjects((float)(-1 * offsetValue), Model.SelectedObjects, true);
DoInvalidate(true);
Log.E("Recipe View Key Input Right Rotate");
}
break;
@ -1560,56 +1575,69 @@ namespace CoreUnit.Control.UserControl.Canvas
float offsetValue = evtGetOffsetValue();
((DataModel)Model).RotateObjects((float)offsetValue, Model.SelectedObjects, true);
DoInvalidate(true);
Log.E("Recipe View Key Input Left Rotate");
}
break;
case Keys.C:
copies = new List<IDrawObject>();
StringBuilder Copy_sb = new StringBuilder();
foreach (IDrawObject obj in Model.SelectedObjects) {
copies.Add(obj.Clone());
Copy_sb.Append($"{obj.No + 1} ");
}
iterationOffsetValue = 0;
DoInvalidate(true);
Log.E($"Recipe View Layer Copy. No [{Copy_sb}]");
break;
case Keys.V:
if (copies.Count != 0) {
StringBuilder Paste_sb = new StringBuilder();
double offsetValue = 3;
((DataModel)Model).CopyObjects(new UnitPoint(iterationOffsetValue + offsetValue, iterationOffsetValue + offsetValue), copies);
iterationOffsetValue = iterationOffsetValue + offsetValue;
DoInvalidate(true);
foreach (var layer in copies) {
Paste_sb.Append($"{layer.No + 1} ");
}
Log.E($"Recipe View Layer Paste. No [{Paste_sb}]");
}
break;
case Keys.Z: //Undo
CommandDoUndo();
Log.E("Recipe View Do Undo");
break;
case Keys.Y: //Redo
CommandDoRedo();
Log.E("Recipe View Do Redo");
break;
//키보드로 객체 이동
case Keys.Up://선택된 객체를 지정된 위치값 만큼 상승
if (evtGetOffsetValue != null) {
float offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(0, offsetValue), Model.SelectedObjects, true);
DoInvalidate(true);
}
break;
////키보드로 객체 이동
//case Keys.Up://선택된 객체를 지정된 위치값 만큼 상승
// if (evtGetOffsetValue != null) {
// float offsetValue = evtGetOffsetValue();
// Model.MoveObjects(new UnitPoint(0, offsetValue), Model.SelectedObjects, true);
// DoInvalidate(true);
// }
// break;
case Keys.Down://선택된 객체를 지정된 위치값 만큼 하강
if (evtGetOffsetValue != null) {
float offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(0, -1 * offsetValue), Model.SelectedObjects, true);
DoInvalidate(true);
}
break;
//case Keys.Down://선택된 객체를 지정된 위치값 만큼 하강
// if (evtGetOffsetValue != null) {
// float offsetValue = evtGetOffsetValue();
// Model.MoveObjects(new UnitPoint(0, -1 * offsetValue), Model.SelectedObjects, true);
// DoInvalidate(true);
// }
// break;
case Keys.A:
foreach (var obj in m_model.ActiveLayer.Objects) {
m_model.AddSelectedObject(obj);
}
Log.E("Recipe View All Layer Select");
break;
}
@ -1660,6 +1688,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetOffsetValue != null) {
float offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(0, offsetValue), Model.SelectedObjects, true);
Log.E($"Input Key Up, Layer Move. [X : 0, | Y : {offsetValue}]");
DoInvalidate(true);
}
break;
@ -1668,6 +1697,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetOffsetValue != null) {
float offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(0, -1 * offsetValue), Model.SelectedObjects, true);
Log.E($"Input Key Down, Layer Move. [X : 0, | Y : {-1 * offsetValue}]");
DoInvalidate(true);
}
break;
@ -1676,6 +1706,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetOffsetValue != null) {
float offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(offsetValue, 0), Model.SelectedObjects, true);
Log.E($"Input Key Right, Layer Move. [X : {offsetValue} | Y : 0]");
DoInvalidate(true);
}
break;
@ -1684,6 +1715,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetOffsetValue != null) {
double offsetValue = evtGetOffsetValue();
Model.MoveObjects(new UnitPoint(-1 * offsetValue, 0), Model.SelectedObjects, true);
Log.E($"Input Key Left, Layer Move. [X : {-1 * offsetValue} | Y : 0]");
DoInvalidate(true);
}
break;
@ -1692,6 +1724,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetAngleOffsetValue != null) {
float angleOffset = evtGetAngleOffsetValue();
((DataModel)Model).RotateObjects(-1 * (float)angleOffset, Model.SelectedObjects, true);
Log.E($"Input Key E, Angle Rotate");
DoInvalidate(true);
}
break;
@ -1700,6 +1733,7 @@ namespace CoreUnit.Control.UserControl.Canvas
if (evtGetAngleOffsetValue != null) {
float angleOffset = evtGetAngleOffsetValue();
((DataModel)Model).RotateObjects((float)angleOffset, Model.SelectedObjects, true);
Log.E($"Input Key Q, Angle Rotate");
DoInvalidate(true);
}
break;

View File

@ -86,103 +86,95 @@ namespace CoreUnit.Scanner.UserControl.Canvas.Dialog
btnOk.Enabled = false;
btnCancel.Enabled = true;
}
if(_MachineName == eMachineName.H52A_CCW || _MachineName == eMachineName.H52A_ACW || _MachineName == eMachineName.CIT) {
label58.Text = "(0~4000)";
label31.Text = "(0~4000)";
label32.Text = "(0~10000)";
label17.Text = "(1~8000)";
//if(_MachineName == eMachineName.H52A_CCW || _MachineName == eMachineName.H52A_ACW || _MachineName == eMachineName.CIT) {
label58.Text = _MachineName == eMachineName.H52A_CCW ? "(0~1500)" : "(0~4000)";
label31.Text = _MachineName == eMachineName.H52A_CCW ? "(0~2500)" : "(0~4000)";
label32.Text = "(0~10000)";
label17.Text = "(1~8000)";
label22.Enabled = false;
tbLaserPower2.Enabled = false;
label29.Enabled = false;
label31.Enabled = false;
label22.Enabled = _MachineName == eMachineName.H52A_CCW;
tbLaserPower2.Enabled = _MachineName == eMachineName.H52A_CCW;
label29.Enabled = _MachineName == eMachineName.H52A_CCW;
label31.Enabled = _MachineName == eMachineName.H52A_CCW;
// Ramping Start, End 구분 후 사용한다. Power 2번은 여전히 막아둠
//label68.Enabled = false;
//label69.Enabled = false;
//label71.Enabled = false;
//label72.Enabled = false;
//label73.Enabled = false;
//label70.Enabled = false;
// Ramping Start, End 구분 후 사용한다. Power 2번은 여전히 막아둠
//label68.Enabled = false;
//label69.Enabled = false;
//label71.Enabled = false;
//label72.Enabled = false;
//label73.Enabled = false;
//label70.Enabled = false;
nudRampingStartPower2.Enabled = false;
#region Permission Checking
// Engineer 이상 등급만 사용 가능
bool PermissionCheck = ApplicationExt.PermissionLevel <= (ushort)Aurora.Api.PermissionLevel.LEVEL3;
label15.Enabled = PermissionCheck;
label14.Enabled = PermissionCheck;
label13.Enabled = PermissionCheck;
label12.Enabled = PermissionCheck;
label11.Enabled = PermissionCheck;
label10.Enabled = PermissionCheck;
label57.Enabled = PermissionCheck;
label63.Enabled = PermissionCheck;
label46.Enabled = PermissionCheck;
label36.Enabled = PermissionCheck;
label45.Enabled = PermissionCheck;
label41.Enabled = PermissionCheck;
nudRampingStartDist.Enabled = PermissionCheck;
tbMarkDelay.Enabled = PermissionCheck;
label62.Enabled = PermissionCheck;
nudRampingEndPower2.Enabled = false;
//label22.Enabled = PermissionCheck;
//tbLaserPower2.Enabled = PermissionCheck;
//label29.Enabled = PermissionCheck;
//label31.Enabled = PermissionCheck;
label16.Enabled = PermissionCheck;
label17.Enabled = PermissionCheck;
label18.Enabled = PermissionCheck;
label23.Enabled = PermissionCheck;
label24.Enabled = PermissionCheck;
label25.Enabled = PermissionCheck;
label58.Enabled = PermissionCheck;
label42.Enabled = PermissionCheck;
label35.Enabled = PermissionCheck;
label34.Enabled = PermissionCheck;
label51.Enabled = PermissionCheck;
nudRampingEndDist.Enabled = PermissionCheck;
#region Permission Checking
// Engineer 이상 등급만 사용 가능
bool PermissionCheck = ApplicationExt.PermissionLevel <= (ushort)Aurora.Api.PermissionLevel.LEVEL3;
label15.Enabled = PermissionCheck;
label14.Enabled = PermissionCheck;
label13.Enabled = PermissionCheck;
label12.Enabled = PermissionCheck;
label11.Enabled = PermissionCheck;
label10.Enabled = PermissionCheck;
label57.Enabled = PermissionCheck;
label63.Enabled = PermissionCheck;
label46.Enabled = PermissionCheck;
label36.Enabled = PermissionCheck;
label45.Enabled = PermissionCheck;
label41.Enabled = PermissionCheck;
nudRampingStartDist.Enabled = PermissionCheck;
tbMarkDelay.Enabled = PermissionCheck;
label62.Enabled = PermissionCheck;
tbDrawSpeed.Enabled = PermissionCheck;
tbJumpSpeed.Enabled = PermissionCheck;
tbLaserOnDelay.Enabled = PermissionCheck;
tbLaserOffDelay.Enabled = PermissionCheck;
tbJumpDelay.Enabled = PermissionCheck;
tbPolygonDelay.Enabled = PermissionCheck;
tbLaserPower1.Enabled = PermissionCheck;
nudRampingStartPower1.Enabled = PermissionCheck;
nudRampingEndPower1.Enabled = PermissionCheck;
//label22.Enabled = PermissionCheck;
//tbLaserPower2.Enabled = PermissionCheck;
//label29.Enabled = PermissionCheck;
//label31.Enabled = PermissionCheck;
nudRampingStartAPower1.Enabled = PermissionCheck;
nudRampingStartAPower2.Enabled = PermissionCheck;
nudRampingStartADist.Enabled = PermissionCheck;
label74.Enabled = PermissionCheck;
label77.Enabled = PermissionCheck;
label76.Enabled = PermissionCheck;
label81.Enabled = PermissionCheck;
label75.Enabled = PermissionCheck;
label80.Enabled = PermissionCheck;
label16.Enabled = PermissionCheck;
label17.Enabled = PermissionCheck;
label18.Enabled = PermissionCheck;
label23.Enabled = PermissionCheck;
label24.Enabled = PermissionCheck;
label25.Enabled = PermissionCheck;
label58.Enabled = PermissionCheck;
label42.Enabled = PermissionCheck;
label35.Enabled = PermissionCheck;
label34.Enabled = PermissionCheck;
label51.Enabled = PermissionCheck;
nudRampingEndDist.Enabled = PermissionCheck;
label68.Enabled = PermissionCheck;
label69.Enabled = PermissionCheck;
label71.Enabled = PermissionCheck;
label72.Enabled = PermissionCheck;
//label73.Enabled = PermissionCheck;
//label70.Enabled = PermissionCheck;
tbDrawSpeed.Enabled = PermissionCheck;
tbJumpSpeed.Enabled = PermissionCheck;
tbLaserOnDelay.Enabled = PermissionCheck;
tbLaserOffDelay.Enabled = PermissionCheck;
tbJumpDelay.Enabled = PermissionCheck;
tbPolygonDelay.Enabled = PermissionCheck;
tbLaserPower1.Enabled = PermissionCheck;
nudRampingStartPower1.Enabled = PermissionCheck;
nudRampingEndPower1.Enabled = PermissionCheck;
label79.Enabled = PermissionCheck;
label65.Enabled = PermissionCheck;
label78.Enabled = PermissionCheck;
nudRampingStartAPower1.Enabled = PermissionCheck;
nudRampingStartAPower2.Enabled = PermissionCheck;
nudRampingStartADist.Enabled = PermissionCheck;
label74.Enabled = PermissionCheck;
label77.Enabled = PermissionCheck;
label76.Enabled = PermissionCheck;
label81.Enabled = PermissionCheck;
label75.Enabled = PermissionCheck;
label80.Enabled = PermissionCheck;
label68.Enabled = PermissionCheck;
label69.Enabled = PermissionCheck;
label71.Enabled = PermissionCheck;
label72.Enabled = PermissionCheck;
//label73.Enabled = PermissionCheck;
//label70.Enabled = PermissionCheck;
label79.Enabled = PermissionCheck;
label65.Enabled = PermissionCheck;
label78.Enabled = PermissionCheck;
nudRampingStartPower2.Visible = false;
nudRampingEndPower2.Visible = false;
#endregion
}
#endregion
//}
//Welding Paramter 색 지정
//rbParam1.ForeColor = Color.FromName(((WeldingParameterIDEditor.eWeldingColor)1).ToString());

View File

@ -181,6 +181,7 @@ namespace WeldingCommon.Views
public void OnChanged((int id, string name) recipe)
{
Log.I($"Recipe Select. ID : {recipe.id}, Name : {recipe.name}");
if (WeldingRecipeManager.SelectedRecipe.id == recipe.id && WeldingRecipeManager.SelectedRecipe.name == recipe.name) {
return;
}