| | |
| | | { |
| | | try |
| | | { |
| | | var obj = JsonConvert.DeserializeObject<AutoLineMacQueueBak>(zwordstr); |
| | | ConfigAOI1.zwoid = obj.zwoid; |
| | | var obj = JsonConvert.DeserializeObject<AutoLineMacQueueBak>(zwordstr); |
| | | if (!string.IsNullOrEmpty(obj.zwoid) && obj.zstatus == "200") |
| | | { |
| | | ConfigAOI1.zwoid = obj.zwoid; |
| | | Plc1.WriteSingleAddress(1524, 1, out _); |
| | | Plc1.WriteSingleAddress(1514, 1, out _); |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Information, $"RabbitMQ zwoid获取成功 {obj.zstatus} {obj.zwoid} "); |
| | |
| | | { |
| | | ResponseMessage msg = new ResponseMessage(); |
| | | |
| | | var plcnum11 = Plc3.Read(1542, 1, out _); |
| | | var plcnum12 = Plc3.Read(1544, 1, out _); |
| | | var plcnum11 = Plc1.Read(1542, 1, out _); |
| | | var plcnum12 = Plc1.Read(1544, 1, out _); |
| | | |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"PLC信息记录保存触发 获取PLC序号{plcnum11[0]}和{plcnum12[0]}"); |
| | | |
| | |
| | | |
| | | string saveTary_ID=string.Empty; |
| | | |
| | | if (!Issuccess && !Issuccess1) |
| | | { |
| | | Plc3.WriteSingleAddress(2120, 2, out _); |
| | | return msg; |
| | | } |
| | | //if (!Issuccess && !Issuccess1) |
| | | //{ |
| | | // Plc3.WriteSingleAddress(2120, 2, out _); |
| | | // return msg; |
| | | //} |
| | | |
| | | LogAsync(DateTime.Now, EnumHelper.LogLevel.Assist, $"产品信息上传MES触发,产品信息数量为:{M141Config.Productioncode.Count}"); |
| | | |
| | |
| | | if (M141Config.Isprint && !string.IsNullOrEmpty(tary_ID)) |
| | | { |
| | | saveTary_ID = tary_ID; |
| | | StartPrint(tary_ID, "Honeywell PX240S(300 dpi)"); |
| | | StartPrint(tary_ID, "Honeywell PX240S (300 dpi)"); |
| | | M141Config.MES_codes.Add(new MES_code |
| | | { |
| | | Printers_code = tary_ID |
| | |
| | | if (M141Config.Isprint && !string.IsNullOrEmpty(tary_ID)) |
| | | { |
| | | saveTary_ID = tary_ID; |
| | | StartPrint(tary_ID, "Honeywell PX240S(300 dpi)"); |
| | | StartPrint(tary_ID, "Honeywell PX240S (300 dpi)"); |
| | | M141Config.MES_codes.Add(new MES_code |
| | | { |
| | | Printers_code = tary_ID |
| | |
| | | if (M141Config.Isprint && !string.IsNullOrEmpty(tary_ID)) |
| | | { |
| | | saveTary_ID = tary_ID; |
| | | StartPrint(tary_ID, "Honeywell PX240S(300 dpi)"); |
| | | StartPrint(tary_ID, "Honeywell PX240S (300 dpi)"); |
| | | M141Config.MES_codes.Add(new MES_code |
| | | { |
| | | Printers_code = tary_ID |
| | |
| | | { |
| | | if (M141Config.Isprint && !string.IsNullOrEmpty(saveTary_ID)) |
| | | { |
| | | StartPrint(saveTary_ID, "Honeywell PX240S(300 dpi)"); |
| | | StartPrint(saveTary_ID, "Honeywell PX240S (300 dpi)"); |
| | | } |
| | | } |
| | | if (Issuccess && Issuccess1) |
| | | { |
| | | Plc3.WriteSingleAddress(2120, 1, out _); |
| | | return msg; |
| | | } |
| | | else |
| | | { |
| | | Plc3.WriteSingleAddress(2120, 2, out _); |
| | | return msg; |
| | | } |
| | | //if (Issuccess && Issuccess1) |
| | | //{ |
| | | Plc3.WriteSingleAddress(2120, 1, out _); |
| | | return msg; |
| | | //} |
| | | //else |
| | | //{ |
| | | // Plc3.WriteSingleAddress(2120, 2, out _); |
| | | // return msg; |
| | | //} |
| | | |
| | | } |
| | | |