From 6df66e4932b28891c383beec4b9bb7db1072c1d6 Mon Sep 17 00:00:00 2001 From: "liulb@mesnac.com" Date: Sun, 19 Nov 2023 22:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=97=A8=E4=BD=93=E5=8F=91?= =?UTF-8?q?=E6=B3=A1PLC=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuartzNet/Jobs/Job_DoorFoam_Quartz.cs | 48 +++++++++++++++++++ .../QuartzNet/Jobs/Job_Perfusion_Quartz.cs | 4 +- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Admin.Core.Tasks/QuartzNet/Jobs/Job_DoorFoam_Quartz.cs diff --git a/Admin.Core.Tasks/QuartzNet/Jobs/Job_DoorFoam_Quartz.cs b/Admin.Core.Tasks/QuartzNet/Jobs/Job_DoorFoam_Quartz.cs new file mode 100644 index 00000000..75a0b310 --- /dev/null +++ b/Admin.Core.Tasks/QuartzNet/Jobs/Job_DoorFoam_Quartz.cs @@ -0,0 +1,48 @@ +using Admin.Core.IService; +using Admin.Core.IService.ISys; +using Admin.Core.Model; +using Aucma.Core.PLc; +using log4net; +using NetTaste; +using NPOI.SS.Formula.Functions; +using Quartz; +using System; +using System.Linq; +using System.Threading.Tasks; + +/// +///门体发泡数据采集 +/// +namespace Admin.Core.Tasks +{ + public class Job_DoorFoam_Quartz : JobBase, IJob + { + protected readonly IBaseOrderInfoServices _baseOrderInfoServices; + private static readonly log4net.ILog log = LogManager.GetLogger(typeof(Job_DoorFoam_Quartz)); + public Job_DoorFoam_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService) + { + _SysTasksQzService = SysTasksQzService; + _sysJobLogService = sysJobLogService; + } + public async Task Execute(IJobExecutionContext context) + { + await ExecuteJob(context, async () => await Run()); + } + + #region 门体发泡数据采集 + public Task Run() + { + var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("DoorPlc")); + if (obj.plc.IsConnected) + { + var endSignal = obj.plc.ReadInt16("DB4.DBW0"); + + + + + } + return Task.FromResult(0); + } + #endregion + } +} diff --git a/Admin.Core.Tasks/QuartzNet/Jobs/Job_Perfusion_Quartz.cs b/Admin.Core.Tasks/QuartzNet/Jobs/Job_Perfusion_Quartz.cs index 87c0f5d1..9b6eb0a3 100644 --- a/Admin.Core.Tasks/QuartzNet/Jobs/Job_Perfusion_Quartz.cs +++ b/Admin.Core.Tasks/QuartzNet/Jobs/Job_Perfusion_Quartz.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Threading.Tasks; /// -/// 这里要注意下,命名空间和程序集是一样的,不然反射不到 +/// 灌注数据采集 /// namespace Admin.Core.Tasks { @@ -62,7 +62,7 @@ namespace Admin.Core.Tasks public async Task SaveDbRun() { string alarmName = string.Empty; - var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("后板Plc")); + var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("PerfusionPlc")); if (obj.plc.IsConnected) { var endSignal = obj.plc.ReadInt16("DB55.44.0");//任务结束信号存盘