123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- using Aitex.Core.Util;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MECF.Framework.Common.Device.LinMot
- {
- public class LinMotErrorCodeManager : Singleton<LinMotErrorCodeManager>
- {
- private Dictionary<short, string> _errorCodeTextDic = new Dictionary<short, string>();
- public void Initialize()
- {
- _errorCodeTextDic[0x0001] = "Logic Supply Too Low";
- _errorCodeTextDic[0x0002] = "Logic Supply Too High";
- _errorCodeTextDic[0x0003] = "X1 Pwr Voltage Too Low";
- _errorCodeTextDic[0x0004] = "X1 Pwr Voltage Too High";
- _errorCodeTextDic[0x0005] = "X1 RR Not Connected";
- _errorCodeTextDic[0x0006] = "PTC 1 Sensor Too Hot";
- _errorCodeTextDic[0x0007] = "Min Pos Undershot";
- _errorCodeTextDic[0x0008] = "Max Pos Overshot";
- _errorCodeTextDic[0x0009] = "Ext-Int Sensor Diff Err";
- _errorCodeTextDic[0x000A] = "X13 Signals Missing";
- _errorCodeTextDic[0x000B] = "Pos Lag Always Too Big";
- _errorCodeTextDic[0x000C] = "Pos Lag Standing Too Big";
- _errorCodeTextDic[0x000D] = "X1 Pwr Over Current";
- _errorCodeTextDic[0x000E] = "Supply Dig Out Missing";
- _errorCodeTextDic[0x000F] = "PTC 2 Sensor Too Hot";
- _errorCodeTextDic[0x0010] = "Drive Ph1+ Too Hot";
- _errorCodeTextDic[0x0011] = "Drive Ph1- Too Hot";
- _errorCodeTextDic[0x0012] = "Drive Ph2+ Too Hot";
- _errorCodeTextDic[0x0013] = "Drive Ph2- Too Hot";
- _errorCodeTextDic[0x0014] = "Drive Pwr Too Hot";
- _errorCodeTextDic[0x0015] = "Drive RR switch hot";
- _errorCodeTextDic[0x0016] = "Drive X3 Too Hot";
- _errorCodeTextDic[0x0017] = "Drive Core Too Hot";
- _errorCodeTextDic[0x0018] = "Power Bridge Ph1+ Defective";
- _errorCodeTextDic[0x0019] = "Power Bridge Ph1- Defective";
- _errorCodeTextDic[0x001A] = "Power Bridge Ph2+ Defective";
- _errorCodeTextDic[0x001B] = "Power Bridge Ph2- Defective";
- _errorCodeTextDic[0x001C] = "Supply DigOut X6 Fuse Blown";
- _errorCodeTextDic[0x001D] = "X3.3 5V Fuse Blown";
- _errorCodeTextDic[0x001E] = "X3.8 AGND Fuse Blown";
- _errorCodeTextDic[0x001F] = "Power Stage defective";
- _errorCodeTextDic[0x0020] = "Motor Hot Sensor";
- _errorCodeTextDic[0x0021] = "X3 Hall Sig Missing";
- _errorCodeTextDic[0x0022] = "Motor Slider Missing";
- _errorCodeTextDic[0x0023] = "Motor Short Time Overload";
- _errorCodeTextDic[0x0024] = "RR Hot Calculated";
- _errorCodeTextDic[0x0025] = "Sensor Alarm On X13";
- _errorCodeTextDic[0x0026] = "Motor Sensor Cold";
- _errorCodeTextDic[0x0028] = "Ph1+ Short Circuit To GND";
- _errorCodeTextDic[0x0029] = "Ph1- Short Circuit To GND";
- _errorCodeTextDic[0x002A] = "Ph2+ Short Circuit To GND";
- _errorCodeTextDic[0x002B] = "Ph2- Short Circuit To GND";
- _errorCodeTextDic[0x002C] = "Ph1 Short Circuit To Ph2";
- _errorCodeTextDic[0x002F] = "X1 Motor Voltage Too High";
- _errorCodeTextDic[0x0030] = "Ph1+ Wired To Ph2+";
- _errorCodeTextDic[0x0031] = "Ph1+ Wired To Ph2-";
- _errorCodeTextDic[0x0032] = "Ph1+ Not Wired To Ph1-";
- _errorCodeTextDic[0x0033] = "Ph2+ Wired To Ph1+";
- _errorCodeTextDic[0x0034] = "Ph2+ Wired To Ph1-";
- _errorCodeTextDic[0x0035] = "Ph2+ Not Wired To Ph2-";
- _errorCodeTextDic[0x0036] = "Ph1 Short Circuit To Ph2+";
- _errorCodeTextDic[0x0037] = "Ph1 Short Circuit To Ph2-";
- _errorCodeTextDic[0x0038] = "Ph2 Short Circuit To Ph1+";
- _errorCodeTextDic[0x0039] = "Ph2 Short Circuit To Ph1-";
- _errorCodeTextDic[0x003A] = "Phase U broken";
- _errorCodeTextDic[0x003B] = "Phase V broken";
- _errorCodeTextDic[0x003C] = "Phase W broken";
- _errorCodeTextDic[0x003D] = "Wrong Motor Type";
- _errorCodeTextDic[0x0040] = "X4.3 Brake Driver Error";
- _errorCodeTextDic[0x0041] = "Dig Out X4.4..X4.11 Status";
- _errorCodeTextDic[0x0042] = "Dig Out X6 Status";
- _errorCodeTextDic[0x0043] = "Fan Driver Error";
- _errorCodeTextDic[0x0044] = "X4 Dig Out GND Fuse Blown";
- _errorCodeTextDic[0x0045] = "Motor Comm Lost";
- _errorCodeTextDic[0x0046] = "PTC 1 Broken";
- _errorCodeTextDic[0x0047] = "PTC 1 Short To 24V";
- _errorCodeTextDic[0x0048] = "Motor Invalid Data";
- _errorCodeTextDic[0x0049] = "Info Checksum";
- _errorCodeTextDic[0x004A] = "Data Checksum";
- _errorCodeTextDic[0x004B] = "Bad Motor Comm";
- _errorCodeTextDic[0x004C] = "No Motor connected/found";
- _errorCodeTextDic[0x004D] = "Motor HW Version invalid";
- _errorCodeTextDic[0x004E] = "Motor SW Version invalid";
- _errorCodeTextDic[0x004F] = "Motor Cfg Data Ver invalid";
- _errorCodeTextDic[0x0050] = "HW Not Supported";
- _errorCodeTextDic[0x0051] = "SW Key Missing";
- _errorCodeTextDic[0x0052] = "SW Key Missing";
- _errorCodeTextDic[0x0053] = "Act Vel too high";
- _errorCodeTextDic[0x0057] = "SW Key Missing";
- _errorCodeTextDic[0x0058] = "ROM write error";
- _errorCodeTextDic[0x0059] = "Par Job List Ovflw";
- _errorCodeTextDic[0x005A] = "Motor Temp Line Low";
- _errorCodeTextDic[0x005C] = "Commutation frequency high";
- _errorCodeTextDic[0x005D] = "No Motor TempSensor Def";
- _errorCodeTextDic[0x005E] = "Par Range Error";
- _errorCodeTextDic[0x005F] = "Par Access Error";
- _errorCodeTextDic[0x0060] = "RR Voltage Set Too Low";
- _errorCodeTextDic[0x0061] = "RR Hysteresis < 0.5V";
- _errorCodeTextDic[0x0062] = "Curve Not Defined";
- _errorCodeTextDic[0x0063] = "Pos Ctrl Max Curr High";
- _errorCodeTextDic[0x0064] = "No Motor Defined";
- _errorCodeTextDic[0x0065] = "No Trigger Mode Defined";
- _errorCodeTextDic[0x0066] = "Lin Distance Error";
- _errorCodeTextDic[0x0067] = "Wrong Stator Type";
- _errorCodeTextDic[0x0068] = "No Motor Communication";
- _errorCodeTextDic[0x0069] = "Wrong Slider";
- _errorCodeTextDic[0x006A] = "UPID Err Range Ind";
- _errorCodeTextDic[0x006B] = "Commutation not Supp";
- _errorCodeTextDic[0x006C] = "Par Access wrong UPID";
- _errorCodeTextDic[0x006D] = "Par Access Wrong Type";
- _errorCodeTextDic[0x006E] = "Motor not supported";
- _errorCodeTextDic[0x006F] = "Wrong Motor Ttype";
- _errorCodeTextDic[0x0070] = "Pos Corr Tab Not Exists";
- _errorCodeTextDic[0x0071] = "Pos Corr Tab not Supp";
- _errorCodeTextDic[0x0080] = "Lin:Not Homed";
- _errorCodeTextDic[0x0081] = "Unknown Motion Cmd";
- _errorCodeTextDic[0x0082] = "PVT Buffer Overflow";
- _errorCodeTextDic[0x0083] = "PVT Buffer Underflow";
- _errorCodeTextDic[0x0084] = "PVT Master Too Fast";
- _errorCodeTextDic[0x0085] = "PVT Master Too Slow";
- _errorCodeTextDic[0x0086] = "Motion Cmd In Wrong St";
- _errorCodeTextDic[0x0087] = "Limit Switch Neg High";
- _errorCodeTextDic[0x0088] = "Limit Switch Pos High";
- _errorCodeTextDic[0x0089] = "Curve Amp Scale Error";
- _errorCodeTextDic[0x008A] = "Cmd Tab Entry Not Def";
- _errorCodeTextDic[0x0090] = "Less Calc Time C0";
- _errorCodeTextDic[0x0091] = "Less Calc Time C1";
- _errorCodeTextDic[0x0092] = "Less Calc Time C2";
- _errorCodeTextDic[0x0093] = "Less Calc Time C3";
- _errorCodeTextDic[0x00A0] = "Sensor Comm. CRC";
- _errorCodeTextDic[0x00A1] = "X13 Sensor Error";
- _errorCodeTextDic[0x00A2] = "X13 Sensor Comm. ACK";
- _errorCodeTextDic[0x00A4] = "X13 Sensor Comm. TO";
- }
- /// <summary>
- /// 获取错误码内容
- /// </summary>
- /// <param name="errorCode"></param>
- /// <returns></returns>
- public string GetErrorCodeText(short errorCode)
- {
- return _errorCodeTextDic.ContainsKey(errorCode) ? _errorCodeTextDic[errorCode] : "";
- }
- }
- }
|