|
@@ -2189,14 +2189,23 @@ namespace TeamAAS_VP.Core
|
|
|
//产品发生改变并且供料器发生了变化时,需要通知PLC进行取料更改
|
|
//产品发生改变并且供料器发生了变化时,需要通知PLC进行取料更改
|
|
|
|
|
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameraPickStatus.Address, (Int16)3);
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameraPickStatus.Address, (Int16)3);
|
|
|
|
|
+ string[] items = response.Split('\n');
|
|
|
|
|
|
|
|
|
|
+ string snItem = items.FirstOrDefault(f => f.Contains("sn="));
|
|
|
|
|
+ if (snItem != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ProductMainSN = snItem.Replace("sn=", "").Trim();
|
|
|
|
|
+ _productService.CurrentProductCode = ProductMainSN;
|
|
|
|
|
+ await plc.WriteNodeAsync<string>(string.Format(addressConfig.In_Code.Address, 0), ProductMainSN);
|
|
|
|
|
+ SendTaskMessage($"产品主sn:{ProductMainSN}", MessageLevel.Info);
|
|
|
|
|
+ }
|
|
|
LogHelper.WriteLogMes($"询问mes失败");
|
|
LogHelper.WriteLogMes($"询问mes失败");
|
|
|
SendTaskMessage($"询问mes失败:{response}", MessageLevel.Error);
|
|
SendTaskMessage($"询问mes失败:{response}", MessageLevel.Error);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- SendTaskMessage($"扫码失败", MessageLevel.Alarm);
|
|
|
|
|
|
|
+ SendTaskMessage($"扫码失败", MessageLevel.Alarm);
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameraPickStatus.Address, (Int16)3);
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameraPickStatus.Address, (Int16)3);
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|