test_acs 프로젝트 변경

This commit is contained in:
backuppc
2026-02-05 13:18:20 +09:00
parent ec2af6ac1f
commit ba542beaff
26 changed files with 416 additions and 533 deletions

View File

@@ -179,4 +179,7 @@ namespace AGVNavigationCore.Models
Complete, Complete,
} }
} }

View File

@@ -311,7 +311,7 @@
<Compile Include="StateMachine\Step\_SM_RUN_BUFFER_OUT.cs"> <Compile Include="StateMachine\Step\_SM_RUN_BUFFER_OUT.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="StateMachine\Step\_SM_RUN_CHARGE_GOFF.cs"> <Compile Include="StateMachine\Step\_SM_RUN_CHARGE_OFF.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="StateMachine\Step\_SM_RUN_GOTO.cs"> <Compile Include="StateMachine\Step\_SM_RUN_GOTO.cs">
@@ -320,7 +320,7 @@
<Compile Include="StateMachine\Step\_SM_RUN_CHARGE_CHECK.cs"> <Compile Include="StateMachine\Step\_SM_RUN_CHARGE_CHECK.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="StateMachine\Step\_SM_RUN_CHARGE_GO.cs"> <Compile Include="StateMachine\Step\_SM_RUN_CHARGE_ON.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="StateMachine\Step\_SM_RUN_READY.cs"> <Compile Include="StateMachine\Step\_SM_RUN_READY.cs">

View File

@@ -186,7 +186,7 @@ namespace Project
PUB.sm.ResetRunStepSeq(); PUB.sm.ResetRunStepSeq();
PUB.log.Add("충전 명령 시작"); PUB.log.Add("충전 명령 시작");
} }
else if (_SM_RUN_CHARGE_GO(runStepisFirst, PUB.sm.GetRunSteptime)) else if (_SM_RUN_CHARGE_ON(runStepisFirst, PUB.sm.GetRunSteptime))
{ {
PUB.XBE.SendActionComplete(PUB.sm.RunStep); PUB.XBE.SendActionComplete(PUB.sm.RunStep);
PUB.Speak(Lang.); PUB.Speak(Lang.);
@@ -219,7 +219,7 @@ namespace Project
else else
{ {
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, stepTime) == true) if (_SM_RUN_CHARGE_OFF(isFirst, stepTime) == true)
{ {
PUB.XBE.SendActionComplete(PUB.sm.RunStep); PUB.XBE.SendActionComplete(PUB.sm.RunStep);
//충전상태가 활성화되었으므로 대기상태로 전환한다 //충전상태가 활성화되었으므로 대기상태로 전환한다

View File

@@ -8,6 +8,7 @@ using COMM;
using AR; using AR;
using System.Windows.Media.Animation; using System.Windows.Media.Animation;
using System.Net.Security; using System.Net.Security;
using AGVNavigationCore.Models;
namespace Project namespace Project
{ {
@@ -19,7 +20,7 @@ namespace Project
var idx = 1; var idx = 1;
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, seqtime) == false) return false; if (_SM_RUN_CHARGE_OFF(isFirst, seqtime) == false) return false;
//라이더멈춤이 설정되어있다면 음성으로 알려준다 //라이더멈춤이 설정되어있다면 음성으로 알려준다
if (CheckLiderStop() == false) return false; if (CheckLiderStop() == false) return false;
@@ -137,7 +138,7 @@ namespace Project
if (PUB.AGV.signal1.lift_down == false) if (PUB.AGV.signal1.lift_down == false)
{ {
VAR.I32[eVarInt32.RetryLift] += 1; VAR.I32[eVarInt32.RetryLift] += 1;
var rlt = PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN); var rlt = PUB.AGV.LiftControl(LiftCommand.DN);
PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 리프트 하강 실행:{rlt}"); PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 리프트 하강 실행:{rlt}");
} }
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
@@ -175,7 +176,7 @@ namespace Project
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter) if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter)
{ {
VAR.I32[eVarInt32.RetryManget] += 1; VAR.I32[eVarInt32.RetryManget] += 1;
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON); PUB.AGV.LiftControl(LiftCommand.ON);
PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 마그넷ON"); PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 마그넷ON");
} }
@@ -351,7 +352,7 @@ namespace Project
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter) if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter)
{ {
VAR.I32[eVarInt32.RetryManget] += 1; VAR.I32[eVarInt32.RetryManget] += 1;
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF); PUB.AGV.LiftControl(LiftCommand.OFF);
} }
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
return false; return false;

View File

@@ -6,6 +6,7 @@ using System.Text;
using Project.StateMachine; using Project.StateMachine;
using COMM; using COMM;
using AR; using AR;
using AGVNavigationCore.Models;
namespace Project namespace Project
{ {
@@ -18,7 +19,7 @@ namespace Project
var idx = 1; var idx = 1;
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, seqtime) == false) return false; if (_SM_RUN_CHARGE_OFF(isFirst, seqtime) == false) return false;
//라이더멈춤이 설정되어있다면 음성으로 알려준다 //라이더멈춤이 설정되어있다면 음성으로 알려준다
if (CheckLiderStop() == false) return false; if (CheckLiderStop() == false) return false;
@@ -53,7 +54,7 @@ namespace Project
} }
else if (PUB.sm.RunStepSeq == idx++) else if (PUB.sm.RunStepSeq == idx++)
{ {
arDev.Narumi.LiftCommand lift = PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit ? arDev.Narumi.LiftCommand.UP : arDev.Narumi.LiftCommand.DN; LiftCommand lift = PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit ? LiftCommand.UP : LiftCommand.DN;
PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 리프트제어 {lift}"); PUB.log.Add($"[{funcname}-{PUB.sm.RunStepSeq}] 리프트제어 {lift}");
VAR.I32[eVarInt32.RetryLift] += 1; VAR.I32[eVarInt32.RetryLift] += 1;
PUB.AGV.LiftControl(lift); PUB.AGV.LiftControl(lift);

View File

@@ -18,7 +18,7 @@ namespace Project
/// <param name="isFirst"></param> /// <param name="isFirst"></param>
/// <param name="stepTime"></param> /// <param name="stepTime"></param>
/// <returns></returns> /// <returns></returns>
public Boolean _SM_RUN_CHARGE_GOFF(bool isFirst, TimeSpan stepTime) public Boolean _SM_RUN_CHARGE_OFF(bool isFirst, TimeSpan stepTime)
{ {
//충전중인지 확인한다. //충전중인지 확인한다.

View File

@@ -12,7 +12,7 @@ namespace Project
public partial class fMain public partial class fMain
{ {
DateTime tm_gocharge_command = DateTime.Now; DateTime tm_gocharge_command = DateTime.Now;
public Boolean _SM_RUN_CHARGE_GO(bool isFirst, TimeSpan stepTime) public Boolean _SM_RUN_CHARGE_ON(bool isFirst, TimeSpan stepTime)
{ {
var funcname = "GOCHARGE"; var funcname = "GOCHARGE";
if (runStepisFirst) if (runStepisFirst)
@@ -29,7 +29,8 @@ namespace Project
} }
//이미 충전중이라면 바로 완료 처리한다 (사용자 요청) //이미 충전중이라면 바로 완료 처리한다 (사용자 요청)
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true || PUB.AGV.system1.Battery_charging == true || if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true ||
PUB.AGV.system1.Battery_charging == true ||
VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true) VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true)
{ {
SetRunStepError(ENIGProtocol.AGVErrorCode.ALREADY_CHARGE); SetRunStepError(ENIGProtocol.AGVErrorCode.ALREADY_CHARGE);
@@ -37,7 +38,7 @@ namespace Project
} }
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, stepTime) == false) if (_SM_RUN_CHARGE_OFF(isFirst, stepTime) == false)
return false; return false;
@@ -67,12 +68,19 @@ namespace Project
//현재위치가 충전기위치이고 마크센서가 감지되었다면 충전기위치로 인지하고 //현재위치가 충전기위치이고 마크센서가 감지되었다면 충전기위치로 인지하고
//그렇지 못하면 충전위치가 아니라는 오류를 발생한다 //그렇지 못하면 충전위치가 아니라는 오류를 발생한다
var curnode = PUB._virtualAGV.CurrentNode; var curnode = PUB._virtualAGV.CurrentNode;
if (PUB.AGV.signal1.mark_sensor == false || curnode.Id != targetnode.Id) if (curnode.Id != targetnode.Id)
{ {
SetRunStepError(ENIGProtocol.AGVErrorCode.NO_CHARGEPOINT, $"충전기위치가 아니므로 충전을 시작할 수 없습니다(현재위치:{curnode.RfidId})"); SetRunStepError(ENIGProtocol.AGVErrorCode.NO_CHARGEPOINT, $"충전기위치가 아니므로 충전을 시작할 수 없습니다(현재위치:{curnode.RfidId})");
return false; return false;
} }
//마크센서가 들어와있어야한다
if (PUB.AGV.signal1.mark_sensor == false)
{
SetRunStepError(ENIGProtocol.AGVErrorCode.MARK_SENSOR_FAIL, $"충전기위치에서 마크센서가 확인되지 않습니다");
return false;
}
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
return false; return false;
} }

View File

