agv 오류코드가 전송되도록함, 에뮬레이터에서 표시되게 함
This commit is contained in:
@@ -33,19 +33,22 @@ namespace AGVEmulator
|
||||
|
||||
if (cmd == ENIGProtocol.AGVCommandEH.Status)
|
||||
{
|
||||
if (data.Length >= 14)
|
||||
if (data.Length >= 16)
|
||||
{
|
||||
_remoteStatus.Mode = data[0];
|
||||
_remoteStatus.RunSt = data[1];
|
||||
_remoteStatus.RunStep = data[2];
|
||||
_remoteStatus.RunStepSeq = data[3];
|
||||
_remoteStatus.MotorDir = data[4];
|
||||
_remoteStatus.MagnetDir = data[5];
|
||||
_remoteStatus.ChargeSt = data[6];
|
||||
_remoteStatus.CartSt = data[7];
|
||||
_remoteStatus.LiftSt = data[8];
|
||||
_remoteStatus.ErrorCode = data[9];
|
||||
_remoteStatus.LastTag = Encoding.ASCII.GetString(data, 10, 4);
|
||||
_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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user