|
|
@@ -2741,8 +2741,17 @@ namespace TeamAAS_VP.Core
|
|
|
{
|
|
|
//这里缺少从MES获取产品配方的内容,需要补充
|
|
|
_LastMesCheckTime[i] = (await _mesService.GetServerTimeAsync(code, 2)).Now;
|
|
|
- ProductMainSN = "";
|
|
|
- var stationConfig2 = _configService.GetDeviceInfo(0);
|
|
|
+ DeviceInfo stationConfig2 = new DeviceInfo();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ stationConfig2 = _configService.GetDeviceInfo(i);
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ await plc.WriteNodeAsync(string.Format(addressConfig.Out_MesStatus.Address, i), (Int16)2);
|
|
|
+ SendTaskMessage($"设置无当前站点:{i}", MessageLevel.Error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
//if (homeview.IsNoCode == false)
|
|
|
//{
|