Cell APD Log 적용 최종 버전
This commit is contained in:
parent
caf35988a7
commit
a95534302f
@ -269,8 +269,6 @@ namespace ILSOS_ACW_H52A.Sequences
|
|||||||
_RecipeManager = Application.Current.AuroraEnv().RecipeManager;
|
_RecipeManager = Application.Current.AuroraEnv().RecipeManager;
|
||||||
_SystemParameter = context.GetSetting<SystemParameter>(CommonSettingIds.SystemParameter);
|
_SystemParameter = context.GetSetting<SystemParameter>(CommonSettingIds.SystemParameter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
InitDev(context);
|
InitDev(context);
|
||||||
if (!CheckDeviceReady(context))
|
if (!CheckDeviceReady(context))
|
||||||
{ //Check Device
|
{ //Check Device
|
||||||
@ -495,8 +493,8 @@ namespace ILSOS_ACW_H52A.Sequences
|
|||||||
WaitingScannerList.Reset();
|
WaitingScannerList.Reset();
|
||||||
CompleteScannerList.Reset();
|
CompleteScannerList.Reset();
|
||||||
|
|
||||||
isTheFirstListWrite = true; // 작업 시작 시 처음 2개의 List는 입력하고 시작한다
|
isTheFirstListWrite = false; // 작업 시작 시 처음 2개의 List는 입력하고 시작한다
|
||||||
isTheSecondListWrite = true;
|
isTheSecondListWrite = false;
|
||||||
isTheFirstListExecute = true; // 제일 첫 List는 ExecuteList 필요. 이후는 AutoChange
|
isTheFirstListExecute = true; // 제일 첫 List는 ExecuteList 필요. 이후는 AutoChange
|
||||||
|
|
||||||
InitAutoRunBit(); // GetRotaryCurrentPosition() 호출 이후 AutoStatus True 변경
|
InitAutoRunBit(); // GetRotaryCurrentPosition() 호출 이후 AutoStatus True 변경
|
||||||
@ -686,6 +684,7 @@ namespace ILSOS_ACW_H52A.Sequences
|
|||||||
}
|
}
|
||||||
UpdateProductCount(context);
|
UpdateProductCount(context);
|
||||||
UpdateProductInfoForView();
|
UpdateProductInfoForView();
|
||||||
|
SaveCellAPD();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (_SystemParameter.BypassModeLBAD == false) {
|
//if (_SystemParameter.BypassModeLBAD == false) {
|
||||||
@ -1188,15 +1187,18 @@ namespace ILSOS_ACW_H52A.Sequences
|
|||||||
return SEQ_CHECK_CYCLE_STOP;
|
return SEQ_CHECK_CYCLE_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param)
|
private void SaveCellAPD()
|
||||||
{
|
{
|
||||||
if (Status.GetProcessingWeldingData().APD.Count > 0)
|
if (Status.GetProcessingWeldingData().APD.Count > 0)
|
||||||
{
|
{
|
||||||
string directoryPath = "D:\\ILSOSConfig\\APD_History";
|
string directoryPath = "D:\\ILSOSConfig\\APD_History";
|
||||||
string fileName = Status.GetProcessingWeldingData().APD.First().Date.ToString("HHmmss") + "_" + Status.GetProcessingWeldingData().APD.First().CellID;
|
string fileName = DateTime.Now.ToString("HH") + "_CellAPD";
|
||||||
string fullPath = Path.Combine(directoryPath, Status.GetProcessingWeldingData().APD.First().Date.ToString("yyyy-MM-dd"), fileName);
|
string fullPath = Path.Combine(directoryPath, Status.GetProcessingWeldingData().APD.First().Date.ToString("yyyy-MM-dd"), fileName);
|
||||||
Status.GetProcessingWeldingData().APD.CreateFiles(fullPath);
|
Status.GetProcessingWeldingData().APD.CreateFiles(fullPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param)
|
||||||
|
{
|
||||||
|
|
||||||
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, true);
|
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, true);
|
||||||
return SequenceAction.Ok();
|
return SequenceAction.Ok();
|
||||||
|
|||||||
@ -3,7 +3,6 @@ using Aurora.Api;
|
|||||||
using Aurora.Api.Manager;
|
using Aurora.Api.Manager;
|
||||||
using Aurora.View;
|
using Aurora.View;
|
||||||
using AuroraCellTracker;
|
using AuroraCellTracker;
|
||||||
//using AuroraOCT;
|
|
||||||
using AuroraIO;
|
using AuroraIO;
|
||||||
using AuroraLaser;
|
using AuroraLaser;
|
||||||
using AuroraLaserScanner;
|
using AuroraLaserScanner;
|
||||||
@ -13,7 +12,6 @@ using CoreUnit.Control.UserControl.Canvas;
|
|||||||
using CoreUnit.Scanner.UserControl.ScannerCanvas;
|
using CoreUnit.Scanner.UserControl.ScannerCanvas;
|
||||||
using DB;
|
using DB;
|
||||||
using Hermes;
|
using Hermes;
|
||||||
using ILSOS_CCW_H52A.Device;
|
|
||||||
using ILSOS_CCW_H52A.Models;
|
using ILSOS_CCW_H52A.Models;
|
||||||
using ILSOS_CCW_H52A.RMS;
|
using ILSOS_CCW_H52A.RMS;
|
||||||
using System;
|
using System;
|
||||||
@ -22,18 +20,18 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows;
|
||||||
using WeldingCommon;
|
using WeldingCommon;
|
||||||
using WeldingCommon.Alarm;
|
using WeldingCommon.Alarm;
|
||||||
using WeldingCommon.Devices;
|
using WeldingCommon.Devices;
|
||||||
using WeldingCommon.Recipes;
|
using WeldingCommon.Recipes;
|
||||||
using WeldingCommon.Sequences;
|
using WeldingCommon.Sequences;
|
||||||
|
using WeldingCommon.Settings;
|
||||||
using WeldingCommon.Utils;
|
using WeldingCommon.Utils;
|
||||||
using static AuroraLBAD.Service.StreamLightLBAD;
|
using static AuroraLBAD.Service.StreamLightLBAD;
|
||||||
using static ILSOS_CCW_H52A.Device.IOController_CCW_H52A;
|
using static ILSOS_CCW_H52A.Device.IOController_CCW_H52A;
|
||||||
using static ILSOS_CCW_H52A.Device.PLCControllerCCWH52A;
|
using static ILSOS_CCW_H52A.Device.PLCControllerCCWH52A;
|
||||||
using static ILSOS_CCW_H52A.Device.ScannerListCCWH52A;
|
using static ILSOS_CCW_H52A.Device.ScannerListCCWH52A;
|
||||||
using Application = System.Windows.Application;
|
|
||||||
using SystemParameter = WeldingCommon.Settings.SystemParameter;
|
|
||||||
|
|
||||||
namespace ILSOS_CCW_H52A.Sequences
|
namespace ILSOS_CCW_H52A.Sequences
|
||||||
{
|
{
|
||||||
@ -43,6 +41,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
|
|
||||||
const string SEQ_ENTER = "[SeqAutoRunCCWH52A] SEQ_ENTER"; // inputParam 으로 받자.
|
const string SEQ_ENTER = "[SeqAutoRunCCWH52A] SEQ_ENTER"; // inputParam 으로 받자.
|
||||||
const string SEQ_CHECK_INIT_CONDITION = "[SeqAutoRunCCWH52A] Check Init Condition"; // Check Init Condition
|
const string SEQ_CHECK_INIT_CONDITION = "[SeqAutoRunCCWH52A] Check Init Condition"; // Check Init Condition
|
||||||
|
|
||||||
const string SEQ_FORK_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Fork Encoder Monitor";
|
const string SEQ_FORK_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Fork Encoder Monitor";
|
||||||
const string SEQ_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Check Encoder Monitor";
|
const string SEQ_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Check Encoder Monitor";
|
||||||
const string SEQ_JOIN_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Join Encoder Monitor";
|
const string SEQ_JOIN_ENCODER_MONITOR = "[SeqAutoRunCCWH52A] Join Encoder Monitor";
|
||||||
@ -115,6 +114,10 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
private uint _TodayProduct;
|
private uint _TodayProduct;
|
||||||
private uint _TotalProduct;
|
private uint _TotalProduct;
|
||||||
|
|
||||||
|
private double _LaserPowerByLBAD;
|
||||||
|
private int _CompletedJigNo;
|
||||||
|
private static bool isWeled;
|
||||||
|
|
||||||
private bool _ModulationMode;
|
private bool _ModulationMode;
|
||||||
|
|
||||||
private DateTime _AutoRunStartTime;
|
private DateTime _AutoRunStartTime;
|
||||||
@ -127,9 +130,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
private double _CellMeasureCenterOffsetX;
|
private double _CellMeasureCenterOffsetX;
|
||||||
private double _CellMeasureCenterOffsetY;
|
private double _CellMeasureCenterOffsetY;
|
||||||
|
|
||||||
private double _LaserPowerByLBAD;
|
|
||||||
private int _CompletedJigNo;
|
|
||||||
|
|
||||||
// MOTF
|
// MOTF
|
||||||
private TimeSpan _WeldInterval;
|
private TimeSpan _WeldInterval;
|
||||||
|
|
||||||
@ -147,12 +147,10 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
private bool isTheSecondListWrite;
|
private bool isTheSecondListWrite;
|
||||||
private bool isTheFirstListExecute;
|
private bool isTheFirstListExecute;
|
||||||
private int _RecipeNo;
|
private int _RecipeNo;
|
||||||
private static bool isWeled;
|
|
||||||
private bool _WeldingDone;
|
|
||||||
private bool UsePlcShotThemAll { get; set; } = false;
|
private bool UsePlcShotThemAll { get; set; } = false;
|
||||||
private bool UsePlcPositionCompensation { get; set; } = false;
|
private bool UsePlcPositionCompensation { get; set; } = false;
|
||||||
private string RecipeFileName { get; set; } = "";
|
private string RecipeFileName { get; set; } = "";
|
||||||
|
|
||||||
private enum InitErrorList
|
private enum InitErrorList
|
||||||
{
|
{
|
||||||
SUCCESS = 0,
|
SUCCESS = 0,
|
||||||
@ -163,7 +161,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
MOTF_OFF,
|
MOTF_OFF,
|
||||||
PLC_ALARM,
|
PLC_ALARM,
|
||||||
}
|
}
|
||||||
|
|
||||||
public SequenceBuilder Builder()
|
public SequenceBuilder Builder()
|
||||||
{
|
{
|
||||||
var sb = new SequenceBuilder(1000, true);
|
var sb = new SequenceBuilder(1000, true);
|
||||||
@ -174,18 +171,19 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
sb.AddFork(SEQ_FORK_ENCODER_MONITOR);
|
sb.AddFork(SEQ_FORK_ENCODER_MONITOR);
|
||||||
sb.AddAction(SEQ_ENCODER_MONITOR, EncoderMonitor);
|
sb.AddAction(SEQ_ENCODER_MONITOR, EncoderMonitor);
|
||||||
sb.AddJoin(SEQ_JOIN_ENCODER_MONITOR);
|
sb.AddJoin(SEQ_JOIN_ENCODER_MONITOR);
|
||||||
|
|
||||||
sb.AddAction(SEQ_CHECK_LOAD_COMPLETE, CheckLoadComplete);
|
sb.AddAction(SEQ_CHECK_LOAD_COMPLETE, CheckLoadComplete);
|
||||||
sb.AddAction(SEQ_CHECK_SCANNER_LIST_COMPLETE, CheckScannerListComplete);
|
sb.AddAction(SEQ_CHECK_SCANNER_LIST_COMPLETE, CheckScannerListComplete);
|
||||||
sb.AddDecision(SEQ_READY_SCANNER_LIST, ReadyScannerList);
|
sb.AddDecision(SEQ_READY_SCANNER_LIST, ReadyScannerList);
|
||||||
|
|
||||||
sb.AddAction(SEQ_SET_PARAMS_RECEIVE_CELL_INFO_SEQ, SetReceiveCellInfo_SeqParams);
|
|
||||||
sb.AddSubsequence(SEQ_DO_ID_RECEIVE_CELL_INFO_SEQ, SequenceManager.GetSeqBuilder_SeqReceiveCellInfo());
|
|
||||||
sb.AddAction(SEQ_GET_PARAMS_RECEIVE_CELL_INFO_SEQ, GetReceiveCellInfo_SeqResult);
|
|
||||||
|
|
||||||
sb.AddAction(SEQ_SET_PARAMS_UPLOAD_WELDING_LIST_SEQ, SetUploadWeldingList_SeqParams);
|
sb.AddAction(SEQ_SET_PARAMS_UPLOAD_WELDING_LIST_SEQ, SetUploadWeldingList_SeqParams);
|
||||||
sb.AddSubsequence(SEQ_DO_ID_UPLOAD_WELDING_LIST_SEQ, SequenceManager.GetSeqBuilder_SeqUploadWeldingList());
|
sb.AddSubsequence(SEQ_DO_ID_UPLOAD_WELDING_LIST_SEQ, SequenceManager.GetSeqBuilder_SeqUploadWeldingList());
|
||||||
sb.AddAction(SEQ_GET_RESULT_UPLOAD_WELDING_LIST_SEQ, GetUploadWeldingList_SeqResult);
|
sb.AddAction(SEQ_GET_RESULT_UPLOAD_WELDING_LIST_SEQ, GetUploadWeldingList_SeqResult);
|
||||||
|
|
||||||
|
sb.AddAction(SEQ_SET_PARAMS_RECEIVE_CELL_INFO_SEQ, SetReceiveCellInfo_SeqParams); // Cell 정보를 받아와 입력한다.
|
||||||
|
sb.AddSubsequence(SEQ_DO_ID_RECEIVE_CELL_INFO_SEQ, SequenceManager.GetSeqBuilder_SeqReceiveCellInfo()); // cell 정보를 받아오는 Sub Seq 실행
|
||||||
|
sb.AddAction(SEQ_GET_PARAMS_RECEIVE_CELL_INFO_SEQ, GetReceiveCellInfo_SeqResult); // Cell 정보를 가져온다
|
||||||
|
|
||||||
sb.AddAction(SEQ_EXECUTE_WELDING, ExecuteWelding);
|
sb.AddAction(SEQ_EXECUTE_WELDING, ExecuteWelding);
|
||||||
sb.AddAction(SEQ_REQUEST_UNLOAD_CELL, RequestUnloadCell);
|
sb.AddAction(SEQ_REQUEST_UNLOAD_CELL, RequestUnloadCell);
|
||||||
|
|
||||||
@ -219,6 +217,10 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
sb.Flows(sb[SEQ_FORK_ENCODER_MONITOR] > sb[SEQ_ENCODER_MONITOR] > sb[SEQ_JOIN_ENCODER_MONITOR] > sb[SEQ_COMPLETE]);
|
sb.Flows(sb[SEQ_FORK_ENCODER_MONITOR] > sb[SEQ_ENCODER_MONITOR] > sb[SEQ_JOIN_ENCODER_MONITOR] > sb[SEQ_COMPLETE]);
|
||||||
|
|
||||||
#region
|
#region
|
||||||
|
//sb.Flows(sb[SEQ_FORK_ENCODER_MONITOR] > sb[SEQ_ENCODER_MONITOR]);
|
||||||
|
////sb.Flows(sb[SEQ_FORK_ENCODER_MONITOR] > sb[SEQ_CHECK_LOAD_COMPLETE]);
|
||||||
|
//sb.Flows(sb[SEQ_JOIN_ENCODER_MONITOR] > sb[SEQ_COMPLETE]);
|
||||||
|
///
|
||||||
//// 1. 시퀀스 시작 ~ 포크
|
//// 1. 시퀀스 시작 ~ 포크
|
||||||
//sb.Flows(sb.Init > sb[SEQ_ENTER] > sb[SEQ_CHECK_INIT_CONDITION] > sb[SEQ_FORK_ENCODER_MONITOR]);
|
//sb.Flows(sb.Init > sb[SEQ_ENTER] > sb[SEQ_CHECK_INIT_CONDITION] > sb[SEQ_FORK_ENCODER_MONITOR]);
|
||||||
|
|
||||||
@ -276,7 +278,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
|
|
||||||
//return null;
|
//return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InitSequenceVariable(context) == false)
|
if (InitSequenceVariable(context) == false)
|
||||||
{
|
{
|
||||||
//AlarmManager.Alarm(AlarmCode.ALARM_SEQUENCE_AutoRun_InitVariableError);
|
//AlarmManager.Alarm(AlarmCode.ALARM_SEQUENCE_AutoRun_InitVariableError);
|
||||||
@ -365,7 +366,12 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
private bool CheckCondition_Interlock()
|
private bool CheckCondition_Interlock()
|
||||||
{
|
{
|
||||||
// PLC, Data, IO 등 Interlock checking
|
// PLC, Data, IO 등 Interlock checking
|
||||||
|
// Config checking
|
||||||
|
//if (_Scanner.Config.UseMarkingOnTheFly == false)
|
||||||
|
//{
|
||||||
|
// Log.E("ERROR Config Setting : Scanner Marking on the fly (OFF)");
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,8 +493,8 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
WaitingScannerList.Reset();
|
WaitingScannerList.Reset();
|
||||||
CompleteScannerList.Reset();
|
CompleteScannerList.Reset();
|
||||||
|
|
||||||
isTheFirstListWrite = true; // 작업 시작 시 처음 2개의 List는 입력하고 시작한다
|
isTheFirstListWrite = false; // 작업 시작 시 처음 2개의 List는 입력하고 시작한다
|
||||||
isTheSecondListWrite = true;
|
isTheSecondListWrite = false;
|
||||||
isTheFirstListExecute = true; // 제일 첫 List는 ExecuteList 필요. 이후는 AutoChange
|
isTheFirstListExecute = true; // 제일 첫 List는 ExecuteList 필요. 이후는 AutoChange
|
||||||
|
|
||||||
InitAutoRunBit(); // GetRotaryCurrentPosition() 호출 이후 AutoStatus True 변경
|
InitAutoRunBit(); // GetRotaryCurrentPosition() 호출 이후 AutoStatus True 변경
|
||||||
@ -561,7 +567,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, false);
|
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, false);
|
||||||
return SEQ_INIT_CONDITION_ERROR;
|
return SEQ_INIT_CONDITION_ERROR;
|
||||||
}
|
}
|
||||||
// AutoMode 전환 시점
|
|
||||||
Status.EquipmentMode = eEquipmentMode.AUTO;
|
Status.EquipmentMode = eEquipmentMode.AUTO;
|
||||||
|
|
||||||
var startTime = DateTime.Now;
|
var startTime = DateTime.Now;
|
||||||
@ -612,6 +618,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
{
|
{
|
||||||
isTheFirstListWrite = false;
|
isTheFirstListWrite = false;
|
||||||
Log.I("Write the 1st scanner list");
|
Log.I("Write the 1st scanner list");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -619,6 +626,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
{
|
{
|
||||||
isTheSecondListWrite = false;
|
isTheSecondListWrite = false;
|
||||||
Log.I("Write the 2nd scanner list");
|
Log.I("Write the 2nd scanner list");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -632,6 +640,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
Log.I("ERR_SCANNER_LIST_PROCESSING_TIMEOVER");
|
Log.I("ERR_SCANNER_LIST_PROCESSING_TIMEOVER");
|
||||||
|
|
||||||
return SequenceAction.Error();
|
return SequenceAction.Error();
|
||||||
|
|
||||||
// WON : 2칸 전에 용접을 진행하지 않아 현재 Angle이 CompleteScannerList.StartAngle + 45 범위를 벗어난 경우라면 에러 상황이 아니므로 에러로 처리 할 필요가 없다
|
// WON : 2칸 전에 용접을 진행하지 않아 현재 Angle이 CompleteScannerList.StartAngle + 45 범위를 벗어난 경우라면 에러 상황이 아니므로 에러로 처리 할 필요가 없다
|
||||||
// 위에 CheckCurrentEncoderAngle if문 조건 대신 아래 내용으로 테스트 해본 뒤에 적용 필요
|
// 위에 CheckCurrentEncoderAngle if문 조건 대신 아래 내용으로 테스트 해본 뒤에 적용 필요
|
||||||
//if (!CheckCurrentEncoderAngle(CompleteScannerList.StartAngle)) {
|
//if (!CheckCurrentEncoderAngle(CompleteScannerList.StartAngle)) {
|
||||||
@ -665,9 +674,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
_LotId = CompleteScannerList.LotId;
|
_LotId = CompleteScannerList.LotId;
|
||||||
_CellId = CompleteScannerList.CellId;
|
_CellId = CompleteScannerList.CellId;
|
||||||
|
|
||||||
_LaserPowerByLBAD = StreamLightLBAD.LaserPowerByLBAD[CompleteScannerList.JigNo];
|
|
||||||
|
|
||||||
_CompletedJigNo = CompleteScannerList.JigNo;
|
|
||||||
Log.I(string.Format("JigNo : {0}, Weld start : {1}, Weld End : {2}, WeldTime : {3}, interval : {4:F3}",
|
Log.I(string.Format("JigNo : {0}, Weld start : {1}, Weld End : {2}, WeldTime : {3}, interval : {4:F3}",
|
||||||
CompleteScannerList.JigNo, _WeldingStartTime.ToString("HH:mm:ss.fff"), _WeldEndTime.ToString("HH:mm:ss.fff"), _WeldingSpanTime.TotalMilliseconds, _WeldInterval.TotalSeconds));
|
CompleteScannerList.JigNo, _WeldingStartTime.ToString("HH:mm:ss.fff"), _WeldEndTime.ToString("HH:mm:ss.fff"), _WeldingSpanTime.TotalMilliseconds, _WeldInterval.TotalSeconds));
|
||||||
|
|
||||||
@ -678,6 +684,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
}
|
}
|
||||||
UpdateProductCount(context);
|
UpdateProductCount(context);
|
||||||
UpdateProductInfoForView();
|
UpdateProductInfoForView();
|
||||||
|
SaveCellAPD();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (_SystemParameter.BypassModeLBAD == false) {
|
//if (_SystemParameter.BypassModeLBAD == false) {
|
||||||
@ -729,17 +736,11 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
if (currentAngle < startAngle + 45)// 다음 리스트 구간이 끝나기 전까지는 완료가 되어야 한다
|
if (currentAngle < startAngle + 45)// 다음 리스트 구간이 끝나기 전까지는 완료가 되어야 한다
|
||||||
{
|
{
|
||||||
Log.I(string.Format("Current encoder check OK, startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
Log.I(string.Format("Current encoder check OK, startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
||||||
_WeldingDone = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else Log.I(string.Format("Current encoder check NG(Too late), startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
else Log.I(string.Format("Current encoder check NG(Too late), startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
||||||
}
|
}
|
||||||
else
|
else Log.I(string.Format("Current encoder check NG(Too early), startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
||||||
{
|
|
||||||
Log.I(string.Format("Current encoder check NG(Too early), startAngle : {0}, currentAngle : {1})", startAngle, currentAngle));
|
|
||||||
_WeldingDone = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -983,7 +984,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SequenceAction.Ok();
|
return SequenceAction.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1021,7 +1021,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
|
|
||||||
return SequenceAction.Ok();
|
return SequenceAction.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
private SequenceActionResult EncoderMonitor(SequenceContext context, string id, SequenceActionResult param)
|
private SequenceActionResult EncoderMonitor(SequenceContext context, string id, SequenceActionResult param)
|
||||||
{
|
{
|
||||||
int EncoderLogCount = 0;
|
int EncoderLogCount = 0;
|
||||||
@ -1040,7 +1039,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
if (InputScannerList[(int)_WeldingScannerListNo - 1].CanExist)
|
if (InputScannerList[(int)_WeldingScannerListNo - 1].CanExist)
|
||||||
{
|
{
|
||||||
Log.I($"Fork Before Min Rotate Encoder X : ({encoderX}), Encoder Y : ({currentAngle}), PLC Rotary : ({CurrentPosPLC}), List {_WeldingScannerListNo}, JigNo : ({InputScannerList[(int)_WeldingScannerListNo - 1].JigNo})");
|
Log.I($"Fork Before Min Rotate Encoder X : ({encoderX}), Encoder Y : ({currentAngle}), PLC Rotary : ({CurrentPosPLC}), List {_WeldingScannerListNo}, JigNo : ({InputScannerList[(int)_WeldingScannerListNo - 1].JigNo})");
|
||||||
EncoderLogCount = 0;
|
|
||||||
if (!_SystemParameter.BypassModeLBAD)
|
if (!_SystemParameter.BypassModeLBAD)
|
||||||
{
|
{
|
||||||
if (InputScannerList[(int)_WeldingScannerListNo - 1].CheckSendCellinfo == false)
|
if (InputScannerList[(int)_WeldingScannerListNo - 1].CheckSendCellinfo == false)
|
||||||
@ -1067,13 +1065,15 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
{
|
{
|
||||||
InputScannerList[(int)_WeldingScannerListNo - 1].WeldStartTime = DateTime.Now;
|
InputScannerList[(int)_WeldingScannerListNo - 1].WeldStartTime = DateTime.Now;
|
||||||
InputScannerList[(int)_WeldingScannerListNo - 1].WeldComplete = true;
|
InputScannerList[(int)_WeldingScannerListNo - 1].WeldComplete = true;
|
||||||
|
EncoderLogCount = 0;
|
||||||
|
Log.I($"Laser On, Welding Complete. JigNo : ({InputScannerList[(int)_WeldingScannerListNo - 1].JigNo})");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EncoderLogCount == 0)
|
if (EncoderLogCount == 0)
|
||||||
{
|
{
|
||||||
Log.I($"Fork Laser On Encoder X : ({encoderX}), Encoder Y : ({currentAngle}), PLC Rotary : ({CurrentPosPLC}), List {_WeldingScannerListNo} JigNo : ({InputScannerList[(int)_WeldingScannerListNo - 1].JigNo})");
|
Log.I($"Fork Laser On Encoder X : ({encoderX}), Encoder Y : ({currentAngle}), PLC Rotary : ({CurrentPosPLC}), List {_WeldingScannerListNo}, JigNo : ({InputScannerList[(int)_WeldingScannerListNo - 1].JigNo})");
|
||||||
}
|
}
|
||||||
EncoderLogCount = (EncoderLogCount + 1) % 10;
|
EncoderLogCount = (EncoderLogCount + 1) % 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _RotaryJigCount; i++)
|
for (int i = 0; i < _RotaryJigCount; i++)
|
||||||
@ -1156,6 +1156,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
|
|
||||||
return SequenceAction.Ok();
|
return SequenceAction.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string CheckCycleStop(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
private static string CheckCycleStop(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||||
{
|
{
|
||||||
Status.SetWorkingPosition(eWorkingPosition.CHECKING_CYCLE);
|
Status.SetWorkingPosition(eWorkingPosition.CHECKING_CYCLE);
|
||||||
@ -1178,7 +1179,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
}
|
}
|
||||||
// END ALL
|
// END ALL
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private static string CheckCanWelded(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
private static string CheckCanWelded(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||||
{
|
{
|
||||||
if (isWeled)
|
if (isWeled)
|
||||||
@ -1186,15 +1186,19 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
else
|
else
|
||||||
return SEQ_CHECK_CYCLE_STOP;
|
return SEQ_CHECK_CYCLE_STOP;
|
||||||
}
|
}
|
||||||
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param)
|
|
||||||
|
private void SaveCellAPD()
|
||||||
{
|
{
|
||||||
if (Status.GetProcessingWeldingData().APD.Count > 0)
|
if (Status.GetProcessingWeldingData().APD.Count > 0)
|
||||||
{
|
{
|
||||||
string directoryPath = "D:\\ILSOSConfig\\APD_History";
|
string directoryPath = "D:\\ILSOSConfig\\APD_History";
|
||||||
string fileName = Status.GetProcessingWeldingData().APD.First().Date.ToString("HHmmss") + "_" + Status.GetProcessingWeldingData().APD.First().CellID;
|
string fileName = DateTime.Now.ToString("HH") + "_CellAPD";
|
||||||
string fullPath = Path.Combine(directoryPath, Status.GetProcessingWeldingData().APD.First().Date.ToString("yyyy-MM-dd"), fileName);
|
string fullPath = Path.Combine(directoryPath, Status.GetProcessingWeldingData().APD.First().Date.ToString("yyyy-MM-dd"), fileName);
|
||||||
Status.GetProcessingWeldingData().APD.CreateFiles(fullPath);
|
Status.GetProcessingWeldingData().APD.CreateFiles(fullPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param)
|
||||||
|
{
|
||||||
|
|
||||||
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, true);
|
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, true);
|
||||||
return SequenceAction.Ok();
|
return SequenceAction.Ok();
|
||||||
@ -1319,7 +1323,6 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
|
|
||||||
private void OnSeqActionStop()
|
private void OnSeqActionStop()
|
||||||
{
|
{
|
||||||
// ManualMode 전환 시점
|
|
||||||
Status.EquipmentMode = eEquipmentMode.MANUAL;
|
Status.EquipmentMode = eEquipmentMode.MANUAL;
|
||||||
|
|
||||||
//PLC All BIT OFF
|
//PLC All BIT OFF
|
||||||
@ -1362,10 +1365,20 @@ namespace ILSOS_CCW_H52A.Sequences
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For CSV 저장용
|
||||||
|
public class CenterPositionData : NotifyPropertyChangedBase
|
||||||
|
{
|
||||||
|
private double _CenterX;
|
||||||
|
public double CenterX { get => _CenterX; set => SetProperty(ref _CenterX, value); }
|
||||||
|
private double _CenterY;
|
||||||
|
public double CenterY { get => _CenterY; set => SetProperty(ref _CenterY, value); }
|
||||||
|
}
|
||||||
|
|
||||||
public class SeqAutoRunCCWH52A_InitParam : InitParam
|
public class SeqAutoRunCCWH52A_InitParam : InitParam
|
||||||
{
|
{
|
||||||
public ScoutSeqParams ScoutSeqParams { get; set; }
|
public ScoutSeqParams ScoutSeqParams { get; set; }
|
||||||
public bool UseStream { get; set; }
|
public bool UseStream { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SeqAutoRunCCWH52A_OutParam : OutParam
|
public class SeqAutoRunCCWH52A_OutParam : OutParam
|
||||||
|
|||||||
@ -79,8 +79,12 @@ namespace WeldingCommon.Data
|
|||||||
{
|
{
|
||||||
public DateTime Date { get => _Date; set => SetProperty(ref _Date, value); }
|
public DateTime Date { get => _Date; set => SetProperty(ref _Date, value); }
|
||||||
private DateTime _Date;
|
private DateTime _Date;
|
||||||
public string LotID { get => Status.GetProcessingWeldingData().LotId; }
|
public string LotID { get => _LodID; set => SetProperty(ref _LodID, value); }
|
||||||
public string CellID { get => Status.GetProcessingWeldingData().CellId; }
|
private string _LodID;
|
||||||
|
|
||||||
|
public string CellID { get => _CellID; set => SetProperty(ref _CellID, value); }
|
||||||
|
private string _CellID;
|
||||||
|
|
||||||
public string WeldType { get => _WeldType; set => SetProperty(ref _WeldType, value); }
|
public string WeldType { get => _WeldType; set => SetProperty(ref _WeldType, value); }
|
||||||
private string _WeldType;
|
private string _WeldType;
|
||||||
public bool EncoderCheck { get => _EncoderCheck; set => SetProperty(ref _EncoderCheck, value); }
|
public bool EncoderCheck { get => _EncoderCheck; set => SetProperty(ref _EncoderCheck, value); }
|
||||||
|
|||||||
@ -724,6 +724,8 @@ namespace WeldingCommon.Sequences {
|
|||||||
laserLog.StartPointY = obj.PF1.Y;
|
laserLog.StartPointY = obj.PF1.Y;
|
||||||
laserLog.EndPointX = obj.PF2.X;
|
laserLog.EndPointX = obj.PF2.X;
|
||||||
laserLog.EndPointY = obj.PF2.Y;
|
laserLog.EndPointY = obj.PF2.Y;
|
||||||
|
laserLog.LotID = Status.GetProcessingWeldingData().WorkLotId;
|
||||||
|
laserLog.CellID = Status.GetProcessingWeldingData().WorkCellId;
|
||||||
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1658,6 +1660,8 @@ namespace WeldingCommon.Sequences {
|
|||||||
laserLog.StartPointY = obj.PF1.Y;
|
laserLog.StartPointY = obj.PF1.Y;
|
||||||
laserLog.EndPointX = obj.PF2.X;
|
laserLog.EndPointX = obj.PF2.X;
|
||||||
laserLog.EndPointY = obj.PF2.Y;
|
laserLog.EndPointY = obj.PF2.Y;
|
||||||
|
laserLog.LotID = Status.GetProcessingWeldingData().WorkLotId;
|
||||||
|
laserLog.CellID = Status.GetProcessingWeldingData().WorkCellId;
|
||||||
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
||||||
|
|
||||||
if (obj.MadebyRCC) {
|
if (obj.MadebyRCC) {
|
||||||
@ -1926,6 +1930,8 @@ namespace WeldingCommon.Sequences {
|
|||||||
laserLog.StartPointY = obj.PF1.Y;
|
laserLog.StartPointY = obj.PF1.Y;
|
||||||
laserLog.EndPointX = obj.PF2.X;
|
laserLog.EndPointX = obj.PF2.X;
|
||||||
laserLog.EndPointY = obj.PF2.Y;
|
laserLog.EndPointY = obj.PF2.Y;
|
||||||
|
laserLog.LotID = Status.GetProcessingWeldingData().WorkLotId;
|
||||||
|
laserLog.CellID = Status.GetProcessingWeldingData().WorkCellId;
|
||||||
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
Status.GetProcessingWeldingData().APD.Add(laserLog);
|
||||||
|
|
||||||
if (obj.MadebyRCC) {
|
if (obj.MadebyRCC) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user