diff --git a/Aucma.Core.RunPlc/RunPlcService.cs b/Aucma.Core.RunPlc/RunPlcService.cs index 623b1ae3..50667b54 100644 --- a/Aucma.Core.RunPlc/RunPlcService.cs +++ b/Aucma.Core.RunPlc/RunPlcService.cs @@ -16,9 +16,10 @@ namespace Aucma.Core.RunPlc { Task.Run(async () => { await StartMelsecMcPlcServer();//三菱PLC + //StartSiemensPlcServer();//西门子 }); - //StartSiemensPlcServer();//西门子 + } #endregion @@ -51,7 +52,7 @@ namespace Aucma.Core.RunPlc return Task.CompletedTask; } - private static void StartSiemensPlcServer() + private static Task StartSiemensPlcServer() { var allPlcServices = Appsettings.app("PLCServer").ToList(); foreach (var item in allPlcServices) @@ -64,6 +65,7 @@ namespace Aucma.Core.RunPlc model.plc = new SiemensPlc(item.IP, item.Port); PlcHelper.siemensList.Add(model); } + return Task.CompletedTask; } #endregion diff --git a/Aucma.Core.SheetMetal/Startup.cs b/Aucma.Core.SheetMetal/Startup.cs index d49f7c02..0372fbbf 100644 --- a/Aucma.Core.SheetMetal/Startup.cs +++ b/Aucma.Core.SheetMetal/Startup.cs @@ -92,7 +92,7 @@ namespace Aucma.Core.SheetMetal // QuartzNetJobȷ app.UseQuartzJobMildd(tasksQzService, schedulerCenter); //PLC - //app.UsePlcMildd(runPlcService); + app.UsePlcMildd(runPlcService); } #region ע