EfemMessage.cs 42 KB

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