턴 조건 변경 센서->메세지
This commit is contained in:
@@ -219,6 +219,7 @@ namespace Project
|
||||
//이 후 상황을 예측한다
|
||||
if (PUB._mapCanvas != null && PUB._virtualAGV != null)
|
||||
{
|
||||
|
||||
var nextAction = PUB._virtualAGV.Predict();
|
||||
var message = $"[다음 행동 예측]\n\n";
|
||||
|
||||
@@ -262,7 +263,8 @@ namespace Project
|
||||
$"---\n" +
|
||||
$"현재 상태: {PUB._virtualAGV.CurrentState}\n" +
|
||||
$"현재 방향: {PUB._virtualAGV.CurrentDirection}\n" +
|
||||
$"턴: {PUB._virtualAGV.Turn}\n" +
|
||||
$"S/W 턴 상태: {PUB._virtualAGV.Turn}\n" +
|
||||
$"H/W 턴 상태: {PUB.AGV.TurnInformation?.State}\n" +
|
||||
$"위치 확정: {PUB._virtualAGV.IsPositionConfirmed} (RFID {PUB._virtualAGV.DetectedRfidCount}개)\n" +
|
||||
|
||||
$"대상 노드: {targetpos}\n" +
|
||||
|
||||
@@ -157,9 +157,19 @@ namespace arDev
|
||||
}
|
||||
else if (frame.DataString.StartsWith("$"))
|
||||
{
|
||||
// [Turn Completion Check]
|
||||
if (frame.DataString.Contains("LEFT-TURN OK"))
|
||||
{
|
||||
if (TurnInformation != null) { TurnInformation.State = eNarumiTurn.Left; TurnInformation.End = DateTime.Now; }
|
||||
}
|
||||
else if (frame.DataString.Contains("RIGHT-TURN OK"))
|
||||
{
|
||||
if (TurnInformation != null) { TurnInformation.State = eNarumiTurn.Right; TurnInformation.End = DateTime.Now; }
|
||||
}
|
||||
// $로 시작되는 AGV 상태 표시
|
||||
//var text_Sts_Etc = Encoding.Default.GetString(bRcvData, 3, bRcvData.Length - 2).TrimStart(' '); //20210311 김정만 - SmartX FrameWork 사용 안함으로 주석처리
|
||||
//var sMessageOther = Encoding.Default.GetString(bRcvData, 3, bRcvData.Length - 2).TrimStart(' ');
|
||||
//AGV RIGHT-TURN OK
|
||||
RaiseMessage(MessageType.Normal, "$메세지수신:" + frame.DataString);
|
||||
}
|
||||
else
|
||||
@@ -266,9 +276,10 @@ namespace arDev
|
||||
nDataTemp = Convert.ToByte(rcvdNow.Substring(idx, 2), 16);
|
||||
signal1.SetValue(nDataTemp); idx += 2;
|
||||
|
||||
//agv가 멈춰있고 마크센서가 들어온경우, 턴 작업이었다면 턴 셋팅을 한다
|
||||
if (system1.agv_run == false && system1.agv_stop == true &&
|
||||
TurnInformation != null && signal1.mark_sensor)
|
||||
//agv가 멈춰있고 들어온경우, 턴 작업이었다면 턴 셋팅을 한다
|
||||
// [REMOVED] Logic replaced by message-based check ($AGV...TURN OK)
|
||||
if (false && system1.agv_run == false && system1.agv_stop == true &&
|
||||
TurnInformation != null)
|
||||
{
|
||||
if (TurnInformation.Start.Year > 2000)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user