Compare commits
3 Commits
0a1bf4d9a1
...
f1908696b5
| Author | SHA1 | Date | |
|---|---|---|---|
| f1908696b5 | |||
| 84eef8e9e4 | |||
| d2dbbf257d |
Binary file not shown.
BIN
External/Aurora/bin/Aurora.exe
vendored
BIN
External/Aurora/bin/Aurora.exe
vendored
Binary file not shown.
BIN
External/Aurora/bin/hi-IN/Aurora.resources.dll
vendored
BIN
External/Aurora/bin/hi-IN/Aurora.resources.dll
vendored
Binary file not shown.
BIN
External/Aurora/bin/ko-KR/Aurora.resources.dll
vendored
BIN
External/Aurora/bin/ko-KR/Aurora.resources.dll
vendored
Binary file not shown.
BIN
External/Aurora/bin/zh-CN/Aurora.resources.dll
vendored
BIN
External/Aurora/bin/zh-CN/Aurora.resources.dll
vendored
Binary file not shown.
BIN
External/Aurora/lib/x64-Debug/AuroraNative.dll
vendored
BIN
External/Aurora/lib/x64-Debug/AuroraNative.dll
vendored
Binary file not shown.
BIN
External/Aurora/lib/x64-Debug/AuroraNative.exp
vendored
BIN
External/Aurora/lib/x64-Debug/AuroraNative.exp
vendored
Binary file not shown.
BIN
External/Aurora/lib/x64-Debug/AuroraNative.lib
vendored
BIN
External/Aurora/lib/x64-Debug/AuroraNative.lib
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
External/Aurora/lib/x64-Release/AuroraNative.dll
vendored
BIN
External/Aurora/lib/x64-Release/AuroraNative.dll
vendored
Binary file not shown.
BIN
External/Aurora/lib/x64-Release/AuroraNative.exp
vendored
BIN
External/Aurora/lib/x64-Release/AuroraNative.exp
vendored
Binary file not shown.
BIN
External/Aurora/lib/x64-Release/AuroraNative.lib
vendored
BIN
External/Aurora/lib/x64-Release/AuroraNative.lib
vendored
Binary file not shown.
@ -49,5 +49,5 @@ using System.Windows;
|
||||
// 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.3")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.3")]
|
||||
[assembly: AssemblyVersion("1.0.0.2")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.2")]
|
||||
|
||||
@ -43,10 +43,8 @@ using static ILSOS_CCW_H52A.Device.IOController_CCW_H52A;
|
||||
using static ILSOS_CCW_H52A.Device.PLCControllerCCWH52A;
|
||||
using static ILSOS_CCW_H52A.Device.ScannerListCCWH52A;
|
||||
|
||||
namespace ILSOS_CCW_H52A.Sequences
|
||||
{
|
||||
class SeqAutoRunCCWH52A
|
||||
{
|
||||
namespace ILSOS_CCW_H52A.Sequences {
|
||||
class SeqAutoRunCCWH52A {
|
||||
static readonly Logger Log = new Logger("SeqAutoRunCCWH52A");
|
||||
|
||||
const string SEQ_ENTER = "[SeqAutoRunCCWH52A] SEQ_ENTER"; // inputParam 으로 받자.
|
||||
@ -89,8 +87,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
const string SEQ_INIT_CONDITION_ERROR = "[SeqAutoRunCCWH52A] Init Condition Error";
|
||||
const string SEQ_COMPLETE = "[SeqAutoRunCCWH52A] SEQ_COMPLETE"; // 완료
|
||||
|
||||
static class ContextKey
|
||||
{
|
||||
static class ContextKey {
|
||||
public const string KEY_SEQUENCE_RESULT = "KEY_SEQUENCE_RESULT_SeqAutoRunCCWH52A";
|
||||
public const string KEY_SEQUENCE_START_TIME = "KEY_SEQUENCE_START_TIME_SeqAutoRunCCWH52A";
|
||||
public const string KEY_SEQUENCE_ERROR_CODE = "KEY_SEQUENCE_ERROR_CODE_SeqAutoRunCCWH52A";
|
||||
@ -145,8 +142,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
private bool UsePlcShotThemAll { get; set; } = false;
|
||||
private bool UsePlcPositionCompensation { get; set; } = false;
|
||||
private string RecipeFileName { get; set; } = "";
|
||||
private enum InitErrorList
|
||||
{
|
||||
private enum InitErrorList {
|
||||
SUCCESS = 0,
|
||||
LBAD_CLIENT_ACTIVATE_FAILED,
|
||||
LBAD_SUB_ACTIVATE_FAILED,
|
||||
@ -155,8 +151,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
MOTF_OFF,
|
||||
PLC_ALARM,
|
||||
}
|
||||
public SequenceBuilder Builder()
|
||||
{
|
||||
public SequenceBuilder Builder() {
|
||||
var sb = new SequenceBuilder(1000, true);
|
||||
|
||||
sb.AddAction(SEQ_ENTER, Sequence_Enter);
|
||||
@ -257,8 +252,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return sb;
|
||||
}
|
||||
|
||||
private SequenceActionResult Sequence_Enter(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult Sequence_Enter(SequenceContext context, string id, SequenceActionResult param) {
|
||||
Log.I("SeqAutoRunCCWH52A Start");
|
||||
Status.SetWorkingPosition(eWorkingPosition.CHECKING_CONDITION);
|
||||
|
||||
@ -279,8 +273,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private bool InitSequenceVariable(SequenceContext context)
|
||||
{
|
||||
private bool InitSequenceVariable(SequenceContext context) {
|
||||
_AutoRunStartTime = DateTime.Now;
|
||||
|
||||
var ActivateRecipeName = _RecipeManager.ActivatedRecipe();
|
||||
@ -299,8 +292,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return true;
|
||||
}
|
||||
|
||||
private void InitDev(SequenceContext context)
|
||||
{
|
||||
private void InitDev(SequenceContext context) {
|
||||
//Device Init
|
||||
_Scanner = context.GetLaserScanner();
|
||||
_Laser = context.GetLaser();
|
||||
@ -317,8 +309,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
|
||||
}
|
||||
|
||||
private bool CheckDeviceReady(SequenceContext context)
|
||||
{
|
||||
private bool CheckDeviceReady(SequenceContext context) {
|
||||
List<string> deviceListToCheck = new List<string>() { CommonDeviceIds.Scanner, CommonDeviceIds.Laser, CommonDeviceIds.PLCDevice, CommonDeviceIds.IODevice };
|
||||
|
||||
if (_InitParam.UseStream) {
|
||||
@ -336,8 +327,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return isAllDeviceActivated;
|
||||
}
|
||||
|
||||
private bool CheckCondition(SequenceContext context)
|
||||
{
|
||||
private bool CheckCondition(SequenceContext context) {
|
||||
int InitializeCode = InitializeDeviceStatus(context);
|
||||
if (InitializeCode == (int)InitErrorList.SUCCESS)
|
||||
return true;
|
||||
@ -346,8 +336,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return false;
|
||||
}
|
||||
|
||||
private int InitializeDeviceStatus(SequenceContext context)
|
||||
{
|
||||
private int InitializeDeviceStatus(SequenceContext context) {
|
||||
// PLC Interface AutoStatus Start
|
||||
// Won : PC의 AutoStatus 가 True 되는 순간 Rotary가 돌기 시작한다.
|
||||
// Rotary 돌기 시작 한 후 Encoder 값을 읽으면 안 되므로 정지상태에서 읽은 후 AutoStatus true 하도록
|
||||
@ -391,8 +380,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
// Scanner Initialize
|
||||
if (_Scanner.GetModulationMode()) {
|
||||
_ModulationMode = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_ModulationMode = false;
|
||||
}
|
||||
|
||||
@ -478,8 +466,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
}
|
||||
|
||||
|
||||
private double GetRotaryCurrentPosition()
|
||||
{
|
||||
private double GetRotaryCurrentPosition() {
|
||||
try {
|
||||
//double finalValue = Convert.ToDouble(_plc.GetLongAIValue("PLC_CURRENT_POS_1") / 100000f);
|
||||
double finalValue = Convert.ToDouble(_PLC.ReadDWord((int)eWordInput.PLC_CURRENT_POS_1).data / 100000f);
|
||||
@ -490,16 +477,14 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
while (360.0 <= finalValue) {
|
||||
finalValue -= 360.0;
|
||||
}
|
||||
}
|
||||
else if (finalValue < 0) {
|
||||
} else if (finalValue < 0) {
|
||||
while (finalValue < 0) {
|
||||
finalValue += 360.0;
|
||||
}
|
||||
}
|
||||
|
||||
return finalValue;
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
return -9999.9999;
|
||||
}
|
||||
}
|
||||
@ -511,8 +496,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
/// <param name="rotaryJigCount">Rotary 내 지그 갯수임. 장비 및 T/T에 따라서, 360도 당 지그의 개수는 다를 수 있으므로.</param>
|
||||
/// <param name="weldingCount">Rotary Welding Count. 30도 구간 하나가 지나갈 때마다 +1</param>
|
||||
/// <param name="weldingJigNo">현재 '용접 중' 구간에 들어가 있는 지그 번호</param>
|
||||
public void InitRotaryOnTheFlyWeldingCount(double rotaryAngleOffset, int rotaryJigCount, out int weldingCount, out int weldingJigNo)
|
||||
{
|
||||
public void InitRotaryOnTheFlyWeldingCount(double rotaryAngleOffset, int rotaryJigCount, out int weldingCount, out int weldingJigNo) {
|
||||
// 현재 로터리 엔코더 값을 기준으로 현재 카운트, 지그 번호를 확인
|
||||
double anglePerOneJig = 360 / (double)rotaryJigCount; //double로 바꿔서 계산해야 22가 아닌 22.5로 anglePerOneJig가 계산됨 25.08.02
|
||||
weldingCount = (int)((rotaryAngleOffset + anglePerOneJig / 2) / anglePerOneJig); // _WeldingCount = 0, 1, 2, ...
|
||||
@ -521,8 +505,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Log.I($"Angle Per One Jig : {anglePerOneJig}");
|
||||
}
|
||||
|
||||
private string CheckInitCondition(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||
{
|
||||
private string CheckInitCondition(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param) {
|
||||
if (!CheckCondition(context)) {
|
||||
//AlarmManager.Alarm(AlarmCode.ALARM_SEQUENCE_AutoRun_CheckInitCondition);
|
||||
Log.E("Condition is not in state to start sequence.");
|
||||
@ -541,8 +524,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
}
|
||||
|
||||
// 지그 상태 확인
|
||||
private SequenceActionResult CheckLoadComplete(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult CheckLoadComplete(SequenceContext context, string id, SequenceActionResult param) {
|
||||
Status.SetWorkingPosition(eWorkingPosition.LOADING_CELL);
|
||||
|
||||
// MOTF WaitScannerLoadListEnable
|
||||
@ -560,8 +542,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult CheckScannerListComplete(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult CheckScannerListComplete(SequenceContext context, string id, SequenceActionResult param) {
|
||||
// Prefetch1 = 2회 전 업로드된 지그 = 현재 물리적으로 레이저 통과 중 = 완료 체크 대상.
|
||||
// Shift()는 이 메서드 이후 ReadyScannerList에서 실행되므로, 이 시점의 Prefetch1이
|
||||
// 원본 코드의 InputScannerList[(listNo-1)]과 동일 대상이다.
|
||||
@ -579,8 +560,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Error();
|
||||
}
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (jigComplete.IsCanExist) {
|
||||
#region 용접 시간, 엔코더 측정/기록
|
||||
double elaspedTime = _Scanner.GetTime();
|
||||
@ -623,17 +603,13 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Status.GetProcessingWeldingData().RecipeNo = _RecipeNo;
|
||||
Status.GetProcessingWeldingData().LaserPowerByLBAD = _LaserPowerByLBAD.ToString();
|
||||
|
||||
// 보고 데이터는 스케줄러의 ActiveReportSlot(Complete 또는 PendingComplete)에서 읽음
|
||||
var report = _CellScheduler.ActiveReportSlot;
|
||||
if (report != null) {
|
||||
Status.GetProcessingWeldingData().LotId = report.LotId;
|
||||
Status.GetProcessingWeldingData().CellId = report.CellId;
|
||||
Status.GetProcessingWeldingData().WeldingStartTime = report.WeldStartTime;
|
||||
Status.GetProcessingWeldingData().WeldingEndTime = report.WeldEndTime;
|
||||
Status.GetProcessingWeldingData().WeldingSpanTimeMilliseconds = report.WeldingSpanTime.TotalMilliseconds.ToString();
|
||||
Status.GetProcessingWeldingData().JigNo = report.JigNo.ToString();
|
||||
SaveCellAPD();
|
||||
}
|
||||
Status.GetProcessingWeldingData().LotId = jigComplete.LotId;
|
||||
Status.GetProcessingWeldingData().CellId = jigComplete.CellId;
|
||||
Status.GetProcessingWeldingData().WeldingStartTime = jigComplete.WeldStartTime;
|
||||
Status.GetProcessingWeldingData().WeldingEndTime = jigComplete.WeldEndTime;
|
||||
Status.GetProcessingWeldingData().WeldingSpanTimeMilliseconds = jigComplete.WeldingSpanTime.TotalMilliseconds.ToString();
|
||||
Status.GetProcessingWeldingData().JigNo = jigComplete.JigNo.ToString();
|
||||
SaveCellAPD();
|
||||
}
|
||||
|
||||
UtilUnit.logUnit.SetLog(LogUnit.eLogType.PRODUCT, MethodBase.GetCurrentMethod().Name, "UPDATE_WELDING_TIME;" + jigComplete.WeldingSpanTime.TotalMilliseconds);
|
||||
@ -673,8 +649,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
/// </summary>
|
||||
/// <param name="startAngle"> 현재 지그의 시작 각도 </param>
|
||||
/// <returns> 지나갔으면 True </returns>
|
||||
public bool CheckInsideWeldPosition(double startAngle)
|
||||
{
|
||||
public bool CheckInsideWeldPosition(double startAngle) {
|
||||
double encoderX, currentAngle;
|
||||
_Scanner.GetEncoder(out encoderX, out currentAngle, true);
|
||||
|
||||
@ -695,8 +670,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return false;
|
||||
}
|
||||
|
||||
private string ReadyScannerList(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||
{
|
||||
private string ReadyScannerList(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param) {
|
||||
Status.SetWorkingPosition(eWorkingPosition.UPLOADING_WELD_LIST);
|
||||
|
||||
//_SelectedDrawObjectList = _ScannerCanvasUserCtrl.Model.Layers[0].Objects;
|
||||
@ -736,8 +710,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
if (UsePlcShotThemAll) {
|
||||
canExist = true;
|
||||
Log.I("Settings - PLC : Shot Them All Mode");
|
||||
}
|
||||
else
|
||||
} else
|
||||
canExist = GetRotaryCanExist(_WeldingJigNo);
|
||||
|
||||
//Log.I("Can Exist : " + canExist.ToString() + ", JigNo " + _WeldingJigNo + " ,CountNo " + _WeldingCount + ", StartAngle(Y) : " + _WeldingStartAngle);
|
||||
@ -762,12 +735,10 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
recvInfo.LotId = rLot;
|
||||
recvInfo.CellId = rCell;
|
||||
Log.I($"[PendingRestore] Jig{_WeldingJigNo} 셀 복원 >> CellId({rCell})");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Log.W($"[PendingRestore] Jig{_WeldingJigNo} canExist=false, 복원 데이터 폐기 >> CellId({rCell})");
|
||||
}
|
||||
}
|
||||
else if (ProcessManager.Instance.ReceivedCellInfoQueue.TryDequeue(out var cell)) {
|
||||
} else if (ProcessManager.Instance.ReceivedCellInfoQueue.TryDequeue(out var cell)) {
|
||||
if (canExist) {
|
||||
recvInfo.LotId = cell.LotId;
|
||||
recvInfo.CellId = cell.CellId;
|
||||
@ -796,7 +767,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
$"[ListNo({_CellScheduler.Prefetch2.ListNo})] [WeldingCount({_CellScheduler.Prefetch2.WeldingCount})]" +
|
||||
$"[StartAngle(Y)({_CellScheduler.Prefetch2.StartAngle})]");
|
||||
|
||||
if(_CellScheduler.Prefetch1 != null)
|
||||
if (_CellScheduler.Prefetch1 != null)
|
||||
Log.I($"Prefetch1 >> CellId({_CellScheduler.Prefetch1.CellId}) [CanExist({_CellScheduler.Prefetch1.IsCanExist})] [JigNo({_CellScheduler.Prefetch1.JigNo})] " +
|
||||
$"[ListNo({_CellScheduler.Prefetch1.ListNo})] [WeldingCount({_CellScheduler.Prefetch1.WeldingCount})]" +
|
||||
$"[StartAngle(Y)({_CellScheduler.Prefetch1.StartAngle})]");
|
||||
@ -806,23 +777,20 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
if (_WeldingJigNo - 1 < _ScannerCanvasUserCtrl.Model.Layers.Length) {
|
||||
_SelectedDrawObjectList = _ScannerCanvasUserCtrl.Model.Layers[_WeldingJigNo - 1].Objects;
|
||||
Log.I(string.Format("Page 불러오기 : [{0}])", _WeldingJigNo - 1));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_SelectedDrawObjectList = _ScannerCanvasUserCtrl.Model.Layers[0].Objects;
|
||||
Log.I(string.Format("Page 불러오기 : [0])"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
return SEQ_SET_PARAMS_UPLOAD_WELDING_LIST_SEQ;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return SEQ_EXECUTE_WELDING;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
private ScannerParam GetSelectedDrawObjectData(IDrawObject DrawObj)
|
||||
{
|
||||
private ScannerParam GetSelectedDrawObjectData(IDrawObject DrawObj) {
|
||||
if (DrawObj is Line lineItem)
|
||||
return WeldingRecipeManager.GetScannerParam(lineItem.ScannerParamNo);
|
||||
else if (DrawObj is Arc arcItem)
|
||||
@ -833,8 +801,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return null;
|
||||
}
|
||||
|
||||
public void WaitForEncoderNextRotarySection(int weldingCount, int rotaryJigCount, double rotaryAngleOffset, double encoderResetOffset, out double sectionStartAngle)
|
||||
{
|
||||
public void WaitForEncoderNextRotarySection(int weldingCount, int rotaryJigCount, double rotaryAngleOffset, double encoderResetOffset, out double sectionStartAngle) {
|
||||
// 한 바퀴당 지그 숫자에 따른 변경
|
||||
double encoderAllowedMinDegree = Int32.MinValue / _Scanner.Config.MarkingOnTheFlyEncoderResolutionRotate * 360.0;
|
||||
double encoderAllowedMaxDegree = Int32.MaxValue / _Scanner.Config.MarkingOnTheFlyEncoderResolutionRotate * 360.0;
|
||||
@ -863,16 +830,14 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
_Scanner.WaitForEncoderRotateRange(encoderAllowedMinDegree, encoderAllowedMaxDegree, sectionStartAngle, sectionEndAngle);
|
||||
}
|
||||
|
||||
public bool GetRotaryCanExist(int jigNo)
|
||||
{
|
||||
public bool GetRotaryCanExist(int jigNo) {
|
||||
if (jigNo <= _RotaryJigCount)
|
||||
return _PLC.ReadBit((int)eBitInput.PLC_USE_WELD_JIG_1 + (jigNo - 1)).data;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private SequenceActionResult SetUploadWeldingList_SeqParams(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult SetUploadWeldingList_SeqParams(SequenceContext context, string id, SequenceActionResult param) {
|
||||
//현재 시퀀스에서 LoadList를 해주기 때문에 Sub 시퀀스에 IncludeListStartEnd를 false로 넘겨줘야 함
|
||||
SeqUploadWeldingList_InitParam seqParams = new SeqUploadWeldingList_InitParam() {
|
||||
NeedSetLaserTiming = _ModulationMode,
|
||||
@ -887,8 +852,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok(seqParams);
|
||||
}
|
||||
|
||||
private SequenceActionResult GetUploadWeldingList_SeqResult(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult GetUploadWeldingList_SeqResult(SequenceContext context, string id, SequenceActionResult param) {
|
||||
var resultOutParam = param.Param as SeqUploadWeldingList_OutParam;
|
||||
if (resultOutParam.Success == false) {
|
||||
//AlarmManager.Alarm(AlarmCode.ALARM_SEQUENCE_UploadWeldingList_ResultFailed);
|
||||
@ -930,8 +894,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
// return SequenceAction.Ok();
|
||||
//}
|
||||
|
||||
private SequenceActionResult ExecuteWelding(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult ExecuteWelding(SequenceContext context, string id, SequenceActionResult param) {
|
||||
Status.SetWorkingPosition(eWorkingPosition.EXECUTING_WELD);
|
||||
|
||||
// MOTF Welding
|
||||
@ -944,8 +907,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
|
||||
_Scanner.ExecuteList(_WeldingScannerListNo);
|
||||
Log.I(string.Format($"START Welding : ExecuteList_{_WeldingScannerListNo}"));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_Scanner.AutoChange();
|
||||
Log.I(string.Format($"Next upload list : uploadList_{_WeldingScannerListNo}"));
|
||||
}
|
||||
@ -956,14 +918,12 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult RequestUnloadCell(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult RequestUnloadCell(SequenceContext context, string id, SequenceActionResult param) {
|
||||
Status.SetWorkingPosition(eWorkingPosition.UNLOADING_CELL);
|
||||
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
private SequenceActionResult EncoderMonitor(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult EncoderMonitor(SequenceContext context, string id, SequenceActionResult param) {
|
||||
double send_time_offset = 0.1;
|
||||
|
||||
while (!context.Stopped) {
|
||||
@ -998,8 +958,8 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
}
|
||||
|
||||
var LaserIO = _IO._iOUnit.ReadDiBit(Convert.ToInt32(eADIAddress.LaserOn));
|
||||
var IsLaserOn = ChangeChecker.IsChangedBoolMonitoring("LaserOn", LaserIO, true);
|
||||
if (IsLaserOn) {
|
||||
//var IsLaserOn = ChangeChecker.IsChangedBoolMonitoring("LaserOn", LaserIO, true);
|
||||
if (true) {
|
||||
if (executeTarget != null && executeTarget.IsCanExist && executeTarget.WeldStartTime == DateTime.MinValue) {
|
||||
executeTarget.WeldStartTime = DateTime.Now;
|
||||
executeTarget.WeldComplete = true;
|
||||
@ -1033,8 +993,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult ReportCellResult(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult ReportCellResult(SequenceContext context, string id, SequenceActionResult param) {
|
||||
Status.SetWorkingPosition(eWorkingPosition.REPORTING_RESULT);
|
||||
|
||||
string strDate = DateTime.Now.Date.ToString("yyyyMMdd");
|
||||
@ -1117,8 +1076,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
// 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);
|
||||
|
||||
// TODO: 확인 필요, CybleStop 에 대한 내용, cycle stop 여부 가져오기
|
||||
@ -1130,14 +1088,12 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
bool cycleStop = false;
|
||||
if (cycleStop) {
|
||||
return SEQ_SAVE_RESULT_DATA;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return SEQ_CHECK_LOAD_COMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
private string CheckCanWelded(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||
{
|
||||
private string CheckCanWelded(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param) {
|
||||
// ── 재시작 전 미완료 보고 우선 처리 ─────────────────────────────────────────
|
||||
// SavePendingComplete()로 보존된 슬롯이 있으면 정상 파이프라인(Complete)보다 우선.
|
||||
if (_CellScheduler.HasPendingComplete) {
|
||||
@ -1156,8 +1112,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SEQ_CHECK_CYCLE_STOP;
|
||||
}
|
||||
|
||||
private void SaveCellAPD()
|
||||
{
|
||||
private void SaveCellAPD() {
|
||||
if (Status.GetProcessingWeldingData().APD.Count > 0) {
|
||||
string directoryPath = "D:\\ILSOSConfig\\APD_History";
|
||||
string fileName = DateTime.Now.ToString("HH") + "_CellAPD";
|
||||
@ -1165,22 +1120,19 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Status.GetProcessingWeldingData().APD.CreateFiles(fullPath);
|
||||
}
|
||||
}
|
||||
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult SaveResultData(SequenceContext context, string id, SequenceActionResult param) {
|
||||
context.PutValue(ContextKey.KEY_SEQUENCE_RESULT, true);
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult WriteCompletionPLCBit(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult WriteCompletionPLCBit(SequenceContext context, string id, SequenceActionResult param) {
|
||||
// 완료 비트 write 하는 Node 추가 필요. format 유지, ReceiveCellInfo 없음
|
||||
Log.D("AutoRun Sequence WriteCompletionPLCBit");
|
||||
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult InitConditionError(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult InitConditionError(SequenceContext context, string id, SequenceActionResult param) {
|
||||
context.TryGetValue(ContextKey.KEY_SEQUENCE_ERROR_CODE, out int InitializeCode);
|
||||
switch (InitializeCode) {
|
||||
case (int)InitErrorList.PLC_AUTORUN_BIT_OFF:
|
||||
@ -1207,8 +1159,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
}
|
||||
}
|
||||
|
||||
private SequenceActionResult Complete(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
private SequenceActionResult Complete(SequenceContext context, string id, SequenceActionResult param) {
|
||||
RestoreDeviceStatus();
|
||||
|
||||
context.Settings.Save(CommonSettingIds.SystemParameter, _SystemParameter, "SeqAutoRunCCWH52A");
|
||||
@ -1225,8 +1176,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok(result);
|
||||
}
|
||||
|
||||
private bool RestoreDeviceStatus()
|
||||
{
|
||||
private bool RestoreDeviceStatus() {
|
||||
//PLC All BIT OFF
|
||||
for (int i = 0; i < _RotaryJigCount; i++) {
|
||||
_PLC.WriteBit((int)eBitOutput.PC_WELD_COMPLETE_1 + i, false);
|
||||
@ -1265,8 +1215,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnForceError(SequenceContext context, string arg2)
|
||||
{
|
||||
private void OnForceError(SequenceContext context, string arg2) {
|
||||
context.Settings.Save(CommonSettingIds.SystemParameter, _SystemParameter, "SeqAutoRunCCWH52A");
|
||||
|
||||
OnSeqActionStop();
|
||||
@ -1274,8 +1223,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Log.I("SequenceAction Ok : OnForceError");
|
||||
}
|
||||
|
||||
private void OnStopped(SequenceContext context)
|
||||
{
|
||||
private void OnStopped(SequenceContext context) {
|
||||
context.Settings.Save(CommonSettingIds.SystemParameter, _SystemParameter, "SeqAutoRunCCWH52A");
|
||||
|
||||
OnSeqActionStop();
|
||||
@ -1283,8 +1231,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Log.I("SequenceAction Ok : OnStopped");
|
||||
}
|
||||
|
||||
private void OnSeqActionStop()
|
||||
{
|
||||
private void OnSeqActionStop() {
|
||||
Status.EquipmentMode = eEquipmentMode.MANUAL;
|
||||
|
||||
foreach (var info in ProcessManager.Instance.ReceivedCellInfoQueue.Select((value, index) => (value, index))) {
|
||||
@ -1333,23 +1280,20 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
}
|
||||
|
||||
// For CSV 저장용
|
||||
public class CenterPositionData : NotifyPropertyChangedBase
|
||||
{
|
||||
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 bool UseStream { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SeqAutoRunCCWH52A_OutParam : OutParam
|
||||
{
|
||||
public class SeqAutoRunCCWH52A_OutParam : OutParam {
|
||||
|
||||
}
|
||||
}
|
||||
@ -25,6 +25,7 @@ using System.Windows.Controls;
|
||||
using Aurora.Api.Manager;
|
||||
using System.Windows;
|
||||
using WeldingCommon.Recipes;
|
||||
using System.Threading;
|
||||
|
||||
namespace ILSOS_CCW_H52A.Views
|
||||
{
|
||||
@ -115,7 +116,6 @@ namespace ILSOS_CCW_H52A.Views
|
||||
CurrentWeldingData.WeldingSpanTimeMilliseconds = "0";
|
||||
CurrentWeldingData.LotId = "Default_Lot_Id";
|
||||
CurrentWeldingData.CellId = "Default_Cell_Id";
|
||||
CurrentWeldingData.JigNo = "0";
|
||||
}
|
||||
|
||||
private void VisibleChanged(object obj)
|
||||
@ -148,28 +148,28 @@ namespace ILSOS_CCW_H52A.Views
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void PerformCmdRunSequenceAutoRun(object obj)
|
||||
{
|
||||
var result = MessageUtil.ShowYesNoMessageDialog("AutoRun Sequence", "Start AutoRun Sequence?");
|
||||
if (result == false) {
|
||||
if (result == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (VisionRecipeManager.GetFovInfos().Count == 0) {
|
||||
if (VisionRecipeManager.GetFovInfos().Count == 0)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("Please check the Vision Recipe of the currently active Recipe."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_SeqAutoRun.RunState == SequenceRunState.Running) {
|
||||
if (_SeqAutoRun.RunState == SequenceRunState.Running)
|
||||
{
|
||||
MessageUtil.ShowWarningToast(string.Format("이미 시퀀스가 Start 상태입니다.", "SeqAutoRunCCWH52A"));
|
||||
return;
|
||||
}
|
||||
|
||||
RunSequenceAutoRun();
|
||||
|
||||
}
|
||||
|
||||
private void OnAutoRunStartRequest()
|
||||
{
|
||||
RunSequenceAutoRun();
|
||||
|
||||
@ -1032,7 +1032,6 @@ namespace CoreUnit.Control.UserControl.Canvas
|
||||
EnableCanvasColor = org.EnableCanvasColor;
|
||||
EnableCanvasGrid = org.EnableCanvasGrid;
|
||||
Layers = (ICanvasLayer[])org.Layers.Clone();
|
||||
m_activeLayer = m_layers[0];
|
||||
|
||||
//var thisDrawing = ActiveLayer as DrawingLayer;
|
||||
//var orgDrawing = org.ActiveLayer as DrawingLayer;
|
||||
|
||||
@ -64,7 +64,7 @@ namespace WeldingCommon.Data
|
||||
if (fullPathNoExt == null)
|
||||
return;
|
||||
|
||||
if(format == ExportFormat.CSV)
|
||||
if (format == ExportFormat.CSV)
|
||||
CSV_Manager.GetInstance().Save_DataTableToCsv(fullPathNoExt, table);
|
||||
|
||||
Clear();
|
||||
@ -109,6 +109,19 @@ namespace WeldingCommon.Data
|
||||
|
||||
table.Rows.Add(values.ToArray());
|
||||
}
|
||||
|
||||
|
||||
//DataRow row = table.NewRow();
|
||||
|
||||
// for (int i = 0; i < item.ParamAPD.Count; i++)
|
||||
// {
|
||||
// table.Rows.Add(item.Date.ToString("yyyy-MM-dd"), item.Date.ToString("HH:mm:ss.fff"), item.LotID, item.CellID, item.HeadNo, item.WeldType, item.EncoderCheck,
|
||||
// item.ParamAPD[0].StartPointX, item.ParamAPD[0].StartPointY, item.ParamAPD[0].EndPointX, item.ParamAPD[0].EndPointY,
|
||||
// item.ParamAPD[0].WeldCondition, item.ParamAPD[0].LaserOnDelay, item.ParamAPD[0].LaserOffDelay, item.ParamAPD[0].JumpDelay, item.ParamAPD[0].MarkDelay,
|
||||
// item.ParamAPD[0].PolygonDelay, item.ParamAPD[0].PowerCore, item.ParamAPD[0].PowerRing, item.ParamAPD[0].JumpSpeed, item.ParamAPD[0].MarkSpeed, item.ParamAPD[0].JumpX,
|
||||
// item.ParamAPD[0].JumpY);
|
||||
// }
|
||||
//}
|
||||
public void UpdateHeadNo(string headNo)
|
||||
{
|
||||
foreach (var item in this)
|
||||
|
||||
@ -123,7 +123,6 @@ namespace WeldingCommon.Data
|
||||
this.WeldTime = string.Empty;
|
||||
this.WorkCellId = string.Empty;
|
||||
this.WorkLotId = string.Empty;
|
||||
this.WorkJigNo = string.Empty;
|
||||
this.LBAD_Judge = string.Empty;
|
||||
this.LDD_Judge = string.Empty;
|
||||
this.LaserPowerCore = string.Empty;
|
||||
@ -152,7 +151,6 @@ namespace WeldingCommon.Data
|
||||
clone._WeldTime = _WeldTime;
|
||||
clone._WorkCellId = _WorkCellId;
|
||||
clone._WorkLotId = _WorkLotId;
|
||||
clone._WorkJigNo = _WorkJigNo;
|
||||
clone._LBAD_Judge = _LBAD_Judge;
|
||||
clone._LDD_Judge = _LDD_Judge;
|
||||
clone._LaserPowerCore = _LaserPowerCore;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user