@@ -6,6 +6,7 @@ using System.Text;
using Project.StateMachine; using Project.StateMachine;
using COMM; using COMM;
using AR; using AR;
using AGVNavigationCore.Models;
namespace Project namespace Project
{ {
@@ -20,7 +21,7 @@ namespace Project
var funcname = PUB.sm.RunStep.ToString(); var funcname = PUB.sm.RunStep.ToString();
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, seqTime) == false) return false; if (_SM_RUN_CHARGE_OFF(isFirst, seqTime) == false) return false;
//라이더멈춤이 설정되어있다면 음성으로 알려준다 //라이더멈춤이 설정되어있다면 음성으로 알려준다
if (CheckLiderStop() == false) return false; if (CheckLiderStop() == false) return false;
@@ -78,7 +79,7 @@ namespace Project
else if (PUB.sm.RunStepSeq == idx++) else if (PUB.sm.RunStepSeq == idx++)
{ {
//pick off/on 상관없이 리프트는 내려서 이동한다 //pick off/on 상관없이 리프트는 내려서 이동한다
var liftCmd = arDev.Narumi.LiftCommand.DN; var liftCmd = LiftCommand.DN;
PUB.AGV.LiftControl(liftCmd); PUB.AGV.LiftControl(liftCmd);
VAR.TIME.Update(eVarTime.LastTurnCommandTime); VAR.TIME.Update(eVarTime.LastTurnCommandTime);
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
@@ -109,7 +110,7 @@ namespace Project
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter) if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter)
{ {
VAR.I32[eVarInt32.RetryManget] += 1; VAR.I32[eVarInt32.RetryManget] += 1;
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON); PUB.AGV.LiftControl(LiftCommand.ON);
} }
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
return false; return false;
@@ -249,7 +250,7 @@ namespace Project
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter) if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOffEnter)
{ {
VAR.I32[eVarInt32.RetryManget] += 1; VAR.I32[eVarInt32.RetryManget] += 1;
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF); PUB.AGV.LiftControl(LiftCommand.OFF);
} }
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
return false; return false;

View File

@@ -6,6 +6,7 @@ using System.Text;
using Project.StateMachine; using Project.StateMachine;
using COMM; using COMM;
using AR; using AR;
using AGVNavigationCore.Models;
namespace Project namespace Project
{ {
@@ -20,7 +21,7 @@ namespace Project
var funcname = $"[EXIT-{PUB.sm.RunStep}]"; var funcname = $"[EXIT-{PUB.sm.RunStep}]";
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, seqtime) == false) return false; if (_SM_RUN_CHARGE_OFF(isFirst, seqtime) == false) return false;
//라이더멈춤이 설정되어있다면 음성으로 알려준다 //라이더멈춤이 설정되어있다면 음성으로 알려준다
if (CheckLiderStop() == false) return false; if (CheckLiderStop() == false) return false;
@@ -37,8 +38,8 @@ namespace Project
else if (PUB.sm.RunStepSeq == idx++) else if (PUB.sm.RunStepSeq == idx++)
{ {
//작업형태에 따라서. 리프트를 제어한다. //작업형태에 따라서. 리프트를 제어한다.
var liftCmd = arDev.Narumi.LiftCommand.DN; var liftCmd = LiftCommand.DN;
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit) liftCmd = arDev.Narumi.LiftCommand.UP; if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit) liftCmd = LiftCommand.UP;
VAR.I32[eVarInt32.RetryLift] += 1; VAR.I32[eVarInt32.RetryLift] += 1;
PUB.AGV.LiftControl(liftCmd); PUB.AGV.LiftControl(liftCmd);
PUB.sm.UpdateRunStepSeq(); PUB.sm.UpdateRunStepSeq();
@@ -46,18 +47,18 @@ namespace Project
} }
else if (PUB.sm.RunStepSeq == idx++) else if (PUB.sm.RunStepSeq == idx++)
{ {
var liftCmd = arDev.Narumi.LiftCommand.DN; var liftCmd = LiftCommand.DN;
if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit) liftCmd = arDev.Narumi.LiftCommand.UP; if (PUB.NextWorkCmd == ENIGProtocol.AGVCommandHE.PickOnExit) liftCmd = LiftCommand.UP;
//리프트 센서 확인 //리프트 센서 확인
var liftdnok = (PUB.AGV.signal1.lift_down == true && PUB.AGV.signal1.lift_up == false); var liftdnok = (PUB.AGV.signal1.lift_down == true && PUB.AGV.signal1.lift_up == false);
var liiftupok = (PUB.AGV.signal1.lift_up == true && PUB.AGV.signal1.lift_down == false); var liiftupok = (PUB.AGV.signal1.lift_up == true && PUB.AGV.signal1.lift_down == false);
if (liftCmd == arDev.Narumi.LiftCommand.DN && liftdnok) if (liftCmd == LiftCommand.DN && liftdnok)
{ {
//정상조건 //정상조건
} }
else if (liftCmd == arDev.Narumi.LiftCommand.UP && liftdnok) else if (liftCmd == LiftCommand.UP && liftdnok)
{ {
//정상조건 //정상조건
} }

View File

@@ -20,7 +20,7 @@ namespace Project
var funcname = "_SM_RUN_GOTO"; var funcname = "_SM_RUN_GOTO";
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, seqtime) == false) if (_SM_RUN_CHARGE_OFF(isFirst, seqtime) == false)
return false; return false;
//최초시작이라면 시간변수 초기화 //최초시작이라면 시간변수 초기화

View File

@@ -27,7 +27,7 @@ namespace Project
} }
//충전 상태가 OFF되어야 동작하게한다 //충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHARGE_GOFF(isFirst, stepTime) == false) if (_SM_RUN_CHARGE_OFF(isFirst, stepTime) == false)
return false; return false;
//라이더멈춤이 설정되어있다면 음성으로 알려준다 200409 //라이더멈춤이 설정되어있다면 음성으로 알려준다 200409

View File

@@ -47,7 +47,7 @@ namespace Project
// if (VAR.BOOL[eVarBool.WAIT_COVER_UP]) // if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
// { // {
// PUB.log.Add($"버튼({diName}) 눌림"); // PUB.log.Add($"버튼({diName}) 눌림");
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP); // PUB.AGV.LiftControl(LiftCommand.UP);
// PUB.Result.NextPos = ePosition.QC; // PUB.Result.NextPos = ePosition.QC;
// } // }
// else PUB.Speak(Lang.커버업대기상태가아닙니다); // else PUB.Speak(Lang.커버업대기상태가아닙니다);
@@ -93,7 +93,7 @@ namespace Project
// if (VAR.BOOL[eVarBool.WAIT_COVER_UP]) // if (VAR.BOOL[eVarBool.WAIT_COVER_UP])
// { // {
// PUB.log.Add($"버튼({diName}) 눌림"); // PUB.log.Add($"버튼({diName}) 눌림");
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP); // PUB.AGV.LiftControl(LiftCommand.UP);
// PUB.Result.NextPos = ePosition.QA; // PUB.Result.NextPos = ePosition.QA;
// } // }
// else PUB.Speak(Lang.커버업대기상태가아닙니다); // else PUB.Speak(Lang.커버업대기상태가아닙니다);
@@ -121,7 +121,7 @@ namespace Project
// { // {
// //Z-up기능으로 업데이트 230119 // //Z-up기능으로 업데이트 230119
// PUB.log.Add($"버튼({diName}) 눌림"); // PUB.log.Add($"버튼({diName}) 눌림");
// PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP); // PUB.AGV.LiftControl(LiftCommand.UP);
// } // }
// } // }
// else if (diName == arDev.FakePLC.DIName.PINI_EMG) // else if (diName == arDev.FakePLC.DIName.PINI_EMG)

View File

