| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.IO;
 
- using System.Reflection;
 
- using System.Runtime.Serialization;
 
- using System.Runtime.Serialization.Formatters.Binary;
 
- using System.Text.RegularExpressions;
 
- using Aitex.Core.Backend;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Sorter.Common;
 
- using MECF.Framework.Common.Equipment;
 
- using Venus_Core;
 
- namespace Venus_RT.Devices.YASKAWA
 
- {
 
-     [Serializable]
 
-     public sealed class EfemMessage : IEfemMessage, ICloneable
 
-     {
 
-         public enum MsgHead
 
-         {
 
-             MOV, GET, ACK, INF, SET, CAN, ABS, EVT, NAK
 
-         }
 
-         public const char EOF = ';';
 
-         public EfemOperation Operation  { get; set; }
 
-         public MsgHead Head             { get; set; }
 
-         public ModuleName Port          { get; set; }
 
-         public IList<string> Data       { get; set; }
 
-         public MsgDirection Direct      { get; set; } = MsgDirection.To;
 
-         public IList<string> Parameters { get; set; }
 
-         public string RawString         { get; set; }
 
-         public string Factor            { get; set; }       // NAK, CAN
 
-         public override string ToString()
 
-         {
 
-             string sPara = ToParamString();
 
-             string sOP = EfemConstant.OperationString[Operation];
 
-             string context = $"{Head}:{sOP}{sPara}{EOF}\r";
 
-             return context;
 
-         }
 
-         public string ToParamString()
 
-         {
 
-             string res = string.Empty;
 
-             if (Parameters == null || Parameters.Count <= 0)
 
-                 return res;
 
-             foreach (var para in Parameters)
 
-             {
 
-                 res += '/' + para;
 
-             }
 
-             return res;
 
-         }
 
-         public object Clone()
 
-         {
 
-             using (Stream objStream = new MemoryStream())
 
-             {
 
-                 IFormatter formatter = new BinaryFormatter();
 
-                 formatter.Serialize(objStream, this);
 
-                 objStream.Seek(0, SeekOrigin.Begin);
 
-                 return formatter.Deserialize(objStream) as EfemMessage ?? throw new InvalidOperationException();
 
-             }
 
-         }
 
-     }
 
-     [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Field)]
 
-     public class HardwareCmdAttribute : Attribute
 
-     {
 
-         public string Member { get; set; }
 
-         public HardwareCmdAttribute(string str) { this.Member = str; }
 
-     }
 
-     [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Field)]
 
-     public class InterpretationAttribute : Attribute
 
-     {
 
-         public string Comment { get; set; }
 
-         public InterpretationAttribute(string str) { this.Comment = str; }
 
-     }
 
-     public static class Extension
 
