Files
CapMachine/CapMachine.Wpf/Services/MachineRtDataService.cs
2025-06-18 13:55:40 +08:00

3194 lines
161 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using AutoMapper.Internal;
using CapMachine.Core;
using CapMachine.Wpf.ChannelModel;
using CapMachine.Wpf.Dtos;
using CapMachine.Wpf.Models;
using CapMachine.Wpf.Models.ProModelPars;
using CapMachine.Wpf.Models.Tag;
using CapMachine.Wpf.Models.Tag.Cell;
using CapMachine.Wpf.PPCalculation;
using CapMachine.Wpf.PrismEvent;
using HslCommunication;
using HslCommunication.Profinet.Melsec;
using HslCommunication.Profinet.Siemens;
using MathNet.Numerics;
using Prism.Events;
using Prism.Mvvm;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Channels;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
using static CapMachine.Wpf.Models.ComEnum;
namespace CapMachine.Wpf.Services
{
/// <summary>
/// 机器实时数据服务
/// </summary>
public class MachineRtDataService : BindableBase
{
/// <summary>
/// 事件聚合器
/// </summary>
private IEventAggregator _EventAggregator { get; set; }
public AlarmService AlarmService { get; }
public ConfigService ConfigService { get; }
public LogicRuleService LogicRuleService { get; }
public CanDriveService CanDriveService { get; }
public LinDriveService LinDriveService { get; }
public SysRunService SysRunService { get; }
/// <summary>
/// PLCScanTask扫描Task
/// </summary>
private static Task PLCScanTask { get; set; }
/// <summary>
/// ScanTask扫描Task
/// </summary>
private static Task ScanTask { get; set; }
/// <summary>
/// 西门子连接驱动程序
/// </summary>
public SiemensS7Net SiemensDrive { get; set; }
/// <summary>
/// 三菱连接驱动程序
/// </summary>
public MelsecMcNet MelsecMcNetDrive { get; set; }
private bool _LinkState;
/// <summary>
/// PLC连接状态
/// </summary>
public bool LinkState
{
get { return _LinkState; }
set { _LinkState = value; RaisePropertyChanged(); }
}
/// <summary>
/// 周期定时器
/// </summary>
private System.Timers.Timer CycleTimer { get; set; }
/// <summary>
/// 界面更新数据
/// </summary>
private bool IsValueShow { get; set; } = true;
/// <summary>
/// 系统拓展数据
/// </summary>
public SysExdInfo CurSysExdInfo { get; set; }
/// <summary>
/// 布尔拓展信息
/// </summary>
public SysExdBoolInfo SysExdBoolInfos { get; set; }
///// <summary>
///// Tag数据集合
///// </summary>
//public List<TagInfo> ListRtDataModel { get; set; }
/// <summary>
/// PLC加载配置数据集合
/// </summary>
public List<PlcLoadConfigCell> ListPlcLoadConfigCell { get; set; }
/// <summary>
/// PLC加载配置拓展数据集合
/// </summary>
public List<PlcExdConfigCell> ListPlcExdConfigCell { get; set; }
/// <summary>
/// 标签管理中心
/// </summary>
public TagManager TagManger { get; set; } = new TagManager();
/// <summary>
/// 扫描线程使能
/// </summary>
public bool ThreadEnable { get; set; } = true;
/// <summary>
/// 历史数据
/// </summary>
public List<RecordInfo> HistoryData { get; set; } = new List<RecordInfo>();
/// <summary>
/// 手自动切换的条件
/// </summary>
public AutoHandSwtichCondition AutoHandSwtichConditionState { get; set; } = new AutoHandSwtichCondition();
/// <summary>
/// 实例化函数
/// </summary>
/// <param name="eventAggregator"></param>
public MachineRtDataService(IEventAggregator eventAggregator, AlarmService alarmService, ConfigService configService, LogicRuleService logicRuleService,
CanDriveService canDriveService, LinDriveService linDriveService, SysRunService sysRunService)//, AlarmService alarmService
{
//ConcurrentDictionary<DateTime, RecordInfo> keyValuePairs = new ConcurrentDictionary<DateTime, RecordInfo>();
//Stopwatch stopwatch = new Stopwatch();
////第一次计时
//stopwatch.Start(); //启动Stopwatch
//stopwatch.Stop(); //停止Stopwatch
//Console.WriteLine("Add Elapsed output runTime:{0}", stopwatch.Elapsed.ToString());
//事件服务
_EventAggregator = eventAggregator;
AlarmService = alarmService;
ConfigService = configService;
LogicRuleService = logicRuleService;
CanDriveService = canDriveService;
LinDriveService = linDriveService;
SysRunService = sysRunService;
//秒触发一次
CycleTimer = new System.Timers.Timer(500);
CycleTimer.Elapsed += RecoredCycleAction;
CycleTimer.AutoReset = true;
CycleTimer.Enabled = true;
#region
////三电 Sample
//TagManger.AddTag(new Tag<short>("转速", "转速[rpm]", "Speed", "程序", "VW15000", 100, 0, 1, "rpm", new ShortTagValue(), true) { DecimalPoint = 0, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("排气压力", "排气压力[BarA]", "ExPress", "程序", "VW15002", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("吸气压力", "吸气压力[BarA]", "InhPress", "程序", "VW15004", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("吸气温度", "吸气温度[℃]", "InhTemp", "程序", "VW15006", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("COND1温度", "COND1温度[℃]", "Cond1Temp", "程序", "VW15008", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("润滑油压力", "润滑油压力[BarA]", "LubePress", "程序", "VW15010", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("COND2压力", "COND2压力[BarA]", "Cond2Press", "程序", "VW15012", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("OCR", "OCR[%]", "OCR", "程序", "VW15014", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("HV[V]", "HV[V]", "HV", "程序", "VW15016", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("HV[A]", "HV[A]", "HVCur", "程序", "VW15018", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = false });
//TagManger.AddTag(new Tag<short>("HV[W]", "HV[W]", "HVPw", "程序", "VW15020", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("LV[V]", "LV[V]", "LV", "程序", "VW15022", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
////TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("环境温度", "环境温度[℃]", "EnvTemp", "程序", "VW15026", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
////TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("OS1温度", "OS1温度[℃]", "OS1Temp", "程序", "VW15030", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("OS2温度", "OS2温度[℃]", "OS2Temp", "程序", "VW15032", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("COND2温度", "COND2温度[℃]", "Cond2Temp", "程序", "VW15034", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("EVAP出口温度", "EVAP出口温度[℃]", "EVAPExpTemp", "程序", "VW15036", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
////TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("润滑油流量", "润滑油流量[L/min]", "LubeFlow", "程序", "VW15040", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("排气温度", "排气温度[℃]", "ExTemp", "程序", "VW15042", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("膨胀阀前压力", "膨胀阀前压力[BarA]", "TxvFrPress", "程序", "VW15044", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("膨胀阀前温度", "膨胀阀前温度[℃]", "TxvFrTemp", "程序", "VW15046", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("EVAP出口压力", "EVAP出口压力[BarA]", "EVAPExpPress", "程序", "VW15048", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("腔内压力", "腔内压力[BarA]", "IntrplPress", "程序", "VW15050", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("压缩机表面温度", "压缩机表面温度[℃]", "CapSurfTemp", "程序", "VW15052", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("PTC流量", "PTC流量[L/min]", "PTCFlow", "程序", "VW15054", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("PTC入水温度", "PTC入水温度[℃]", "PTCEntTemp", "程序", "VW15056", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("PTC出水温度", "PTC出水温度[℃]", "PTCExpTemp", "程序", "VW15058", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = true, SVAddress = "VW5", Pid_PAddress = "VW0", Pid_IAddress = "VW1", Pid_DAddress = "VW2", Limit_UpAddress = "VW3", Limit_DownAddress = "VW4" });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电流", "通讯Cmp母线电流[A]", "ComCapBusCur", "程序", "VW15060", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电压", "通讯Cmp母线电压[V]", "ComCapBusVol", "程序", "VW15062", 100, 0, 10, "V", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯Cmp逆变器温度", "通讯Cmp逆变器温度[℃]", "ComCapInvTemp", "程序", "VW15064", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯Cmp相电流", "通讯Cmp相电流[A]", "ComCapPhCur", "程序", "VW15066", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯Cmp功率", "通讯Cmp功率[W]", "ComCapPw", "程序", "VW15068", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯Cmp芯片温度", "通讯Cmp芯片温度[℃]", "ComCapChipTemp", "程序", "VW15070", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC入水温度", "通讯PTC入水温度[℃]", "ComPTCEntTemp", "程序", "VW15072", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC出水温度", "通讯PTC出水温度[℃]", "ComPTCExpTemp", "程序", "VW15074", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC峰值电流", "通讯PTC峰值电流[A]", "ComPTCPeakCur", "程序", "VW15076", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC母线电流", "通讯PTC母线电流[A]", "ComPTCBusCur", "程序", "VW15078", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC膜温", "通讯PTC膜温[℃]", "ComPTCFlmTemp", "程序", "VW15080", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0, IsMeter = false });
//TagManger.AddTag(new Tag<short>("通讯PTC模块温度", "通讯PTC模块温度[℃]", "ComPTCMdTemp", "程序", "VW15082", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0, IsMeter = false });
//转速
TagManger.AddTag(new ShortControlTag()
{
Id = 10,
Name = "转速[rpm]",
NameNoUnit = "转速",
EnName = "Speed",
Group = "程序",
MinValue = 0,
MaxValue = 12000,
IsMeter = true,
DecimalPoint = 0,
Precision = 1,
Unit = "rpm",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW100", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 0 },
SVModel = new MeterValueAttrCell() { Address = "VW400", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 0 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 0, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
//AutoHandSwitchAddress = "",//仪表不控制转速PC直接控制转速
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//排气压力
TagManger.AddTag(new ShortControlTag()
{
Id = 20,
Name = "排气压力[BarA]",
NameNoUnit = "排气压力",
EnName = "ExPress",
Group = "程序",
MinValue = 0,
MaxValue = 40,
IsMeter = true,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW102", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 2 },
SVModel = new MeterValueAttrCell() { Address = "VW402", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 2 },
MVModel = new MeterValueAttrCell() { Address = "VW702", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 2 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW700", EngValueStr = "", Block = "MVAM", BlockIndex = 0 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW704", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW706", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW708", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW710", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW712", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW714", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//吸气压力
TagManger.AddTag(new ShortControlTag()
{
Id = 30,
Name = "吸气压力[BarA]",
NameNoUnit = "吸气压力",
EnName = "InhPress",
Group = "程序",
MinValue = 0,
MaxValue = 16,
IsMeter = true,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW104", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 4 },
SVModel = new MeterValueAttrCell() { Address = "VW404", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 4 },
MVModel = new MeterValueAttrCell() { Address = "VW724", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 24 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW722", EngValueStr = "", Block = "MVAM", BlockIndex = 22 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW726", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW728", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW730", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW732", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW734", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW736", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//吸气温度
TagManger.AddTag(new ShortControlTag()
{
Id = 40,
Name = "吸气温度[℃]",
NameNoUnit = "吸气温度",
EnName = "InhTemp",
Group = "程序",
MinValue = -50,
MaxValue = 200,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW106", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 6 },
SVModel = new MeterValueAttrCell() { Address = "VW406", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 6 },
MVModel = new MeterValueAttrCell() { Address = "VW746X", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 46 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW744", EngValueStr = "", Block = "MVAM", BlockIndex = 44 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW748", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW750", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW752", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW754", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW756", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW758", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//COND1温度
TagManger.AddTag(new ShortControlTag()
{
Id = 50,
Name = "COND1温度[℃]",
NameNoUnit = "COND1温度",
EnName = "Cond1Temp",
Group = "程序",
MinValue = -50,
MaxValue = 200,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW108", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 8 },
SVModel = new MeterValueAttrCell() { Address = "VW408", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 8 },
MVModel = new MeterValueAttrCell() { Address = "VW768", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 68 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW766", EngValueStr = "", Block = "MVAM", BlockIndex = 66 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW770", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW772", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW774", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW776", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW778", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW780", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//润滑油压力
TagManger.AddTag(new ShortControlTag()
{
Id = 60,
Name = "润滑油压力[BarA]",
NameNoUnit = "润滑油压力",
EnName = "LubePress",
Group = "程序",
MinValue = 0,
MaxValue = 40,
IsMeter = true,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW110", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 10 },
SVModel = new MeterValueAttrCell() { Address = "VW410", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 10 },
MVModel = new MeterValueAttrCell() { Address = "VW790", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 90 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW788", EngValueStr = "", Block = "MVAM", BlockIndex = 88 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW792", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW794", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW796", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW798", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW800", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW802", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//COND2压力
TagManger.AddTag(new ShortControlTag()
{
Id = 70,
Name = "COND2压力[BarA]",
NameNoUnit = "COND2压力",
EnName = "Cond2Press",
Group = "程序",
MinValue = 0,
MaxValue = 40,
IsMeter = true,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW112", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 12 },
SVModel = new MeterValueAttrCell() { Address = "VW412", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 12 },
MVModel = new MeterValueAttrCell() { Address = "VW812", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 112 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW810", EngValueStr = "", Block = "MVAM", BlockIndex = 110 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW814", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW816", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW818", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW820", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW822", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW824", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//OCR
TagManger.AddTag(new ShortControlTag()
{
Id = 80,
Name = "OCR[%]",
NameNoUnit = "OCR",
EnName = "OCR",
Group = "程序",
MinValue = 0,
MaxValue = 100,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "%",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW114", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 14 },
SVModel = new MeterValueAttrCell() { Address = "VW414", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 14 },
MVModel = new MeterValueAttrCell() { Address = "VW834", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 134 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW832", EngValueStr = "", Block = "MVAM", BlockIndex = 132 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW836", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW838", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW840", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW842", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW844", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW846", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//HV
TagManger.AddTag(new ShortControlTag()
{
Id = 90,
Name = "HV[V]",
NameNoUnit = "HV[V]",
EnName = "HV",
Group = "程序",
MinValue = 0,
MaxValue = 1500,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "V",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW116", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 16 },
SVModel = new MeterValueAttrCell() { Address = "VW416", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 16 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//HV[A] 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 100,
Name = "HV[A]",
NameNoUnit = "HV[A]",
EnName = "HVCur",
Group = "采集",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 2,
Precision = 100,
Unit = "A",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW118", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 18 },
//SVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AutoHandState = false,
RWInfo = RWInfo.PLCRead,
});
//HV[W] 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 110,
Name = "HV[W]",
NameNoUnit = "HV[W]",
EnName = "HVPw",
Group = "采集",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 0,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW120", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 20 },
//SVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AutoHandState = false,
RWInfo = RWInfo.PLCRead,
});
//LV[V]
TagManger.AddTag(new ShortControlTag()
{
Id = 120,
Name = "LV[V]",
NameNoUnit = "LV[V]",
EnName = "LV",
Group = "程序",
MinValue = 0,
MaxValue = 30,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "V",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW122", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 22 },
SVModel = new MeterValueAttrCell() { Address = "VW418", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 18 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//LV[A] 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 130,
Name = "LV[A]",
NameNoUnit = "LV[A]",
EnName = "LVCur",
Group = "采集",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 2,
Precision = 100,
Unit = "A",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW124", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 24 },
//SVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "Pro", BlockIndex = 1, Enable = false },
//Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
//AutoHandState = false,
RWInfo = RWInfo.PLCRead,
});
//环境温度
TagManger.AddTag(new ShortControlTag()
{
Id = 140,
Name = "环境温度[℃]",
NameNoUnit = "环境温度",
EnName = "EnvTemp",
Group = "程序",
MinValue = -50,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW126", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 26 },
SVModel = new MeterValueAttrCell() { Address = "VW420", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 20 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//环境湿度
TagManger.AddTag(new ShortControlTag()
{
Id = 150,
Name = "环境湿度[%]",
NameNoUnit = "环境湿度",
EnName = "EnvRH",
Group = "程序",
MinValue = 0,
MaxValue = 100,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "%",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW128", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 28 },
SVModel = new MeterValueAttrCell() { Address = "VW422", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 22 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//OS1温度
TagManger.AddTag(new ShortControlTag()
{
Id = 160,
Name = "OS1温度[℃]",
NameNoUnit = "OS1温度",
EnName = "OS1Temp",
Group = "程序",
MinValue = -50,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW130", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 30 },
SVModel = new MeterValueAttrCell() { Address = "VW424", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 24 },
MVModel = new MeterValueAttrCell() { Address = "VW856", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 156 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW854", EngValueStr = "", Block = "MVAM", BlockIndex = 154 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW858", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW860", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW862", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW864", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW866", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW868", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//OS2温度
TagManger.AddTag(new ShortControlTag()
{
Id = 170,
Name = "OS2温度[℃]",
NameNoUnit = "OS2温度",
EnName = "OS2Temp",
Group = "程序",
MinValue = -50,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW132", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 32 },
SVModel = new MeterValueAttrCell() { Address = "VW426", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 26 },
MVModel = new MeterValueAttrCell() { Address = "VW878", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 178 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW876", EngValueStr = "", Block = "MVAM", BlockIndex = 176 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW880", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW882", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW884", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW886", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW888", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW890", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//COND2温度
TagManger.AddTag(new ShortControlTag()
{
Id = 180,
Name = "COND2温度[℃]",
NameNoUnit = "COND2温度",
EnName = "Cond2Temp",
Group = "程序",
MinValue = -50,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW134", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 34 },
SVModel = new MeterValueAttrCell() { Address = "VW428", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 28 },
MVModel = new MeterValueAttrCell() { Address = "VW900", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 200 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW898", EngValueStr = "", Block = "MVAM", BlockIndex = 198 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW902", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW904", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW906", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW908", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW910", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW912", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//EVAP出口温度
TagManger.AddTag(new ShortControlTag()
{
Id = 190,
Name = "EVAP出口温度[℃]",
NameNoUnit = "EVAP出口温度",
EnName = "EVAPExpTemp",
Group = "程序",
MinValue = -50,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW136", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 36 },
SVModel = new MeterValueAttrCell() { Address = "VW430", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 30 },
MVModel = new MeterValueAttrCell() { Address = "VW922", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 222 },
MVAutoHandModel = new MvAmAttrCell() { Address = "VW920", EngValueStr = "", Block = "MVAM", BlockIndex = 220 },
Pid_PModel = new MeterExdAttrCell() { Address = "VW924", EngValue = 0, EngValueStr = "", },
Pid_IModel = new MeterExdAttrCell() { Address = "VW926", EngValue = 0, EngValueStr = "", },
Pid_DModel = new MeterExdAttrCell() { Address = "VW928", EngValue = 0, EngValueStr = "", },
Limit_UpModel = new MeterExdAttrCell() { Address = "VW930", EngValue = 0, EngValueStr = "", },
Limit_DownModel = new MeterExdAttrCell() { Address = "VW932", EngValue = 0, EngValueStr = "", },
AlarmModel = new MeterExdAttrCell() { Address = "VW934", EngValue = 0, EngValueStr = "", },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//PTC功率 控制但非仪表控制
TagManger.AddTag(new ShortControlTag()
{
Id = 200,
Name = "PTC功率[W]",
NameNoUnit = "PTC功率",
EnName = "PTCPw",
Group = "程序",
MinValue = 0,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW432", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 332 },
SVModel = new MeterValueAttrCell() { Address = "VW432", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 32 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//PTC功率2 控制但非仪表控制 -北厂未启用此功能,南厂有此功能
//TagManger.AddTag(new ShortControlTag()
//{
// Id = 201,
// Name = "PTC功率2[W]",
// NameNoUnit = "PTC功率2",
// EnName = "PTCPw2",
// Group = "程序",
// MinValue = 0,
// MaxValue = 10000,
// IsMeter = true,
// DecimalPoint = 1,
// Precision = 1,
// Unit = "W",
// DataType = TagDataType.Short,
// PVModel = new MeterValueAttrCell() { Address = "VW434", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 334},
// SVModel = new MeterValueAttrCell() { Address = "VW434", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 34 },
// MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
// MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
// Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
// AutoHandState = false,
// RWInfo = RWInfo.Control,
//});
//PTC流量 控制但非仪表控制
TagManger.AddTag(new ShortControlTag()
{
Id = 210,
Name = "PTC流量[L/min]",
NameNoUnit = "PTC流量",
EnName = "PTCFlow",
Group = "程序",
MinValue = 0,
MaxValue = 150,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "L/min",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW138", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 38 },
SVModel = new MeterValueAttrCell() { Address = "VW436", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 36 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//PTC入口水温 控制但非仪表控制
TagManger.AddTag(new ShortControlTag()
{
Id = 220,
Name = "PTC入口水温[℃]",
NameNoUnit = "PTC入口水温",
EnName = "PTCEntTemp",
Group = "程序",
MinValue = 0,
MaxValue = 100,
IsMeter = true,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW140", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 40 },
SVModel = new MeterValueAttrCell() { Address = "VW438", EngValue = 0, EngValueStr = "", Block = "SV", BlockIndex = 38 },
MVModel = new MeterValueAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Block = "MV", BlockIndex = 1, Enable = false },
MVAutoHandModel = new MvAmAttrCell() { Address = "", EngValueStr = "", Block = "MVAM", BlockIndex = 1, Enable = false },
Pid_PModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_IModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Pid_DModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_UpModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
Limit_DownModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AlarmModel = new MeterExdAttrCell() { Address = "", EngValue = 0, EngValueStr = "", Enable = false },
AutoHandState = false,
RWInfo = RWInfo.Control,
});
//冷媒流量 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 230,
Name = "冷媒流量[kg/h]",
NameNoUnit = "冷媒流量",
EnName = "VRV",
Group = "采集",
MinValue = 0,
MaxValue = 800,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "kg/h",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW144", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 44 },
RWInfo = RWInfo.PLCRead,
});
//润滑油流量 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 240,
Name = "润滑油流量[kg/h]",
NameNoUnit = "润滑油流量",
EnName = "LubeFlow",
Group = "采集",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "kg/h",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW142", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 42 },
RWInfo = RWInfo.PLCRead,
});
//排气温度 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 250,
Name = "排气温度[℃]",
NameNoUnit = "排气温度",
EnName = "ExTemp",
Group = "采集",
MinValue = -50,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW146", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 46 },
RWInfo = RWInfo.PLCRead,
});
//阀前压力P3 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 260,
Name = "阀前压力P3[BarA]",
NameNoUnit = "阀前压力P3",
EnName = "TxvFrPressP3",
Group = "采集",
MinValue = 0,
MaxValue = 40,
IsMeter = false,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW184", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 84 },
RWInfo = RWInfo.PLCRead,
});
//EVAP出口压力P6 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 270,
Name = "EVAP出口压力P6[BarA]",
NameNoUnit = "EVAP出口压力P6",
EnName = "EVAPExpPressP6",
Group = "采集",
MinValue = 0,
MaxValue = 40,
IsMeter = false,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW186", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 86 },
RWInfo = RWInfo.PLCRead,
});
//背压压力P8 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 280,
Name = "背压压力P8[BarA]",
NameNoUnit = "背压压力P8",
EnName = "BackPressP8",
Group = "采集",
MinValue = 0,
MaxValue = 40,
IsMeter = false,
DecimalPoint = 2,
Precision = 100,
Unit = "BarA",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW188", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 88 },
RWInfo = RWInfo.PLCRead,
});
//阀前温度T3 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 290,
Name = "阀前温度T3[℃]",
NameNoUnit = "阀前温度T3",
EnName = "TxvFrTempT3",
Group = "采集",
MinValue = -50,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW190", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 90 },
RWInfo = RWInfo.PLCRead,
});
//COND1入口温度T4 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 300,
Name = "COND1入口温度T4[℃]",
NameNoUnit = "COND1入口温度T4",
EnName = "Cond1TempT4",
Group = "采集",
MinValue = -50,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW192", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 92 },
RWInfo = RWInfo.PLCRead,
});
//EVAP出口温度T6 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 310,
Name = "EVAP出口温度T6[℃]",
NameNoUnit = "EVAP出口温度T6",
EnName = "EVAPExpTempT6",
Group = "采集",
MinValue = -50,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW194", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 94 },
RWInfo = RWInfo.PLCRead,
});
//压缩机表面温度T11 采集
TagManger.AddTag(new ShortValueTag()
{
Id = 320,
Name = "压缩机表面温度T11[℃]",
NameNoUnit = "压缩机表面温度T11",
EnName = "CapSufTempT11",
Group = "采集",
MinValue = -50,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 10,
Unit = "℃",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW196", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 96 },
RWInfo = RWInfo.PLCRead,
});
//Qcool 计算 制冷量
TagManger.AddTag(new ShortValueTag()
{
Id = 330,
Name = "制冷量[W]",
NameNoUnit = "制冷量",
EnName = "Qcool",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW208", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 0 },
RWInfo = RWInfo.PCCalcu,
});
//Qcool_Customer 计算
TagManger.AddTag(new ShortValueTag()
{
Id = 340,
Name = "制热量[W]",
NameNoUnit = "制热量",
EnName = "Qheat",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW210", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
RWInfo = RWInfo.PCCalcu,
});
////Qheat 计算
//TagManger.AddTag(new ShortValueTag()
//{
// Id = 35,
// Name = "Qheat[W]",
// NameNoUnit = "Qheat",
// EnName = "Qheat",
// Group = "计算",
// MinValue = 0,
// MaxValue = 100,
// IsMeter = false,
// DecimalPoint = 1,
// Precision = 1,
// Unit = "W",
// DataType = TagDataType.Short,
// PVModel = new MeterValueAttrCell() { Address = "VW212", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
// RWInfo = RWInfo.PCCalcu,
//});
//COP_Cooling_5K 计算
TagManger.AddTag(new ShortValueTag()
{
Id = 360,
Name = "制冷性能系数[W]",
NameNoUnit = "制冷性能系数",
EnName = "COPCooling",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW214", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
RWInfo = RWInfo.PCCalcu,
});
////COP_Cooling_Customer 计算 制冷性能系数
//TagManger.AddTag(new ShortValueTag()
//{
// Id = 37,
// Name = "COP_Cooling_Customer[W]",
// NameNoUnit = "COP_Cooling_Customer",
// EnName = "COP_Cooling_Customer",
// Group = "计算",
// MinValue = 0,
// MaxValue = 100,
// IsMeter = false,
// DecimalPoint = 1,
// Precision = 1,
// Unit = "W",
// DataType = TagDataType.Short,
// PVModel = new MeterValueAttrCell() { Address = "VW216", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
// RWInfo = RWInfo.PCCalcu,
//});
//COP_Heating 计算 制热性能系数
TagManger.AddTag(new ShortValueTag()
{
Id = 380,
Name = "制热性能系数[W]",
NameNoUnit = "制热性能系数",
EnName = "COPHeating",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW218", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
RWInfo = RWInfo.PCCalcu,
});
//VolumeEfficiency 计算 容积效率
TagManger.AddTag(new ShortValueTag()
{
Id = 390,
Name = "容积效率[%]",
NameNoUnit = "容积效率",
EnName = "VolumeEfficiency",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "%",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW220", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
RWInfo = RWInfo.PCCalcu,
});
//IsentropyEfficiency 计算 等熵效率
TagManger.AddTag(new ShortValueTag()
{
Id = 400,
Name = "等熵效率[%]",
NameNoUnit = "等熵效率",
EnName = "IsentropyEfficiency",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "%",
DataType = TagDataType.Short,
PVModel = new MeterValueAttrCell() { Address = "VW222", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
RWInfo = RWInfo.PCCalcu,
});
////IsentropyEfficiency 计算 等熵效率
//TagManger.AddTag(new ShortValueTag()
//{
// Id = 41,
// Name = "IsentropyEfficiency[%]",
// NameNoUnit = "IsentropyEfficiency",
// EnName = "IsentropyEfficiency",
// Group = "计算",
// MinValue = 0,
// MaxValue = 100,
// IsMeter = false,
// DecimalPoint = 1,
// Precision = 1,
// Unit = "%",
// DataType = TagDataType.Short,
// PVModel = new MeterValueAttrCell() { Address = "VW222", EngValue = 0, EngValueStr = "", Block = "PV", BlockIndex = 1 },
// RWInfo = RWInfo.PCCalcu,
//});
// 过冷度 计算
TagManger.AddTag(new CalcTag()
{
Id = 420,
Name = "过冷度[K]",
NameNoUnit = "过冷度",
EnName = "Subcooling",
Group = "计算",
MinValue = -50,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "K",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW224", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.PCCalcu,
});
// 过热度 计算
TagManger.AddTag(new CalcTag()
{
Id = 430,
Name = "过热度[K]",
NameNoUnit = "过热度",
EnName = "Superheat",
Group = "计算",
MinValue = -50,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "K",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW226", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.PCCalcu,
});
// 干度 计算
TagManger.AddTag(new CalcTag()
{
Id = 440,
Name = "干度[%]",
NameNoUnit = "干度",
EnName = "Dryness",
Group = "计算",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "%",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW228", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.PCCalcu,
});
//压缩机采集的数据
// 通讯母线电流 压缩机
TagManger.AddTag(new CapTag()
{
Id = 450,
Name = "通讯母线电流[A]",
NameNoUnit = "通讯母线电流",
EnName = "ComCapBusCur",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 2,
Precision = 1,
Unit = "A",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW270", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯母线电压 压缩机
TagManger.AddTag(new CapTag()
{
Id = 460,
Name = "通讯母线电压[V]",
NameNoUnit = "通讯母线电压",
EnName = "ComCapBusCur",
Group = "压缩机",
MinValue = 0,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "V",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW272", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯相电流 压缩机
TagManger.AddTag(new CapTag()
{
Id = 470,
Name = "通讯相电流[A]",
NameNoUnit = "通讯相电流",
EnName = "ComCapPhCur",
Group = "压缩机",
MinValue = 0,
MaxValue = 200,
IsMeter = false,
DecimalPoint = 2,
Precision = 1,
Unit = "A",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW274", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯功率 压缩机
TagManger.AddTag(new CapTag()
{
Id = 480,
Name = "通讯功率[W]",
NameNoUnit = "通讯功率",
EnName = "ComCapPw",
Group = "压缩机",
MinValue = 0,
MaxValue = 1000,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "W",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW276", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯逆变器温度 压缩机
TagManger.AddTag(new CapTag()
{
Id = 490,
Name = "通讯逆变器温度[℃]",
NameNoUnit = "通讯逆变器温度",
EnName = "ComCapInverterTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 150,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW278", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯芯片温度 压缩机
TagManger.AddTag(new CapTag()
{
Id = 500,
Name = "通讯芯片温度[℃]",
NameNoUnit = "通讯芯片温度",
EnName = "ComCapChipTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 150,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW280", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC入水温度 压缩机
TagManger.AddTag(new CapTag()
{
Id = 510,
Name = "通讯PTC入水温度[℃]",
NameNoUnit = "通讯PTC入水温度",
EnName = "CapPTCInWaterTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW302", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC出水温度 压缩机
TagManger.AddTag(new CapTag()
{
Id = 520,
Name = "通讯PTC出水温度[℃]",
NameNoUnit = "通讯PTC出水温度",
EnName = "CapPTCOutWaterTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW304", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC峰值电流 压缩机
TagManger.AddTag(new CapTag()
{
Id = 530,
Name = "通讯PTC峰值电流[A]",
NameNoUnit = "通讯PTC峰值电流",
EnName = "CapPTCPeakCur",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 2,
Precision = 1,
Unit = "A",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW306", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC母线电流
TagManger.AddTag(new CapTag()
{
Id = 540,
Name = "通讯PTC母线电流[A]",
NameNoUnit = "通讯PTC母线电流",
EnName = "CapPTCBusCur",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 2,
Precision = 1,
Unit = "A",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW308", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC膜温 压缩机
TagManger.AddTag(new CapTag()
{
Id = 550,
Name = "通讯PTC膜温[℃]",
NameNoUnit = "通讯PTC膜温",
EnName = "CapPTCFilmTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW310", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
// 通讯PTC功率模块温度 压缩机
TagManger.AddTag(new CapTag()
{
Id = 560,
Name = "通讯PTC功率模块温度[℃]",
NameNoUnit = "通讯PTC功率模块温度",
EnName = "CapPTCPwMdTemp",
Group = "压缩机",
MinValue = 0,
MaxValue = 100,
IsMeter = false,
DecimalPoint = 1,
Precision = 1,
Unit = "℃",
DataType = TagDataType.Double,
PVModel = new QuickAttrCell() { Address = "VW310", EngValue = 0, EngValueStr = "", },
RWInfo = RWInfo.CapRead,
});
//精度和小数点数据的属性数据初始化
foreach (var itemTag in TagManger.DicTags)
{
if (TagManger.TryGetShortControlTagByName(itemTag.Key, out ShortControlTag? shortControlTag))
{
shortControlTag!.UpdateInit();
continue;
}
if (TagManger.TryGetShortTagByName(itemTag.Key, out ShortValueTag? shortValueTag))
{
shortValueTag!.UpdateInit();
continue;
}
}
#endregion
#region SongZhi
////【SongZhi】
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "转速[rpm]",//名称带单位
// NameNoUnit = "转速",//无单位名称
// EnName = "Speed",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "rpm",
// PVAddress = "VW100",//地址信息
// SVAddress = "VW200",
// MVAddress = "VW242",
// IsMeter = true,
// AutoHandSwitchAddress = "VW240",
// Precision = 1,
// DecimalPoint = 0,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "排气压力[MpaA]",//名称带单位
// NameNoUnit = "排气压力",//无单位名称
// EnName = "ExPress",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "MpaA",
// PVAddress = "VW102",//地址信息
// SVAddress = "VW202",
// MVAddress = "VW242",
// IsMeter = true,
// AutoHandSwitchAddress = "VW240",
// Precision = 1000,
// DecimalPoint = 3,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "吸气压力[MpaA]",//名称带单位
// NameNoUnit = "吸气压力",//无单位名称
// EnName = "InhPress",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "MpaA",
// PVAddress = "VW104",//地址信息
// SVAddress = "VW204",
// MVAddress = "VW246",
// IsMeter = true,
// AutoHandSwitchAddress = "VW244",
// Precision = 1000,
// DecimalPoint = 3,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "吸气温度[℃]",//名称带单位
// NameNoUnit = "吸气温度",//无单位名称
// EnName = "InhTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW106",//地址信息
// SVAddress = "VW206",
// MVAddress = "VW250",
// IsMeter = true,
// AutoHandSwitchAddress = "VW248",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "冷凝器出口水温[℃]",//名称带单位 COND1水温
// NameNoUnit = "冷凝器出口水温",//无单位名称
// EnName = "Cond1Temp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW108",//地址信息
// SVAddress = "VW208",
// MVAddress = "VW254",
// IsMeter = true,
// AutoHandSwitchAddress = "VW252",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "吸气混合器温度[℃]",//名称带单位 OS2温度
// NameNoUnit = "吸气混合器温度",//无单位名称 OS2温度
// EnName = "OS2Temp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW110",//地址信息
// SVAddress = "VW210",
// MVAddress = "VW258",
// IsMeter = true,
// AutoHandSwitchAddress = "VW256",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "HV_V[V]",//名称带单位
// NameNoUnit = "HV_V",//无单位名称
// EnName = "HV_V",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "V",
// PVAddress = "VW112",//地址信息
// SVAddress = "VW212",
// MVAddress = "VW262",
// IsMeter = true,
// AutoHandSwitchAddress = "VW260",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "HV_A[A]",//名称带单位
// NameNoUnit = "HV_A",//无单位名称
// EnName = "HV_A",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "A",
// PVAddress = "VW114",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 100,
// DecimalPoint = 2,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "HV_W[W]",//名称带单位
// NameNoUnit = "HV_W",//无单位名称
// EnName = "HV_W",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "W",
// PVAddress = "VW116",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 1,
// DecimalPoint = 0,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "LV_V[V]",//名称带单位
// NameNoUnit = "LV_V",//无单位名称
// EnName = "LV_V",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "V",
// PVAddress = "VW118",//地址信息
// SVAddress = "VW214",
// MVAddress = "",
// IsMeter = true,
// AutoHandSwitchAddress = "",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "LV_A[A]",//名称带单位
// NameNoUnit = "LV_A",//无单位名称
// EnName = "LV_A",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "A",
// PVAddress = "VW120",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 100,
// DecimalPoint = 2,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "试验箱温度[℃]",//名称带单位
// NameNoUnit = "试验箱温度",//无单位名称
// EnName = "EnvTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW122",//地址信息
// SVAddress = "VW216",
// MVAddress = "",
// IsMeter = true,
// AutoHandSwitchAddress = "",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "试验箱湿度[%]",//名称带单位
// NameNoUnit = "试验箱湿度",//无单位名称
// EnName = "EnvRH",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "%",
// PVAddress = "VW124",//地址信息
// SVAddress = "VW218",
// MVAddress = "",
// IsMeter = true,
// AutoHandSwitchAddress = "",
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "排气温度[℃]",//名称带单位
// NameNoUnit = "排气温度",//无单位名称
// EnName = "ExTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW126",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "膨胀阀前温度[℃]",//名称带单位
// NameNoUnit = "膨胀阀前温度",//无单位名称
// EnName = "TxvFrTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW128",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "膨胀阀前压力[MpaA]",//名称带单位
// NameNoUnit = "膨胀阀前压力",//无单位名称
// EnName = "TxvFrPress",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "MpaA",
// PVAddress = "VW130",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 1000,
// DecimalPoint = 3,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "冷凝器进口温度[℃]",//名称带单位
// NameNoUnit = "冷凝器进口温度",//无单位名称
// EnName = "CondInTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW132",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "冷凝器进口压力[MpaA]",//名称带单位
// NameNoUnit = "冷凝器进口压力",//无单位名称
// EnName = "CondInPress",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "MpaA",
// PVAddress = "VW134",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 1000,
// DecimalPoint = 3,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "水箱进水温度[℃]",//名称带单位
// NameNoUnit = "水箱进水温度",//无单位名称
// EnName = "WaterTankInTemp",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// Unit = "℃",
// MaxValue = 100,
// PVAddress = "VW136",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "水加热温度H1[℃]",//名称带单位
// NameNoUnit = "水加热温度H1",//无单位名称
// EnName = "WaterHeatTempH1",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW138",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "压缩机表面温度1[℃]",//名称带单位
// NameNoUnit = "压缩机表面温度1",//无单位名称
// EnName = "CapSurfTemp1",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW140",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "压缩机表面温度2[℃]",//名称带单位
// NameNoUnit = "压缩机表面温度2",//无单位名称
// EnName = "CapSurfTemp2",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW142",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "压缩机表面温度3[℃]",//名称带单位
// NameNoUnit = "压缩机表面温度3",//无单位名称
// EnName = "CapSurfTemp3",//英文名称
// Group = "程序",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW144",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "通讯母线电压[V]",//名称带单位
// NameNoUnit = "通讯母线电压",//无单位名称
// EnName = "ComCapBusVol",//英文名称
// Group = "CANLIN",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "V",
// PVAddress = "VW146",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "通讯母线电流[A]",//名称带单位
// NameNoUnit = "通讯母线电流",//无单位名称
// EnName = "ComCapBusCur",//英文名称
// Group = "CANLIN",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "A",
// PVAddress = "VW148",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 100,
// DecimalPoint = 2,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "通讯相电流[A]",//名称带单位
// NameNoUnit = "通讯相电流",//无单位名称
// EnName = "ComCapPhCur",//英文名称
// Group = "CANLIN",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "A",
// PVAddress = "VW150",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 100,
// DecimalPoint = 2,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "通讯功率[W]",//名称带单位
// NameNoUnit = "通讯功率",//无单位名称
// EnName = "ComCapPw",//英文名称
// Group = "CANLIN",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "W",
// PVAddress = "VW152",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 1000,
// DecimalPoint = 2,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "通讯芯片温度[℃]",//名称带单位
// NameNoUnit = "通讯芯片温度",//无单位名称
// EnName = "ComCapChipTemp",//英文名称
// Group = "CANLIN",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "℃",
// PVAddress = "VW154",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "过冷度[K]",//名称带单位
// NameNoUnit = "过冷度",//无单位名称
// EnName = "Subcooling",//英文名称
// Group = "计算",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "K",
// PVAddress = "",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//TagManger.AddTag(new Tag<short>(new ShortTagValue())
//{
// Name = "过热度[K]",//名称带单位
// NameNoUnit = "过热度",//无单位名称
// EnName = "Superheat",//英文名称
// Group = "计算",//分组
// MinValue = 0,
// MaxValue = 100,
// Unit = "K",
// PVAddress = "",//地址信息
// SVAddress = "",
// MVAddress = "",
// IsMeter = false,
// Precision = 10,
// DecimalPoint = 1,
// Samp = 1,
// ValueType = typeof(short),
// Index = "",
//});
//#endregion
//TagManger.AddTag(new Tag<short>("OCR", "OCR[%]", "OCR", "程序", "VW15014", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("HV[V]", "HV[V]", "HV", "程序", "VW15016", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("HV[A]", "HV[A]", "HVCur", "程序", "VW15018", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("HV[W]", "HV[W]", "HVPw", "程序", "VW15020", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("LV[V]", "LV[V]", "LV", "程序", "VW15022", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("环境温度", "环境温度[℃]", "EnvTemp", "程序", "VW15026", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 1, "%", new ShortTagValue(), true) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("OS1温度", "OS1温度[℃]", "OS1Temp", "程序", "VW15030", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("OS2温度", "OS2温度[℃]", "OS2Temp", "程序", "VW15032", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("COND2温度", "COND2温度[℃]", "Cond2Temp", "程序", "VW15034", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("EVAP出口温度", "EVAP出口温度[℃]", "EVAPExpTemp", "程序", "VW15036", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("润滑油流量", "润滑油流量[L/min]", "LubeFlow", "程序", "VW15040", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("排气温度", "排气温度[℃]", "ExTemp", "程序", "VW15042", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("膨胀阀前压力", "膨胀阀前压力[MpaA]", "TxvFrPress", "程序", "VW15044", 100, 0, 100, "MpaA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("膨胀阀前温度", "膨胀阀前温度[℃]", "TxvFrTemp", "程序", "VW15046", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("EVAP出口压力", "EVAP出口压力[MpaA]", "EVAPExpPress", "程序", "VW15048", 100, 0, 100, "MpaA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("腔内压力", "腔内压力[MpaA]", "IntrplPress", "程序", "VW15050", 100, 0, 100, "MpaA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("压缩机表面温度", "压缩机表面温度[℃]", "CapSurfTemp", "程序", "VW15052", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC流量", "PTC流量[L/min]", "PTCFlow", "程序", "VW15054", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC入水温度", "PTC入水温度[℃]", "PTCEntTemp", "程序", "VW15056", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC出水温度", "PTC出水温度[℃]", "PTCExpTemp", "程序", "VW15058", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电流", "通讯Cmp母线电流[A]", "ComCapBusCur", "程序", "VW15060", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电压", "通讯Cmp母线电压[V]", "ComCapBusVol", "程序", "VW15062", 100, 0, 10, "V", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp逆变器温度", "通讯Cmp逆变器温度[℃]", "ComCapInvTemp", "程序", "VW15064", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp相电流", "通讯Cmp相电流[A]", "ComCapPhCur", "程序", "VW15066", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp功率", "通讯Cmp功率[W]", "ComCapPw", "程序", "VW15068", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp芯片温度", "通讯Cmp芯片温度[℃]", "ComCapChipTemp", "程序", "VW15070", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC入水温度", "通讯PTC入水温度[℃]", "ComPTCEntTemp", "程序", "VW15072", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC出水温度", "通讯PTC出水温度[℃]", "ComPTCExpTemp", "程序", "VW15074", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC峰值电流", "通讯PTC峰值电流[A]", "ComPTCPeakCur", "程序", "VW15076", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC母线电流", "通讯PTC母线电流[A]", "ComPTCBusCur", "程序", "VW15078", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC膜温", "通讯PTC膜温[℃]", "ComPTCFlmTemp", "程序", "VW15080", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC模块温度", "通讯PTC模块温度[℃]", "ComPTCMdTemp", "程序", "VW15082", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
#endregion
ListHandSwitchData = new List<HandSwitchData>()
{
new HandSwitchData(){Name="自动",ActionAddress="M0.0",StateAddress="M0.0",StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="抽真空",ActionAddress="M0.3",StateAddress="V9.0" ,StateAddressType=HandSwitchStateType.Bool },
//new HandSwitchData(){Name="复位",ActionAddress="M0.7",StateAddress="M0.7" ,StateAddressType=HandSwitchStateType.Bool },放到上侧的按钮区域了
//new HandSwitchData(){Name="消音",ActionAddress="M0.3",StateAddress="M0.3" ,StateAddressType=HandSwitchStateType.Bool },放到上侧的按钮区域了
new HandSwitchData(){Name="HV电源",ActionAddress="M1.1",StateAddress="Q0.1" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="HV启动",ActionAddress="M1.2",StateAddress="Q2.0" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="LV电源",ActionAddress="M1.3",StateAddress="Q0.2" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="LV启动",ActionAddress="M1.4",StateAddress="VW30" ,StateAddressType=HandSwitchStateType.Word },//VW30=1
new HandSwitchData(){Name="P1水泵",ActionAddress="M1.5",StateAddress="Q0.3" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="P2水泵",ActionAddress="M1.6",StateAddress="Q0.4" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="OS1加热器",ActionAddress="M1.7",StateAddress="Q0.5" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="OS2加热器",ActionAddress="M2.0",StateAddress="Q0.6" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="COND2加热器",ActionAddress="M2.1",StateAddress="Q0.7" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="EVAP加热器",ActionAddress="M2.2",StateAddress="Q1.0" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="HCV1",ActionAddress="M2.3",StateAddress="Q1.1" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="HCV2",ActionAddress="M2.4",StateAddress="Q1.7" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="HCV3",ActionAddress="M2.5",StateAddress="Q1.2" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="HCV4",ActionAddress="M2.6",StateAddress="Q1.3" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="EV1",ActionAddress="M2.7",StateAddress="Q1.4" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="EV2",ActionAddress="M3.0",StateAddress="Q1.5" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="EV3",ActionAddress="M3.1",StateAddress="Q1.6" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="EV4",ActionAddress="M3.2",StateAddress="Q2.1" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="试验箱",ActionAddress="M3.3",StateAddress="VW32" ,StateAddressType=HandSwitchStateType.Word },//VW32=1
new HandSwitchData(){Name="吸排气球阀",ActionAddress="M3.4",StateAddress="Q2.3" ,StateAddressType=HandSwitchStateType.Bool },
new HandSwitchData(){Name="使能",ActionAddress="M3.5",StateAddress="V9.1" ,StateAddressType=HandSwitchStateType.Bool },
};
ListPlcExdConfigCell = new List<PlcExdConfigCell>()
{
new PlcExdConfigCell(){ Name="输出锁定",Address="V482",Precision=1},
new PlcExdConfigCell(){ Name="吸排气阀",Address="V490",Precision=1},
new PlcExdConfigCell(){ Name="EV",Address="V492",Precision=1},
new PlcExdConfigCell(){ Name="压缩机使能",Address="V484",Precision=1},
new PlcExdConfigCell(){ Name="PTC使能",Address="V486",Precision=1},
};
InitialPLCCom();
//拓展的参数信息
CurSysExdInfo = new SysExdInfo(SiemensDrive);
SysExdBoolInfos = new SysExdBoolInfo(SiemensDrive);
//PubRtDataStart();
}
#region
//// <summary>
///// 手自动切换集合数据
///// </summary>
public List<HandSwitchData> ListHandSwitchData { get; set; }
/// <summary>
/// 程序复位
/// </summary>
/// <returns></returns>
public bool SysReset()
{
SiemensDrive.Write("M0.7", true);
return true;
////取消XXX
//var FindData = ListHandSwitchData.Where(a => a.Name == "复位");
//if (FindData.Count() > 0)
//{
// var Result = SiemensDrive.Write(FindData.First().ActionAddress, true);
// if (Result.IsSuccess)
// {
// return true;
// }
// else
// {
// return false;
// }
//}
//return false;
}
/// <summary>
/// 程序消音
/// </summary>
/// <returns></returns>
public bool SysMute()
{
//return true;
//取消XXX
var FindData = ListHandSwitchData.Where(a => a.Name == "消音");
if (FindData.Count() > 0)
{
var Result = SiemensDrive.Write(FindData.First().ActionAddress, true);
if (Result.IsSuccess)
{
return true;
}
else
{
return false;
}
}
return false;
}
/// <summary>
/// 程序Start
/// </summary>
/// <returns></returns>
public bool SysStart()
{
//return true;
//取消XXX
var Result = SiemensDrive.Write("M0.4", true);
if (Result.IsSuccess)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 程序结束
/// </summary>
/// <returns></returns>
public bool SysEnd()
{
//return true;
//取消XXX
var Result = SiemensDrive.Write("M0.7", true);
if (Result.IsSuccess)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 程序暂停
/// 取反
/// </summary>
/// <returns></returns>
public bool SysPause()
{
//return true;
//取消XXX
var StateResult = SiemensDrive.ReadBool("M0.6");
if (StateResult.IsSuccess)
{
if (StateResult.Content == true)
{
var Result = SiemensDrive.Write("M0.6", false);
if (Result.IsSuccess)
{
return true;
}
else
{
return false;
}
}
else
{
var Result = SiemensDrive.Write("M0.6", true);
if (Result.IsSuccess)
{
return true;
}
else
{
return false;
}
}
}
return false;
}
/// <summary>
/// 程序继续
/// 取反
/// </summary>
/// <returns></returns>
public bool SysContinue()
{
return true;
}
#endregion
/// <summary>
/// UI更新
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <exception cref="NotImplementedException"></exception>
private void RecoredCycleAction(object? sender, ElapsedEventArgs e)
{
//IsValueShow = !IsValueShow;
}
/// <summary>
/// 初始化PLC通信
/// </summary>
private void InitialPLCCom()
{
var IPInfo = ConfigHelper.GetValue("PLCIP");
SiemensDrive = new SiemensS7Net(SiemensPLCS.S200Smart, IPInfo);
// 连接对象
OperateResult connect = SiemensDrive.ConnectServer();
if (!connect.IsSuccess)//连接失败
{
LinkState = false;
Console.WriteLine("connect failed:" + connect.Message);
MessageBox.Show($"PLC连接失败:{IPInfo}");
//return;
}
else//连接成功
{
LinkState = true;
}
//扫描线程成功
RtScanDeviceStart();
}
public const string ConstShortType = "Int16";
public const string ConstUShortType = "UInt16";
public const string ConstIntType = "Int32";
public const string ConstUIntType = "UInt32";
public const string ConstLongType = "Int64";
public const string ConstULongType = "UInt64";
public const string ConstByteType = "Byte";
public const string ConstCharType = "Char";
public const string ConstFloatType = "Single";
public const string ConstDoubleType = "Double";
public const string ConstDecimalType = "Decimal";
public const string ConstBoolType = "Boolean";
//private Random random = new Random();
private int IsShowCount = 0;
private OperateResult<short> OperateResultShort { get; set; }
/// <summary>
/// SV数据
/// </summary>
private OperateResult<short> OperateResultSVShort { get; set; }
/// <summary>
/// MV数据
/// </summary>
private OperateResult<short> OperateResultMVShort { get; set; }
private Random Random { get; set; } = new Random();
/// <summary>
/// 报警结果集合
/// </summary>
private OperateResult<bool[]> OperateResultAlarm { get; set; }
/// <summary>
/// CAP的使能状态
/// </summary>
private OperateResult<bool> OperateResultCapEnable { get; set; }
/// <summary>
/// 时间诊断
/// </summary>
private Stopwatch DiagnosticsTime { get; set; } = new Stopwatch();
/// <summary>
/// PV整块读取数据
/// </summary>
private OperateResult<byte[]> OperateResultBlockPVRead { get; set; }
/// <summary>
/// SV整块读取数据
/// </summary>
private OperateResult<byte[]> OperateResultBlockSVRead { get; set; }
/// <summary>
/// MV整块读取数据
/// </summary>
private OperateResult<byte[]> OperateResultBlockMVRead { get; set; }
private double TestValue = 0.2;
/// <summary>
/// PLC扫描线程
/// </summary>
private void RtScanDeviceStart()
{
PLCScanTask = Task.Run(async () =>
{
Stopwatch stopwatch = new Stopwatch();
while (ThreadEnable)
{
//await Task.CompletedTask;
DiagnosticsTime.Reset();
DiagnosticsTime.Start();
await Task.Delay(5);
try
{
//// 第一次计时
//stopwatch.Start(); //启动Stopwatch
//CANLIN数据读取到TagManger.DicTags数据中心中上面的操作是itemWrite反写到PLC中
foreach (var itemCanLinGroup in TagManger.DicTags)
{
//转速特殊处理因为在数据集合中叫做【转速】在CANLIN中叫做【通讯转速】
if (itemCanLinGroup.Value.NameNoUnit == "转速")
{
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
{
case CanLinEnum.Can:
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC 取消XXX
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? CanpVModel))
{
CanpVModel!.EngValue = CanDriveService.GetDbcSpeedValueBySpeedName("通讯转速");
SiemensDrive.Write(CanpVModel!.Address, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯转速"));
//pVModel.EngSrcValue = 0;
}
break;
case CanLinEnum.Lin:
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC 取消XXX
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? LinpVModel))
{
LinpVModel!.EngValue = LinDriveService.GetLdfSpeedValueBySpeedName("通讯转速");
SiemensDrive.Write(LinpVModel!.Address, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯转速"));
}
break;
default:
break;
}
//找到后继续下一个
continue;
}
//只处理CANLIN的数据
if (itemCanLinGroup.Value.Group == "CANLIN")
{
//尝试获取模型信息
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? pVModel))
{
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
{
case CanLinEnum.Can:
//取得压缩机的CANLIN数据到数据集合中
pVModel!.EngValue = CanDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit);
//写入到PLC中
SiemensDrive.Write(pVModel!.Address, (short)(CanDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit) * pVModel.Precision));
break;
case CanLinEnum.Lin:
//取得压缩机的CANLIN数据
pVModel!.EngValue = LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit);
//写入到PLC中
SiemensDrive.Write(pVModel!.Address, (short)(LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit) * pVModel.Precision));
break;
case CanLinEnum.No:
break;
default:
break;
}
}
}
}
//PV批量读取
OperateResultBlockPVRead = SiemensDrive.Read("VW100", 700);
if (OperateResultBlockPVRead.IsSuccess)
{
foreach (var itemBlockReadTag in TagManger.DicTags)
{
if (itemBlockReadTag.Key.Contains("转速"))
{
//转速不需要PLC读取
continue;
}
//需要从PLC读取的标签才算
if ((itemBlockReadTag.Value.RWInfo == RWInfo.PLCRead || itemBlockReadTag.Value.RWInfo == RWInfo.Control) && TagManger.TryGetPVModel(itemBlockReadTag.Key, out MeterValueAttrCell pVModel))
{
//地址为空的话则下一个
if (string.IsNullOrEmpty(pVModel!.Address)) continue;
//给PvModel的原始属性赋值
pVModel!.EngSrcValue = SiemensDrive.ByteTransform.TransInt16(OperateResultBlockPVRead.Content, pVModel.BlockIndex);
}
}
//通信状态
LinkState = true;
}
else
{
//通信状态
LinkState = false;
}
//SV批量读取
OperateResultBlockSVRead = SiemensDrive.Read("VW400", 200);
if (OperateResultBlockSVRead.IsSuccess)
{
foreach (var itemBlockReadTag in TagManger.DicTags)
{
//需要控制的标签才算 才有SV
if (itemBlockReadTag.Value.RWInfo == RWInfo.Control && TagManger.TryGetSVModel(itemBlockReadTag.Key, out MeterValueAttrCell sVModel))
{
//地址为空的话则下一个
if (string.IsNullOrEmpty(sVModel!.Address)) continue;
//给SvModel的原始属性赋值
sVModel!.EngSrcValue = SiemensDrive.ByteTransform.TransInt16(OperateResultBlockSVRead.Content, sVModel.BlockIndex);
}
}
}
//MV批量读取
OperateResultBlockMVRead = SiemensDrive.Read("VW700", 230);
if (OperateResultBlockMVRead.IsSuccess)
{
foreach (var itemBlockReadTag in TagManger.DicTags)
{
//MV 设置值
//需要从PLC读取的标签才算 只有控制才有MV控制
if (itemBlockReadTag.Value.RWInfo == RWInfo.Control && TagManger.TryGetMVModel(itemBlockReadTag.Key, out MeterValueAttrCell mVModel))
{
//地址为空的话则下一个
if (string.IsNullOrEmpty(mVModel!.Address)) continue;
//给MvModel的原始属性赋值 MV是0-100 % 有标准的转换格式
mVModel!.EngValue = SiemensDrive.ByteTransform.TransInt16(OperateResultBlockMVRead.Content, mVModel.BlockIndex) * 1.0 / 10;
}
//MV 手自动切换 只有控制才有MVAM控制
if (itemBlockReadTag.Value.RWInfo == RWInfo.Control && TagManger.TryGetMVAmModel(itemBlockReadTag.Key, out MvAmAttrCell mVAmModel))
{
//地址为空的话则下一个
if (string.IsNullOrEmpty(mVAmModel!.Address)) continue;
//给mVAmModel的原始属性赋值
mVAmModel!.EngSrcValue = SiemensDrive.ByteTransform.TransInt16(OperateResultBlockMVRead.Content, mVAmModel.BlockIndex);
}
}
}
//手自动切换按钮条件
AutoHandSwtichConditionState.AlarmStateResult = SiemensDrive.ReadBool(AutoHandSwtichConditionState.AlarmAddress);
AutoHandSwtichConditionState.HandStateResult = SiemensDrive.ReadBool(AutoHandSwtichConditionState.HandStateAddress);
AutoHandSwtichConditionState.SumResult();
//程序步骤的写入
ProRunStepWrite();
//TestValue = TestValue + 0.001;
//Console.WriteLine($"结果:{LogicRuleService.ApplyExpressionFast(TestValue, LogicRuleService.LogicRuleDtos[1])}");
//stopwatch.Stop(); //停止Stopwatch
//Console.WriteLine("Add Elapsed output runTime:{0}", stopwatch.Elapsed.TotalSeconds.ToString());
//stopwatch.Reset();
//读取报警信息 取消报警XXX
OperateResultAlarm = SiemensDrive.ReadBool("V0.1", 20);
if (OperateResultAlarm.IsSuccess)
{
foreach (var item in AlarmService.ListAlarmRunCell)
{
item.UpdateBoolValue(OperateResultAlarm.Content[item.Index]);
}
}
//循环读取手自动切换
foreach (var item in ListHandSwitchData)
{
switch (item.StateAddressType)
{
case HandSwitchStateType.Bool:
item.StateBoolOperateResult = SiemensDrive.ReadBool(item.StateAddress);
if (item.StateBoolOperateResult.IsSuccess)
{
item.State = item.StateBoolOperateResult.Content;
//根据PLC得到执行的步骤数据更新到CAN和LIN的数据压缩的使能时来自于程序的步骤配置不再接受PLC的指令数据
//if (item.Name!.Equals("使能"))
//{
// switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
// {
// case CanLinEnum.Can:
// //获取PLC的使能状态更新到CAN的使能状态
// CanDriveService.UpdateCapEnableCmdData(item.State);
// //itemTag.Value.EngPvValue = 0;
// break;
// case CanLinEnum.Lin:
// //获取PLC的使能状态更新到LIN的使能状态
// LinDriveService.UpdateCapEnableCmdData(item.State);
// //itemTag.Value.EngPvValue = 0;
// break;
// default:
// break;
// }
//}
}
break;
case HandSwitchStateType.Word:
item.StateShortOperateResult = SiemensDrive.ReadInt16(item.StateAddress);
if (item.StateShortOperateResult.IsSuccess)
{
item.State = item.StateShortOperateResult.Content == 0 ? false : true;
}
break;
default:
break;
}
}
////拓展信息的展示 取消XXX
//foreach (var itemQuickTag in CurSysExdInfo.QuickTags)
//{
// itemQuickTag.OperateResultSource = SiemensDrive.Read(itemQuickTag.ValueAddress, itemQuickTag.ByteLength);
//}
//CurSysExdInfo.SumRunTime();
////布尔拓展信息的展示 取消XXX
//foreach (var itemQuickTag in SysExdBoolInfos.QuickTags)
//{
// itemQuickTag.OperateResultSource = SiemensDrive.Read(itemQuickTag.ValueAddress, itemQuickTag.ByteLength);
//}
}
catch (Exception ex)
{
//LogService.Info($"时间:{DateTime.Now.ToString()}-【Meter】-{ex.Message}");
}
DiagnosticsTime.Stop();
ConfigService.PlcCycleTime = (int)DiagnosticsTime.Elapsed.TotalMilliseconds;
//Console.WriteLine($"扫描时间:{DiagnosticsTime.Elapsed.TotalMilliseconds.ToString()}");
}
});
}
private Random random = new Random();
/// <summary>
///发布实时数据
/// </summary>
private void PubRtDataStart()
{
ScanTask = Task.Run(async () =>
{
while (ThreadEnable)
{
try
{
await Task.Delay(1000);
//_EventAggregator.GetEvent<ChartRtEvent>().Publish(new List<Models.ChartRtValue>()
//{
// new Models.ChartRtValue(){Name="EVA风量",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="中间轴转速",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="加热电力",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="加湿电力",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="EMPCV电流",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="INJ压力",Value=random.NextDouble()*100,Unit="℃"},
// new Models.ChartRtValue(){Name="冷媒流量",Value=random.NextDouble()*100,Unit="℃"},
//});
}
catch (Exception ex)
{
}
}
});
}
#region
/// <summary>
/// 队列通道
/// 当前队列消费触发的数据记录
/// </summary>
public Channel<ProRunChannelData> ProRunChannel = Channel.CreateUnbounded<ProRunChannelData>(new UnboundedChannelOptions()
{
SingleWriter = false,//允许一次写入多条数据
SingleReader = true //一次只能读取一条消息
});
///// <summary>
///// 程序执行管道监听方法
///// </summary>
///// <exception cref="NotImplementedException"></exception>
//private async void ListenProRunChannelAction()
//{
// while (await ProRunChannel.Reader.WaitToReadAsync())
// {
// if (ProRunChannel.Reader.TryRead(out var ProRunChannelData))
// {
// ////第一次计时
// //stopwatch.Start(); //启动Stopwatch
// if (ProRunChannelData.RunStepType == RunStepType.SlopCell)
// {
// Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} " +
// $"【参数名称】:{ProRunChannelData.MeterName} " +
// $"【程序Seg】{ProRunChannelData.ProSegName} " +
// $"【程序步骤】{ProRunChannelData.MeterStep} " +
// $"【斜坡打点步骤】{ProRunChannelData.SlopStepNo} " +
// $"【斜坡打点值SV】{ProRunChannelData.SV} " +
// $"【Msg】接受到仿真写入PLC OK ");
// }
// else
// {
// Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} " +
// $"【参数名称】:{ProRunChannelData.MeterName} " +
// $"【程序Seg】{ProRunChannelData.ProSegName} " +
// $"【程序步骤】{ProRunChannelData.MeterStep} " +
// $"【步骤SV】{ProRunChannelData.SV} " +
// $"【Msg】接受到步骤仿真写入PLC OK ");
// }
// Thread.Sleep(50);
// //DownLoadPID();
// //stopwatch.Stop(); //停止Stopwatch
// //Console.WriteLine("保存数据耗时::{0}", stopwatch.Elapsed.TotalSeconds.ToString());
// //stopwatch.Reset();
// }
// }
//}
/// <summary>
/// 运行步骤写入
/// </summary>
private void ProRunStepWrite()
{
while (ProRunChannel.Reader.TryRead(out var ProRunChannelData))
{
////第一次计时
//stopwatch.Start(); //启动Stopwatch
switch (ProRunChannelData.RunStepType)
{
case RunStepType.Step:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Sv
var SvResult = SiemensDrive.Write(CurMeterInfo!.SvAddress, (short)ProRunChannelData.SV!);
if (!SvResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:SV写入失败");
//速度SV到压缩机
if (ProRunChannelData.IsSpeed) SendSpeedSvToCap(ProRunChannelData.SV);
//Pid
if (!string.IsNullOrEmpty(CurMeterInfo.Pid_PAddress))
{
var Pid_PResult = SiemensDrive.Write(CurMeterInfo.Pid_PAddress, (short)ProRunChannelData.CurLoadPID!.P);
if (!Pid_PResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-P写入失败");
var Pid_IResult = SiemensDrive.Write(CurMeterInfo.Pid_IAddress, (short)ProRunChannelData.CurLoadPID!.I);
if (!Pid_IResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-I写入失败");
var Pid_DResult = SiemensDrive.Write(CurMeterInfo.Pid_DAddress, (short)ProRunChannelData.CurLoadPID!.D);
if (!Pid_DResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-D写入失败");
}
//Limit
if (!string.IsNullOrEmpty(CurMeterInfo.Limit_UpAddress))
{
var Limit_UpResult = SiemensDrive.Write(CurMeterInfo.Limit_UpAddress, (short)ProRunChannelData.CurLoadLimit!.Up);
if (!Limit_UpResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Up写入失败");
var Limit_DownResult = SiemensDrive.Write(CurMeterInfo.Limit_DownAddress, (short)ProRunChannelData.CurLoadLimit!.Down);
if (!Limit_DownResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Down写入失败");
}
}
break;
case RunStepType.StepPID:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Sv
var SvResult = SiemensDrive.Write(CurMeterInfo!.SvAddress, (short)ProRunChannelData.SV!);
if (!SvResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:SV写入失败");
//速度SV到压缩机
if (ProRunChannelData.IsSpeed) SendSpeedSvToCap(ProRunChannelData.SV);
//Pid
if (!string.IsNullOrEmpty(CurMeterInfo.Pid_PAddress))
{
var Pid_PResult = SiemensDrive.Write(CurMeterInfo.Pid_PAddress, (short)ProRunChannelData.CurLoadPID!.P);
if (!Pid_PResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-P写入失败");
var Pid_IResult = SiemensDrive.Write(CurMeterInfo.Pid_IAddress, (short)ProRunChannelData.CurLoadPID!.I);
if (!Pid_IResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-I写入失败");
var Pid_DResult = SiemensDrive.Write(CurMeterInfo.Pid_DAddress, (short)ProRunChannelData.CurLoadPID!.D);
if (!Pid_DResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-D写入失败");
}
}
break;
case RunStepType.StepLimit:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Sv
var SvResult = SiemensDrive.Write(CurMeterInfo!.SvAddress, (short)ProRunChannelData.SV!);
if (!SvResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:SV写入失败");
//速度SV到压缩机
if (ProRunChannelData.IsSpeed) SendSpeedSvToCap(ProRunChannelData.SV);
//Limit
if (!string.IsNullOrEmpty(CurMeterInfo.Limit_UpAddress))
{
var Limit_UpResult = SiemensDrive.Write(CurMeterInfo.Limit_UpAddress, (short)ProRunChannelData.CurLoadLimit!.Up);
if (!Limit_UpResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Up写入失败");
var Limit_DownResult = SiemensDrive.Write(CurMeterInfo.Limit_DownAddress, (short)ProRunChannelData.CurLoadLimit!.Down);
if (!Limit_DownResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Down写入失败");
}
}
break;
case RunStepType.StepSV:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Sv
var SvResult = SiemensDrive.Write(CurMeterInfo!.SvAddress, (short)ProRunChannelData.SV!);
if (!SvResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:SV写入失败");
//速度SV到压缩机
if (ProRunChannelData.IsSpeed) SendSpeedSvToCap(ProRunChannelData.SV);
}
break;
case RunStepType.LimitPid:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Pid
if (!string.IsNullOrEmpty(CurMeterInfo.Pid_PAddress))
{
var Pid_PResult = SiemensDrive.Write(CurMeterInfo.Pid_PAddress, (short)ProRunChannelData.CurLoadPID!.P);
if (!Pid_PResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-P写入失败");
var Pid_IResult = SiemensDrive.Write(CurMeterInfo.Pid_IAddress, (short)ProRunChannelData.CurLoadPID!.I);
if (!Pid_IResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-I写入失败");
var Pid_DResult = SiemensDrive.Write(CurMeterInfo.Pid_DAddress, (short)ProRunChannelData.CurLoadPID!.D);
if (!Pid_DResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-D写入失败");
}
//Limit
if (!string.IsNullOrEmpty(CurMeterInfo.Limit_UpAddress))
{
var Limit_UpResult = SiemensDrive.Write(CurMeterInfo.Limit_UpAddress, (short)ProRunChannelData.CurLoadLimit!.Up);
if (!Limit_UpResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Up写入失败");
var Limit_DownResult = SiemensDrive.Write(CurMeterInfo.Limit_DownAddress, (short)ProRunChannelData.CurLoadLimit!.Down);
if (!Limit_DownResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Down写入失败");
}
}
break;
case RunStepType.Pid:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Pid
if (!string.IsNullOrEmpty(CurMeterInfo.Pid_PAddress))
{
var Pid_PResult = SiemensDrive.Write(CurMeterInfo.Pid_PAddress, (short)ProRunChannelData.CurLoadPID!.P);
if (!Pid_PResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-P写入失败");
var Pid_IResult = SiemensDrive.Write(CurMeterInfo.Pid_IAddress, (short)ProRunChannelData.CurLoadPID!.I);
if (!Pid_IResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-I写入失败");
var Pid_DResult = SiemensDrive.Write(CurMeterInfo.Pid_DAddress, (short)ProRunChannelData.CurLoadPID!.D);
if (!Pid_DResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:PID-D写入失败");
}
}
break;
case RunStepType.Limit:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Limit
if (!string.IsNullOrEmpty(CurMeterInfo.Limit_UpAddress))
{
var Limit_UpResult = SiemensDrive.Write(CurMeterInfo.Limit_UpAddress, (short)ProRunChannelData.CurLoadLimit!.Up);
if (!Limit_UpResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Up写入失败");
var Limit_DownResult = SiemensDrive.Write(CurMeterInfo.Limit_DownAddress, (short)ProRunChannelData.CurLoadLimit!.Down);
if (!Limit_DownResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:Limit_Down写入失败");
}
}
break;
case RunStepType.SlopCell:
{
var CurMeterInfo = ListPlcLoadConfigCell.FirstOrDefault(a => a.Name!.Contains(ProRunChannelData.MeterName!));
//Sv
var SvResult = SiemensDrive.Write(CurMeterInfo!.SvAddress, (short)ProRunChannelData.SV!);
if (!SvResult.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:SV写入失败");
//速度SV到压缩机
if (ProRunChannelData.IsSpeed) SendSpeedSvToCap(ProRunChannelData.SV);
}
break;
case RunStepType.No:
{
//没有任何动作
}
break;
default:
break;
}
//拓展参数
if (ProRunChannelData.ListStepExd != null && ProRunChannelData.ListStepExd.Count() > 0)
{
foreach (var itemStepExd in ProRunChannelData.ListStepExd)
{
//压缩机使能的参数直接给压缩机触发
if (itemStepExd.Name!.Contains("压缩机使能"))
{
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
{
case CanLinEnum.Can:
CanDriveService.UpdateCapEnableCmdData((bool)itemStepExd.Value!);
break;
case CanLinEnum.Lin:
LinDriveService.UpdateCapEnableCmdData((bool)itemStepExd.Value!);
break;
default:
break;
}
continue;
}
var DataAdrees = ListPlcExdConfigCell.FirstOrDefault(a => a.Name == itemStepExd.Name);
if (DataAdrees != null)
{
switch (itemStepExd.ValueType)
{
case ExdValueType.Bool:
var ResultBool = SiemensDrive.Write(DataAdrees.Address, (bool)itemStepExd.Value! == true ? 1 : 0);
if (!ResultBool.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:{itemStepExd.Name}写入失败");
break;
case ExdValueType.Short:
var ResultShort = SiemensDrive.Write(DataAdrees.Address, (short)itemStepExd.Value!);
if (!ResultShort.IsSuccess) Console.WriteLine($"{ProRunChannelData.MeterName}:{itemStepExd.Name}写入失败");
break;
case ExdValueType.Double:
break;
default:
break;
}
}
}
}
//if (ProRunChannelData.RunStepType == RunStepType.SlopCell)
//{
// //SiemensDrive.Write("D1", (short)ProRunChannelData.SV);
// //Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} " +
// // $"【参数名称】:{ProRunChannelData.MeterName} " +
// // $"【程序Seg】{ProRunChannelData.ProSegName} " +
// // $"【程序步骤】{ProRunChannelData.MeterStep} " +
// // $"【斜坡打点步骤】{ProRunChannelData.SlopStepNo} " +
// // $"【斜坡打点值SV】{ProRunChannelData.SV} " +
// // $"【Msg】接受到仿真写入PLC OK ");
//}
//else
//{
// //SiemensDrive.Write("D1", (short)ProRunChannelData.SV);
// //Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} " +
// // $"【参数名称】:{ProRunChannelData.MeterName} " +
// // $"【程序Seg】{ProRunChannelData.ProSegName} " +
// // $"【程序步骤】{ProRunChannelData.MeterStep} " +
// // $"【步骤SV】{ProRunChannelData.SV} " +
// // $"【Msg】接受到步骤仿真写入PLC OK ");
//}
//Thread.Sleep(50);
//DownLoadPID();
//stopwatch.Stop(); //停止Stopwatch
//Console.WriteLine("保存数据耗时::{0}", stopwatch.Elapsed.TotalSeconds.ToString());
//stopwatch.Reset();
}
}
/// <summary>
/// 发送速度SV到压缩机
/// 自动步骤数据发送
/// </summary>
private void SendSpeedSvToCap(int SpeedSv)
{
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
{
case CanLinEnum.Can:
//获取PLC的SV数据 更新SV的速度值到压缩机
if (CanDriveService.CanAutoHand)//自动时步骤的数据可以赋值数据
{
CanDriveService.UpdateSpeedCmdData(SpeedSv);
}
//itemTag.Value.EngPvValue = 0;
break;
case CanLinEnum.Lin:
//获取PLC的SV数据 更新SV的速度值到压缩机
LinDriveService.UpdateSpeedCmdData(SpeedSv);
//itemTag.Value.EngPvValue = 0;
break;
default:
//CanDriveService.UpdateSpeedCmdData(SpeedSv);
break;
}
}
#endregion
}
}