@@ -75,6 +75,7 @@ namespace Project
PUB._mapCanvas.SetAGVPosition(PUB.setting.MCID, node, PUB._virtualAGV.CurrentDirection); PUB._mapCanvas.SetAGVPosition(PUB.setting.MCID, node, PUB._virtualAGV.CurrentDirection);
PUB._virtualAGV.SetPosition(node, PUB._virtualAGV.CurrentDirection); PUB._virtualAGV.SetPosition(node, PUB._virtualAGV.CurrentDirection);
PUB.SaveLastPosition(); //위치저장 260205
} }
else PUB.log.AddE($"[{logPrefix}-SetCurrent] TagString Value Errorr:{data}"); else PUB.log.AddE($"[{logPrefix}-SetCurrent] TagString Value Errorr:{data}");
} }
@@ -353,25 +354,25 @@ namespace Project
break; break;
case ENIGProtocol.AGVCommandHE.LiftControl: //Lift Control case ENIGProtocol.AGVCommandHE.LiftControl: //Lift Control
var LiftCommand = data[1]; //0=stop, 1=up, 2=down var LiftCommand = (LiftCommand)data[1];
PUB.log.Add($"[{logPrefix}-LiftControl] {LiftCommand}");
arDev.Narumi.LiftCommand LCmd = arDev.Narumi.LiftCommand.STP; PUB.AGV.LiftControl(LiftCommand); //리프트제어
if (LiftCommand == 1) LCmd = arDev.Narumi.LiftCommand.UP;
else if (LiftCommand == 2) LCmd = arDev.Narumi.LiftCommand.DN;
PUB.log.Add($"[{logPrefix}-LiftControl] {LCmd}");
PUB.AGV.LiftControl(LCmd); //리프트제어
break; break;
case ENIGProtocol.AGVCommandHE.ChargeControl: //충전을 제어한다 case ENIGProtocol.AGVCommandHE.ChargeControl: //충전을 제어한다
var chargeAction = data[1] == 1; //0= off, 1=on var chargeAction = data[1] == 1; //0= off, 1=on
//충전시퀀스가 진행되지 않았다면 진행한다 //충전시퀀스가 진행되지 않았다면 진행한다
if (PUB.sm.RunStep == StateMachine.ERunStep.GOCHARGE && PUB.sm.RunStepNew != StateMachine.ERunStep.GOCHARGE) if(chargeAction==true)
{ {
PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOCHARGE); PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOCHARGE);
PUB.log.AddI($"충전을 시작합니다"); PUB.log.AddI($"충전을 시작합니다");
} }
else
{
PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF);
PUB.log.AddI($"충전을 해제 합니다");
}
break; break;
default: default:

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using AGVNavigationCore.Models;
using COMM; using COMM;
namespace Project.ViewForm namespace Project.ViewForm
@@ -170,27 +171,27 @@ namespace Project.ViewForm
private void button14_Click(object sender, EventArgs e) private void button14_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON); PUB.AGV.LiftControl(LiftCommand.ON);
} }
private void button15_Click(object sender, EventArgs e) private void button15_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF); PUB.AGV.LiftControl(LiftCommand.OFF);
} }
private void button11_Click(object sender, EventArgs e) private void button11_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP); PUB.AGV.LiftControl(LiftCommand.UP);
} }
private void button13_Click(object sender, EventArgs e) private void button13_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN); PUB.AGV.LiftControl(LiftCommand.DN);
} }
private void button12_Click(object sender, EventArgs e) private void button12_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP); PUB.AGV.LiftControl(LiftCommand.STP);
} }
private void button17_Click(object sender, EventArgs e) private void button17_Click(object sender, EventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AGVNavigationCore.Models;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -135,28 +136,28 @@ namespace Project.ViewForm
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.UP); PUB.AGV.LiftControl(LiftCommand.UP);
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.STP); PUB.AGV.LiftControl(LiftCommand.STP);
} }
private void button3_Click_1(object sender, EventArgs e) private void button3_Click_1(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.DN); PUB.AGV.LiftControl(LiftCommand.DN);
} }
private void button4_Click(object sender, EventArgs e) private void button4_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON); PUB.AGV.LiftControl(LiftCommand.ON);
} }
private void button5_Click(object sender, EventArgs e) private void button5_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF); PUB.AGV.LiftControl(LiftCommand.OFF);
} }
} }
} }

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using AGVNavigationCore.Models;
using AR; using AR;
using arDev; using arDev;
using COMM; using COMM;
@@ -399,12 +400,12 @@ namespace Project.ViewForm
private void btBack180_Click(object sender, EventArgs e) private void btBack180_Click(object sender, EventArgs e)
{ {
//[STX] C T B 0 0 0 0 9 9 [ETX] //[STX] C T B 0 0 0 0 9 9 [ETX]
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.ON);// (;// (true); PUB.AGV.LiftControl(LiftCommand.ON);// (;// (true);
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
PUB.AGV.LiftControl(arDev.Narumi.LiftCommand.OFF); PUB.AGV.LiftControl(LiftCommand.OFF);
} }
} }
} }

View File

@@ -63,11 +63,11 @@ namespace arDev
Wait = 2, Wait = 2,
Error = 100, Error = 100,
Timeout, Timeout,
} }
public enum eNarmiPBSSensor : byte public enum eNarmiPBSSensor : byte
{ {
notset=0, notset = 0,
on = 1, on = 1,
off = 2 off = 2
} }
@@ -383,9 +383,9 @@ namespace arDev
case eAgvCmd.MoveSet: case eAgvCmd.MoveSet:
cmdString = $"CBR{param}"; cmdString = $"CBR{param}";
retval = AddCommand(cmdString); retval = AddCommand(cmdString);
if(retval == eNarumiCommandResult.Success) if (retval == eNarumiCommandResult.Success)
{ {
if (param.Length > 3) if (param.Length > 3)
{ {

View File

@@ -1,6 +1,5 @@
using System; using System;
using System.Linq; using System.Linq;
using AR;
namespace arDev namespace arDev
{ {

View File

@@ -216,6 +216,78 @@ namespace arDev
EditRoute, EditRoute,
} }
public enum LiftCommand
{
/// <summary>
/// lift up
/// </summary>
UP,
/// <summary>
/// lift down
/// </summary>
DN,
/// <summary>
/// lift 동작 정지
/// </summary>
STP,
/// <summary>
/// magnet holder on
/// </summary>
ON,
/// <summary>
/// magnet holder off
/// </summary>
OFF
}
public enum eflag
{
Emergency = 0,
Overcurrent,
Charger_run_error,
Charger_pos_error,
line_out_error = 4,
/// <summary>
/// 기동시 자석 감지 에러
/// </summary>
runerror_by_no_magent_line = 5,
/// <summary>
/// 호출제어기 통신 오류
/// </summary>
controller_comm_error = 6,
/// <summary>
/// 배터리 저전압
/// </summary>
battery_low_voltage = 7,
spare08 = 8,
lift_timeout = 9,
lift_driver_overcurrent = 10,
lift_driver_emergency = 11,
/// <summary>
/// 도착경보기 통신 오류
/// </summary>
arrive_ctl_comm_error,
/// <summary>
/// 자동문제어기 통신 오류
/// </summary>
door_ctl_comm_error,
/// <summary>
/// 자동충전기 통신 오류
/// </summary>
charger_comm_error,
/// <summary>
/// 교차로 제어기 통신 오류
/// </summary>
cross_ctrl_comm_error,
}
} }
} }

View File

