SunWayVce.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. using Aitex.Core.Common;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Log;
  4. using Aitex.Core.RT.SCCore;
  5. using Aitex.Core.Util;
  6. using MECF.Framework.Common.Communications;
  7. using MECF.Framework.Common.Equipment;
  8. using MECF.Framework.Common.SubstrateTrackings;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.IO.Ports;
  12. using System.Linq;
  13. using System.Text;
  14. using System.Text.RegularExpressions;
  15. using System.Threading.Tasks;
  16. using Venus_Core;
  17. using Venus_RT.Devices.EFEM;
  18. using Venus_RT.Devices.TM;
  19. using Venus_RT.Modules;
  20. namespace Venus_RT.Devices.VCE
  21. {
  22. /// <summary>
  23. /// 素珀 vce 驱动
  24. /// </summary>
  25. public class SunWayVce : VCEModuleBase
  26. {
  27. #region 私有变量
  28. private AsyncSerialPort _serialport;
  29. private string _portname;
  30. private string _newline = "\r\n";//终止符 0D 0A
  31. private object _locker = new object();
  32. private bool _IsAsciiMode;
  33. private LinkedList<string> _lstAsciiMsgs = new LinkedList<string>();
  34. private PeriodicJob _thread;
  35. private Regex _match_ReadMsg = new Regex(@"X,.*");
  36. private Regex _matchErrorCode = new Regex(@"(?<=_ERR,)(.*)");
  37. private ModuleName _moduleName;
  38. private RState _status;
  39. private string _currentMsg;
  40. private VceMessage _currentVceMessage;
  41. private bool _HasReceiveMsg;
  42. private bool _IsDashWaferError;
  43. private int _currentSlot = 0;
  44. public override int CurrentSlot => _currentSlot;
  45. private ModuleName _baseLPIndex
  46. {
  47. get
  48. {
  49. switch (RtInstance.ConfigType)
  50. {
  51. case ConfigType.VenusSE:
  52. return ModuleName.LP1;
  53. case ConfigType.VenusDE:
  54. return _moduleName == ModuleName.VCEA ? ModuleName.LP1 : ModuleName.LP2;
  55. default:
  56. return ModuleName.System;
  57. }
  58. }
  59. }
  60. private Loadport[] _LPMs = new Loadport[1];
  61. public override ILoadport this[ModuleName mod]
  62. {
  63. get
  64. {
  65. if (!ModuleHelper.IsLoadPort(mod))
  66. throw new ApplicationException($"{mod} is NOT Loadport");
  67. return _LPMs[mod - _baseLPIndex];
  68. }
  69. }
  70. //待补充
  71. private Dictionary<string, string> _ErrorCode2Reason = new Dictionary<string, string>()
  72. {
  73. {"221","错误的 ARM 参数" },
  74. {"233","伸缩信号未使能" },
  75. {"304","未识别的错误码" },
  76. {"305","未识别的指令" },
  77. {"309","不支持的指令" },
  78. {"401","ZWAFER 参数错误" },
  79. {"402","非法的 slot 参数" },
  80. {"403","运动指令 RX 参数错误" },
  81. {"404","晶圆夹取失败" },
  82. {"405","晶圆释放失败" },
  83. {"406","气缸压力表检测错误" },
  84. {"407","Mapping 传感器伸出失败" },
  85. {"408","Mapping 传感器缩回失败" },
  86. {"409","Mapping 传感器位置数据不正确" },
  87. {"411","Mapping 传感器高度不一致" },
  88. {"412","工位 VIA 参数未使能" },
  89. {"413","不是有效的 Mapping 工位" },
  90. {"414","手指有晶圆无法 mapping" },
  91. {"415","采集的数据个数错误" },
  92. {"416","采集的晶圆厚度过小" },
  93. {"417","晶圆位置超出有效范围" },
  94. {"418","晶圆上下沿槽数错误" },
  95. {"419","斜片上下沿槽数错误" },
  96. {"550","工位号超范围" },
  97. {"552","VIA 参数错误" },
  98. {"553","MAPVIA 参数错误" },
  99. {"600","系统未上电" },
  100. {"602","指令正在执行中" },
  101. {"603","系统上电失败" },
  102. {"604","示教器控制中" },
  103. {"605","机械手运动中停止" },
  104. {"609","系统存在错误" },
  105. {"610","示教盒急停启动" },
  106. {"611","驱动器报警" },
  107. {"629","驱动器存在报警" },
  108. {"705","LOAD 状态未知" },
  109. {"712","真空吸附动作失败" },
  110. {"730","PLACE 前 LOAD 状态错误" },
  111. {"731","PLACE 后 LOAD 状态错误" },
  112. {"734","PLACE 执行 Extend 过程中未检测到晶圆" },
  113. {"736","PLACE 执行 Retract 过程中检测到晶圆" },
  114. {"740","PICK 前 LOAD 状态错误" },
  115. {"741","PICK 后 LOAD 状态错误" },
  116. {"744","PICK 执行 Extend 过程中检测到晶圆" },
  117. {"745","PICK 执行 Retract 过程中未检测到晶圆" },
  118. {"1006","非法的 IO 端口号" },
  119. {"1314","PITCH 轴超界" },
  120. {"1315","关节位置超界" },
  121. {"1316","关节位置超硬限" },
  122. {"1320","机械手跟踪差超限错误" },
  123. {"1321","机械手发生碰撞" },
  124. {"1322","机械手超出工作区" },
  125. {"1323","关节速度超限" },
  126. {"1401","当前位置不正确" },
  127. {"1407","大气压力不足" },
  128. {"1412","晶圆已滑出" },
  129. {"1500","打开门失败" },
  130. {"1501","关闭门失败" },
  131. {"1502","门开关状态不对" },
  132. {"1503","门松开失败" },
  133. {"1504","门夹紧失败" },
  134. {"1506","当前不是自动门模式" },
  135. {"1507","开盖检测互锁" },
  136. {"1508","开门不允许运动" },
  137. {"1509","无 casette 盒不允许运动" },
  138. {"1510","安全检测触发" },
  139. {"1511","R 轴未运动到位" },
  140. {"1512","门动作开关未使能" },
  141. {"1513","运动开关未使能" },
  142. };
  143. //
  144. #endregion
  145. #region 暴露变量
  146. public override bool IsConnected => _serialport.IsOpen();
  147. public override RState Status => _status;
  148. public override bool IsReady => _status == RState.Init || _status == RState.End;
  149. public override bool IsError => _status == RState.Failed || _status == RState.Timeout;
  150. public override bool IsInit => _status == RState.Init;
  151. public override bool IsDashWaferError => _IsDashWaferError;
  152. private string[] _slotMap = new string[25];
  153. public string SlotMap
  154. {
  155. get
  156. {
  157. WaferInfo[] wafers = WaferManager.Instance.GetWafers(ModuleHelper.Converter(Name));
  158. string slot = "";
  159. for (int i = 0; i < 25; i++)
  160. {
  161. slot += wafers[i].IsEmpty ? "0" : "1";
  162. }
  163. return slot;
  164. }
  165. }
  166. private bool _OutDoorIsOpen
  167. {
  168. get
  169. {
  170. switch (_moduleName)
  171. {
  172. case ModuleName.VCE1:
  173. //2024-05-20 16:35:34 泓浒四边形硬件还未实现
  174. //DEVICE.GetDevice<HongHuTM>("SETM").VCEACassPresent
  175. return _vcedoorflag;
  176. case ModuleName.VCEA:
  177. if (DEVICE.GetDevice<SunWayDETM>("TM").VCEACassPresent)
  178. {
  179. _LPMs[0].HasCassette = true;
  180. }
  181. else
  182. {
  183. _LPMs[0].HasCassette = false;
  184. WaferManager.Instance.DeleteWafer(_LPMs[0].Module, 0, 25);
  185. }
  186. return !DEVICE.GetDevice<SunWayDETM>("TM").VCEALOCKED;
  187. case ModuleName.VCEB:
  188. if (DEVICE.GetDevice<SunWayDETM>("TM").VCEBCassPresent)
  189. {
  190. _LPMs[0].HasCassette = true;
  191. }
  192. else
  193. {
  194. _LPMs[0].HasCassette = false;
  195. WaferManager.Instance.DeleteWafer(_LPMs[0].Module, 0, 25);
  196. }
  197. return !DEVICE.GetDevice<SunWayDETM>("TM").VCEBLOCKED;
  198. default:
  199. return false;
  200. }
  201. }
  202. }
  203. public override bool OutDoorIsOpen => _OutDoorIsOpen;
  204. private bool _vcedoorflag;
  205. private bool _hasProtrusion
  206. {
  207. get
  208. {
  209. switch (_moduleName)
  210. {
  211. case ModuleName.VCE1:
  212. //2024-05-20 16:35:34 泓浒四边形硬件还未实现
  213. //DEVICE.GetDevice<HongHuTM>("SETM").VCEProtrusion
  214. return true;
  215. case ModuleName.VCEA:
  216. if (DEVICE.GetDevice<SunWayDETM>("TM").VCEAProtrusion)
  217. {
  218. _LPMs[0].Protrusion = true;
  219. return true;
  220. }
  221. else
  222. {
  223. _LPMs[0].Protrusion = false;
  224. return false;
  225. }
  226. case ModuleName.VCEB:
  227. if (DEVICE.GetDevice<SunWayDETM>("TM").VCEBProtrusion)
  228. {
  229. _LPMs[0].Protrusion = true;
  230. return true;
  231. }
  232. else
  233. {
  234. _LPMs[0].Protrusion = false;
  235. return false;
  236. }
  237. default:
  238. return false;
  239. }
  240. }
  241. }
  242. #endregion
  243. public SunWayVce(int slot, ModuleName moduleName) : base(slot, moduleName)
  244. {
  245. _moduleName = moduleName;
  246. _vcedoorflag = false;
  247. _IsAsciiMode = true;
  248. _portname = SC.GetStringValue($"{moduleName}.Port");
  249. _serialport = new AsyncSerialPort(_portname, 9600, 8, Parity.None, StopBits.One, _newline, _IsAsciiMode);
  250. _serialport.Open();
  251. _status = RState.Init;
  252. _serialport.OnDataChanged += onDataChange;
  253. _thread = new PeriodicJob(50, fnTimer, _moduleName.ToString(), true);
  254. if (moduleName == ModuleName.VCE1)
  255. _LPMs[0] = new Loadport(ModuleName.LP1);
  256. else
  257. _LPMs[0] = new Loadport((moduleName - ModuleName.VCEA) + ModuleName.LP1);
  258. CarrierManager.Instance.DeleteCarrier(_LPMs[0].Module.ToString());
  259. WaferManager.Instance.DeleteWafer(_LPMs[0].Module, 0, 25);
  260. CarrierManager.Instance.SubscribeLocation(_LPMs[0].Module.ToString(), 1);
  261. Action<ModuleName, int> _subscribeLoc = (ModuleName module, int waferCount) => {
  262. if (ModuleHelper.IsInstalled(module))
  263. {
  264. WaferManager.Instance.SubscribeLocation(module, waferCount);
  265. }
  266. };
  267. _subscribeLoc(_LPMs[0].Module, slot);
  268. }
  269. private bool fnTimer()
  270. {
  271. lock (_locker)
  272. {
  273. //采用ascii传输
  274. if (_IsAsciiMode)
  275. {
  276. //有数据尚未处理
  277. while (_lstAsciiMsgs.Count > 0)
  278. {
  279. string _needHandle = _lstAsciiMsgs.First.Value;
  280. HandleSingleMsg(_needHandle);
  281. _lstAsciiMsgs.RemoveFirst();
  282. }
  283. }
  284. //采用binary
  285. else
  286. {
  287. }
  288. }
  289. return true;
  290. }
  291. private void HandleSingleMsg(string rawmsgs)
  292. {
  293. string[] msgs = rawmsgs.Split('\r');
  294. foreach (var Msg in msgs)
  295. {
  296. string msg = Msg.Trim();
  297. LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"{_moduleName} Receive msg=>{msg}");
  298. if (!string.IsNullOrEmpty(msg))
  299. {
  300. //action set petrify _BKGRDY结束
  301. switch (_currentVceMessage.Head)
  302. {
  303. case VceMessageHead.Action:
  304. case VceMessageHead.Set:
  305. case VceMessageHead.Petrify:
  306. switch (msg)
  307. {
  308. //设备收到 开始运行 目前状态在下发
  309. case "_RDY":
  310. LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"vce {_currentVceMessage.Head} over");
  311. switch (_currentVceMessage.Command)
  312. {
  313. case VceCommand.Home:
  314. case VceCommand.Map:
  315. case VceCommand.GotoLP:
  316. _currentSlot = 0;
  317. break;
  318. case VceCommand.DoorClose:
  319. _vcedoorflag = false;
  320. break;
  321. case VceCommand.DoorOpen:
  322. _vcedoorflag = true;
  323. break;
  324. }
  325. _status = RState.End;
  326. break;
  327. //异常处理
  328. default:
  329. _status = RState.Failed;
  330. string reason;
  331. Errorhandle(msg, out reason);
  332. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, reason);
  333. break;
  334. }
  335. break;
  336. case VceMessageHead.Read:
  337. //如果收到的信息符合
  338. if (_match_ReadMsg.IsMatch(msg))
  339. {
  340. //收到消息 用于结束
  341. _HasReceiveMsg = true;
  342. switch (_currentVceMessage.Command)
  343. {
  344. //处理wafer 信息为map数据
  345. case VceCommand.ReadMap:
  346. ReadMapData(msg);
  347. break;
  348. case VceCommand.CheckStatus:
  349. ReadStatus(msg);
  350. break;
  351. }
  352. }
  353. //_RDY查询结束
  354. else
  355. {
  356. if (msg == "_RDY")
  357. {
  358. if (_HasReceiveMsg)
  359. {
  360. _status = RState.End;
  361. }
  362. else
  363. {
  364. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is over but not receive msg! raw message:{_currentMsg}");
  365. _status = RState.Failed;
  366. }
  367. }
  368. else
  369. {
  370. _status = RState.Failed;
  371. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Read Message is invalid: receive message {msg} and send message {_currentMsg}");
  372. }
  373. }
  374. break;
  375. }
  376. }
  377. }
  378. }
  379. private void ReadStatus(string msg)
  380. {
  381. try
  382. {
  383. //BRa,SLbb,CPc,WPd,ERe
  384. string[] status = msg.Split(',');
  385. _currentSlot = Convert.ToInt32(status[4].Substring(2, 2));
  386. }
  387. catch (Exception ex)
  388. {
  389. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"illegal msg:{msg}, {ex.Message}");
  390. }
  391. }
  392. private void ReadMapData(string msg)
  393. {
  394. string waferinfo = "";
  395. string[] waferitems = msg.Split(',');
  396. //智能模式 可以识别叠片
  397. for (int i = 3; i < waferitems.Length - 1; ++i)
  398. {
  399. //如果包含只需要逐个检查
  400. if (waferitems[i].Contains('?'))
  401. {
  402. foreach (char j in waferitems[i])
  403. {
  404. if (waferinfo.Length >= 25)
  405. break;
  406. else
  407. waferinfo += j;
  408. }
  409. }
  410. else
  411. waferinfo += waferitems[i];
  412. }
  413. for (int i = 0; i < waferinfo.Length; ++i)
  414. {
  415. int slotnum = i;
  416. if (slotnum < 25)
  417. {
  418. switch (waferinfo[i])
  419. {
  420. case '0':
  421. WaferManager.Instance.DeleteWafer(_LPMs[0].Module, slotnum);
  422. break;
  423. case 'X':
  424. WaferManager.Instance.CreateWafer(_LPMs[0].Module, slotnum, WaferStatus.Normal);
  425. break;
  426. case 'C':
  427. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Slot {i + 1}:double or dummy wafer.");
  428. WaferManager.Instance.CreateWafer(_LPMs[0].Module, slotnum, WaferStatus.Double);
  429. break;
  430. case '?':
  431. LOG.Write(eEvent.ERR_VCE_COMMON_Failed, _moduleName, $"Slot {i + 1}:Crossed wafer.");
  432. WaferManager.Instance.CreateWafer(_LPMs[0].Module, slotnum, WaferStatus.Crossed);
  433. break;
  434. }
  435. }
  436. }
  437. _LPMs[0].IsMapped = true;
  438. }
  439. private void Errorhandle(string msg, out string reason)
  440. {
  441. if (_matchErrorCode.IsMatch(msg))
  442. {
  443. //若是匹配
  444. //包含原因
  445. string errorcode = _matchErrorCode.Match(msg).Value;
  446. if (_ErrorCode2Reason.ContainsKey(errorcode))
  447. {
  448. if (errorcode == "L13")
  449. _IsDashWaferError = true;
  450. reason = _ErrorCode2Reason[errorcode];
  451. }
  452. else
  453. {
  454. reason = "未找到相关Error Code";
  455. }
  456. }
  457. else
  458. {
  459. //若不匹配
  460. reason = "回复消息不符合标准格式";
  461. }
  462. }
  463. private void onDataChange(string oneLineMessage)
  464. {
  465. lock (_locker)
  466. {
  467. if (string.IsNullOrEmpty(_newline))//没有CR
  468. {
  469. _lstAsciiMsgs.AddLast(oneLineMessage);//将消息添加到最后
  470. return;
  471. }
  472. string[] array = oneLineMessage.Split(_newline.ToCharArray());//按照cr分开通讯数据
  473. foreach (string text in array)
  474. {
  475. if (!string.IsNullOrEmpty(text))
  476. {
  477. _lstAsciiMsgs.AddLast(text + _newline);//存进list中等待处理
  478. }
  479. }
  480. }
  481. }
  482. public override bool ServerUp()
  483. {
  484. if (!CheckVceStatus())
  485. return false;
  486. _currentVceMessage = new VceMessage { Head = VceMessageHead.Set, Command = VceCommand.ServerUp, Param = "ALL,ON" };
  487. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  488. _status = RState.Running;
  489. return _serialport.Write(_currentMsg);
  490. }
  491. public override bool HomeALL()
  492. {
  493. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.Home, Param = "ALL" };
  494. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  495. _status = RState.Running;
  496. return _serialport.Write(_currentMsg);
  497. }
  498. public override bool Home(string axis)
  499. {
  500. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.Home, Param = axis };
  501. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  502. _status = RState.Running;
  503. return _serialport.Write(_currentMsg);
  504. }
  505. public override bool CheckStatus()
  506. {
  507. if (!CheckVceStatus())
  508. return false;
  509. _currentVceMessage = new VceMessage { Head = VceMessageHead.Read, Command = VceCommand.CheckStatus };
  510. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  511. _status = RState.Running;
  512. return _serialport.Write(_currentMsg);
  513. }
  514. public override bool CloseDoor()
  515. {
  516. if (!CheckVceStatus())
  517. return false;
  518. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.DoorClose };
  519. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  520. _status = RState.Running;
  521. return _serialport.Write(_currentMsg);
  522. }
  523. /// <summary>
  524. /// 开门提示
  525. /// 在honghuVCE中没有ATM信号的内部卡控 可能会导致开门的压差
  526. /// 因此每一次都要增加判断,只要引用此处功能的,前面都需要有判断
  527. ///
  528. /// </summary>
  529. /// <returns></returns>
  530. public override bool OpenDoor()
  531. {
  532. //如果其他指令正在执行 且
  533. //if (!CheckVceStatus())
  534. // return false;
  535. if (_IsDashWaferError)
  536. _IsDashWaferError = false;
  537. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.DoorOpen };
  538. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  539. _status = RState.Running;
  540. return _serialport.Write(_currentMsg);
  541. }
  542. public override bool Load()
  543. {
  544. if (!CheckVceStatus())
  545. return false;
  546. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.Load };
  547. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  548. _status = RState.Running;
  549. return _serialport.Write(_currentMsg);
  550. }
  551. public override bool UnLoad()
  552. {
  553. if (!CheckVceStatus())
  554. return false;
  555. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.UnLoad };
  556. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  557. _status = RState.Running;
  558. return _serialport.Write(_currentMsg);
  559. }
  560. public override bool Map()
  561. {
  562. if (!CheckVceStatus())
  563. return false;
  564. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.Map };
  565. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  566. _status = RState.Running;
  567. return _serialport.Write(_currentMsg);
  568. }
  569. public override bool ReadMap()
  570. {
  571. if (!CheckVceStatus())
  572. return false;
  573. _currentVceMessage = new VceMessage { Head = VceMessageHead.Read, Command = VceCommand.ReadMap, Param = "S" };
  574. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  575. _status = RState.Running;
  576. _HasReceiveMsg = false;
  577. return _serialport.Write(_currentMsg);
  578. }
  579. public override bool Goto(int Targetslot)
  580. {
  581. if (!CheckVceStatus())
  582. return false;
  583. LOG.Write(eEvent.EV_VCE_COMMON_INFO, _moduleName, $"SlotNum:{Targetslot}");
  584. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.Goto, Param = (Targetslot + 1).ToString().PadLeft(2, '0') };
  585. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  586. _status = RState.Running;
  587. return _serialport.Write(_currentMsg);
  588. }
  589. public override bool GotoLP()
  590. {
  591. if (!CheckVceStatus())
  592. return false;
  593. _currentVceMessage = new VceMessage { Head = VceMessageHead.Action, Command = VceCommand.GotoLP };
  594. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  595. _status = RState.Running;
  596. return _serialport.Write(_currentMsg);
  597. }
  598. public override bool ClearError()
  599. {
  600. _currentVceMessage = new VceMessage { Head = VceMessageHead.Set, Command = VceCommand.ClearError };
  601. _currentMsg = _currentVceMessage.toSunWayString() + _newline;
  602. _status = RState.Running;
  603. return _serialport.Write(_currentMsg);
  604. }
  605. }
  606. }