스캐너 동작 시작과 종료 시점에 한번씩만 로그 찍을 예정
This commit is contained in:
parent
0300cb6ee0
commit
99032bce9a
@ -577,6 +577,15 @@ namespace AuroraLaserScanner
|
|||||||
}
|
}
|
||||||
_scannerObj.SetConfigList(mem1, mem2);
|
_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()
|
public double GetCommandPosX()
|
||||||
{
|
{
|
||||||
return _scannerObj.CommandPosX;
|
return _scannerObj.CommandPosX;
|
||||||
|
|||||||
@ -313,6 +313,7 @@ namespace AuroraLaserScanner
|
|||||||
#endregion
|
#endregion
|
||||||
public abstract uint GetListSpace();
|
public abstract uint GetListSpace();
|
||||||
public abstract void SetConfigList(uint mem1, uint mem2);
|
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) //단위는 초
|
public void WaitForListTaskCompleted(int timeOut, SequenceContext context = null) //단위는 초
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1111,5 +1111,14 @@ namespace AuroraLaserScanner
|
|||||||
{
|
{
|
||||||
RTC5Wrap.config_list(mem1, mem2);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1113,5 +1113,14 @@ namespace AuroraLaserScanner
|
|||||||
{
|
{
|
||||||
RTC6Wrap.config_list(mem1, mem2);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -726,20 +726,22 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
Log.W($"[PendingRestore] Jig{_WeldingJigNo} canExist=false, 복원 데이터 폐기 >> CellId({rCell})");
|
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.LotId = cell.LotId;
|
||||||
_CellScheduler.Prefetch2.CellId = cell.CellId;
|
_CellScheduler.Prefetch2.CellId = cell.CellId;
|
||||||
Status.GetProcessingWeldingData().WorkLotId = cell.LotId;
|
Status.GetProcessingWeldingData().WorkLotId = cell.LotId;
|
||||||
Status.GetProcessingWeldingData().WorkCellId = cell.CellId;
|
Status.GetProcessingWeldingData().WorkCellId = cell.CellId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Log.I($"상태 시프트(Rotate) >> 용접 전전셀({_CellScheduler.Prefetch2.CellId}) [CanExist({_CellScheduler.Prefetch2.IsCanExist})] [JigNo({_CellScheduler.Prefetch2.JigNo})] " +
|
if(_CellScheduler.Prefetch2 != null)
|
||||||
// $"[ListNo({_CellScheduler.Prefetch2.ListNo})] [WeldingCount({_CellScheduler.Prefetch2.WeldingCount})]" +
|
Log.I($"상태 시프트(Rotate) >> 용접 전전셀({_CellScheduler.Prefetch2.CellId}) [CanExist({_CellScheduler.Prefetch2.IsCanExist})] [JigNo({_CellScheduler.Prefetch2.JigNo})] " +
|
||||||
// $"[StartAngle(Y)({_CellScheduler.Prefetch2.StartAngle})]");
|
$"[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})] " +
|
if(_CellScheduler.Prefetch1 != null)
|
||||||
// $"[ListNo({_CellScheduler.Prefetch1.ListNo})] [WeldingCount({_CellScheduler.Prefetch1.WeldingCount})]" +
|
Log.I($"이번 용접대상 >> 용접 전셀({_CellScheduler.Prefetch1.CellId}) [CanExist({_CellScheduler.Prefetch1.IsCanExist})] [JigNo({_CellScheduler.Prefetch1.JigNo})] " +
|
||||||
// $"[StartAngle(Y)({_CellScheduler.Prefetch1.StartAngle})]");
|
$"[ListNo({_CellScheduler.Prefetch1.ListNo})] [WeldingCount({_CellScheduler.Prefetch1.WeldingCount})]" +
|
||||||
|
$"[StartAngle(Y)({_CellScheduler.Prefetch1.StartAngle})]");
|
||||||
|
|
||||||
if (canExist) {
|
if (canExist) {
|
||||||
#region 용접할 Objects 선택
|
#region 용접할 Objects 선택
|
||||||
@ -982,8 +984,14 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var IsLaserToggle = ChangeChecker.IsChangedBool("LaserToggle", LaserIO);
|
// List의 실행의 토글을 확인함
|
||||||
if (IsLaserToggle)
|
_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})");
|
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++) {
|
for (int i = 0; i < _RotaryJigCount; i++) {
|
||||||
|
|||||||
@ -41,5 +41,21 @@ namespace WeldingCommon.Utils
|
|||||||
|
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user