@@ -475,30 +475,7 @@ namespace arDev
Mid, Mid,
Low, Low,
} }
public enum LiftCommand
{
/// <summary>
/// lift up
/// </summary>
UP,
/// <summary>
/// lift down
/// </summary>
DN,
/// <summary>
/// lift 동작 정지
/// </summary>
STP,
/// <summary>
/// magnet holder on
/// </summary>
ON,
/// <summary>
/// magnet holder off
/// </summary>
OFF
}
private bool CheckSum(byte[] bData) private bool CheckSum(byte[] bData)
{ {

View File

@@ -4,7 +4,6 @@ namespace arDev
{ {
public partial class Narumi public partial class Narumi
{ {
public class ErrorFlag public class ErrorFlag
{ {
private COMM.Flag _value { get; set; } = new COMM.Flag(16); private COMM.Flag _value { get; set; } = new COMM.Flag(16);
@@ -16,54 +15,7 @@ namespace arDev
return (UInt16)_value.Value; return (UInt16)_value.Value;
} }
} }
public enum eflag
{
Emergency = 0,
Overcurrent,
Charger_run_error,
Charger_pos_error,
line_out_error = 4,
/// <summary>
/// 기동시 자석 감지 에러
/// </summary>
runerror_by_no_magent_line=5,
/// <summary>
/// 호출제어기 통신 오류
/// </summary>
controller_comm_error =6,
/// <summary>
/// 배터리 저전압
/// </summary>
battery_low_voltage=7,
spare08=8,
lift_timeout=9,
lift_driver_overcurrent=10,
lift_driver_emergency = 11,
/// <summary>
/// 도착경보기 통신 오류
/// </summary>
arrive_ctl_comm_error,
/// <summary>
/// 자동문제어기 통신 오류
/// </summary>
door_ctl_comm_error,
/// <summary>
/// 자동충전기 통신 오류
/// </summary>
charger_comm_error,
/// <summary>
/// 교차로 제어기 통신 오류
/// </summary>
cross_ctrl_comm_error,
}
public bool GetValue(eflag idx) public bool GetValue(eflag idx)
{ {

View File

@@ -15,7 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{530A
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "..\SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "..\SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\..\AGVLogic\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NARUMI", "..\SubProject\AGV\NARUMI.csproj", "{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NARUMI", "..\SubProject\AGV\NARUMI.csproj", "{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}"
EndProject EndProject

View File

@@ -29,7 +29,12 @@ namespace Test_ACS
this.rbAGV2 = new System.Windows.Forms.RadioButton(); this.rbAGV2 = new System.Windows.Forms.RadioButton();
this.rbAGV1 = new System.Windows.Forms.RadioButton(); this.rbAGV1 = new System.Windows.Forms.RadioButton();
this.grpCommands = new System.Windows.Forms.GroupBox(); this.grpCommands = new System.Windows.Forms.GroupBox();
this.button11 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();
this.btnLiftStop = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button(); this.button8 = new System.Windows.Forms.Button();
this.btnLiftDown = new System.Windows.Forms.Button();
this.btnLiftUp = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button(); this.button10 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button(); this.button7 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button(); this.button9 = new System.Windows.Forms.Button();
@@ -50,13 +55,13 @@ namespace Test_ACS
this.radForw = new System.Windows.Forms.RadioButton(); this.radForw = new System.Windows.Forms.RadioButton();
this.radBack = new System.Windows.Forms.RadioButton(); this.radBack = new System.Windows.Forms.RadioButton();
this.btAMove = new System.Windows.Forms.Button(); this.btAMove = new System.Windows.Forms.Button();
this.btnMarkStop = new System.Windows.Forms.Button();
this.grpManual = new System.Windows.Forms.GroupBox(); this.grpManual = new System.Windows.Forms.GroupBox();
this.button5 = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.btnMarkStop = new System.Windows.Forms.Button();
this.btnReset = new System.Windows.Forms.Button(); this.btnReset = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.btnGotoAlias = new System.Windows.Forms.Button(); this.btnGotoAlias = new System.Windows.Forms.Button();
@@ -66,11 +71,6 @@ namespace Test_ACS
this.lblAlias = new System.Windows.Forms.Label(); this.lblAlias = new System.Windows.Forms.Label();
this.txtRFID = new System.Windows.Forms.NumericUpDown(); this.txtRFID = new System.Windows.Forms.NumericUpDown();
this.lblRFID = new System.Windows.Forms.Label(); this.lblRFID = new System.Windows.Forms.Label();
this.grpLift = new System.Windows.Forms.GroupBox();
this.btnLiftStop = new System.Windows.Forms.Button();
this.btnLiftDown = new System.Windows.Forms.Button();
this.btnLiftUp = new System.Windows.Forms.Button();
this.lblDirection = new System.Windows.Forms.Label();
this.grpLogs = new System.Windows.Forms.GroupBox(); this.grpLogs = new System.Windows.Forms.GroupBox();
this.tabLogs = new System.Windows.Forms.TabControl(); this.tabLogs = new System.Windows.Forms.TabControl();
this.tabRX = new System.Windows.Forms.TabPage(); this.tabRX = new System.Windows.Forms.TabPage();
@@ -84,22 +84,10 @@ namespace Test_ACS
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.grpAGVStatus = new System.Windows.Forms.GroupBox(); this.grpAGVStatus = new System.Windows.Forms.GroupBox();
this.lblLastTagValue = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.lblLastTag = new System.Windows.Forms.Label(); this.rtStatus = new System.Windows.Forms.TextBox();
this.lblLiftStValue = new System.Windows.Forms.Label(); this.tbErCode = new System.Windows.Forms.TextBox();
this.lblLiftSt = new System.Windows.Forms.Label(); this.tbErmsg = new System.Windows.Forms.TextBox();
this.lblCartStValue = new System.Windows.Forms.Label();
this.lblCartSt = new System.Windows.Forms.Label();
this.lblChargeStValue = new System.Windows.Forms.Label();
this.lblChargeSt = new System.Windows.Forms.Label();
this.lblInpositionValue = new System.Windows.Forms.Label();
this.lblInposition = new System.Windows.Forms.Label();
this.lblDirectionValue = new System.Windows.Forms.Label();
this.lblRunStValue = new System.Windows.Forms.Label();
this.lblRunSt = new System.Windows.Forms.Label();
this.lblModeValue = new System.Windows.Forms.Label();
this.lblMode = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.grpConnection.SuspendLayout(); this.grpConnection.SuspendLayout();
this.grpAGV.SuspendLayout(); this.grpAGV.SuspendLayout();
this.grpCommands.SuspendLayout(); this.grpCommands.SuspendLayout();
@@ -110,7 +98,6 @@ namespace Test_ACS
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.grpManual.SuspendLayout(); this.grpManual.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtRFID)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtRFID)).BeginInit();
this.grpLift.SuspendLayout();
this.grpLogs.SuspendLayout(); this.grpLogs.SuspendLayout();
this.tabLogs.SuspendLayout(); this.tabLogs.SuspendLayout();
this.tabRX.SuspendLayout(); this.tabRX.SuspendLayout();
@@ -118,7 +105,7 @@ namespace Test_ACS
this.tabInfo.SuspendLayout(); this.tabInfo.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.grpAGVStatus.SuspendLayout(); this.grpAGVStatus.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout(); this.groupBox3.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// grpConnection // grpConnection
@@ -231,7 +218,12 @@ namespace Test_ACS
// //
// grpCommands // grpCommands
// //
this.grpCommands.Controls.Add(this.button11);
this.grpCommands.Controls.Add(this.button12);
this.grpCommands.Controls.Add(this.btnLiftStop);
this.grpCommands.Controls.Add(this.button8); this.grpCommands.Controls.Add(this.button8);
this.grpCommands.Controls.Add(this.btnLiftDown);
this.grpCommands.Controls.Add(this.btnLiftUp);
this.grpCommands.Controls.Add(this.button10); this.grpCommands.Controls.Add(this.button10);
this.grpCommands.Controls.Add(this.button7); this.grpCommands.Controls.Add(this.button7);
this.grpCommands.Controls.Add(this.button9); this.grpCommands.Controls.Add(this.button9);
@@ -249,11 +241,41 @@ namespace Test_ACS
this.grpCommands.Controls.Add(this.lblRFID); this.grpCommands.Controls.Add(this.lblRFID);
this.grpCommands.Location = new System.Drawing.Point(12, 98); this.grpCommands.Location = new System.Drawing.Point(12, 98);
this.grpCommands.Name = "grpCommands"; this.grpCommands.Name = "grpCommands";
this.grpCommands.Size = new System.Drawing.Size(433, 307); this.grpCommands.Size = new System.Drawing.Size(535, 307);
this.grpCommands.TabIndex = 2; this.grpCommands.TabIndex = 2;
this.grpCommands.TabStop = false; this.grpCommands.TabStop = false;
this.grpCommands.Text = "ACS 명령"; this.grpCommands.Text = "ACS 명령";
// //
// button11
//
this.button11.Location = new System.Drawing.Point(431, 198);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(100, 43);
this.button11.TabIndex = 18;
this.button11.Text = "전자석 OFF";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// button12
//
this.button12.Location = new System.Drawing.Point(431, 153);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(100, 43);
this.button12.TabIndex = 17;
this.button12.Text = "전자석 ON";
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// btnLiftStop
//
this.btnLiftStop.Location = new System.Drawing.Point(431, 108);
this.btnLiftStop.Name = "btnLiftStop";
this.btnLiftStop.Size = new System.Drawing.Size(100, 43);
this.btnLiftStop.TabIndex = 2;
this.btnLiftStop.Text = "리프트 정지";
this.btnLiftStop.UseVisualStyleBackColor = true;
this.btnLiftStop.Click += new System.EventHandler(this.btnLiftStop_Click);
//
// button8 // button8
// //
this.button8.Location = new System.Drawing.Point(102, 264); this.button8.Location = new System.Drawing.Point(102, 264);
@@ -264,6 +286,26 @@ namespace Test_ACS
this.button8.UseVisualStyleBackColor = true; this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click); this.button8.Click += new System.EventHandler(this.button8_Click);
// //
// btnLiftDown
//
this.btnLiftDown.Location = new System.Drawing.Point(431, 63);
this.btnLiftDown.Name = "btnLiftDown";
this.btnLiftDown.Size = new System.Drawing.Size(100, 43);
this.btnLiftDown.TabIndex = 1;
this.btnLiftDown.Text = "리프트 DN";
this.btnLiftDown.UseVisualStyleBackColor = true;
this.btnLiftDown.Click += new System.EventHandler(this.btnLiftDown_Click);
//
// btnLiftUp
//
this.btnLiftUp.Location = new System.Drawing.Point(431, 18);
this.btnLiftUp.Name = "btnLiftUp";
this.btnLiftUp.Size = new System.Drawing.Size(100, 43);
this.btnLiftUp.TabIndex = 0;
this.btnLiftUp.Text = "리프트 UP";
this.btnLiftUp.UseVisualStyleBackColor = true;
this.btnLiftUp.Click += new System.EventHandler(this.btnLiftUp_Click);
//
// button10 // button10
// //
this.button10.Location = new System.Drawing.Point(102, 229); this.button10.Location = new System.Drawing.Point(102, 229);
@@ -310,6 +352,7 @@ namespace Test_ACS
// radSpdL // radSpdL
// //
this.radSpdL.AutoSize = true; this.radSpdL.AutoSize = true;
this.radSpdL.Checked = true;
this.radSpdL.Location = new System.Drawing.Point(9, 20); this.radSpdL.Location = new System.Drawing.Point(9, 20);
this.radSpdL.Name = "radSpdL"; this.radSpdL.Name = "radSpdL";
this.radSpdL.Size = new System.Drawing.Size(30, 16); this.radSpdL.Size = new System.Drawing.Size(30, 16);
@@ -326,7 +369,6 @@ namespace Test_ACS
this.radSpdM.Name = "radSpdM"; this.radSpdM.Name = "radSpdM";
this.radSpdM.Size = new System.Drawing.Size(34, 16); this.radSpdM.Size = new System.Drawing.Size(34, 16);
this.radSpdM.TabIndex = 7; this.radSpdM.TabIndex = 7;
this.radSpdM.TabStop = true;
this.radSpdM.Tag = "1"; this.radSpdM.Tag = "1";
this.radSpdM.Text = "M"; this.radSpdM.Text = "M";
this.radSpdM.UseVisualStyleBackColor = true; this.radSpdM.UseVisualStyleBackColor = true;
@@ -338,7 +380,6 @@ namespace Test_ACS
this.radSpdH.Name = "radSpdH"; this.radSpdH.Name = "radSpdH";
this.radSpdH.Size = new System.Drawing.Size(31, 16); this.radSpdH.Size = new System.Drawing.Size(31, 16);
this.radSpdH.TabIndex = 7; this.radSpdH.TabIndex = 7;
this.radSpdH.TabStop = true;
this.radSpdH.Tag = "2"; this.radSpdH.Tag = "2";
this.radSpdH.Text = "H"; this.radSpdH.Text = "H";
this.radSpdH.UseVisualStyleBackColor = true; this.radSpdH.UseVisualStyleBackColor = true;
@@ -417,13 +458,13 @@ namespace Test_ACS
this.radRight.Name = "radRight"; this.radRight.Name = "radRight";
this.radRight.Size = new System.Drawing.Size(31, 16); this.radRight.Size = new System.Drawing.Size(31, 16);
this.radRight.TabIndex = 1; this.radRight.TabIndex = 1;
this.radRight.TabStop = true;
this.radRight.Text = "R"; this.radRight.Text = "R";
this.radRight.UseVisualStyleBackColor = true; this.radRight.UseVisualStyleBackColor = true;
// //
// radLeft // radLeft
// //
this.radLeft.AutoSize = true; this.radLeft.AutoSize = true;
this.radLeft.Checked = true;
this.radLeft.Location = new System.Drawing.Point(51, 9); this.radLeft.Location = new System.Drawing.Point(51, 9);
this.radLeft.Name = "radLeft"; this.radLeft.Name = "radLeft";
this.radLeft.Size = new System.Drawing.Size(30, 16); this.radLeft.Size = new System.Drawing.Size(30, 16);
@@ -439,7 +480,6 @@ namespace Test_ACS
this.radStraight.Name = "radStraight"; this.radStraight.Name = "radStraight";
this.radStraight.Size = new System.Drawing.Size(31, 16); this.radStraight.Size = new System.Drawing.Size(31, 16);
this.radStraight.TabIndex = 0; this.radStraight.TabIndex = 0;
this.radStraight.TabStop = true;
this.radStraight.Text = "S"; this.radStraight.Text = "S";
this.radStraight.UseVisualStyleBackColor = true; this.radStraight.UseVisualStyleBackColor = true;
// //
@@ -459,13 +499,13 @@ namespace Test_ACS
this.radForw.Name = "radForw"; this.radForw.Name = "radForw";
this.radForw.Size = new System.Drawing.Size(30, 16); this.radForw.Size = new System.Drawing.Size(30, 16);
this.radForw.TabIndex = 0; this.radForw.TabIndex = 0;
this.radForw.TabStop = true;
this.radForw.Text = "F"; this.radForw.Text = "F";
this.radForw.UseVisualStyleBackColor = true; this.radForw.UseVisualStyleBackColor = true;
// //
// radBack // radBack
// //
this.radBack.AutoSize = true; this.radBack.AutoSize = true;
this.radBack.Checked = true;
this.radBack.Location = new System.Drawing.Point(12, 9); this.radBack.Location = new System.Drawing.Point(12, 9);
this.radBack.Name = "radBack"; this.radBack.Name = "radBack";
this.radBack.Size = new System.Drawing.Size(31, 16); this.radBack.Size = new System.Drawing.Size(31, 16);
@@ -484,6 +524,16 @@ namespace Test_ACS
this.btAMove.UseVisualStyleBackColor = true; this.btAMove.UseVisualStyleBackColor = true;
this.btAMove.Click += new System.EventHandler(this.btAMove_Click); this.btAMove.Click += new System.EventHandler(this.btAMove_Click);
// //
// btnMarkStop
//
this.btnMarkStop.Location = new System.Drawing.Point(10, 137);
this.btnMarkStop.Name = "btnMarkStop";
this.btnMarkStop.Size = new System.Drawing.Size(139, 40);
this.btnMarkStop.TabIndex = 6;
this.btnMarkStop.Text = "마크 정지";
this.btnMarkStop.UseVisualStyleBackColor = true;
this.btnMarkStop.Click += new System.EventHandler(this.btnMarkStop_Click);
//
// grpManual // grpManual
// //
this.grpManual.Controls.Add(this.button5); this.grpManual.Controls.Add(this.button5);
@@ -553,16 +603,6 @@ namespace Test_ACS
this.button1.UseVisualStyleBackColor = true; this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.btnManual_Click); this.button1.Click += new System.EventHandler(this.btnManual_Click);
// //
// btnMarkStop
//
this.btnMarkStop.Location = new System.Drawing.Point(10, 137);
this.btnMarkStop.Name = "btnMarkStop";
this.btnMarkStop.Size = new System.Drawing.Size(139, 40);
this.btnMarkStop.TabIndex = 6;
this.btnMarkStop.Text = "마크 정지";
this.btnMarkStop.UseVisualStyleBackColor = true;
this.btnMarkStop.Click += new System.EventHandler(this.btnMarkStop_Click);
//
// btnReset // btnReset
// //
this.btnReset.Location = new System.Drawing.Point(193, 81); this.btnReset.Location = new System.Drawing.Point(193, 81);
@@ -662,62 +702,10 @@ namespace Test_ACS
this.lblRFID.TabIndex = 0; this.lblRFID.TabIndex = 0;
this.lblRFID.Text = "RFID 번호:"; this.lblRFID.Text = "RFID 번호:";
// //
// grpLift
//
this.grpLift.Controls.Add(this.tableLayoutPanel2);
this.grpLift.Location = new System.Drawing.Point(12, 535);
this.grpLift.Name = "grpLift";
this.grpLift.Size = new System.Drawing.Size(433, 79);
this.grpLift.TabIndex = 9;
this.grpLift.TabStop = false;
this.grpLift.Text = "리프트 제어";
//
// btnLiftStop
//
this.btnLiftStop.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftStop.Location = new System.Drawing.Point(287, 3);
this.btnLiftStop.Name = "btnLiftStop";
this.btnLiftStop.Size = new System.Drawing.Size(137, 53);
this.btnLiftStop.TabIndex = 2;
this.btnLiftStop.Text = "정지";
this.btnLiftStop.UseVisualStyleBackColor = true;
this.btnLiftStop.Click += new System.EventHandler(this.btnLiftStop_Click);
//
// btnLiftDown
//
this.btnLiftDown.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftDown.Location = new System.Drawing.Point(145, 3);
this.btnLiftDown.Name = "btnLiftDown";
this.btnLiftDown.Size = new System.Drawing.Size(136, 53);
this.btnLiftDown.TabIndex = 1;
this.btnLiftDown.Text = "하강";
this.btnLiftDown.UseVisualStyleBackColor = true;
this.btnLiftDown.Click += new System.EventHandler(this.btnLiftDown_Click);
//
// btnLiftUp
//
this.btnLiftUp.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnLiftUp.Location = new System.Drawing.Point(3, 3);
this.btnLiftUp.Name = "btnLiftUp";
this.btnLiftUp.Size = new System.Drawing.Size(136, 53);
this.btnLiftUp.TabIndex = 0;
this.btnLiftUp.Text = "상승";
this.btnLiftUp.UseVisualStyleBackColor = true;
this.btnLiftUp.Click += new System.EventHandler(this.btnLiftUp_Click);
//
// lblDirection
//
this.lblDirection.AutoSize = true;
this.lblDirection.Location = new System.Drawing.Point(10, 48);
this.lblDirection.Name = "lblDirection";
this.lblDirection.Size = new System.Drawing.Size(33, 12);
this.lblDirection.TabIndex = 4;
this.lblDirection.Text = "방향:";
//
// grpLogs // grpLogs
// //
this.grpLogs.Controls.Add(this.tabLogs); this.grpLogs.Controls.Add(this.tabLogs);
this.grpLogs.Location = new System.Drawing.Point(451, 12); this.grpLogs.Location = new System.Drawing.Point(553, 12);
this.grpLogs.Name = "grpLogs"; this.grpLogs.Name = "grpLogs";
this.grpLogs.Size = new System.Drawing.Size(520, 602); this.grpLogs.Size = new System.Drawing.Size(520, 602);
this.grpLogs.TabIndex = 3; this.grpLogs.TabIndex = 3;
@@ -816,7 +804,7 @@ namespace Test_ACS
this.tabInfo.Controls.Add(this.txtInfoLog); this.tabInfo.Controls.Add(this.txtInfoLog);
this.tabInfo.Location = new System.Drawing.Point(4, 22); this.tabInfo.Location = new System.Drawing.Point(4, 22);
this.tabInfo.Name = "tabInfo"; this.tabInfo.Name = "tabInfo";
this.tabInfo.Size = new System.Drawing.Size(506, 518); this.tabInfo.Size = new System.Drawing.Size(506, 556);
this.tabInfo.TabIndex = 2; this.tabInfo.TabIndex = 2;
this.tabInfo.Text = "정보"; this.tabInfo.Text = "정보";
this.tabInfo.UseVisualStyleBackColor = true; this.tabInfo.UseVisualStyleBackColor = true;
@@ -830,7 +818,7 @@ namespace Test_ACS
this.txtInfoLog.Name = "txtInfoLog"; this.txtInfoLog.Name = "txtInfoLog";
this.txtInfoLog.ReadOnly = true; this.txtInfoLog.ReadOnly = true;
this.txtInfoLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtInfoLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtInfoLog.Size = new System.Drawing.Size(506, 518); this.txtInfoLog.Size = new System.Drawing.Size(506, 556);
this.txtInfoLog.TabIndex = 0; this.txtInfoLog.TabIndex = 0;
// //
// tabPage1 // tabPage1
@@ -838,7 +826,7 @@ namespace Test_ACS
this.tabPage1.Controls.Add(this.richTextBox1); this.tabPage1.Controls.Add(this.richTextBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(506, 518); this.tabPage1.Size = new System.Drawing.Size(506, 556);
this.tabPage1.TabIndex = 3; this.tabPage1.TabIndex = 3;
this.tabPage1.Text = "프레임구조"; this.tabPage1.Text = "프레임구조";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
@@ -851,201 +839,63 @@ namespace Test_ACS
this.richTextBox1.Location = new System.Drawing.Point(0, 0); this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Margin = new System.Windows.Forms.Padding(10); this.richTextBox1.Margin = new System.Windows.Forms.Padding(10);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(506, 518); this.richTextBox1.Size = new System.Drawing.Size(506, 556);
this.richTextBox1.TabIndex = 0; this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = resources.GetString("richTextBox1.Text"); this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
// //
// grpAGVStatus // grpAGVStatus
// //
this.grpAGVStatus.Controls.Add(this.lblLastTagValue); this.grpAGVStatus.Controls.Add(this.rtStatus);
this.grpAGVStatus.Controls.Add(this.lblLastTag);
this.grpAGVStatus.Controls.Add(this.lblLiftStValue);
this.grpAGVStatus.Controls.Add(this.lblLiftSt);
this.grpAGVStatus.Controls.Add(this.lblCartStValue);
this.grpAGVStatus.Controls.Add(this.lblCartSt);
this.grpAGVStatus.Controls.Add(this.lblChargeStValue);
this.grpAGVStatus.Controls.Add(this.lblChargeSt);
this.grpAGVStatus.Controls.Add(this.lblInpositionValue);
this.grpAGVStatus.Controls.Add(this.lblInposition);
this.grpAGVStatus.Controls.Add(this.lblDirectionValue);
this.grpAGVStatus.Controls.Add(this.lblDirection);
this.grpAGVStatus.Controls.Add(this.lblRunStValue);
this.grpAGVStatus.Controls.Add(this.lblRunSt);
this.grpAGVStatus.Controls.Add(this.lblModeValue);
this.grpAGVStatus.Controls.Add(this.lblMode);
this.grpAGVStatus.Location = new System.Drawing.Point(12, 409); this.grpAGVStatus.Location = new System.Drawing.Point(12, 409);
this.grpAGVStatus.Name = "grpAGVStatus"; this.grpAGVStatus.Name = "grpAGVStatus";
this.grpAGVStatus.Size = new System.Drawing.Size(433, 120); this.grpAGVStatus.Size = new System.Drawing.Size(535, 120);
this.grpAGVStatus.TabIndex = 4; this.grpAGVStatus.TabIndex = 4;
this.grpAGVStatus.TabStop = false; this.grpAGVStatus.TabStop = false;
this.grpAGVStatus.Text = "AGV 상태"; this.grpAGVStatus.Text = "AGV 상태";
// //
// lblLastTagValue // groupBox3
// //
this.lblLastTagValue.AutoSize = true; this.groupBox3.Controls.Add(this.tbErCode);
this.lblLastTagValue.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold); this.groupBox3.Controls.Add(this.tbErmsg);
this.lblLastTagValue.Location = new System.Drawing.Point(221, 98); this.groupBox3.Location = new System.Drawing.Point(12, 535);
this.lblLastTagValue.Name = "lblLastTagValue"; this.groupBox3.Name = "groupBox3";
this.lblLastTagValue.Size = new System.Drawing.Size(14, 14); this.groupBox3.Size = new System.Drawing.Size(535, 79);
this.lblLastTagValue.TabIndex = 15; this.groupBox3.TabIndex = 16;
this.lblLastTagValue.Text = "-"; this.groupBox3.TabStop = false;
this.groupBox3.Text = "Error 상태";
// //
// lblLastTag // rtStatus
// //
this.lblLastTag.AutoSize = true; this.rtStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblLastTag.Location = new System.Drawing.Point(151, 98); this.rtStatus.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLastTag.Name = "lblLastTag"; this.rtStatus.Location = new System.Drawing.Point(3, 17);
this.lblLastTag.Size = new System.Drawing.Size(57, 12); this.rtStatus.Multiline = true;
this.lblLastTag.TabIndex = 14; this.rtStatus.Name = "rtStatus";
this.lblLastTag.Text = "현재태그:"; this.rtStatus.ReadOnly = true;
this.rtStatus.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.rtStatus.Size = new System.Drawing.Size(529, 100);
this.rtStatus.TabIndex = 1;
// //
// lblLiftStValue // tbErCode
// //
this.lblLiftStValue.AutoSize = true; this.tbErCode.Location = new System.Drawing.Point(6, 20);
this.lblLiftStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold); this.tbErCode.Name = "tbErCode";
this.lblLiftStValue.Location = new System.Drawing.Point(80, 98); this.tbErCode.Size = new System.Drawing.Size(523, 21);
this.lblLiftStValue.Name = "lblLiftStValue"; this.tbErCode.TabIndex = 3;
this.lblLiftStValue.Size = new System.Drawing.Size(12, 12);
this.lblLiftStValue.TabIndex = 13;
this.lblLiftStValue.Text = "-";
// //
// lblLiftSt // tbErmsg
// //
this.lblLiftSt.AutoSize = true; this.tbErmsg.Location = new System.Drawing.Point(7, 47);
this.lblLiftSt.Location = new System.Drawing.Point(10, 98); this.tbErmsg.Name = "tbErmsg";
this.lblLiftSt.Name = "lblLiftSt"; this.tbErmsg.Size = new System.Drawing.Size(523, 21);
this.lblLiftSt.Size = new System.Drawing.Size(45, 12); this.tbErmsg.TabIndex = 2;
this.lblLiftSt.TabIndex = 12;
this.lblLiftSt.Text = "리프트:";
//
// lblCartStValue
//
this.lblCartStValue.AutoSize = true;
this.lblCartStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblCartStValue.Location = new System.Drawing.Point(221, 73);
this.lblCartStValue.Name = "lblCartStValue";
this.lblCartStValue.Size = new System.Drawing.Size(12, 12);
this.lblCartStValue.TabIndex = 11;
this.lblCartStValue.Text = "-";
//
// lblCartSt
//
this.lblCartSt.AutoSize = true;
this.lblCartSt.Location = new System.Drawing.Point(151, 73);
this.lblCartSt.Name = "lblCartSt";
this.lblCartSt.Size = new System.Drawing.Size(33, 12);
this.lblCartSt.TabIndex = 10;
this.lblCartSt.Text = "카트:";
//
// lblChargeStValue
//
this.lblChargeStValue.AutoSize = true;
this.lblChargeStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblChargeStValue.Location = new System.Drawing.Point(80, 73);
this.lblChargeStValue.Name = "lblChargeStValue";
this.lblChargeStValue.Size = new System.Drawing.Size(12, 12);
this.lblChargeStValue.TabIndex = 9;
this.lblChargeStValue.Text = "-";
//
// lblChargeSt
//
this.lblChargeSt.AutoSize = true;
this.lblChargeSt.Location = new System.Drawing.Point(10, 73);
this.lblChargeSt.Name = "lblChargeSt";
this.lblChargeSt.Size = new System.Drawing.Size(33, 12);
this.lblChargeSt.TabIndex = 8;
this.lblChargeSt.Text = "충전:";
//
// lblInpositionValue
//
this.lblInpositionValue.AutoSize = true;
this.lblInpositionValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblInpositionValue.Location = new System.Drawing.Point(221, 48);
this.lblInpositionValue.Name = "lblInpositionValue";
this.lblInpositionValue.Size = new System.Drawing.Size(12, 12);
this.lblInpositionValue.TabIndex = 7;
this.lblInpositionValue.Text = "-";
//
// lblInposition
//
this.lblInposition.AutoSize = true;
this.lblInposition.Location = new System.Drawing.Point(151, 48);
this.lblInposition.Name = "lblInposition";
this.lblInposition.Size = new System.Drawing.Size(57, 12);
this.lblInposition.TabIndex = 6;
this.lblInposition.Text = "도달완료:";
//
// lblDirectionValue
//
this.lblDirectionValue.AutoSize = true;
this.lblDirectionValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblDirectionValue.Location = new System.Drawing.Point(80, 48);
this.lblDirectionValue.Name = "lblDirectionValue";
this.lblDirectionValue.Size = new System.Drawing.Size(12, 12);
this.lblDirectionValue.TabIndex = 5;
this.lblDirectionValue.Text = "-";
//
// lblRunStValue
//
this.lblRunStValue.AutoSize = true;
this.lblRunStValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblRunStValue.Location = new System.Drawing.Point(221, 23);
this.lblRunStValue.Name = "lblRunStValue";
this.lblRunStValue.Size = new System.Drawing.Size(12, 12);
this.lblRunStValue.TabIndex = 3;
this.lblRunStValue.Text = "-";
//
// lblRunSt
//
this.lblRunSt.AutoSize = true;
this.lblRunSt.Location = new System.Drawing.Point(151, 23);
this.lblRunSt.Name = "lblRunSt";
this.lblRunSt.Size = new System.Drawing.Size(57, 12);
this.lblRunSt.TabIndex = 2;
this.lblRunSt.Text = "실행상태:";
//
// lblModeValue
//
this.lblModeValue.AutoSize = true;
this.lblModeValue.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold);
this.lblModeValue.Location = new System.Drawing.Point(80, 23);
this.lblModeValue.Name = "lblModeValue";
this.lblModeValue.Size = new System.Drawing.Size(12, 12);
this.lblModeValue.TabIndex = 1;
this.lblModeValue.Text = "-";
//
// lblMode
//
this.lblMode.AutoSize = true;
this.lblMode.Location = new System.Drawing.Point(10, 23);
this.lblMode.Name = "lblMode";
this.lblMode.Size = new System.Drawing.Size(33, 12);
this.lblMode.TabIndex = 0;
this.lblMode.Text = "모드:";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel2.Controls.Add(this.btnLiftStop, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.btnLiftUp, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.btnLiftDown, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(427, 59);
this.tableLayoutPanel2.TabIndex = 0;
// //
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(979, 621); this.ClientSize = new System.Drawing.Size(1083, 621);
this.Controls.Add(this.grpLift); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.grpAGVStatus); this.Controls.Add(this.grpAGVStatus);
this.Controls.Add(this.grpLogs); this.Controls.Add(this.grpLogs);
this.Controls.Add(this.grpCommands); this.Controls.Add(this.grpCommands);
@@ -1073,7 +923,6 @@ namespace Test_ACS
this.panel1.PerformLayout(); this.panel1.PerformLayout();
this.grpManual.ResumeLayout(false); this.grpManual.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtRFID)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtRFID)).EndInit();
this.grpLift.ResumeLayout(false);
this.grpLogs.ResumeLayout(false); this.grpLogs.ResumeLayout(false);
this.tabLogs.ResumeLayout(false); this.tabLogs.ResumeLayout(false);
this.tabRX.ResumeLayout(false); this.tabRX.ResumeLayout(false);
@@ -1084,7 +933,8 @@ namespace Test_ACS
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.grpAGVStatus.ResumeLayout(false); this.grpAGVStatus.ResumeLayout(false);
this.grpAGVStatus.PerformLayout(); this.grpAGVStatus.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -1109,7 +959,6 @@ namespace Test_ACS
private System.Windows.Forms.Button btnReset; private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.Button btnMarkStop; private System.Windows.Forms.Button btnMarkStop;
private System.Windows.Forms.GroupBox grpManual; private System.Windows.Forms.GroupBox grpManual;
private System.Windows.Forms.GroupBox grpLift;
private System.Windows.Forms.Button btnLiftStop; private System.Windows.Forms.Button btnLiftStop;
private System.Windows.Forms.Button btnLiftDown; private System.Windows.Forms.Button btnLiftDown;
private System.Windows.Forms.Button btnLiftUp; private System.Windows.Forms.Button btnLiftUp;
@@ -1125,22 +974,6 @@ namespace Test_ACS
private System.Windows.Forms.TextBox txtAlias; private System.Windows.Forms.TextBox txtAlias;
private System.Windows.Forms.Label lblAlias; private System.Windows.Forms.Label lblAlias;
private System.Windows.Forms.GroupBox grpAGVStatus; private System.Windows.Forms.GroupBox grpAGVStatus;
private System.Windows.Forms.Label lblLastTagValue;
private System.Windows.Forms.Label lblLastTag;
private System.Windows.Forms.Label lblLiftStValue;
private System.Windows.Forms.Label lblLiftSt;
private System.Windows.Forms.Label lblCartStValue;
private System.Windows.Forms.Label lblCartSt;
private System.Windows.Forms.Label lblChargeStValue;
private System.Windows.Forms.Label lblChargeSt;
private System.Windows.Forms.Label lblInpositionValue;
private System.Windows.Forms.Label lblInposition;
private System.Windows.Forms.Label lblDirectionValue;
private System.Windows.Forms.Label lblDirection;
private System.Windows.Forms.Label lblRunStValue;
private System.Windows.Forms.Label lblRunSt;
private System.Windows.Forms.Label lblModeValue;
private System.Windows.Forms.Label lblMode;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
@@ -1172,6 +1005,11 @@ namespace Test_ACS
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.RadioButton radLidarOff; private System.Windows.Forms.RadioButton radLidarOff;
private System.Windows.Forms.RadioButton radLidarOn; private System.Windows.Forms.RadioButton radLidarOn;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox rtStatus;
private System.Windows.Forms.TextBox tbErCode;
private System.Windows.Forms.TextBox tbErmsg;
} }
} }

