스캐너 동작 시작과 종료 시점에 한번씩만 로그 찍을 예정

This commit is contained in:
최이근 2026-03-01 14:44:13 +09:00
parent 0300cb6ee0
commit 99032bce9a
7 changed files with 71 additions and 9 deletions

View File

@ -577,6 +577,15 @@ namespace AuroraLaserScanner
}
_scannerObj.SetConfigList(mem1, mem2);
}
public void GetListPointer(out eListNo list_no, out uint list_pos)
{
if (!IsActivated) {
list_no = eListNo.NONE;
list_pos = 0;
return;
}
_scannerObj.GetListPointer(out list_no, out list_pos);
}
public double GetCommandPosX()
{
return _scannerObj.CommandPosX;

View File

@ -313,6 +313,7 @@ namespace AuroraLaserScanner
#endregion
public abstract uint GetListSpace();
public abstract void SetConfigList(uint mem1, uint mem2);
public abstract void GetListPointer(out eListNo list_no, out uint list_pos);
public void WaitForListTaskCompleted(int timeOut, SequenceContext context = null) //단위는 초
{

View File

@ -1111,5 +1111,14 @@ namespace AuroraLaserScanner
{
RTC5Wrap.config_list(mem1, mem2);
}
public override void GetListPointer(out eListNo list_no, out uint list_pos)
{
list_no = eListNo.NONE;
uint listNo = 0, listPos = 0;
RTC5Wrap.get_list_pointer(out listNo, out listPos);
list_no = (eListNo)listNo;
list_pos = listPos;
}
}
}

View File

@ -1113,5 +1113,14 @@ namespace AuroraLaserScanner
{
RTC6Wrap.config_list(mem1, mem2);
}
public override void GetListPointer(out eListNo list_no, out uint list_pos)
{
list_no = eListNo.NONE;
uint listNo = 0, listPos = 0;
RTC6Wrap.get_list_pointer(out listNo, out listPos);
list_no = (eListNo)listNo;
list_pos = listPos;
}
}
}

View File

@ -852,5 +852,15 @@ namespace AuroraLaserScanner
{
}
public override void GetListPointer(out eListNo list_no, out uint list_pos)
{
list_no = eListNo.NONE;
if (_list1Busy)
list_no = eListNo.LIST1;
else if (_list2Busy)
list_no = eListNo.LIST2;
list_pos = 0;
}
}
}

View File

@ -726,20 +726,22 @@ namespace ILSOS_CCW_H52A.Sequences
Log.W($"[PendingRestore] Jig{_WeldingJigNo} canExist=false, 복원 데이터 폐기 >> CellId({rCell})");
}
}
else if (ProcessManager.Instance.ReceivedCellInfoQueue.TryDequeue(out var cell)) {
else if (canExist && ProcessManager.Instance.ReceivedCellInfoQueue.TryDequeue(out var cell)) {
_CellScheduler.Prefetch2.LotId = cell.LotId;
_CellScheduler.Prefetch2.CellId = cell.CellId;
Status.GetProcessingWeldingData().WorkLotId = cell.LotId;
Status.GetProcessingWeldingData().WorkCellId = cell.CellId;
}
//Log.I($"상태 시프트(Rotate) >> 용접 전전셀({_CellScheduler.Prefetch2.CellId}) [CanExist({_CellScheduler.Prefetch2.IsCanExist})] [JigNo({_CellScheduler.Prefetch2.JigNo})] " +
// $"[ListNo({_CellScheduler.Prefetch2.ListNo})] [WeldingCount({_CellScheduler.Prefetch2.WeldingCount})]" +
// $"[StartAngle(Y)({_CellScheduler.Prefetch2.StartAngle})]");
if(_CellScheduler.Prefetch2 != null)
Log.I($"상태 시프트(Rotate) >> 용접 전전셀({_CellScheduler.Prefetch2.CellId}) [CanExist({_CellScheduler.Prefetch2.IsCanExist})] [JigNo({_CellScheduler.Prefetch2.JigNo})] " +
$"[ListNo({_CellScheduler.Prefetch2.ListNo})] [WeldingCount({_CellScheduler.Prefetch2.WeldingCount})]" +
$"[StartAngle(Y)({_CellScheduler.Prefetch2.StartAngle})]");
//Log.I($"이번 용접대상 >> 용접 전셀({_CellScheduler.Prefetch1.CellId}) [CanExist({_CellScheduler.Prefetch1.IsCanExist})] [JigNo({_CellScheduler.Prefetch1.JigNo})] " +
// $"[ListNo({_CellScheduler.Prefetch1.ListNo})] [WeldingCount({_CellScheduler.Prefetch1.WeldingCount})]" +
// $"[StartAngle(Y)({_CellScheduler.Prefetch1.StartAngle})]");
if(_CellScheduler.Prefetch1 != null)
Log.I($"이번 용접대상 >> 용접 전셀({_CellScheduler.Prefetch1.CellId}) [CanExist({_CellScheduler.Prefetch1.IsCanExist})] [JigNo({_CellScheduler.Prefetch1.JigNo})] " +
$"[ListNo({_CellScheduler.Prefetch1.ListNo})] [WeldingCount({_CellScheduler.Prefetch1.WeldingCount})]" +
$"[StartAngle(Y)({_CellScheduler.Prefetch1.StartAngle})]");
if (canExist) {
#region 용접할 Objects 선택
@ -982,8 +984,14 @@ namespace ILSOS_CCW_H52A.Sequences
}
}
var IsLaserToggle = ChangeChecker.IsChangedBool("LaserToggle", LaserIO);
if (IsLaserToggle)
// List의 실행의 토글을 확인함
_Scanner.GetListPointer(out eListNo curList, out uint pos);
var isBusy = _Scanner.GetBusyStatus();
if (!isBusy && (curList == eListNo.LIST1 || curList == eListNo.LIST2))
curList = eListNo.NONE;
var IsToggleListState = ChangeChecker.IsChangedInt("ListState", (int)curList);
if (IsToggleListState)
Log.I($"Fork Laser On({LaserIO}) Encoder X : ({encoderX}), Encoder Y : ({currentAngle}), PLC Rotary : ({CurrentPosPLC}), List {executeTarget?.ListNo}, JigNo : ({executeTarget?.JigNo})");
for (int i = 0; i < _RotaryJigCount; i++) {

View File

@ -41,5 +41,21 @@ namespace WeldingCommon.Utils
return false;
}
private static Dictionary<string, int> mappingInt = new Dictionary<string, int>();
public static bool IsChangedInt(string Resource, int value, int defaultVal = 0)
{
if (mappingInt.ContainsKey(Resource) == false) {
mappingInt[Resource] = defaultVal;
return false;
}
if (mappingInt[Resource] == value) {
return false;
}
mappingInt[Resource] = value;
return true;
}
}
}