EfemMessage.cs 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Reflection;
  5. using System.Runtime.Serialization;
  6. using System.Runtime.Serialization.Formatters.Binary;
  7. using System.Text.RegularExpressions;
  8. using Aitex.Core.Backend;
  9. using Aitex.Core.RT.Event;
  10. using Aitex.Core.RT.Log;
  11. using Aitex.Sorter.Common;
  12. using MECF.Framework.Common.Equipment;
  13. using Venus_Core;
  14. namespace Venus_RT.Devices.YASKAWA
  15. {
  16. [Serializable]
  17. public sealed class EfemMessage : IEfemMessage, ICloneable
  18. {
  19. public enum MsgHead
  20. {
  21. MOV, GET, ACK, INF, SET, CAN, ABS, EVT, NAK
  22. }
  23. public const char EOF = ';';
  24. public EfemOperation Operation { get; set; }
  25. public MsgHead Head { get; set; }
  26. public ModuleName Port { get; set; }
  27. public IList<string> Data { get; set; }
  28. public MsgDirection Direct { get; set; } = MsgDirection.To;
  29. public IList<string> Parameters { get; set; }
  30. public string RawString { get; set; }
  31. public string Factor { get; set; } // NAK, CAN
  32. public override string ToString()
  33. {
  34. string sPara = ToParamString();
  35. string sOP = EfemConstant.OperationString[Operation];
  36. string context = $"{Head}:{sOP}{sPara}{EOF}\r";
  37. return context;
  38. }
  39. public string ToParamString()
  40. {
  41. string res = string.Empty;
  42. if (Parameters == null || Parameters.Count <= 0)
  43. return res;
  44. foreach (var para in Parameters)
  45. {
  46. res += '/' + para;
  47. }
  48. return res;
  49. }
  50. public object Clone()
  51. {
  52. using (Stream objStream = new MemoryStream())
  53. {
  54. IFormatter formatter = new BinaryFormatter();
  55. formatter.Serialize(objStream, this);
  56. objStream.Seek(0, SeekOrigin.Begin);
  57. return formatter.Deserialize(objStream) as EfemMessage ?? throw new InvalidOperationException();
  58. }
  59. }
  60. }
  61. [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Field)]
  62. public class HardwareCmdAttribute : Attribute
  63. {
  64. public string Member { get; set; }
  65. public HardwareCmdAttribute(string str) { this.Member = str; }
  66. }
  67. [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Field)]
  68. public class InterpretationAttribute : Attribute
  69. {
  70. public string Comment { get; set; }
  71. public InterpretationAttribute(string str) { this.Comment = str; }
  72. }
  73. public static class Extension
  74. {
  75. private const string ERROR_MSG = "hardware message invalid";
  76. /// <summary>
  77. /// NAK:FACTOR|Message*;
  78. /// ACK:Message*;
  79. /// CAN:Message*|Factor/Place;
  80. /// ABS:Message*|Error/Parameter1/Parameter2;
  81. /// EVT:Message*;
  82. /// </summary>
  83. public static EfemMessage ToMessage(this string context)
  84. {
  85. if (string.IsNullOrEmpty(context) || context.Length < 3)
  86. throw new ArgumentNullException(ERROR_MSG);
  87. EfemMessage msg = new EfemMessage { RawString = context, Direct = MsgDirection.From, Data = new List<string>() };
  88. // remove EOT
  89. string messageBody = context.Substring(0, context.IndexOf(EfemMessage.EOF) + 1);
  90. try
  91. {
  92. // split up the string
  93. string[] sBodies = messageBody.Split(Constant.delimiters);
  94. string sHead = sBodies[0];
  95. string sBasic = sBodies[1];
  96. string sPort = sBodies[2];
  97. // Head
  98. if (Enum.TryParse(sHead, true, out EfemMessage.MsgHead msgHead))
  99. {
  100. msg.Head = msgHead;
  101. }
  102. switch (msg.Head)
  103. {
  104. case EfemMessage.MsgHead.ACK:
  105. case EfemMessage.MsgHead.MOV:
  106. case EfemMessage.MsgHead.INF:
  107. case EfemMessage.MsgHead.EVT:
  108. // Basic
  109. msg.Operation = EfemConstant.ToOperation(sBasic);
  110. // Port
  111. if (Regex.IsMatch(sPort, @"P[123]$"))
  112. {
  113. msg.Port = sPort.ToModule();
  114. }
  115. else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
  116. {
  117. msg.Port = sPort.ToModule();
  118. }
  119. else
  120. {
  121. msg.Port = ModuleName.EFEM;
  122. }
  123. // Data
  124. switch (msg.Operation)
  125. {
  126. case EfemOperation.StateTrack:
  127. case EfemOperation.GetWaferInfo:
  128. msg.Data.Add(sBodies[3]);
  129. break;
  130. case EfemOperation.CarrierId:
  131. msg.Data.Add(msg.RawString.Substring("INF:CSTID/P1/".Length));
  132. break;
  133. case EfemOperation.SigStatus:
  134. msg.Data.Add(sBodies[2]);
  135. msg.Data.Add(sBodies[3]);
  136. msg.Data.Add(sBodies[4]);
  137. break;
  138. case EfemOperation.Ready:
  139. msg.Data.Add(sBodies[2]);
  140. break;
  141. default:
  142. break;
  143. }
  144. break;
  145. case EfemMessage.MsgHead.NAK:
  146. msg.Operation = EfemConstant.ToOperation(sBasic);
  147. // Port
  148. if (Regex.IsMatch(sPort, @"P[123]$"))
  149. {
  150. msg.Port = sPort.ToModule();
  151. }
  152. else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
  153. {
  154. msg.Port = sPort.ToModule();
  155. }
  156. else
  157. {
  158. msg.Port = ModuleName.EFEM;
  159. }
  160. msg.Factor = sBodies[1];
  161. msg.Data.Add(sBodies[2]);
  162. msg.Operation = EfemConstant.ToOperation(sBasic);
  163. break;
  164. case EfemMessage.MsgHead.CAN:
  165. msg.Operation = EfemConstant.ToOperation(sBasic);
  166. // Port
  167. if (Regex.IsMatch(sPort, @"P[123]$"))
  168. {
  169. msg.Port = sPort.ToModule();
  170. }
  171. else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
  172. {
  173. msg.Port = sPort.ToModule();
  174. }
  175. else
  176. {
  177. msg.Port = ModuleName.EFEM;
  178. }
  179. // CAN:ERROR/CLEAR;
  180. int a1 = messageBody.IndexOf(':');
  181. int a3 = messageBody.IndexOf(';');
  182. int a2 = messageBody.IndexOf('|');
  183. if (a2 > 0)
  184. {
  185. msg.Data.Add(messageBody.Substring(a1 + 1, a2 - a1 - 1));
  186. msg.Factor = messageBody.Substring(a2 + 1, a3 - a2 - 1);
  187. }
  188. else
  189. {
  190. int a8 = messageBody.IndexOf('/');
  191. msg.Factor = sBodies[2];
  192. }
  193. break;
  194. case EfemMessage.MsgHead.ABS:
  195. msg.Operation = EfemConstant.ToOperation(sBasic);
  196. // Port
  197. if (Regex.IsMatch(sPort, @"P[123]$"))
  198. {
  199. msg.Port = sPort.ToModule();
  200. }
  201. else if (Regex.IsMatch(sPort, @"ALIGN\d?", RegexOptions.IgnoreCase))
  202. {
  203. msg.Port = sPort.ToModule();
  204. }
  205. else
  206. {
  207. msg.Port = ModuleName.EFEM;
  208. }
  209. // ABS:INIT/ALL|ERROR/SYSTEM_FF10/UNDEFINITION;
  210. int a4 = messageBody.IndexOf('|');
  211. int a5 = messageBody.IndexOf(';');
  212. // ABS:LOAD/LLLB01/ARM2|ERROR/RB|2B80;
  213. string errStr = messageBody.Substring(a4 + 1, a5 - a4 - 1);
  214. //分割位置和因素 最后一位是需要处理
  215. string[] a6 = errStr.Split('/','|');
  216. if (a6.Length < 3)
  217. {
  218. LOG.Write(eEvent.WARN_EFEM_COMMON_WARN, ModuleName.EFEM, $"ABS 格式错误 {errStr}");
  219. }
  220. msg.Factor = a6[0];
  221. msg.Data.Add(a6[1]);
  222. string errorcode = a6[2].Substring(1);
  223. if (Constant._EFEMHWErrorCode2Msg.ContainsKey(errorcode))
  224. msg.Data.Add(Constant._EFEMHWErrorCode2Msg[errorcode]);
  225. else if (!string.IsNullOrEmpty(MatchError(errorcode)))
  226. msg.Data.Add(MatchError(errorcode));
  227. else
  228. msg.Data.Add(a6[2]);
  229. break;
  230. }
  231. }
  232. catch (Exception ex)
  233. {
  234. EV.PostAlarmLog(ModuleName.EFEM.ToString(), $"收到[{context}],解析出错[{ex.Message}]");
  235. }
  236. return msg;
  237. }
  238. private static string MatchError(string errorcode)
  239. {
  240. foreach (KeyValuePair<Regex, string> item in Constant._EFEMHWRegexError2Msg)
  241. {
  242. if (item.Key.IsMatch(errorcode))
  243. return item.Value;
  244. }
  245. return string.Empty;
  246. }
  247. public static string ToHWString(this Position pos)
  248. {
  249. string res = string.Empty;
  250. if (ModuleHelper.IsAligner(pos.Module) || ModuleHelper.IsCooling(pos.Module))
  251. {
  252. res = Constant.ModuleString[pos.Module];
  253. }
  254. else
  255. {
  256. string sMod = Constant.ModuleString[pos.Module];
  257. int num = pos.Slot + 1;
  258. string sSlot = num.ToString("D2");
  259. res = $"{sMod}{sSlot}";
  260. }
  261. return res;
  262. }
  263. public static string ToHWString(this ModuleName mod)
  264. {
  265. return Constant.ModuleString[mod];
  266. }
  267. public static ModuleName ToModule(this string str)
  268. {
  269. if (Constant.StringModule.ContainsKey(str))
  270. return Constant.StringModule[str];
  271. throw new ApplicationException($"Cannot translate {str}");
  272. }
  273. public static string HardwareCmd(this Enum val)
  274. {
  275. FieldInfo fi = val.GetType().GetField(val.ToString());
  276. return fi.GetCustomAttributes(typeof(HardwareCmdAttribute), false) is HardwareCmdAttribute[] attrs
  277. && attrs.Length > 0 ? attrs[0].Member : val.ToString();
  278. }
  279. public static string Interpretation(this Enum val)
  280. {
  281. FieldInfo fi = val.GetType().GetField(val.ToString());
  282. return fi.GetCustomAttributes(typeof(InterpretationAttribute), false) is InterpretationAttribute[] attrs
  283. && attrs.Length > 0 ? attrs[0].Comment : val.ToString();
  284. }
  285. }
  286. /// <summary>
  287. /// constant define
  288. /// </summary>
  289. public class Constant
  290. {
  291. public static readonly char[] delimiters = { ':', '/', '>', '|', ';' };
  292. public const string ALL = "ALL";
  293. public const string MAP = "MAPDT";
  294. public const string SYS = "SYSTEM";
  295. public const string STOWER = "STOWER";
  296. public static readonly Dictionary<ModuleName, string> ModuleString = new Dictionary<ModuleName, string>
  297. {
  298. [ModuleName.EFEM] = "ALL",
  299. [ModuleName.EfemRobot]= "ROB",
  300. [ModuleName.LLA] = "LLLA",
  301. [ModuleName.LLB] = "LLLB",
  302. [ModuleName.LP1] = "P1",
  303. [ModuleName.LP2] = "P2",
  304. [ModuleName.LP3] = "P3",
  305. [ModuleName.PMA] = "LLA",
  306. [ModuleName.PMB] = "LLB",
  307. [ModuleName.Aligner1] = "ALIGN3",
  308. [ModuleName.Aligner2] = "ALIGN4",
  309. [ModuleName.Cooling1] = "ALIGN",
  310. [ModuleName.Cooling2] = "ALIGN2",
  311. [ModuleName.Buffer] = "BUFFER"
  312. };
  313. public static readonly Dictionary<string, ModuleName> StringModule = new Dictionary<string, ModuleName>
  314. {
  315. ["ALL"] = ModuleName.EFEM,
  316. ["System"] = ModuleName.EFEM,
  317. ["P1"] = ModuleName.LP1,
  318. ["P2"] = ModuleName.LP2,
  319. ["P3"] = ModuleName.LP3,
  320. ["LLA"] = ModuleName.PMA,
  321. ["LLB"] = ModuleName.PMB,
  322. ["ALIGN"] = ModuleName.Cooling1,
  323. ["ALIGN2"] = ModuleName.Cooling2,
  324. ["ALIGN3"] = ModuleName.Aligner1,
  325. ["ALIGN4"] = ModuleName.Aligner2,
  326. ["BUFFER"] = ModuleName.Buffer,
  327. ["LLLA"] = ModuleName.LLA,
  328. ["LLLB"] = ModuleName.LLB,
  329. };
  330. public static readonly Dictionary<Hand, string> ArmString = new Dictionary<Hand, string>
  331. {
  332. [Hand.Blade1] = "ARM2",
  333. [Hand.Blade2] = "ARM1",
  334. [Hand.Both] = "ARM3"
  335. };
  336. public static readonly Dictionary<ExtendPos, string> ExtendPosString = new Dictionary<ExtendPos, string>
  337. {
  338. //[ExtendPos.GetReady] = "G1",
  339. //[ExtendPos.GetTarget] = "GB",
  340. //[ExtendPos.GetBack] = "G4",
  341. //[ExtendPos.PutReady] = "P1",
  342. //[ExtendPos.PutTarget] = "PB",
  343. //[ExtendPos.PutBack] = "P4"
  344. };
  345. public static readonly Dictionary<string, string> FactorString = new Dictionary<string, string>
  346. {
  347. { "MSG", "Message error" },
  348. { "NOREAD", "Communication not established" },
  349. { "NOINITCMPL", "Initialization not completed" },
  350. { "NOORGCMPL", "Not org finished" },
  351. { "VAC", "Vac error" },
  352. { "AIR", "Air error" },
  353. { "EMS", "EMS pushed" },
  354. { "ERROR", "Has Error" },
  355. { "BUSY", "Busy (Module in use)" },
  356. { "CMPL", "Already Completed" },
  357. { "NOMAPCMPL", "Not Mapped" },
  358. { "NONWAF", "NO wafer on the position" },
  359. { "WAFER", "Wafer already existed" },
  360. { "NONPOD", "No Pod" },
  361. { "POD", "Pod Exist" },
  362. { "NOTINMOTION","Not in Motion" },
  363. { "HOLD", "Holded" },
  364. { "NOHOLD", "Not hold" },
  365. { "LLCLOSE", "LL door closed state" },
  366. { "LLNOEXTEND", "LL not extended" },
  367. { "REMOVE", "remove" },
  368. { "MAINTENANCE","In maintain mode or EFEM offline" },
  369. { "NOLINK", "not config" },
  370. { "ARMEXTEND", "arm extended" },
  371. { "POWER", "power off" },
  372. { "PRTWAF", "TODO" },
  373. { "NOPOS", "Not at valid position" },
  374. { "NOFUNC", "not support" },
  375. { "PARAM_NG", "Invalid parameters are included" }
  376. };
  377. public static readonly Dictionary<string, string> ABS_PARA1 = new Dictionary<string, string>
  378. {
  379. { "SYSTEM_FF01", "No specific route data or malfunction" },
  380. { "SYSTEM_FF10", "Operation time out" },
  381. { "SYSTEM_FF11", "Communication time out between PC for robot control and controller" },
  382. { "SYSTEM_FF12", "Encoder battery error" },
  383. { "SYSTEM_FF13", "Loss of encoder information" },
  384. { "SYSTEM_FF20", "No data file of route" },
  385. { "SYSTEM_FF21", "Serial number in route data is wrong" },
  386. { "SYSTEM_FF22", "No line for serial number in route data" },
  387. { "SYSTEM_FF23", "Discrepancy in serial number between route data and teaching data" },
  388. { "SYSTEM_FF30", "Failure of pre-operation movement at the wrist in the robot" },
  389. { "SYSTEM_FF83", "Inability of the robot to return origin" },
  390. { "SYSTEM_FFB0", "Operation malfunction at fan in robot" },
  391. { "SYSTEM_FFF0", "Alarm at Z-axis driver in the robot" },
  392. { "SYSTEM_FFFF", "Robot control program malfunction" }
  393. };
  394. #region 硬件错误码
  395. public static readonly Dictionary<string, string> _EFEMHWErrorCode2Msg = new Dictionary<string, string>()
  396. {
  397. {"020","伺服电源关闭,运动指令失败"},
  398. {"021","伺服电源开启,设置命令失败"},
  399. {"040","命令被拒绝,因为主机命令是在控制器处于TEACH模式时发送的"},
  400. {"050","命令被拒绝,因为当主机向同一单元发送另一个运动命令时,该单元正在执行运动命令"},
  401. {"051","当间距生成方法设置为“自动计算模式”时,主机尝试在槽间设置间距"},
  402. {"052","重新启动命令被拒绝,因为在电源打开后立即发生错误"},
  403. {"053","Get/Put(或exchange)命令被拒绝,因为在此之前没有执行“移动到就绪位置”命令"},
  404. {"054","晶圆片对准命令被拒绝,因为在对准命令之前,预对准器的“移动到对准就绪位置”命令没有被执行"},
  405. {"055","指定了不可访问的站类型"},
  406. {"058","命令被拒绝,因为发送的命令不被指定的单元支持"},
  407. {"059","“传送点之间的移动”命令被拒绝,因为指定了一个无效点"},
  408. {"05A","不能移动,因为机械手在线性运动不能执行的范围(或姿势)"},
  409. {"05C","晶圆对中没有执行"},
  410. {"05D","手臂校准被拒绝,因为预对准阶段没有记录"},
  411. {"05E","映射数据引用命令被拒绝,因为映射从未执行过"},
  412. {"05F","命令被拒绝,因为数据上传/下载命令正在进行中"},
  413. {"061","无法从目前的操纵姿势安全回家"},
  414. {"064","升降机与预对准器相撞"},
  415. {"070","命令被拒绝,因为底部槽位没有被记录"},
  416. {"071","命令被拒绝,因为当俯仰产生方法设置为“自动计算模式”时,没有记录顶部槽位"},
  417. {"088","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  418. {"089","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  419. {"08A","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  420. {"08B","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  421. {"08C","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  422. {"08D","由教学位置计算出的转换位置(姿势)超出了运动极限"},
  423. {"090","来自主机的通信命令的参数设置超出范围"},
  424. {"0A0","未执行对齐运动,因为对齐器未准备好在具有对齐角度的put运动命令中运行"},
  425. {"0E0","调整偏移量超过限额"},
  426. {"0F0","输入电压太低" },
  427. {"701","伺服控制板或ROM有缺陷"},
  428. {"703","主控制板与伺服控制板之间发生通信错误"},
  429. {"704","主控制板与伺服控制板之间发生通信错误"},
  430. {"705","主控板与变频器之间发生通信错误"},
  431. {"706","伺服控制板出现系统错误"},
  432. {"707","伺服控制板出现系统错误"},
  433. {"709","电流不正常"},
  434. {"70A","检测到电源丢失"},
  435. {"70B","防突电流继电器不正常"},
  436. {"70C","转换器类型不匹配"},
  437. {"70F","伺服控制板无响应"},
  438. {"713","DB是不正常的"},
  439. {"714","发生变换器充电错误"},
  440. {"715","出现硬线基块错误"},
  441. {"716","发生硬线基启用错误"},
  442. {"717","发生基本块错误"},
  443. {"718","发生基本启用错误"},
  444. {"719","请求硬线座释放,但不释放"},
  445. {"71A","刹车锁定错误"},
  446. {"71B","刹车解锁错误"},
  447. {"71C","电源继电器不正常"},
  448. {"721","伺服参数异常"},
  449. {"722","伺服参数异常"},
  450. {"725","检测到转换器过热"},
  451. {"726","检测到未定义的命令"},
  452. {"727","检测到不支持的命令"},
  453. {"728","检测到命令的数据异常"},
  454. {"729","伺服控制板出现系统错误"},
  455. {"72A","伺服控制板出现系统错误"},
  456. {"72B","伺服参数值异常"},
  457. {"730","Amp模块未安装"},
  458. {"732","伺服参数异常"},
  459. {"733","伺服参数异常"},
  460. {"734","伺服参数异常"},
  461. {"735","伺服参数异常"},
  462. {"73F","从伺服控制板接收未定义的错误"},
  463. {"740","发生错误时PG"},
  464. {"741","请求多重伺服开启"},
  465. {"742","伺服控制板出现系统错误"},
  466. {"743","伺服控制板出现系统错误"},
  467. {"744","伺服控制板出现系统错误"},
  468. {"745","伺服控制板出现系统错误"},
  469. {"746","伺服控制板出现系统错误"},
  470. {"74A","伺服控制板出现系统错误"},
  471. {"74B","伺服控制板出现系统错误"},
  472. {"74C","伺服控制板出现系统错误"},
  473. {"74D","伺服控制板出现系统错误"},
  474. {"7A0","PAIF接收到一条未定义的命令"},
  475. {"7A1","PAIF板检测到命令的参数值超出范围"},
  476. {"7A2","检测到不支持的命令"},
  477. {"7A3","数据缓冲区已满"},
  478. {"7A4","检测到不支持的命令"},
  479. {"7A5","编码器数据异常"},
  480. {"7A6","检测到不支持的命令"},
  481. {"7AE","PA板还没有准备好"},
  482. {"7AF","PA板没有回应"},
  483. {"7B0","CCD传感器头电源电压低"},
  484. {"7B4","关闭CCD光源LED"},
  485. {"7B5","CCD光源LED光强下降"},
  486. {"7C0","发现PAIF板的看门狗"},
  487. {"7C1","检测到低电压"},
  488. {"7C2","异常中断发生"},
  489. {"7C3","打开LED,但光强度为零"},
  490. {"7CF","没有安装PAIF板"},
  491. {"7D0","检测到过电压"},
  492. {"7D1","数据采集失败"},
  493. {"900","主机命令消息中断"},
  494. {"910","从主机接收到的数据的总和是无效的"},
  495. {"920","从主机接收到未定义单元的命令"},
  496. {"930","从主机接收的命令未定义"},
  497. {"940","附加到从主机接收到的命令的参数为"},
  498. {"950","执行完成的确认报告没有从主机收到"},
  499. {"960","从主机接收到的命令消息中序列号不正确"},
  500. {"961","序列号与先前从主机接收到的命令消息上的序列号相同"},
  501. {"970","没有定界符"},
  502. {"9A1","当控制器收到来自主机的命令时,消息缓冲区已满"},
  503. {"9C0","局域网设备设置无效"},
  504. {"9C1","设置的IP地址无效"},
  505. {"9C2","设置子网掩码无效"},
  506. {"9C3","设置默认的门方式无效"},
  507. {"9D0","主机消息接收失败(以太网)"},
  508. {"9E0","来自主机的请求是不可接受的,因为在运行维护工具期间"},
  509. {"9E1","由于使用维护工具获取数据时内部数据被破坏,无法获取"},
  510. {"A01","重新检测电源电压的下降"},
  511. {"A10","外部紧急停机(EXESP)由I/O启用"},
  512. {"A20","TP紧急停止按钮被按下"},
  513. {"A21","检测联锁板故障"},
  514. {"A30","紧急停机由主机发出指令"},
  515. {"A40","控制器冷却风扇1出现错误"},
  516. {"A41","控制器冷却风扇2出现错误"},
  517. {"A42","控制器冷却风扇3出现错误"},
  518. {"A45","1号风机有故障"},
  519. {"A46","2号机有故障"},
  520. {"A4F","控制器的内存备份电池不足"},
  521. {"AC0","从I/O输入一个安全栅栏(SAFF)信号"},
  522. {"AC9","保护停止(ONEN)信号从I/O输入"},
  523. {"AE0","由教学挂件控制,切换到“主机”模式"},
  524. {"AE1","模式切换到“教导”,同时由主机控制"},
  525. {"AE8","教学挂起过程中释放了死门开关"},
  526. {"AF0","检测联锁板故障"},
  527. {"AF1","检测联锁板故障"},
  528. {"AF2","检测联锁板故障"},
  529. {"AF3","检测联锁板故障"},
  530. {"AF4","检测联锁板故障"},
  531. {"AF5","检测联锁板故障"},
  532. {"AF6","检测联锁板故障"},
  533. {"AF8","交叉检查比较错误的教学挂件紧急停止"},
  534. {"AF9","对联锁输入信号1进行交叉校验比较误差"},
  535. {"AFA","对外部紧急停止信号的比较误差进行交叉检查"},
  536. {"AFB","反复检查死区开关信号的比较误差"},
  537. {"AFC","反复检查安全围栏信号(SAFF)的比较误差"},
  538. {"AFD","反复检查保护停止信号(ONEN)的比较误差"},
  539. {"AFE","对联锁输入信号2进行交叉校验比较误差"},
  540. {"AFF","对联锁输入信号进行交叉校验比较误差3" },
  541. {"B10","轴1超过允许速度"},
  542. {"B11","轴2超过允许速度"},
  543. {"B12","轴3超过允许速度"},
  544. {"B13","轴4超过允许速度"},
  545. {"B14","轴5超过允许速度"},
  546. {"B20","超过正向轴对称-1运动范围"},
  547. {"B21","在正方向超过轴-2运动范围"},
  548. {"B22","在正方向超过轴-3运动范围"},
  549. {"B23","在正方向超过轴-4运动范围"},
  550. {"B24","超过轴-5正向运动范围"},
  551. {"B28","当映射运动开始时,正向超过Axis-1运动范围"},
  552. {"B29","当映射运动开始时,正向超过轴-2运动范围"},
  553. {"B2A","当映射运动开始时,正向超过轴-3运动范围"},
  554. {"B2B","当映射运动开始时,正向超过轴-4运动范围"},
  555. {"B2C","当映射运动开始时,正向超过轴-5运动范围"},
  556. {"B30","超轴向-1运动范围"},
  557. {"B31","超过轴-2的负向运动范围"},
  558. {"B32","超过轴-3向负方向的运动范围"},
  559. {"B33","超过轴-4的负向运动范围"},
  560. {"B34","超过轴-5的负向运动范围"},
  561. {"B38","当映射运动开始时,在负方向上超过了Axis-1运动范围"},
  562. {"B39","当映射运动开始时,超过轴-2的负向运动范围"},
  563. {"B3A","当映射运动开始时,超过轴-3的负向运动范围"},
  564. {"B3B","当映射运动开始时,超过轴-4的负向运动范围"},
  565. {"B3C","当映射运动开始时,超过轴-5的负向运动范围"},
  566. {"B40","超时访问权限信号1发生"},
  567. {"B41","超时访问权限信号2发生"},
  568. {"B42","超时访问权限信号3发生"},
  569. {"B43","超时访问权限信号4发生"},
  570. {"B44","超时访问权限信号5发生"},
  571. {"B45","超时访问权限信号6发生"},
  572. {"B46","超时访问权限信号7发生" },
  573. {"B47","超时访问权限信号8发生"},
  574. {"B48","超时访问权限信号9发生"},
  575. {"B49","超时访问权限信号10发生"},
  576. {"B4A","超时访问权限信号11发生"},
  577. {"B4B","超时访问权限信号12发生"},
  578. {"B4C","超时访问权限信号13发生"},
  579. {"B4D","超时访问权限信号14发生"},
  580. {"B4E","超时访问权限信号15发生"},
  581. {"B4F","超时访问权限信号16发生"},
  582. {"B60","预对准器在访问P/A阶段时正在运行(用于边缘对准器)"},
  583. {"B61","预对准器在进入P/ a阶段时持晶圆片"},
  584. {"B62","晶圆片在到达P/A阶段时不在预对准器上晶圆片在P/A阶段的预对准器上(用于边缘抓地力预平衡器)"},
  585. {"B63","当P/A阶段访问时,预对准器没有处于“发布”状态(用于边缘对准器)"},
  586. {"B64","当P/A阶段进入时,Lifer不是上/下端(用于边缘对准器)"},
  587. {"B65","当P/A阶段进入时,预对准器未处于准备位置(用于边缘对准器)"},
  588. {"B66","使用Get指定的P/A阶段不是指定的阶段(用于边缘对准器)"},
  589. {"B68","由于机械手已经进入P/A阶段或机械手的进入阶段不理解预对准器无法移动(用于边缘对准器)"},
  590. {"B70","操作过程中检测到软件停止信号"},
  591. {"B80","真空/抓地力传感器未在规定时间内打开"},
  592. {"B81","真空/抓地力传感器未在规定时间内关闭"},
  593. {"B82","晶圆片存在/缺失传感器在规定的时间内没有打开"},
  594. {"B83","晶圆片存在/缺失传感器没有在规定的时间内关闭"},
  595. {"B88","抓地力传感器未在规定时间内打开(用于边缘对准器)"},
  596. {"B89","抓地力传感器未在规定时间内关闭(用于边缘对准器)"},
  597. {"B8A","松开传感器在规定时间内不打开(用于边缘对准器)"},
  598. {"B8B","松开感测器未在规定时间内关闭(用于边缘对准器)"},
  599. {"B8F","叉1的柱塞在观察时间内没有移动"},
  600. {"B90","真空/抓地力传感器未在规定时间内打开"},
  601. {"B91","真空/抓地力传感器未在规定时间内关闭"},
  602. {"B92","晶圆片存在/缺失传感器在规定的时间内没有打开"},
  603. {"B93","晶圆片存在/缺失传感器没有在规定的时间内关闭"},
  604. {"B98","升降机上传感器在规定的时间内没有打开(用于边缘对准器)"},
  605. {"B99","升降机上传感器没有在规定的时间内关闭(用于边缘对准器)"},
  606. {"B9A","升降机下降传感器未在规定时间内打开(用于边缘对准器)"},
  607. {"B9B","升降机下降传感器未在规定时间内关闭(用于边缘对准器)"},
  608. {"B9F","叉2的柱塞在观察时间内没有移动"},
  609. {"BA0","当机械手(Fork1)/预对准器传送晶圆时,真空/握把传感器或晶圆存在/缺失传感器关闭"},
  610. {"BA1","Fork 1的真空/握把传感器是开着的,而wafer存在/缺失传感器是关着的"},
  611. {"BA8","握力传感器在预对准器运动时关闭,握力传感器打开(用于边缘对准器)"},
  612. {"BA9","抓地力传感器在预对准器运动时打开,抓地力传感器关闭(对于边缘抓地力预对准器)"},
  613. {"BAA","在预对准过程中,松开传感器关闭,松开传感器打开(用于边缘对准器)"},
  614. {"BAB","在预对准期间,松开传感器打开,松开传感器关闭(对于边缘握把预对准器)"},
  615. {"BAC","握力传感器和反握力传感器都打开了(用于边缘对准器)"},
  616. {"BAD","手柄传感器指示晶圆存在,升降机传感器指示lifer启动(用于边缘对准器)"},
  617. {"BB0","吸/抓力传感器或晶圆片存在/缺失传感器在叉2保持和传送晶圆片时关闭"},
  618. {"BB1","Fork 2的吸力/抓力传感器是开着的,而晶圆的存在/缺失传感器是关着时"},
  619. {"BB8","升力传感器在预对准过程中处于关闭状态,升力传感器处于开启状态(用于边缘对准器)"},
  620. {"BB9","在预对准过程中,升降传感器处于开启状态,升降传感器处于关闭状态(用于边缘抓地力预对准)"},
  621. {"BBA","在预对准过程中,升降传感器处于关闭状态,升降传感器处于开启状态(用于边缘对准器)"},
  622. {"BBB","在预对准过程中,升降传感器处于开启状态,升降传感器处于关闭状态(用于边缘抓地力预对准)"},
  623. {"BBC","升降式传感器和升降式传感器均处于工作状态(用于边缘握把预对准器)"},
  624. {"BF0","当机械手被保持信号停止时,运动请求被传送"},
  625. {"C80","晶圆片对准的有效数据不足"},
  626. {"C90","缺口/定位平面位置无法分辨"},
  627. {"CA0","无法检测到准确的晶圆中心位置"},
  628. {"CB0","晶圆偏心轮数量过多"},
  629. {"CC0","无法检测到准确的缺口/定位平面位置"},
  630. {"CD0","校正后的量超过允许的范围"},
  631. {"CE0","无法正确执行手臂校准"},
  632. {"D00","映射传感器波束在映射开始时就已经被阻塞"},
  633. {"D10","无法正确执行映射校准"},
  634. {"D20","从未执行映射校准"},
  635. {"D30","测图或测图校准的采样数据异常"},
  636. {"D40","在绘图或绘图校准时检测到晶圆突出"},
  637. {"D50","在映射或映射校准时检测到抖动"},
  638. {"D60","对于“顶面GET / PUT工作站”,映射或映射校准无法强制执行" },
  639. {"E90","系统配置错误"},
  640. {"E91","机械手配置错误"},
  641. {"EA0","实型通用参数设置警告"},
  642. {"EA1","整型通用参数设置警告"},
  643. {"EA4","实型机组参数设置警告"},
  644. {"EA5","整型单元参数设置警告"},
  645. {"EB0","实型通用参数设置无效"},
  646. {"EB1","整型通用参数设置无效"},
  647. {"EB4","实型单元参数设置无效"},
  648. {"EB5","整型单元参数设置无效"},
  649. {"EC0","软件与设置参数不匹配"},
  650. {"ED0","发生内存操作错误"},
  651. {"ED1","发生内存操作错误"},
  652. {"EE0","文件打开失败"},
  653. {"EE1","关闭文件失败"},
  654. {"EE2","读取文件失败"},
  655. {"EE3","写入文件失败"},
  656. {"EE4","删除文件失败"},
  657. {"EE5","参数初始化文件大小无效"},
  658. {"EE8","创建文件夹失败"},
  659. {"EF0","“格式请求文件”中的数据无效"},
  660. {"EF1","“自动更新请求文件”中的数据无效"},
  661. {"EF2","“伺服参数文件”中的数据无效"},
  662. {"EF3","“通用参数文件”中的无效数据"},
  663. {"EF4","“单元参数文件”中的数据无效"},
  664. {"EF5","“位置数据文件”中的数据无效"},
  665. {"EF8","“伺服参数自动更新文件”中的数据无效"},
  666. {"EF9","“常用参数自动更新文件”中的无效数据"},
  667. {"EFA","“单元参数自动更新文件”中的无效数据"},
  668. {"EFE","在控制器中记录数据异常1"},
  669. {"EFF","文件数据异常2在控制器"},
  670. {"F10","System error 1-0."},
  671. {"F11","System error 1-1."},
  672. {"F12","System error 1-2."},
  673. {"F14","System error 1-4."},
  674. {"F20","System error 2-0."},
  675. {"F21","System error 2-1."},
  676. {"F22","System error 2-2."},
  677. {"F50","System error 5-0."},
  678. {"F51","System error 5-1."},
  679. {"F61","System Error 6-1."},
  680. {"F62","System Error 6-2."},
  681. {"F70","System Error 7-0."},
  682. {"F82","System error 8-2."},
  683. {"F83","System error 8-3."},
  684. {"F84","System error 8-4."},
  685. {"F86","System error 8-6."},
  686. {"F88","System error 8-8."},
  687. {"F90","System trap 9-0."},
  688. {"F91","System trap 9-1."},
  689. {"F92","System trap 9-2."},
  690. {"F93","System trap 9-3."},
  691. {"F94","System trap 9-4."},
  692. {"F95","System trap 9-5."},
  693. {"F98","System trap 9-8."},
  694. {"F99","System trap 9-9."},
  695. {"F9A","System trap 9-10."},
  696. {"F9B","System trap 9-11."},
  697. {"F9C","System trap 9-12."},
  698. {"F9D","System trap 9-13."},
  699. {"FA0","System trap A-0."},
  700. {"FA1","System trap A-1."},
  701. {"FA2","System trap A-2."},
  702. {"FA3","System trap A-3."},
  703. {"FA4","System trap A-4."},
  704. {"FA8","System trap A-8."},
  705. {"FA9","System trap A-9."},
  706. {"FAA","System trap A-10."},
  707. {"FAB","System trap A-11."},
  708. {"FB0","System trap b-0."},
  709. {"FB1","System trap b-1."},
  710. {"FB8","System trap b-8."},
  711. {"FB9","System trap b-9." },
  712. {"FC0","System trap C-0."},
  713. {"FC4","System trap C-4."},
  714. {"FC5","System trap C-5."},
  715. {"FC8","System trap C-8."},
  716. {"FCC","System trap C-12."},
  717. {"FD0","System trap d-0."},
  718. {"FD1","System trap d-1."},
  719. {"FD2","System trap d-2."},
  720. {"FD3","System trap d-3."},
  721. {"FD4","System trap d-4."},
  722. {"FD5","System trap d-5."},
  723. {"FD6","System trap d-6."},
  724. {"FD7","System trap d-7."},
  725. {"FD8","System trap d-8."},
  726. {"FD9","System trap d-9."},
  727. {"FDA","System trap d-10."},
  728. {"FDB","System trap d-11."},
  729. {"FDC","System trap d-12."},
  730. {"FDD","System trap d-13."},
  731. {"FDE","System trap d-14."},
  732. {"FDF","System trap d-15."},
  733. {"FE0","System trap E-0."},
  734. {"FE2","System trap E-2."},
  735. {"FE4","System trap E-4."},
  736. {"FE6","System trap E-6."},
  737. {"FE8","System trap E-8."},
  738. {"FEA","System trap E-10."},
  739. {"FEC","System trap E-12." },
  740. };
  741. #endregion
  742. #region 含有缺省的错误码
  743. public static readonly Dictionary<Regex, string> _EFEMHWRegexError2Msg = new Dictionary<Regex, string>()
  744. {
  745. { new Regex(@"(.)(?=06)"),"放大器类型不匹配"},
  746. { new Regex(@"(.)(?=07)"),"编码器类型不匹配"},
  747. { new Regex(@"(.)(?=10)"),"溢出电流已运行"},
  748. { new Regex(@"(.)(?=30)"),"检测再生电路误差"},
  749. { new Regex(@"(.)(?=40)"),"变换器电压异常高"},
  750. { new Regex(@"(.)(?=41)"),"变换器电压低"},
  751. { new Regex(@"(.)(?=45)"),"刹车被锁住了"},
  752. { new Regex(@"(.)(?=46)"),"转换器出现错误"},
  753. { new Regex(@"(.)(?=47)"),"输入功率出错"},
  754. { new Regex(@"(.)(?=48)"),"变频器主电路出现错误"},
  755. { new Regex(@"(.)(?=49)"),"放大器发生误差"},
  756. { new Regex(@"(.)(?=51)"),"电机转速过高"},
  757. { new Regex(@"(.)(?=71)"),"当扭矩很大程度上超过额定值时,应用几秒钟或几十秒钟"},
  758. { new Regex(@"(.)(?=72)"),"一个很大程度上超过额定值的扭矩被连续施加"},
  759. { new Regex(@"(.)(?=78)"),"转换器已经超载"},
  760. { new Regex(@"(.)(?=7B)"),"放大器发生过热"},
  761. { new Regex(@"(.)(?=7C)"),"当扭矩很大程度上超过额定值时,应用几秒钟或几十秒钟"},
  762. { new Regex(@"(.)(?=7D)"),"一个很大程度上超过额定值的扭矩被连续施加"},
  763. { new Regex(@"(.)(?=81)"),"绝对编码器的所有电源关闭,位置数据被清除"},
  764. { new Regex(@"(.)(?=83)"),"编码器的后备电池的电压很低"},
  765. { new Regex(@"(.)(?=84)"),"编码器内部数据错误"},
  766. { new Regex(@"(.)(?=85)"),"开机时编码器高速旋转"},
  767. { new Regex(@"(.)(?=86)"),"过热的任何类型的编码器"},
  768. { new Regex(@"(.)(?=88)"),"编码器发生错误"},
  769. { new Regex(@"(.)(?=89)"),"编码器的响应出现错误"},
  770. { new Regex(@"(.)(?=8A)"),"编码器多圈范围错误发生"},
  771. { new Regex(@"(.)(?=8C)"),"编码器复位未完成"},
  772. { new Regex(@"(.)(?=98)"),"伺服参数异常"},
  773. { new Regex(@"(.)(?=9A)"),"反馈发生溢出"},
  774. { new Regex(@"(.)(?=B4)"),"发生微程序传输错误"},
  775. { new Regex(@"(.)(?=BC)"),"编码器发生错误"},
  776. { new Regex(@"(.)(?=C1)"),"伺服马达失去控制"},
  777. { new Regex(@"(.)(?=C9)"),"编码器与伺服控制板之间的通信错误"},
  778. { new Regex(@"(.)(?=CE)"),"编码器发生错误"},
  779. { new Regex(@"(.)(?=CF)"),"编码器发生错误"},
  780. { new Regex(@"(.)(?=D0)"),"位置偏移脉冲已超过设定值"},
  781. { new Regex(@"(.)(?=D1)"),"位置偏差饱和"},
  782. { new Regex(@"(.)(?=D2)"),"电机定向位置错误"},
  783. { new Regex(@"(.)(?=D4)"),"伺服跟踪误差"},
  784. { new Regex(@"(.)(?=F1)"),"阶段损失(转换器)"},
  785. { new Regex(@"(?<=E)(.)(?=1)"),"命令发送后,轴定位无法完成"},
  786. { new Regex(@"(?<=E)(.)(?=D)"),"不准备将命令发送到伺服控制板"},
  787. { new Regex(@"(?<=E)(.)(?=E)"),"主控制板与伺服控制板之间发生通信错误"},
  788. { new Regex(@"(?<=E)(.)(?=F)"),"伺服控制板无响应"},
  789. };
  790. #endregion
  791. }
  792. }