View File

@@ -55,16 +55,35 @@ namespace Test_ACS
// AGV 상태 수신 처리 (cmd = 3) // AGV 상태 수신 처리 (cmd = 3)
var device = e.ReceivedPacket.ID; var device = e.ReceivedPacket.ID;
var command = (ENIGProtocol.AGVCommandEH)e.ReceivedPacket.Command; var command = (ENIGProtocol.AGVCommandEH)e.ReceivedPacket.Command;
var data = e.ReceivedPacket.Data;
switch (command) switch (command)
{ {
case AGVCommandEH.Status: case AGVCommandEH.Status:
UpdateAGVStatus(e.ReceivedPacket.Data); _remoteStatus.Mode = data[0];
_remoteStatus.RunSt = data[1];
_remoteStatus.HWError = BitConverter.ToUInt16(data, 2);
_remoteStatus.RunStep = data[4];
_remoteStatus.RunStepSeq = data[5];
_remoteStatus.MotorDir = data[6];
_remoteStatus.MagnetDir = data[7];
_remoteStatus.ChargeSt = data[8];
_remoteStatus.CartSt = data[9];
_remoteStatus.LiftSt = data[10];
_remoteStatus.ErrorCode = data[11];
_remoteErrorCode = (ENIGProtocol.AGVErrorCode)data[11];
_remoteErrorMessage = ENIGProtocol.AGVUtility.GetAGVErrorMessage(_remoteErrorCode);
_remoteStatus.LastTag = Encoding.ASCII.GetString(data, 12, 4);
UpdateUIStatus();
break; break;
case AGVCommandEH.Error: case AGVCommandEH.Error:
var errorcode = (AGVErrorCode)e.ReceivedPacket.Data[0];
var errorMessage = System.Text.Encoding.UTF8.GetString(e.ReceivedPacket.Data, 1, e.ReceivedPacket.Data.Length - 1); _remoteErrorCode = (ENIGProtocol.AGVErrorCode)data[0];
AddLog($"Error Received : {errorcode} ID:{e.ReceivedPacket.ID} MSG:{errorMessage}", LogType.Info); // _remoteErrorMessage = ... Error 메시지 자체는 패킷에 포함되지 않으므로 유틸리티 사용 가능
_remoteErrorMessage = ENIGProtocol.AGVUtility.GetAGVErrorMessage(_remoteErrorCode);
UpdateUIStatus();
AddLog($"Error Received : {_remoteErrorCode} ID:{e.ReceivedPacket.ID} MSG:{_remoteErrorMessage}", LogType.Info);
break; break;
default: default:
AddLog($"unknown command:{command}", LogType.Error); AddLog($"unknown command:{command}", LogType.Error);
@@ -305,20 +324,21 @@ namespace Test_ACS
private void btnLiftUp_Click(object sender, EventArgs e) private void btnLiftUp_Click(object sender, EventArgs e)
{ {
SendLiftCommand(1); // Up SendLiftCommand( arDev.Narumi.LiftCommand.UP); // Up
} }
private void btnLiftDown_Click(object sender, EventArgs e) private void btnLiftDown_Click(object sender, EventArgs e)
{ {
SendLiftCommand(2); // Down SendLiftCommand( arDev.Narumi.LiftCommand.DN); // Down
} }
private void btnLiftStop_Click(object sender, EventArgs e) private void btnLiftStop_Click(object sender, EventArgs e)
{ {
SendLiftCommand(0); // Stop SendLiftCommand( arDev.Narumi.LiftCommand.STP); // Stop
} }
private void SendLiftCommand(byte liftCmd)
private void SendLiftCommand(arDev.Narumi.LiftCommand liftCmd)
{ {
// LiftControl: data = TargetID(2 hex) + LiftCommand(1 byte) // LiftControl: data = TargetID(2 hex) + LiftCommand(1 byte)
var targetID = selectedAGV.ToString("X2"); var targetID = selectedAGV.ToString("X2");
@@ -372,124 +392,56 @@ namespace Test_ACS
AddLog($"전송 실패: {ex.Message}", LogType.Error); AddLog($"전송 실패: {ex.Message}", LogType.Error);
} }
} }
public ENIGProtocol.AGVErrorCode _remoteErrorCode = ENIGProtocol.AGVErrorCode.None;
private void UpdateAGVStatus(byte[] data) public string _remoteErrorMessage = "";
public RemoteStatus _remoteStatus = new RemoteStatus();
private void UpdateUIStatus()
{ {
if (data.Length < 12) if (this.InvokeRequired)
{ {
AddLog($"AGV 상태 데이터 길이 오류: {data.Length} bytes", LogType.Error); this.BeginInvoke(new Action(UpdateUIStatus));
return;
}
if (InvokeRequired)
{
BeginInvoke(new Action(() => UpdateAGVStatus(data)));
return; return;
} }
try try
{ {
// Mode[1]: 0=manual, 1=auto
lblModeValue.Text = data[0] == 0 ? "수동" : "자동";
lblModeValue.ForeColor = data[0] == 0 ? Color.Blue : Color.Green;
// RunSt[1]: 0=stop, 1=run, 2=error rtStatus.Text = _remoteStatus.ToString();
switch (data[1])
string errCode = _remoteErrorCode.ToString();
string errMsg = _remoteErrorMessage;
if (_remoteStatus.HWError > 0)
{ {
case 0: errCode = $"HW:{_remoteStatus.HWError:X4}" + (errCode == "None" ? "" : $" | {errCode}");
lblRunStValue.Text = "정지";
lblRunStValue.ForeColor = Color.Gray; StringBuilder sbHw = new StringBuilder();
break; for (int i = 0; i < 16; i++)
case 1: {
lblRunStValue.Text = "실행"; if (((ushort)_remoteStatus.HWError & (1 << i)) != 0)
lblRunStValue.ForeColor = Color.Green; {
break; sbHw.Append($"{(arDev.Narumi.eflag)i}, ");
case 2: }
lblRunStValue.Text = "에러"; }
lblRunStValue.ForeColor = Color.Red; errMsg = $"[HW] {sbHw}" + (string.IsNullOrEmpty(errMsg) ? "" : $" | {errMsg}");
break;
default:
lblRunStValue.Text = "알 수 없음";
lblRunStValue.ForeColor = Color.Black;
break;
} }
// Mot Direction[1]: 0=forward, 1:backward tbErCode.Text = errCode;
switch (data[2]) tbErmsg.Text = errMsg;
if (_remoteErrorCode != ENIGProtocol.AGVErrorCode.None || _remoteStatus.HWError > 0)
{ {
case 0: tbErCode.BackColor = Color.Red;
lblDirectionValue.Text = "전진"; tbErCode.ForeColor = Color.White;
break; }
case 1: else
lblDirectionValue.Text = "후진"; {
break; tbErCode.BackColor = SystemColors.Window;
default: tbErCode.ForeColor = SystemColors.WindowText;
lblDirectionValue.Text = "??";
break;
} }
// Direction[1]: 0=straight, 1=left, 2=right, 3=markstop
switch (data[3])
{
case 0:
lblDirectionValue.Text += "/직진";
break;
case 1:
lblDirectionValue.Text += "/좌회전";
break;
case 2:
lblDirectionValue.Text += "/우회전";
break;
default:
lblDirectionValue.Text += "/??";
break;
}
// Inposition[1]: 0=off, 1=on
lblInpositionValue.Text = data[4] == 0 ? "OFF" : "ON";
lblInpositionValue.ForeColor = data[4] == 0 ? Color.Gray : Color.Green;
// ChargeSt[1]: 0=off, 1=on
lblChargeStValue.Text = data[5] == 0 ? "OFF" : "ON";
lblChargeStValue.ForeColor = data[5] == 0 ? Color.Gray : Color.Orange;
// CartSt[1]: 0=off, 1=on, 2=unknown
switch (data[6])
{
case 0:
lblCartStValue.Text = "없음";
lblCartStValue.ForeColor = Color.Gray;
break;
case 1:
lblCartStValue.Text = "있음";
lblCartStValue.ForeColor = Color.Green;
break;
default:
lblCartStValue.Text = "??";
lblCartStValue.ForeColor = Color.Red;
break;
}
// LiftSt[1]: 0=down, 1=up, 2=unknown
switch (data[7])
{
case 0:
lblLiftStValue.Text = "하강";
lblLiftStValue.ForeColor = Color.Blue;
break;
case 1:
lblLiftStValue.Text = "상승";
lblLiftStValue.ForeColor = Color.Green;
break;
default:
lblLiftStValue.Text = "??";
lblLiftStValue.ForeColor = Color.Red;
break;
}
string lastTag = Encoding.ASCII.GetString(data, 8, 4);
lblLastTagValue.Text = lastTag;
lblLastTagValue.ForeColor = Color.Black;
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -585,6 +537,8 @@ namespace Test_ACS
private void button7_Click(object sender, EventArgs e) private void button7_Click(object sender, EventArgs e)
{ {
//lt180 //lt180
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2"); var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.LTurn180, targetID); SendCommand(AGVCommandHE.LTurn180, targetID);
} }
@@ -592,6 +546,8 @@ namespace Test_ACS
private void button8_Click(object sender, EventArgs e) private void button8_Click(object sender, EventArgs e)
{ {
//rt180 //rt180
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2"); var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.RTurn180, targetID); SendCommand(AGVCommandHE.RTurn180, targetID);
} }
@@ -599,6 +555,8 @@ namespace Test_ACS
private void button9_Click(object sender, EventArgs e) private void button9_Click(object sender, EventArgs e)
{ {
//l turn //l turn
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2"); var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.LTurn, targetID); SendCommand(AGVCommandHE.LTurn, targetID);
} }
@@ -606,8 +564,20 @@ namespace Test_ACS
private void button10_Click(object sender, EventArgs e) private void button10_Click(object sender, EventArgs e)
{ {
///r-turn ///r-turn
var dlg = MessageBox.Show("턴작업을 실행할까요? 회전반경에 장애물이 없어야 합니다", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dlg != DialogResult.Yes) return;
var targetID = selectedAGV.ToString("X2"); var targetID = selectedAGV.ToString("X2");
SendCommand(AGVCommandHE.RTurn, targetID); SendCommand(AGVCommandHE.RTurn, targetID);
} }
private void button12_Click(object sender, EventArgs e)
{
SendLiftCommand(arDev.Narumi.LiftCommand.ON);
}
private void button11_Click(object sender, EventArgs e)
{
SendLiftCommand(arDev.Narumi.LiftCommand.OFF);
}
} }
} }