-     {
 
-         private const string ERROR_MSG = "hardware message invalid";
 
-         /// <summary>
 
-         /// NAK:FACTOR|Message*;
 
-         /// ACK:Message*;
 
-         /// CAN:Message*|Factor/Place;
 
-         /// ABS:Message*|Error/Parameter1/Parameter2;
 
-         /// EVT:Message*;
 
-         /// </summary>
 
-         public static EfemMessage ToMessage(this string context)
 
-         {
 
-             if (string.IsNullOrEmpty(context) || context.Length < 3)
 
-                 throw new ArgumentNullException(ERROR_MSG);
 
-             EfemMessage msg = new EfemMessage { RawString = context, Direct = MsgDirection.From, Data = new List<string>() };
 
-             // remove EOT
 
-             string messageBody = context.Substring(0, context.IndexOf(EfemMessage.EOF) + 1);
 
-             try
 
-             {
 
-                 // split up the string
 
-                 string[] sBodies = messageBody.Split(Constant.delimiters);
 
-                 string sHead = sBodies[0];
 
-                 string sBasic = sBodies[1];
 
-                 string sPort = sBodies[2];
 
-                 // Head
 
-                 if (Enum.TryParse(sHead, true, out EfemMessage.MsgHead msgHead))
 
-                 {
 
-                     msg.Head = msgHead;
 
-                 }
 
-                 switch (msg.Head)
 
-                 {
 
-                 case EfemMessage.MsgHead.ACK:
 
-                 case EfemMessage.MsgHead.MOV:
 
-                 case EfemMessage.MsgHead.INF:
 
-                 case EfemMessage.MsgHead.EVT:
 
-                     // Basic
 
-                     msg.Operation = EfemConstant.ToOperation(sBasic);
 
-                     // Port
 
-                     if (Regex.IsMatch(sPort, @"P[123]$"))
 
-                     {
 
-                         msg.Port = sPort.ToModule();
 
-                     }
 
-                     else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
 
-                     {
 
-                         msg.Port = sPort.ToModule();
 
-                     }
 
-                     else
 
-                     {
 
-                         msg.Port = ModuleName.EFEM;
 
-                     }
 
-                         // Data
 
-                         switch (msg.Operation)
 
-                         {
 
-                             case EfemOperation.StateTrack:
 
-                             case EfemOperation.GetWaferInfo:
 
-                                 msg.Data.Add(sBodies[3]);
 
-                                 break;
 
-                             case EfemOperation.CarrierId:
 
-                                 msg.Data.Add(msg.RawString.Substring("INF:CSTID/P1/".Length));
 
-                                 break;
 
-                             case EfemOperation.SigStatus:
 
-                                 msg.Data.Add(sBodies[2]);
 
-                                 msg.Data.Add(sBodies[3]);
 
-                                 msg.Data.Add(sBodies[4]);
 
-                                 break;
 
-                             case EfemOperation.Ready:
 
-                                 msg.Data.Add(sBodies[2]);
 
-                                 break;
 
-                             default:
 
-                                 break;
 
-                         }
 
-                         break;
 
-                     case EfemMessage.MsgHead.NAK:
 
-                         msg.Operation = EfemConstant.ToOperation(sBasic);
 
-                         // Port
 
-                         if (Regex.IsMatch(sPort, @"P[123]$"))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else
 
-                         {
 
-                             msg.Port = ModuleName.EFEM;
 
-                         }
 
-                         msg.Factor = sBodies[1];
 
-                         msg.Data.Add(sBodies[2]);
 
-                         msg.Operation = EfemConstant.ToOperation(sBasic);
 
-                         break;
 
-                     case EfemMessage.MsgHead.CAN:
 
-                         msg.Operation = EfemConstant.ToOperation(sBasic);
 
-                         // Port
 
-                         if (Regex.IsMatch(sPort, @"P[123]$"))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else
 
-                         {
 
-                             msg.Port = ModuleName.EFEM;
 
-                         }
 
-                         // CAN:ERROR/CLEAR;
 
-                         int a1 = messageBody.IndexOf(':');
 
-                         int a3 = messageBody.IndexOf(';');
 
-                     int a2 = messageBody.IndexOf('|');
 
-                     if (a2 > 0)
 
-                     {
 
-                         msg.Data.Add(messageBody.Substring(a1 + 1, a2 - a1 - 1));
 
-                         msg.Factor = messageBody.Substring(a2 + 1, a3 - a2 - 1);
 
-                     }
 
-                     else
 
-                     {
 
-                         int a8 = messageBody.IndexOf('/');
 
-                         msg.Factor = sBodies[2];
 
-                     }
 
-                     break;
 
-                     case EfemMessage.MsgHead.ABS:
 
-                         msg.Operation = EfemConstant.ToOperation(sBasic);
 
-                         // Port
 
-                         if (Regex.IsMatch(sPort, @"P[123]$"))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
 
-                         {
 
-                             msg.Port = sPort.ToModule();
 
-                         }
 
-                         else
 
-                         {
 
-                             msg.Port = ModuleName.EFEM;
 
-                         }
 
-                         // ABS:INIT/ALL|ERROR/SYSTEM_FF10/UNDEFINITION;
 
-                         int a4 = messageBody.IndexOf('|');
 
-                         int a5 = messageBody.IndexOf(';');
 
-                         // ABS:LOAD/LLLB01/ARM2|ERROR/RB|2B80;
 
-                     string errStr = messageBody.Substring(a4 + 1, a5 - a4 - 1);
 
-                         //分割位置和因素 最后一位是需要处理
 
-                     string[] a6 = errStr.Split('/','|');
 
-                     if (a6.Length < 3)
 
-                     {
 
-                        //因为小于导致后续使用相关变量时会越界
 
-                        //需要补全 已保证使用
 
-                        msg.Factor = errStr;
 
-                        msg.Data.Add($"ABS 格式错误");
 
-                        msg.Data.Add($"{errStr}");
 
-                        LOG.Write(eEvent.WARN_EFEM_COMMON_WARN, ModuleName.EFEM, $"ABS 格式错误 {errStr}");
 
-                     }
 
-                     else
 
-                     {
 
-                         msg.Factor = a6[0];
 
-                         msg.Data.Add(a6[1]);
 
-                         string errorcode = a6[2].Substring(1);
 
-                         if (Constant._EFEMHWErrorCode2Msg.ContainsKey(errorcode))
 
-                             msg.Data.Add(Constant._EFEMHWErrorCode2Msg[errorcode]);
 
-                         else if (!string.IsNullOrEmpty(MatchError(errorcode)))
 
-                             msg.Data.Add(MatchError(errorcode));
 
-                         else
 
-                             msg.Data.Add(a6[2]);
 
-                     }
 
-                     break;
 
-                 }
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 EV.PostAlarmLog(ModuleName.EFEM.ToString(), $"收到[{context}],解析出错[{ex.Message}]");
 
-             }
 
-             return msg;
 
-         }
 
-         private static string MatchError(string errorcode)
 
-         {
 
-             foreach (KeyValuePair<Regex, string> item in Constant._EFEMHWRegexError2Msg) 
 
-             { 
 
-                 if (item.Key.IsMatch(errorcode))
 
-                     return item.Value; 
 
-             }
 
-             return string.Empty;
 
-         }
 
-         public static string ToHWString(this Position pos)
 
-         {
 
-             string res = string.Empty;
 
-             if (ModuleHelper.IsAligner(pos.Module) || ModuleHelper.IsCooling(pos.Module))
 
-             {
 
-                 res = Constant.ModuleString[pos.Module];
 
-             }
 
-             else
 
-             {
 
-                 string sMod = Constant.ModuleString[pos.Module];
 
-                 int num = pos.Slot + 1;
 
-                 string sSlot = num.ToString("D2");
 
-                 res = $"{sMod}{sSlot}";
 
-             }
 
-             return res;
 
-         }
 
-         public static string ToHWString(this ModuleName mod)
 
-         {
 
-             return Constant.ModuleString[mod];
 
-         }
 
-         public static ModuleName ToModule(this string str)
 
-         {
 
-             if (Constant.StringModule.ContainsKey(str))
 
-                 return Constant.StringModule[str];
 
-             throw new ApplicationException($"Cannot translate {str}");
 
-         }
 
-         public static string HardwareCmd(this Enum val)
 
-         {
 
-             FieldInfo fi = val.GetType().GetField(val.ToString());
 
-             return fi.GetCustomAttributes(typeof(HardwareCmdAttribute), false) is HardwareCmdAttribute[] attrs
 
-                     && attrs.Length > 0 ? attrs[0].Member : val.ToString();
 
-         }
 
-         public static string Interpretation(this Enum val)
 
-         {
 
-             FieldInfo fi = val.GetType().GetField(val.ToString());
 
-             return fi.GetCustomAttributes(typeof(InterpretationAttribute), false) is InterpretationAttribute[] attrs
 
-                     && attrs.Length > 0 ? attrs[0].Comment : val.ToString();
 
-         }
 
-     }
 
