Initial commit

This commit is contained in:
ChiKyun Kim
2025-07-17 16:11:46 +09:00
parent 4865711adc
commit 4a1b1924ba
743 changed files with 230954 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
using AR;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace Project
{
public partial class FMain
{
private void _SM_MAIN_ERROR(Boolean isFirst, eSMStep Step, TimeSpan StepTime)
{
//모션의 위치를 저장해준다. - 재시작시 변경이 잇다면 오류로 처리한다
for (int i = 0; i < PUB.mot.DeviceCount; i++)
PUB.Result.PreventMotionPosition[i] = PUB.mot.GetLastCmdPos(i);
var errorMessage = string.Empty;
//에러메세지가 있는 경우에만 표시함
if (PUB.Result.ResultCode != eResult.NOERROR && PUB.Result.ResultMessage != "")
errorMessage += PUB.Result.ResultMessage;
//에러메세지가 있는 경우에만 표시함
if (errorMessage != "")
{
//사용자 값 입력창에서는 오류를 표시하지않는다
if (Step == eSMStep.PAUSE && PUB.flag.get(eVarBool.FG_WAIT_LOADERINFO))
PUB.log.Add("바코드정보입력창이라 일시중지 메세지를 표시하지 않음");
else
PUB.popup.setMessage(errorMessage);
}
if (Step == eSMStep.EMERGENCY)
{
PUB.log.AddE("Enter Emergency Step");
}
else if (Step == eSMStep.PAUSE)
{
PUB.log.AddE("Enter Pause Step 1 : " + PUB.Result.ResultMessage);
}
else
{
//홈 검색실패로 인해 멈췄다면 모든 축을 멈춘다
if (Step == eSMStep.ERROR && PUB.Result.ResultCode == eResult.SAFTY)
PUB.mot.MoveStop("홈검색 실패");
PUB.log.AddE(string.Format("Enter Error Step 1 : {0}", PUB.Result.ResultMessage));
}
//lbMsgR.ProgressEnable = false;
DIO.SetBuzzer(true);
DIO.SetPortMotor(0, eMotDir.CW, false, "ERROR");
DIO.SetPortMotor(1, eMotDir.CW, false, "ERROR");
DIO.SetPortMotor(2, eMotDir.CW, false, "ERROR");
//컨베어멈춤
DIO.SetOutput(AR.eDOName.LEFT_CONV, false);
DIO.SetOutput(AR.eDOName.RIGHT_CONV, false);
}
}
}