| | |
| | | break; |
| | | } |
| | | |
| | | string errorStr = "异常信息:"; |
| | | string errorStr = string.Empty; |
| | | //将异常信息显示到LED屏幕上 |
| | | var (errorRes0, errorVal0) = plcConn.GetPlcDBValue(PLCDataTypeEnum.Bit, $"M{dbStr}.0", ""); |
| | | if (errorRes0.IsSucceed && errorVal0 == true) |
| | |
| | | { |
| | | errorStr += " 扫码仪通讯报警"; |
| | | } |
| | | ledText += $"申请入库失败\n\n"; |
| | | ledText += $"{errorStr}"; |
| | | LedDisplay(modDevice.LedIP, ledText); |
| | | |
| | | if (!string.IsNullOrEmpty(errorStr)) |
| | | { |
| | | errorStr = "异常信息:" + errorStr; |
| | | |
| | | ledText += $"申请入库失败\n\n"; |
| | | ledText += $"{errorStr}"; |
| | | LedDisplay(modDevice.LedIP, ledText); |
| | | } |
| | | } |
| | | break; |
| | | case "320": |
| | |
| | | } |
| | | } |
| | | |
| | | private static void LedDisplay(string ip,string text) |
| | | private static void LedDisplay(string ip,string text,int type=0) |
| | | { |
| | | try |
| | | { |
| | | LedDll Led = new LedDll(); |
| | | Led.ConsoleLeds(ip, text); |
| | | if (type == 0) |
| | | { |
| | | Led.ConsoleLeds(ip, text); |
| | | } |
| | | else |
| | | { |
| | | Led.LEDstr(ip, text); |
| | | } |
| | | |
| | | // 设置实例 |
| | | //Led.ConsoleLeds("10.18.51.238", $"任务类型:{TaskTypeEnum.Move.GetDescription()}\n\n任务号:TK2024102100001\n托盘号:LN000145\n\n起始位:033\n目标位:R01-02010102"); |
| | | } |