-     /// <summary>
 
-     /// constant define
 
-     /// </summary>
 
-     public class Constant
 
-     {
 
-         public static readonly char[] delimiters = { ':', '/', '>', '|', ';' };
 
-         public const string ALL = "ALL";
 
-         public const string MAP = "MAPDT";
 
-         public const string SYS = "SYSTEM";
 
-         public const string STOWER = "STOWER";
 
-         public static readonly Dictionary<ModuleName, string> ModuleString = new Dictionary<ModuleName, string>
 
-         {
 
-             [ModuleName.EFEM]     = "ALL",
 
-             [ModuleName.EfemRobot]= "ROB",
 
-             [ModuleName.LLA]      = "LLLA",
 
-             [ModuleName.LLB]      = "LLLB",
 
-             [ModuleName.LP1]      = "P1",
 
-             [ModuleName.LP2]      = "P2",
 
-             [ModuleName.LP3]      = "P3",
 
-             [ModuleName.PMA]      = "LLA",
 
-             [ModuleName.PMB]      = "LLB",
 
-             [ModuleName.Aligner1] = "ALIGN3",
 
-             [ModuleName.Aligner2] = "ALIGN4",
 
-             [ModuleName.Cooling1] = "ALIGN",
 
-             [ModuleName.Cooling2] = "ALIGN2",
 
-             [ModuleName.Buffer]   = "BUFFER"
 
-         };
 
-         public static readonly Dictionary<string, ModuleName> StringModule = new Dictionary<string, ModuleName>
 
-         {
 
-             ["ALL"]    = ModuleName.EFEM,
 
-             ["System"] = ModuleName.EFEM,
 
-             ["P1"]     = ModuleName.LP1,
 
-             ["P2"]     = ModuleName.LP2,
 
-             ["P3"]     = ModuleName.LP3,
 
-             ["LLA"]    = ModuleName.PMA,
 
-             ["LLB"]    = ModuleName.PMB,
 
-             ["ALIGN"]  = ModuleName.Cooling1,
 
-             ["ALIGN2"] = ModuleName.Cooling2,
 
-             ["ALIGN3"] = ModuleName.Aligner1,
 
-             ["ALIGN4"] = ModuleName.Aligner2,
 
-             ["BUFFER"] = ModuleName.Buffer,
 
-             ["LLLA"]   = ModuleName.LLA,
 
-             ["LLLB"]   = ModuleName.LLB,
 
-         };
 
-         public static readonly Dictionary<Hand, string> ArmString = new Dictionary<Hand, string>
 
-         {
 
-             [Hand.Blade1] = "ARM2",
 
-             [Hand.Blade2] = "ARM1",
 
-             [Hand.Both] = "ARM3"
 
-         };
 
-         public static readonly Dictionary<ExtendPos, string> ExtendPosString = new Dictionary<ExtendPos, string>
 
-         {
 
-             //[ExtendPos.GetReady]  = "G1",
 
-             //[ExtendPos.GetTarget] = "GB",
 
-             //[ExtendPos.GetBack]   = "G4",
 
-             //[ExtendPos.PutReady]  = "P1",
 
-             //[ExtendPos.PutTarget] = "PB",
 
-             //[ExtendPos.PutBack]   = "P4"
 
-         };
 
-         public static readonly Dictionary<string, string> FactorString = new Dictionary<string, string>
 
-         {
 
-             { "MSG",        "Message error" },
 
-             { "NOREAD",     "Communication not established" },
 
-             { "NOINITCMPL", "Initialization not completed" },
 
-             { "NOORGCMPL",  "Not org finished" },
 
-             { "VAC",        "Vac error" },
 
-             { "AIR",        "Air error" },
 
-             { "EMS",        "EMS pushed" },
 
-             { "ERROR",      "Has Error" },
 
-             { "BUSY",       "Busy (Module in use)" },
 
-             { "CMPL",       "Already Completed" },
 
-             { "NOMAPCMPL",  "Not Mapped" },
 
-             { "NONWAF",     "NO wafer on the position" },
 
-             { "WAFER",      "Wafer already existed" },
 
-             { "NONPOD",     "No Pod" },
 
-             { "POD",        "Pod Exist" },
 
-             { "NOTINMOTION","Not in Motion" },
 
-             { "HOLD",       "Holded" },
 
-             { "NOHOLD",     "Not hold" },
 
-             { "LLCLOSE",    "LL door closed state" },
 
-             { "LLNOEXTEND", "LL not extended" },
 
-             { "REMOVE",     "remove" },
 
-             { "MAINTENANCE","In maintain mode or EFEM offline" },
 
-             { "NOLINK",     "not config" },
 
-             { "ARMEXTEND",  "arm extended" },
 
-             { "POWER",      "power off" },
 
-             { "PRTWAF",     "TODO" },
 
-             { "NOPOS",      "Not at valid position" },
 
-             { "NOFUNC",     "not support" },
 
-             { "PARAM_NG",   "Invalid parameters are included" }
 
-         };
 
-         public static readonly Dictionary<string, string> ABS_PARA1 = new Dictionary<string, string>
 
-         {
 
-             { "SYSTEM_FF01", "No specific route data or malfunction" },
 
-             { "SYSTEM_FF10", "Operation time out" },
 
-             { "SYSTEM_FF11", "Communication time out between PC for robot control and controller" },
 
-             { "SYSTEM_FF12", "Encoder battery error" },
 
-             { "SYSTEM_FF13", "Loss of encoder information" },
 
-             { "SYSTEM_FF20", "No data file of route" },
 
-             { "SYSTEM_FF21", "Serial number in route data is wrong" },
 
-             { "SYSTEM_FF22", "No line for serial number in route data" },
 
-             { "SYSTEM_FF23", "Discrepancy in serial number between route data and teaching data" },
 
-             { "SYSTEM_FF30", "Failure of pre-operation movement at the wrist in the robot" },
 
-             { "SYSTEM_FF83", "Inability of the robot to return origin" },
 
-             { "SYSTEM_FFB0", "Operation malfunction at fan in robot" },
 
-             { "SYSTEM_FFF0", "Alarm at Z-axis driver in the robot" },
 
-             { "SYSTEM_FFFF", "Robot control program malfunction" }
 
-         };
 
-         #region 硬件错误码
 
-         public static readonly Dictionary<string, string> _EFEMHWErrorCode2Msg = new Dictionary<string, string>()
 
-         {
 
-             {"020","伺服电源关闭,运动指令失败"},
 
-             {"021","伺服电源开启,设置命令失败"},
 
-             {"040","命令被拒绝,因为主机命令是在控制器处于TEACH模式时发送的"},
 
-             {"050","命令被拒绝,因为当主机向同一单元发送另一个运动命令时,该单元正在执行运动命令"},
 
-             {"051","当间距生成方法设置为“自动计算模式”时,主机尝试在槽间设置间距"},
 
-             {"052","重新启动命令被拒绝,因为在电源打开后立即发生错误"},
 
-             {"053","Get/Put(或exchange)命令被拒绝,因为在此之前没有执行“移动到就绪位置”命令"},
 
-             {"054","晶圆片对准命令被拒绝,因为在对准命令之前,预对准器的“移动到对准就绪位置”命令没有被执行"},
 
-             {"055","指定了不可访问的站类型"},
 
-             {"058","命令被拒绝,因为发送的命令不被指定的单元支持"},
 
-             {"059","“传送点之间的移动”命令被拒绝,因为指定了一个无效点"},
 
-             {"05A","不能移动,因为机械手在线性运动不能执行的范围(或姿势)"},
 
-             {"05C","晶圆对中没有执行"},
 
-             {"05D","手臂校准被拒绝,因为预对准阶段没有记录"},
 
-             {"05E","映射数据引用命令被拒绝,因为映射从未执行过"},
 
-             {"05F","命令被拒绝,因为数据上传/下载命令正在进行中"},
 
-             {"061","无法从目前的操纵姿势安全回家"},
 
-             {"064","升降机与预对准器相撞"},
 
-             {"070","命令被拒绝,因为底部槽位没有被记录"},
 
-             {"071","命令被拒绝,因为当俯仰产生方法设置为“自动计算模式”时,没有记录顶部槽位"},
 
-             {"088","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"089","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"08A","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"08B","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"08C","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"08D","由教学位置计算出的转换位置(姿势)超出了运动极限"},
 
-             {"090","来自主机的通信命令的参数设置超出范围"},
 
-             {"0A0","未执行对齐运动,因为对齐器未准备好在具有对齐角度的put运动命令中运行"},
 
-             {"0E0","调整偏移量超过限额"},
 
-             {"0F0","输入电压太低" },
 
-             {"701","伺服控制板或ROM有缺陷"},
 
-             {"703","主控制板与伺服控制板之间发生通信错误"},
 
-             {"704","主控制板与伺服控制板之间发生通信错误"},
 
-             {"705","主控板与变频器之间发生通信错误"},
 
-             {"706","伺服控制板出现系统错误"},
 
-             {"707","伺服控制板出现系统错误"},
 
-             {"709","电流不正常"},
 
-             {"70A","检测到电源丢失"},
 
-             {"70B","防突电流继电器不正常"},
 
-             {"70C","转换器类型不匹配"},
 
-             {"70F","伺服控制板无响应"},
 
-             {"713","DB是不正常的"},
 
-             {"714","发生变换器充电错误"},
 
-             {"715","出现硬线基块错误"},
 
-             {"716","发生硬线基启用错误"},
 
-             {"717","发生基本块错误"},
 
-             {"718","发生基本启用错误"},
 
-             {"719","请求硬线座释放,但不释放"},
 
-             {"71A","刹车锁定错误"},
 
-             {"71B","刹车解锁错误"},
 
-             {"71C","电源继电器不正常"},
 
-             {"721","伺服参数异常"},
 
-             {"722","伺服参数异常"},
 
-             {"725","检测到转换器过热"},
 
-             {"726","检测到未定义的命令"},
 
-             {"727","检测到不支持的命令"},
 
-             {"728","检测到命令的数据异常"},
 
-             {"729","伺服控制板出现系统错误"},
 
-             {"72A","伺服控制板出现系统错误"},
 
-             {"72B","伺服参数值异常"},
 
-             {"730","Amp模块未安装"},
 
-             {"732","伺服参数异常"},
 
-             {"733","伺服参数异常"},
 
-             {"734","伺服参数异常"},
 
-             {"735","伺服参数异常"},
 
-             {"73F","从伺服控制板接收未定义的错误"},
 
-             {"740","发生错误时PG"},
 
-             {"741","请求多重伺服开启"},
 
-             {"742","伺服控制板出现系统错误"},
 
-             {"743","伺服控制板出现系统错误"},
 
-             {"744","伺服控制板出现系统错误"},
 
-             {"745","伺服控制板出现系统错误"},
 
-             {"746","伺服控制板出现系统错误"},
 
-             {"74A","伺服控制板出现系统错误"},
 
-             {"74B","伺服控制板出现系统错误"},
 
-             {"74C","伺服控制板出现系统错误"},
 
-             {"74D","伺服控制板出现系统错误"},
 
-             {"7A0","PAIF接收到一条未定义的命令"},
 
-             {"7A1","PAIF板检测到命令的参数值超出范围"},
 
-             {"7A2","检测到不支持的命令"},
 
-             {"7A3","数据缓冲区已满"},
 
-             {"7A4","检测到不支持的命令"},
 
-             {"7A5","编码器数据异常"},
 
-             {"7A6","检测到不支持的命令"},
 
-             {"7AE","PA板还没有准备好"},
 
-             {"7AF","PA板没有回应"},
 
-             {"7B0","CCD传感器头电源电压低"},
 
-             {"7B4","关闭CCD光源LED"},
 
-             {"7B5","CCD光源LED光强下降"},
 
-             {"7C0","发现PAIF板的看门狗"},
 
-             {"7C1","检测到低电压"},
 
-             {"7C2","异常中断发生"},
 
-             {"7C3","打开LED,但光强度为零"},
 
-             {"7CF","没有安装PAIF板"},
 
-             {"7D0","检测到过电压"},
 
-             {"7D1","数据采集失败"},
 
-             {"900","主机命令消息中断"},
 
-             {"910","从主机接收到的数据的总和是无效的"},
 
-             {"920","从主机接收到未定义单元的命令"},
 
-             {"930","从主机接收的命令未定义"},
 
-             {"940","附加到从主机接收到的命令的参数为"},
 
-             {"950","执行完成的确认报告没有从主机收到"},
 
-             {"960","从主机接收到的命令消息中序列号不正确"},
 
-             {"961","序列号与先前从主机接收到的命令消息上的序列号相同"},
 
-             {"970","没有定界符"},
 
-             {"9A1","当控制器收到来自主机的命令时,消息缓冲区已满"},
 
-             {"9C0","局域网设备设置无效"},
 
-             {"9C1","设置的IP地址无效"},
 
-             {"9C2","设置子网掩码无效"},
 
-             {"9C3","设置默认的门方式无效"},
 
-             {"9D0","主机消息接收失败(以太网)"},
 
-             {"9E0","来自主机的请求是不可接受的,因为在运行维护工具期间"},
 
-             {"9E1","由于使用维护工具获取数据时内部数据被破坏,无法获取"},
 
-             {"A01","重新检测电源电压的下降"},
 
-             {"A10","外部紧急停机(EXESP)由I/O启用"},
 
-             {"A20","TP紧急停止按钮被按下"},
 
-             {"A21","检测联锁板故障"},
 
-             {"A30","紧急停机由主机发出指令"},
 
-             {"A40","控制器冷却风扇1出现错误"},
 
-             {"A41","控制器冷却风扇2出现错误"},
 
-             {"A42","控制器冷却风扇3出现错误"},
 
-             {"A45","1号风机有故障"},
 
-             {"A46","2号机有故障"},
 
-             {"A4F","控制器的内存备份电池不足"},
 
-             {"AC0","从I/O输入一个安全栅栏(SAFF)信号"},
 
-             {"AC9","保护停止(ONEN)信号从I/O输入"},
 
-             {"AE0","由教学挂件控制,切换到“主机”模式"},
 
-             {"AE1","模式切换到“教导”,同时由主机控制"},
 
-             {"AE8","教学挂起过程中释放了死门开关"},
 
-             {"AF0","检测联锁板故障"},
 
-             {"AF1","检测联锁板故障"},
 
-             {"AF2","检测联锁板故障"},
 
-             {"AF3","检测联锁板故障"},
 
-             {"AF4","检测联锁板故障"},
 
-             {"AF5","检测联锁板故障"},
 
-             {"AF6","检测联锁板故障"},
 
-             {"AF8","交叉检查比较错误的教学挂件紧急停止"},
 
-             {"AF9","对联锁输入信号1进行交叉校验比较误差"},
 
-             {"AFA","对外部紧急停止信号的比较误差进行交叉检查"},
 
-             {"AFB","反复检查死区开关信号的比较误差"},
 
-             {"AFC","反复检查安全围栏信号(SAFF)的比较误差"},
 
-             {"AFD","反复检查保护停止信号(ONEN)的比较误差"},
 
-             {"AFE","对联锁输入信号2进行交叉校验比较误差"},
 
-             {"AFF","对联锁输入信号进行交叉校验比较误差3" },
 
-             {"B10","轴1超过允许速度"},
 
-             {"B11","轴2超过允许速度"},
 
-             {"B12","轴3超过允许速度"},
 
-             {"B13","轴4超过允许速度"},
 
-             {"B14","轴5超过允许速度"},
 
-             {"B20","超过正向轴对称-1运动范围"},
 
-             {"B21","在正方向超过轴-2运动范围"},
 
-             {"B22","在正方向超过轴-3运动范围"},
 
-             {"B23","在正方向超过轴-4运动范围"},
 
-             {"B24","超过轴-5正向运动范围"},
 
-             {"B28","当映射运动开始时,正向超过Axis-1运动范围"},
 
-             {"B29","当映射运动开始时,正向超过轴-2运动范围"},
 
-             {"B2A","当映射运动开始时,正向超过轴-3运动范围"},
 
-             {"B2B","当映射运动开始时,正向超过轴-4运动范围"},
 
-             {"B2C","当映射运动开始时,正向超过轴-5运动范围"},
 
-             {"B30","超轴向-1运动范围"},
 
-             {"B31","超过轴-2的负向运动范围"},
 
-             {"B32","超过轴-3向负方向的运动范围"},
 
-             {"B33","超过轴-4的负向运动范围"},
 
-             {"B34","超过轴-5的负向运动范围"},
 
-             {"B38","当映射运动开始时,在负方向上超过了Axis-1运动范围"},
 
-             {"B39","当映射运动开始时,超过轴-2的负向运动范围"},
 
-             {"B3A","当映射运动开始时,超过轴-3的负向运动范围"},
 
-             {"B3B","当映射运动开始时,超过轴-4的负向运动范围"},
 
-             {"B3C","当映射运动开始时,超过轴-5的负向运动范围"},
 
-             {"B40","超时访问权限信号1发生"},
 
-             {"B41","超时访问权限信号2发生"},
 
-             {"B42","超时访问权限信号3发生"},
 
-             {"B43","超时访问权限信号4发生"},
 
-             {"B44","超时访问权限信号5发生"},
 
-             {"B45","超时访问权限信号6发生"},
 
-             {"B46","超时访问权限信号7发生" },
 
-             {"B47","超时访问权限信号8发生"},
 
-             {"B48","超时访问权限信号9发生"},
 
-             {"B49","超时访问权限信号10发生"},
 
-             {"B4A","超时访问权限信号11发生"},
 
-             {"B4B","超时访问权限信号12发生"},
 
-             {"B4C","超时访问权限信号13发生"},
 
-             {"B4D","超时访问权限信号14发生"},
 
-             {"B4E","超时访问权限信号15发生"},
 
-             {"B4F","超时访问权限信号16发生"},
 
-             {"B60","预对准器在访问P/A阶段时正在运行(用于边缘对准器)"},
 
-             {"B61","预对准器在进入P/ a阶段时持晶圆片"},
 
-             {"B62","晶圆片在到达P/A阶段时不在预对准器上晶圆片在P/A阶段的预对准器上(用于边缘抓地力预平衡器)"},
 
-             {"B63","当P/A阶段访问时,预对准器没有处于“发布”状态(用于边缘对准器)"},
 
-             {"B64","当P/A阶段进入时,Lifer不是上/下端(用于边缘对准器)"},
 
-             {"B65","当P/A阶段进入时,预对准器未处于准备位置(用于边缘对准器)"},
 
-             {"B66","使用Get指定的P/A阶段不是指定的阶段(用于边缘对准器)"},
 
-             {"B68","由于机械手已经进入P/A阶段或机械手的进入阶段不理解预对准器无法移动(用于边缘对准器)"},
 
-             {"B70","操作过程中检测到软件停止信号"},
 
-             {"B80","真空/抓地力传感器未在规定时间内打开"},
 
-             {"B81","真空/抓地力传感器未在规定时间内关闭"},
 
-             {"B82","晶圆片存在/缺失传感器在规定的时间内没有打开"},
 
-             {"B83","晶圆片存在/缺失传感器没有在规定的时间内关闭"},
 
-             {"B88","抓地力传感器未在规定时间内打开(用于边缘对准器)"},
 
-             {"B89","抓地力传感器未在规定时间内关闭(用于边缘对准器)"},
 
-             {"B8A","松开传感器在规定时间内不打开(用于边缘对准器)"},
 
-             {"B8B","松开感测器未在规定时间内关闭(用于边缘对准器)"},
 
-             {"B8F","叉1的柱塞在观察时间内没有移动"},
 
-             {"B90","真空/抓地力传感器未在规定时间内打开"},
 
-             {"B91","真空/抓地力传感器未在规定时间内关闭"},
 
-             {"B92","晶圆片存在/缺失传感器在规定的时间内没有打开"},
 
-             {"B93","晶圆片存在/缺失传感器没有在规定的时间内关闭"},
 
-             {"B98","升降机上传感器在规定的时间内没有打开(用于边缘对准器)"},
 
-             {"B99","升降机上传感器没有在规定的时间内关闭(用于边缘对准器)"},
 
-             {"B9A","升降机下降传感器未在规定时间内打开(用于边缘对准器)"},
 
-             {"B9B","升降机下降传感器未在规定时间内关闭(用于边缘对准器)"},
 
-             {"B9F","叉2的柱塞在观察时间内没有移动"},
 
-             {"BA0","当机械手(Fork1)/预对准器传送晶圆时,真空/握把传感器或晶圆存在/缺失传感器关闭"},
 
-             {"BA1","Fork 1的真空/握把传感器是开着的,而wafer存在/缺失传感器是关着的"},
 
-             {"BA8","握力传感器在预对准器运动时关闭,握力传感器打开(用于边缘对准器)"},
 
-             {"BA9","抓地力传感器在预对准器运动时打开,抓地力传感器关闭(对于边缘抓地力预对准器)"},
 
-             {"BAA","在预对准过程中,松开传感器关闭,松开传感器打开(用于边缘对准器)"},
 
-             {"BAB","在预对准期间,松开传感器打开,松开传感器关闭(对于边缘握把预对准器)"},
 
-             {"BAC","握力传感器和反握力传感器都打开了(用于边缘对准器)"},
 
-             {"BAD","手柄传感器指示晶圆存在,升降机传感器指示lifer启动(用于边缘对准器)"},
 
-             {"BB0","吸/抓力传感器或晶圆片存在/缺失传感器在叉2保持和传送晶圆片时关闭"},
 
-             {"BB1","Fork 2的吸力/抓力传感器是开着的,而晶圆的存在/缺失传感器是关着时"},
 
-             {"BB8","升力传感器在预对准过程中处于关闭状态,升力传感器处于开启状态(用于边缘对准器)"},
 
-             {"BB9","在预对准过程中,升降传感器处于开启状态,升降传感器处于关闭状态(用于边缘抓地力预对准)"},
 
-             {"BBA","在预对准过程中,升降传感器处于关闭状态,升降传感器处于开启状态(用于边缘对准器)"},
 
-             {"BBB","在预对准过程中,升降传感器处于开启状态,升降传感器处于关闭状态(用于边缘抓地力预对准)"},
 
-             {"BBC","升降式传感器和升降式传感器均处于工作状态(用于边缘握把预对准器)"},
 
-             {"BF0","当机械手被保持信号停止时,运动请求被传送"},
 
-             {"C80","晶圆片对准的有效数据不足"},
 
-             {"C90","缺口/定位平面位置无法分辨"},
 
-             {"CA0","无法检测到准确的晶圆中心位置"},
 
-             {"CB0","晶圆偏心轮数量过多"},
 
-             {"CC0","无法检测到准确的缺口/定位平面位置"},
 
-             {"CD0","校正后的量超过允许的范围"},
 
-             {"CE0","无法正确执行手臂校准"},
 
-             {"D00","映射传感器波束在映射开始时就已经被阻塞"},
 
-             {"D10","无法正确执行映射校准"},
 
-             {"D20","从未执行映射校准"},
 
-             {"D30","测图或测图校准的采样数据异常"},
 
-             {"D40","在绘图或绘图校准时检测到晶圆突出"},
 
-             {"D50","在映射或映射校准时检测到抖动"},
 
-             {"D60","对于“顶面GET / PUT工作站”,映射或映射校准无法强制执行" },
 
-             {"E90","系统配置错误"},
 
-             {"E91","机械手配置错误"},
 
-             {"EA0","实型通用参数设置警告"},
 
-             {"EA1","整型通用参数设置警告"},
 
-             {"EA4","实型机组参数设置警告"},
 
-             {"EA5","整型单元参数设置警告"},
 
-             {"EB0","实型通用参数设置无效"},
 
-             {"EB1","整型通用参数设置无效"},
 
-             {"EB4","实型单元参数设置无效"},
 
-             {"EB5","整型单元参数设置无效"},
 
-             {"EC0","软件与设置参数不匹配"},
 
-             {"ED0","发生内存操作错误"},
 
-             {"ED1","发生内存操作错误"},
 
-             {"EE0","文件打开失败"},
 
-             {"EE1","关闭文件失败"},
 
-             {"EE2","读取文件失败"},
 
-             {"EE3","写入文件失败"},
 
-             {"EE4","删除文件失败"},
 
-             {"EE5","参数初始化文件大小无效"},
 
-             {"EE8","创建文件夹失败"},
 
-             {"EF0","“格式请求文件”中的数据无效"},
 
-             {"EF1","“自动更新请求文件”中的数据无效"},
 
-             {"EF2","“伺服参数文件”中的数据无效"},
 
-             {"EF3","“通用参数文件”中的无效数据"},
 
-             {"EF4","“单元参数文件”中的数据无效"},
 
-             {"EF5","“位置数据文件”中的数据无效"},
 
-             {"EF8","“伺服参数自动更新文件”中的数据无效"},
 
-             {"EF9","“常用参数自动更新文件”中的无效数据"},
 
-             {"EFA","“单元参数自动更新文件”中的无效数据"},
 
-             {"EFE","在控制器中记录数据异常1"},
 
-             {"EFF","文件数据异常2在控制器"},
 
-             {"F10","System error 1-0."},
 
-             {"F11","System error 1-1."},
 
-             {"F12","System error 1-2."},
 
-             {"F14","System error 1-4."},
 
-             {"F20","System error 2-0."},
 
-             {"F21","System error 2-1."},
 
-             {"F22","System error 2-2."},
 
-             {"F50","System error 5-0."},
 
-             {"F51","System error 5-1."},
 
-             {"F61","System Error 6-1."},
 
-             {"F62","System Error 6-2."},
 
-             {"F70","System Error 7-0."},
 
-             {"F82","System error 8-2."},
 
-             {"F83","System error 8-3."},
 
-             {"F84","System error 8-4."},
 
-             {"F86","System error 8-6."},
 
-             {"F88","System error 8-8."},
 
-             {"F90","System trap 9-0."},
 
-             {"F91","System trap 9-1."},
 
-             {"F92","System trap 9-2."},
 
-             {"F93","System trap 9-3."},
 
-             {"F94","System trap 9-4."},
 
-             {"F95","System trap 9-5."},
 
-             {"F98","System trap 9-8."},
 
-             {"F99","System trap 9-9."},
 
-             {"F9A","System trap 9-10."},
 
-             {"F9B","System trap 9-11."},
 
-             {"F9C","System trap 9-12."},
 
-             {"F9D","System trap 9-13."},
 
-             {"FA0","System trap A-0."},
 
-             {"FA1","System trap A-1."},
 
-             {"FA2","System trap A-2."},
 
-             {"FA3","System trap A-3."},
 
-             {"FA4","System trap A-4."},
 
-             {"FA8","System trap A-8."},
 
-             {"FA9","System trap A-9."},
 
-             {"FAA","System trap A-10."},
 
-             {"FAB","System trap A-11."},
 
-             {"FB0","System trap b-0."},
 
-             {"FB1","System trap b-1."},
 
-             {"FB8","System trap b-8."},
 
-             {"FB9","System trap b-9." },
 
-             {"FC0","System trap C-0."},
 
-             {"FC4","System trap C-4."},
 
-             {"FC5","System trap C-5."},
 
-             {"FC8","System trap C-8."},
 
-             {"FCC","System trap C-12."},
 
-             {"FD0","System trap d-0."},
 
-             {"FD1","System trap d-1."},
 
-             {"FD2","System trap d-2."},
 
-             {"FD3","System trap d-3."},
 
-             {"FD4","System trap d-4."},
 
-             {"FD5","System trap d-5."},
 
-             {"FD6","System trap d-6."},
 
-             {"FD7","System trap d-7."},
 
-             {"FD8","System trap d-8."},
 
-             {"FD9","System trap d-9."},
 
-             {"FDA","System trap d-10."},
 
-             {"FDB","System trap d-11."},
 
-             {"FDC","System trap d-12."},
 
-             {"FDD","System trap d-13."},
 
-             {"FDE","System trap d-14."},
 
-             {"FDF","System trap d-15."},
 
-             {"FE0","System trap E-0."},
 
-             {"FE2","System trap E-2."},
 
-             {"FE4","System trap E-4."},
 
-             {"FE6","System trap E-6."},
 
-             {"FE8","System trap E-8."},
 
-             {"FEA","System trap E-10."},
 
-             {"FEC","System trap E-12." },
 
-         };
 
-         #endregion
 
-         #region 含有缺省的错误码
 
-         public static readonly Dictionary<Regex, string> _EFEMHWRegexError2Msg = new Dictionary<Regex, string>()
 
-         {
 
-             { new Regex(@"(.)(?=06)"),"放大器类型不匹配"},
 
-             { new Regex(@"(.)(?=07)"),"编码器类型不匹配"},
 
-             { new Regex(@"(.)(?=10)"),"溢出电流已运行"},
 
-             { new Regex(@"(.)(?=30)"),"检测再生电路误差"},
 
-             { new Regex(@"(.)(?=40)"),"变换器电压异常高"},
 
-             { new Regex(@"(.)(?=41)"),"变换器电压低"},
 
-             { new Regex(@"(.)(?=45)"),"刹车被锁住了"},
 
-             { new Regex(@"(.)(?=46)"),"转换器出现错误"},
 
-             { new Regex(@"(.)(?=47)"),"输入功率出错"},
 
-             { new Regex(@"(.)(?=48)"),"变频器主电路出现错误"},
 
-             { new Regex(@"(.)(?=49)"),"放大器发生误差"},
 
-             { new Regex(@"(.)(?=51)"),"电机转速过高"},
 
-             { new Regex(@"(.)(?=71)"),"当扭矩很大程度上超过额定值时,应用几秒钟或几十秒钟"},
 
-             { new Regex(@"(.)(?=72)"),"一个很大程度上超过额定值的扭矩被连续施加"},
 
-             { new Regex(@"(.)(?=78)"),"转换器已经超载"},
 
-             { new Regex(@"(.)(?=7B)"),"放大器发生过热"},
 
-             { new Regex(@"(.)(?=7C)"),"当扭矩很大程度上超过额定值时,应用几秒钟或几十秒钟"},
 
-             { new Regex(@"(.)(?=7D)"),"一个很大程度上超过额定值的扭矩被连续施加"},
 
-             { new Regex(@"(.)(?=81)"),"绝对编码器的所有电源关闭,位置数据被清除"},
 
-             { new Regex(@"(.)(?=83)"),"编码器的后备电池的电压很低"},
 
-             { new Regex(@"(.)(?=84)"),"编码器内部数据错误"},
 
-             { new Regex(@"(.)(?=85)"),"开机时编码器高速旋转"},
 
-             { new Regex(@"(.)(?=86)"),"过热的任何类型的编码器"},
 
-             { new Regex(@"(.)(?=88)"),"编码器发生错误"},
 
-             { new Regex(@"(.)(?=89)"),"编码器的响应出现错误"},
 
-             { new Regex(@"(.)(?=8A)"),"编码器多圈范围错误发生"},
 
-             { new Regex(@"(.)(?=8C)"),"编码器复位未完成"},
 
-             { new Regex(@"(.)(?=98)"),"伺服参数异常"},
 
-             { new Regex(@"(.)(?=9A)"),"反馈发生溢出"},
 
-             { new Regex(@"(.)(?=B4)"),"发生微程序传输错误"},
 
-             { new Regex(@"(.)(?=BC)"),"编码器发生错误"},
 
-             { new Regex(@"(.)(?=C1)"),"伺服马达失去控制"},
 
-             { new Regex(@"(.)(?=C9)"),"编码器与伺服控制板之间的通信错误"},
 
-             { new Regex(@"(.)(?=CE)"),"编码器发生错误"},
 
-             { new Regex(@"(.)(?=CF)"),"编码器发生错误"},
 
-             { new Regex(@"(.)(?=D0)"),"位置偏移脉冲已超过设定值"},
 
-             { new Regex(@"(.)(?=D1)"),"位置偏差饱和"},
 
-             { new Regex(@"(.)(?=D2)"),"电机定向位置错误"},
 
-             { new Regex(@"(.)(?=D4)"),"伺服跟踪误差"},
 
-             { new Regex(@"(.)(?=F1)"),"阶段损失(转换器)"},
 
-             { new Regex(@"(?<=E)(.)(?=1)"),"命令发送后,轴定位无法完成"},
 
-             { new Regex(@"(?<=E)(.)(?=D)"),"不准备将命令发送到伺服控制板"},
 
-             { new Regex(@"(?<=E)(.)(?=E)"),"主控制板与伺服控制板之间发生通信错误"},
 
-             { new Regex(@"(?<=E)(.)(?=F)"),"伺服控制板无响应"},
 
-         };
 
-         #endregion
 
-     }
 
- }
 
 
  |