View File

@@ -0,0 +1,49 @@
using System.Text;
namespace Test_ACS
{
public partial class MainForm
{
public class RemoteStatus
{
public byte Mode { get; set; } // 0=manual, 1=auto
public byte RunSt { get; set; } // 0=stop, 1=run, 2=error
public byte RunStep { get; set; }
public byte RunStepSeq { get; set; }
public ushort HWError { get; set; }
public byte MotorDir { get; set; } // 0=F, 1=B
public byte MagnetDir { get; set; } // 0=S, 1=L, 2=R
public byte ChargeSt { get; set; } // 0=off, 1=on
public byte CartSt { get; set; } // 0=off, 1=on, 2=unknown
public byte LiftSt { get; set; } // 0=down, 1=up, 2=unknown
public byte ErrorCode { get; set; }
public string LastTag { get; set; }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"Mode: {(Mode == 1 ? "Auto" : "Manual")}");
sb.AppendLine($"RunSt: {(RunSt == 0 ? "Stop" : (RunSt == 1 ? "Run" : "Error"))}");
if (HWError > 0)
{
sb.Append(" [HW ERR: ");
for (int i = 0; i < 16; i++)
{
if ((HWError & (1 << i)) != 0)
{
sb.Append($"{(arDev.Narumi.eflag)i},");
}
}
sb.AppendLine("]");
}
sb.AppendLine($"Step: {RunStep}, Seq: {RunStepSeq}");
sb.AppendLine($"Dir: {(MotorDir == 1 ? "B" : "F")}, Mag: {(MagnetDir == 1 ? "L" : (MagnetDir == 2 ? "R" : "S"))}");
sb.AppendLine($"Charge: {(ChargeSt == 1 ? "ON" : "OFF")}");
sb.AppendLine($"Cart: {(CartSt == 1 ? "ON" : (CartSt == 0 ? "OFF" : "Unk"))}");
sb.AppendLine($"Lift: {(LiftSt == 1 ? "UP" : (LiftSt == 0 ? "DOWN" : "Unk"))}");
sb.Append($"Tag: {LastTag}");
return sb.ToString();
}
}
}
}

View File

@@ -69,6 +69,9 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
</Compile> </Compile>
<Compile Include="RemoteStatus.cs">
<SubType>Form</SubType>
</Compile>
<EmbeddedResource Include="MainForm.resx"> <EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -84,10 +87,14 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj"> <ProjectReference Include="..\..\..\AGVLogic\EnigProtocol\enigprotocol\ENIGProtocol.csproj">
<Project>{499d8912-4b96-41e5-a70d-cfe797883d65}</Project> <Project>{9365803b-933d-4237-93c7-b502c855a71c}</Project>
<Name>ENIGProtocol</Name> <Name>ENIGProtocol</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\SubProject\AGV\NARUMI.csproj">
<Project>{8bae0eac-3d25-402f-9a65-2ba1ecfe28b7}</Project>
<Name>NARUMI</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>