| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
- using SHJX.Service.Model.Dao;
- using System.Collections.Generic;
- using SHJX.Service.Common.ReadXML;
- using SHJX.Service.Model.Control;
- using SHJX.Service.ServerClient.Interface;
- using SHJX.Service.ServerClient.TempController;
- using SHJX.Service.Common.Logging;
- using Microsoft.Extensions.Logging;
- namespace SHJX.Service.ServerClient.RS485Control
- {
- /// <summary>
- /// 加热
- /// </summary>
- public class HeatingControl : DeltaDtc, PortControlImp
- {
- private static readonly ILogger logger = LogFactory.BuildLogger(typeof(HeatingControl));
- /// <summary>
- /// 加热
- /// </summary>
- /// <param name="log">日志</param>
- /// <param name="config">配置</param>
- public HeatingControl( ReadConfigUtil config)
- : base( config) { }
- public object Read(PortArgs args)
- {
- double pv = 0;
- double sv = 0;
- ReadPVnSV(ref pv, ref sv);
- Dictionary<string, double> temp = new()
- {
- { "pv", pv },
- { "sv", sv }
- };
- return temp;
- }
- public bool Write(PortArgs args)
- {
- var pid = args.Reserve as PID;
- var res = WritePid(pid.Ratio, pid.Integral, pid.Differential, pid.DifferentialDeafult) && WriteSV(args.Distance);
- return res;
- }
- }
- }
|