From 0abd867230198628a88f54370104bee0306f1f7c Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期五, 11 四月 2025 14:19:26 +0800 Subject: [PATCH] 添加提升机调度 --- 代码管理/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Roast/CommonRoast.cs | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Roast/CommonRoast.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Roast/CommonRoast.cs" index 935e5df..da22bf6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Roast/CommonRoast.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Roast/CommonRoast.cs" @@ -1,4 +1,5 @@ 锘�#region << 鐗� 鏈� 娉� 閲� >> + /*---------------------------------------------------------------- * 鍛藉悕绌洪棿锛歐IDESEAWCS_QuartzJob * 鍒涘缓鑰咃細鑳$搴� @@ -11,22 +12,17 @@ * 淇敼鏃堕棿锛� * 鐗堟湰锛歏1.0.1 * 淇敼璇存槑锛� - * + * *----------------------------------------------------------------*/ + #endregion << 鐗� 鏈� 娉� 閲� >> using HslCommunication; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using WIDESEAWCS_Communicator; using WIDESEAWCS_QuartzJob.ConveyorLine.Enum; using WIDESEAWCS_QuartzJob.DeviceBase; using WIDESEAWCS_QuartzJob.DTO; -using WIDESEAWCS_QuartzJob.StackerCrane.Enum; namespace WIDESEAWCS_QuartzJob { @@ -37,6 +33,7 @@ public class CommonRoast : IRoast { #region Private Member + /// <summary> /// 鐑樼儰閫氳瀵硅薄 /// </summary> @@ -65,9 +62,11 @@ private bool _heartStatr = true; private bool _isConnected = true; + #endregion #region Public Member + /// <summary> /// 鐑樼儰閫氳瀵硅薄 /// </summary> @@ -101,6 +100,7 @@ #endregion #region Constructor Function + /// <summary> /// 鏋勯�犲嚱鏁� /// </summary> @@ -118,9 +118,11 @@ _deviceName = deviceName; CheckConnect(); } + #endregion #region Private Method + private void CheckConnect() { Task.Run(() => @@ -144,9 +146,11 @@ } }); } + #endregion #region Public Method + /// <summary> /// 璇诲彇PLC鍗忚鍦板潃鐨勬暟鎹� /// </summary> @@ -171,7 +175,7 @@ } /// <summary> - /// + /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="command"></param> @@ -180,7 +184,7 @@ /// <exception cref="Exception"></exception> public bool SendCommand<T>(T command, string deviceChildCode) where T : IDataTransfer, new() { - if(Communicator is SiemensS7) + if (Communicator is MelsecA1ENetCommunicator) { if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�"); DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); @@ -285,6 +289,7 @@ // 鍛婅瘔鍨冨溇鍥炴敹鍣ㄤ笉鍐嶈皟鐢ㄧ粓缁撳櫒 GC.SuppressFinalize(this); } + #endregion } -} +} \ No newline at end of file -- Gitblit v1.9.3