diff --git a/.vs/hybirdMyFrame/DesignTimeBuild/.dtbcache.v2 b/.vs/hybirdMyFrame/DesignTimeBuild/.dtbcache.v2
deleted file mode 100644
index 5caff38..0000000
Binary files a/.vs/hybirdMyFrame/DesignTimeBuild/.dtbcache.v2 and /dev/null differ
diff --git a/.vs/hybirdMyFrame/v17/.futdcache.v2 b/.vs/hybirdMyFrame/v17/.futdcache.v2
deleted file mode 100644
index 99f4acb..0000000
Binary files a/.vs/hybirdMyFrame/v17/.futdcache.v2 and /dev/null differ
diff --git a/.vs/hybirdMyFrame/v17/.suo b/.vs/hybirdMyFrame/v17/.suo
deleted file mode 100644
index 449982d..0000000
Binary files a/.vs/hybirdMyFrame/v17/.suo and /dev/null differ
diff --git a/HybirdFrameworkDriver/ModbusTcpMaster/PlcDate.cs b/HybirdFrameworkDriver/ModbusTcpMaster/PlcDate.cs
new file mode 100644
index 0000000..9037c75
--- /dev/null
+++ b/HybirdFrameworkDriver/ModbusTcpMaster/PlcDate.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkDriver.ModbusTcpMaster
+{
+ ///
+ /// PLC地址
+ ///
+ public class PlcDate
+ {
+ ///
+ /// 写编程使能
+ ///
+ public ModbusProperty ProgrammingEnable { get; set; } = new(40960);
+ ///
+ /// 本机modbus地址
+ ///
+ public ModbusProperty Modbus1Addres { get; set; } = new(40962);
+ ///
+ /// 波特率
+ ///
+ public ModbusProperty BaudRate { get; set; } = new(40964);
+ ///
+ /// 校验位
+ ///
+ public ModbusProperty CheckBit { get; set; } = new(2566);
+ ///
+ /// 秒
+ ///
+ public ModbusProperty Seconds { get; set; } = new(0);
+ ///
+ /// 分
+ ///
+ public ModbusProperty Points { get; set; } = new(2);
+ ///
+ /// 时
+ ///
+ public ModbusProperty When { get; set; } = new(4);
+ ///
+ /// 周
+ ///
+ public ModbusProperty Weeks { get; set; } = new(6);
+ ///
+ /// 日
+ ///
+ public ModbusProperty Day { get; set; } = new(8);
+ ///
+ /// 月
+ ///
+ public ModbusProperty Month { get; set; } = new(10);
+ ///
+ /// 年
+ ///
+ public ModbusProperty Years { get; set; } = new(12);
+ ///
+ /// 本机modbus地址
+ ///
+ public ModbusProperty Modbus1Addres2 { get; set; } = new(14);
+ ///
+ /// 保留
+ ///
+ public ModbusProperty Reserve { get; set; } = new(16);
+ ///
+ /// 电压变比
+ ///
+ public ModbusProperty VoltageRatio { get; set; } = new(18);
+ ///
+ /// 电流变比
+ ///
+ public ModbusProperty CurrentRatio { get; set; } = new(20);
+ ///
+ /// 秒脉冲/无功电能选择
+ ///
+ public ModbusProperty PulsePerSecond { get; set; } = new(42);
+ ///
+ /// 电流接线反向
+ ///
+ public ModbusProperty CurrentReversal { get; set; } = new(48);
+ ///
+ /// 电表清零
+ ///
+ public ModbusProperty MeterReset { get; set; } = new(4576);
+ }
+}
diff --git a/HybirdFrameworkDriver/TcpServer/ModbusSession.cs b/HybirdFrameworkDriver/TcpServer/ModbusSession.cs
new file mode 100644
index 0000000..ecf6ed2
--- /dev/null
+++ b/HybirdFrameworkDriver/TcpServer/ModbusSession.cs
@@ -0,0 +1,40 @@
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using log4net;
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkDriver.TcpServer
+{
+ public class ModbusSession
+ {
+ private readonly ILog Log = LogManager.GetLogger(typeof(ModbusSession));
+
+ public ModbusTcpMaster.ModbusTcpMaster ModbusTcpMaster;
+ private String IpAddr { get; }
+ public String Key { get; set; }
+
+ public ConcurrentDictionary BusinessMap { get; set; }
+ public ModbusSession(ModbusTcpMaster.ModbusTcpMaster modbusTcpMaster)
+ {
+ this.ModbusTcpMaster = modbusTcpMaster;
+ this.IpAddr = modbusTcpMaster.Ip;
+ this.Key = modbusTcpMaster.connectId;
+ }
+
+
+ public bool Write(ModbusProperty property)
+ {
+ return ModbusTcpMaster.WriteValue(property);
+ }
+ public byte[]? Read(int registerNo, int length)
+ {
+ return ModbusTcpMaster.BatchRead(registerNo, length);
+ }
+
+
+ }
+}
diff --git a/HybirdFrameworkEntity/DbModel/BsNetEqmParamInfo.cs b/HybirdFrameworkEntity/DbModel/BsNetEqmParamInfo.cs
new file mode 100644
index 0000000..9f9c740
--- /dev/null
+++ b/HybirdFrameworkEntity/DbModel/BsNetEqmParamInfo.cs
@@ -0,0 +1,59 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Principal;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkEntity.DbModel
+{
+ ///
+ /// 设备连接参数信息字段类
+ ///
+ [SugarTable("t_bs_net_eqm_param_info")]
+ public partial class BsNetEqmParamInfo
+ {
+ ///
+ /// 索引
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "f_id")]
+
+ public int Id { get; set; }
+ ///
+ /// 设备类型编号
+ ///
+ [SugarColumn(ColumnName = "f_eqm_type_no")]
+ public int EqmTypeNo { get; set; }
+ ///
+ /// 设备类型名称
+ ///
+ [SugarColumn(ColumnName = "f_eqm_type_name")]
+ public string EqmTypeName { get; set; }
+ ///
+ /// 设备编码
+ ///
+ [SugarColumn(ColumnName = "f_eqm_code")]
+ public string EqmCode { get; set; }
+ ///
+ /// 设备序号
+ ///
+ [SugarColumn(ColumnName = "f_eqm_sn")]
+ public int EqmSn { get; set; }
+ ///
+ /// 连接地址
+ ///
+ [SugarColumn(ColumnName = "f_net_addr")]
+ public string NetAddr { get; set; }
+ ///
+ /// 连接端口
+ ///
+ [SugarColumn(ColumnName = "f_net_port")]
+ public string NetPort { get; set; }
+ ///
+ /// 目的地址
+ ///
+ [SugarColumn(ColumnName = "f_dest_addr")]
+ public string DestAddr { get; set; }
+ }
+}
diff --git a/HybirdFrameworkRepository/System/BsNetEqmParamInfoRepository.cs b/HybirdFrameworkRepository/System/BsNetEqmParamInfoRepository.cs
new file mode 100644
index 0000000..068f682
--- /dev/null
+++ b/HybirdFrameworkRepository/System/BsNetEqmParamInfoRepository.cs
@@ -0,0 +1,39 @@
+using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkEntity.DbModel;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkRepository.System
+{
+ [Scope("SingleInstance")]
+ public class BsNetEqmParamInfoRepository : BaseRepository
+ {
+ private ISqlSugarClient DbBaseClient;
+
+
+ public BsNetEqmParamInfoRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
+ {
+ DbBaseClient = sqlSugar;
+ }
+
+
+ public List QueryListByFEqmTypeNo(List fEqmTypeNo)
+
+ {
+ return DbBaseClient
+ .Queryable()
+ .In(t => t.EqmTypeNo, fEqmTypeNo)
+ .ToList();
+ }
+
+ public IEnumerable> QueryConnectParams(List types)
+ {
+ List infos = this.QueryListByFEqmTypeNo(types);
+ return infos.GroupBy(i => i.EqmTypeNo).ToList();
+ }
+ }
+}
diff --git a/HybirdFrameworkServices/EquipmentInit.cs b/HybirdFrameworkServices/EquipmentInit.cs
new file mode 100644
index 0000000..b18b662
--- /dev/null
+++ b/HybirdFrameworkServices/EquipmentInit.cs
@@ -0,0 +1,171 @@
+using HslCommunication.ModBus;
+using HslCommunication;
+using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using HybirdFrameworkDriver.TcpServer;
+using HybirdFrameworkEntity.DbModel;
+using HybirdFrameworkRepository.System;
+using HybirdFrameworkServices.Init.Entity;
+using HybirdFrameworkServices.Plc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices
+{
+ [Scope("SingleInstance")]
+ public class EquipmentInit
+ {
+ #region
+ BsNetEqmParamInfoRepository _bsNetEqmParamInfoRepository;
+ public EquipmentInit(BsNetEqmParamInfoRepository bsNetEqmParamInfoRepository)
+ {
+ _bsNetEqmParamInfoRepository = bsNetEqmParamInfoRepository;
+ }
+
+
+ ///
+ /// 连接所有数据
+ ///
+ ///
+ public void Connect()
+ {
+ BsNetEqmParamInfo bsNetEqmParamInfo = new BsNetEqmParamInfo()
+ {
+ EqmTypeNo = 3,
+ EqmTypeName = "",
+ EqmCode = "",
+ EqmSn = 3,
+ NetAddr = "127.0.0.1",
+ NetPort = "502",
+ DestAddr = "1",
+ };
+
+ ConnectPlc(bsNetEqmParamInfo);
+ }
+
+ ///
+ /// 连接PLC
+ ///
+ ///
+ ///
+ public int ConnectPlc(/*IGrouping param*/ BsNetEqmParamInfo p)
+ {
+ Thread thread = new Thread(() => ConnectPlcAsync(p));
+ thread.Start();
+
+ return 0;
+ }
+ ///
+ /// 连接PLC
+ ///
+ ///
+ private void ConnectPlcAsync(BsNetEqmParamInfo p)
+ {
+ bool connected = false;
+
+ ModbusTcpMaster master = null;
+ //PLC连接
+ while (!connected)
+ {
+
+ master = new ModbusTcpMaster()
+ {
+ Ip = "172.0.20.66",
+ Port = 502,
+ };
+ master.ReadAction = BatchReadPlc;//启动线程一直读
+ master.Duration = 3000;
+ connected = master.Connect();
+
+ if (connected)
+ {
+ break;
+ }
+
+ Thread.Sleep(5000);
+ }
+
+ ModbusSession modbusSession = new ModbusSession(master);
+ master.connectId = master.Ip + master.Port;
+ SessionMgr.RegisterModbusSession(master.connectId, modbusSession);
+ SessionMgr.SetAttrModbus(modbusSession, "eqm_sn", p.EqmSn);
+ PlcInfo waterColdInfo = new PlcInfo(master.connectId, p.EqmSn);
+ ChargerStaticInfo.PlcInfos.TryAdd(p.EqmSn, waterColdInfo);
+ }
+ /**
+ * 一直读
+ */
+ private static void BatchReadPlc(ModbusTcpMaster master)
+ {
+ while (true)
+ {
+ int sn = 3;//(int)SessionMgr.GetAttrModbus(master.connectId, "eqm_sn");
+
+ ChargerStaticInfo.PlcInfos.TryGetValue(sn, out PlcInfo plcInfo);
+ if (plcInfo != null)
+ {
+ var bytes01 = master.BatchRead(1, 115);
+ if (bytes01 != null)
+ {
+ ModbusDecoder.Decode(bytes01, plcInfo.hostToPlc);
+ }
+ var bytes02 = master.BatchRead(201, 222);
+ if (bytes02 != null)
+ {
+ ModbusDecoder.Decode(bytes02, plcInfo.plcToHost);
+ }
+ var bytes03 = master.BatchRead(701, 10);
+ if (bytes03 != null)
+ {
+ ModbusDecoder.Decode(bytes03, plcInfo.plcFault);
+ }
+ //OperateResult result2 = ModbusTcpNet.Read("x=3;201", 222);
+
+ }
+ /*
+ if (plcInfo != null)
+ {
+ byte[]? bytes01 = master.BatchRead(0, 22);
+ if (bytes01 != null)
+ {
+ ModbusDecoder.DecodeByT(bytes01, plcInfo.PlcReadAndWritten2);
+ }
+ byte[]? bytes02 = master.BatchRead(256, 170);
+ if (bytes02 != null)
+ {
+ ModbusDecoder.DecodeByT(bytes02, plcInfo.PlcReadonly);
+ }
+ byte[]? bytes03 = master.BatchRead(39424, 108);
+ if (bytes03 != null)
+ {
+ ModbusDecoder.DecodeByT(bytes03, plcInfo.PlcTurnsRatio);
+ }
+
+ byte[]? bytes04 = master.BatchRead(40960, 3);//写编程使能。本机modbus地址。波特率
+ byte[]? bytes05 = master.BatchRead(2566, 1);//校验位
+ byte[]? bytes06 = master.BatchRead(42, 1);//秒脉冲/无功电能选择
+ byte[]? bytes07 = master.BatchRead(48, 1);//电流接线反向
+ byte[]? bytes08 = master.BatchRead(4576, 1);//电表清零
+
+ if (bytes04 != null)
+ {
+ ModbusDecoder.DecodeByT(bytes04, plcInfo.PlcReadAndWritten1);
+ }
+ plcInfo.PlcReadAndWritten1.CheckBit = master.ModbusTcpNet.ByteTransform.TransUInt16(bytes05, 0);
+ plcInfo.PlcReadAndWritten1.PulsePerSecond = master.ModbusTcpNet.ByteTransform.TransUInt16(bytes06, 0);
+ plcInfo.PlcReadAndWritten1.CurrentReversal = master.ModbusTcpNet.ByteTransform.TransUInt16(bytes07, 0);
+ plcInfo.PlcReadAndWritten1.MeterReset = master.ModbusTcpNet.ByteTransform.TransUInt16(bytes08, 0);
+
+ }
+ */
+
+ }
+
+ }
+
+ #endregion PLC
+ }
+}
diff --git a/HybirdFrameworkServices/Init/Entity/ChargerStaticInfo.cs b/HybirdFrameworkServices/Init/Entity/ChargerStaticInfo.cs
new file mode 100644
index 0000000..406905d
--- /dev/null
+++ b/HybirdFrameworkServices/Init/Entity/ChargerStaticInfo.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Init.Entity
+{
+ public class ChargerStaticInfo
+ {
+ ///
+ /// PLC管理
+ ///
+ public static readonly ConcurrentDictionary PlcInfos =
+ new ConcurrentDictionary();
+ }
+}
diff --git a/HybirdFrameworkServices/Init/Entity/ConnectState.cs b/HybirdFrameworkServices/Init/Entity/ConnectState.cs
new file mode 100644
index 0000000..a50582f
--- /dev/null
+++ b/HybirdFrameworkServices/Init/Entity/ConnectState.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Init.Entity
+{
+ ///
+ ///PLC连接状态枚举
+ ///
+ public enum ConnectState
+ {
+ NOCONNECT = 0,
+ CONNECTING = 1,
+ CONNECTED = 2
+ }
+}
diff --git a/HybirdFrameworkServices/Init/Entity/PlcInfo.cs b/HybirdFrameworkServices/Init/Entity/PlcInfo.cs
new file mode 100644
index 0000000..71d4d3b
--- /dev/null
+++ b/HybirdFrameworkServices/Init/Entity/PlcInfo.cs
@@ -0,0 +1,86 @@
+using HslCommunication;
+using HslCommunication.ModBus;
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using HybirdFrameworkDriver.TcpServer;
+using HybirdFrameworkServices.Plc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Init.Entity
+{
+ public class PlcInfo
+ {
+ #region 字段
+ ///
+ /// ModbusTcp客户端
+ ///
+ //public ModbusTcpNet _client = null;
+ ///
+ /// 设备编号
+ ///
+ private string _devNo = "001";
+ ///
+ /// 设备名称
+ ///
+ private string _devname = "换电PLC";
+ ///
+ /// 服务端连接IP
+ ///
+ private string _ipaddr = "172.0.20.48";
+ ///
+ /// 服务端连接端口
+ ///
+ private int _port = 502;
+ ///
+ /// 站号
+ ///
+ private byte _site = 0x01;
+ ///
+ /// 连接超时时间。单位秒
+ ///
+ private int _connecttimeout = 10;
+ ///
+ /// 保持活跃时间。单位秒
+ ///
+ private int _keepalive = 30;
+ ///
+ /// 连接状态
+ ///
+ private ConnectState _connect_state = ConnectState.NOCONNECT;
+ #endregion 字段
+
+ public string ChannelId;
+
+ public int EqmSn;
+
+ public HostToPlc hostToPlc=new HostToPlc();
+ public PlcToHost plcToHost =new PlcToHost();
+ public PlcFault plcFault = new PlcFault();
+
+
+ public PlcInfo(string channelId, int eqmSn)
+ {
+ ChannelId = channelId;
+ EqmSn = eqmSn;
+ }
+
+ public bool WriteUint16(ModbusProperty value)
+ {
+ bool bResult = false;
+ ModbusSession session = SessionMgr.GetModbusSession(ChannelId);
+ bResult = session.Write(value);
+ return bResult;
+ }
+
+ public bool Writeint16(ModbusProperty value)
+ {
+ bool bResult = false;
+ ModbusSession session = SessionMgr.GetModbusSession(ChannelId);
+ bResult = session.Write(value);
+ return bResult;
+ }
+ }
+}
diff --git a/HybirdFrameworkServices/Plc/HostToPlc.cs b/HybirdFrameworkServices/Plc/HostToPlc.cs
new file mode 100644
index 0000000..88eae77
--- /dev/null
+++ b/HybirdFrameworkServices/Plc/HostToPlc.cs
@@ -0,0 +1,87 @@
+using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Plc
+{
+ public class HostToPlc
+ {
+ public ModbusProperty ProtocolVersion1 { get; set; } = new(40001); // 协议版本
+ public ModbusProperty ProtocolVersion2 { get; set; } = new(40002); // 协议版本
+ public ModbusProperty ProtocolVersion3 { get; set; } = new(40003); // 协议版本
+ public ModbusProperty CommunicationDiagnosis { get; set; } = new(40004); // 通讯诊断
+ public ModbusProperty ModeControl { get; set; } = new(40005); // 模式控制
+ public ModbusProperty EquipmentControl { get; set; } = new(40006); // 设备控制
+ public ModbusProperty ExhaustFanControl { get; set; } = new(40007); // 排风扇控制
+ public ModbusProperty LightingControl { get; set; } = new(40008); // 灯光控制
+ public ModbusProperty Standby1 { get; set; } = new(40009); // 备用
+ public ModbusProperty Standby2 { get; set; } = new(40010); // 备用
+ public ModbusProperty Seconds { get; set; } = new(40011); // 对时时钟:秒
+ public ModbusProperty Points { get; set; } = new(40012); // 对时时钟:分
+ public ModbusProperty Hour { get; set; } = new(40013); // 对时时钟:时
+ public ModbusProperty Day { get; set; } = new(40014); // 对时时钟:天
+ public ModbusProperty Month { get; set; } = new(40015); // 对时时钟:月
+ public ModbusProperty Years { get; set; } = new(40016); // 对时时钟:年
+ public ModbusProperty Standby3 { get; set; } = new(40017, length: 4); // 备用3
+ public ModbusProperty ChargingStatus { get; set; } = new(40021, length: 40); // 仓位充电状态
+ public ModbusProperty ChargingStatus01 { get; set; } = new(40021); // 仓位充电状态
+ public ModbusProperty ChargingStatus02 { get; set; } = new(40022); // 仓位充电状态
+ public ModbusProperty ChargingStatus03 { get; set; } = new(40023); // 仓位充电状态
+ public ModbusProperty ChargingStatus04 { get; set; } = new(40024); // 仓位充电状态
+ public ModbusProperty ChargingStatus05 { get; set; } = new(40025); // 仓位充电状态
+ public ModbusProperty ChargingStatus06 { get; set; } = new(40026); // 仓位充电状态
+ public ModbusProperty ChargingStatus07 { get; set; } = new(40027); // 仓位充电状态
+ public ModbusProperty ChargingStatus08 { get; set; } = new(40028); // 仓位充电状态
+ public ModbusProperty ChargingStatus09 { get; set; } = new(40029); // 仓位充电状态
+ public ModbusProperty ChargingStatus10 { get; set; } = new(40030); // 仓位充电状态
+ public ModbusProperty ChargingStatus11 { get; set; } = new(40031); // 仓位充电状态
+ public ModbusProperty ChargingStatus12 { get; set; } = new(40032); // 仓位充电状态
+ public ModbusProperty ChargingStatus13 { get; set; } = new(40033); // 仓位充电状态
+ public ModbusProperty ChargingStatus14 { get; set; } = new(40034); // 仓位充电状态
+ public ModbusProperty ChargingStatus15 { get; set; } = new(40035); // 仓位充电状态
+ public ModbusProperty ChargingStatus16 { get; set; } = new(40036); // 仓位充电状态
+ public ModbusProperty ChargingStatus17 { get; set; } = new(40037); // 仓位充电状态
+ public ModbusProperty ChargingStatus18 { get; set; } = new(40038); // 仓位充电状态
+ public ModbusProperty ChargingStatus19 { get; set; } = new(40039); // 仓位充电状态
+ public ModbusProperty ChargingStatus20 { get; set; } = new(40040); // 仓位充电状态
+ public ModbusProperty BatteryType { get; set; } = new(40061, length: 40); // 仓位所在电池型号
+
+ public ModbusProperty BatteryType01 { get; set; } = new(40061); // 仓位所在电池型号
+ public ModbusProperty BatteryType02 { get; set; } = new(40062); // 仓位所在电池型号
+ public ModbusProperty BatteryType03 { get; set; } = new(40063); // 仓位所在电池型号
+ public ModbusProperty BatteryType04 { get; set; } = new(40064); // 仓位所在电池型号
+ public ModbusProperty BatteryType05 { get; set; } = new(40065); // 仓位所在电池型号
+ public ModbusProperty BatteryType06 { get; set; } = new(40066); // 仓位所在电池型号
+ public ModbusProperty BatteryType07 { get; set; } = new(40067); // 仓位所在电池型号
+ public ModbusProperty BatteryType08 { get; set; } = new(40068); // 仓位所在电池型号
+ public ModbusProperty BatteryType09 { get; set; } = new(40069); // 仓位所在电池型号
+ public ModbusProperty BatteryType10 { get; set; } = new(40070); // 仓位所在电池型号
+ public ModbusProperty BatteryType11 { get; set; } = new(40071); // 仓位所在电池型号
+ public ModbusProperty BatteryType12 { get; set; } = new(40072); // 仓位所在电池型号
+ public ModbusProperty BatteryType13 { get; set; } = new(40073); // 仓位所在电池型号
+ public ModbusProperty BatteryType14 { get; set; } = new(40074); // 仓位所在电池型号
+ public ModbusProperty BatteryType15 { get; set; } = new(40075); // 仓位所在电池型号
+ public ModbusProperty BatteryType16 { get; set; } = new(40076); // 仓位所在电池型号
+ public ModbusProperty BatteryType17 { get; set; } = new(40077); // 仓位所在电池型号
+ public ModbusProperty BatteryType18 { get; set; } = new(40078); // 仓位所在电池型号
+ public ModbusProperty BatteryType19 { get; set; } = new(40079); // 仓位所在电池型号
+ public ModbusProperty BatteryType20 { get; set; } = new(40080); // 仓位所在电池型号
+
+ public ModbusProperty VehicleParkingLocation { get; set; } = new(40101); // 车辆驻车位置
+ public ModbusProperty VehicleParkingStatus { get; set; } = new(40102); // 车辆驻车状态
+ public ModbusProperty LightIn { get; set; } = new(40103); // "三色灯控制整站状态(入口)"
+ public ModbusProperty LightOut { get; set; } = new(40104); // "三色灯控制整站状态(出口)"
+ public ModbusProperty StopCommand { get; set; } = new(40105); // 电池包锁止异常,暂停命令
+ public ModbusProperty Standby4 { get; set; } = new(40106, length: 5); // 备用4
+ public ModbusProperty TaskType { get; set; } = new(40111); // 任务类型
+ public ModbusProperty EntrySelection { get; set; } = new(40112); // 入仓位选择
+ public ModbusProperty ExitSelection { get; set; } = new(40113); // 出仓仓位选择
+ public ModbusProperty BatteryPackType { get; set; } = new(40114); // 电池包类型
+ public ModbusProperty TaskEnablement { get; set; } = new(40115); // 任务使能
+
+ }
+}
diff --git a/HybirdFrameworkServices/Plc/PlcFault.cs b/HybirdFrameworkServices/Plc/PlcFault.cs
new file mode 100644
index 0000000..0b35d9a
--- /dev/null
+++ b/HybirdFrameworkServices/Plc/PlcFault.cs
@@ -0,0 +1,23 @@
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Plc
+{
+ public class PlcFault
+ {
+ public ModbusProperty ErrorCode01 { get; set; } = new(40701); // 错误码
+ public ModbusProperty ErrorCode02 { get; set; } = new(40702); // 错误码
+ public ModbusProperty ErrorCode03 { get; set; } = new(40703); // 错误码
+ public ModbusProperty ErrorCode04 { get; set; } = new(40704); // 错误码
+ public ModbusProperty ErrorCode05 { get; set; } = new(40705); // 错误码
+ public ModbusProperty ErrorCode06 { get; set; } = new(40706); // 错误码
+ public ModbusProperty ErrorCode07 { get; set; } = new(40707); // 错误码
+ public ModbusProperty ErrorCode08 { get; set; } = new(40708); // 错误码
+ public ModbusProperty ErrorCode09 { get; set; } = new(40709); // 错误码
+ public ModbusProperty ErrorCode10 { get; set; } = new(40710); // 错误码
+ }
+}
diff --git a/HybirdFrameworkServices/Plc/PlcToHost.cs b/HybirdFrameworkServices/Plc/PlcToHost.cs
new file mode 100644
index 0000000..3345a61
--- /dev/null
+++ b/HybirdFrameworkServices/Plc/PlcToHost.cs
@@ -0,0 +1,69 @@
+using HybirdFrameworkCore.Autofac.Attribute;
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HybirdFrameworkServices.Plc
+{
+ ///
+ ///
+ ///
+ public class PlcToHost
+ {
+ public ModbusProperty ProtocolVersion1 { get; set; } = new(40201); // 协议版本
+ public ModbusProperty ProtocolVersion2 { get; set; } = new(40202); // 协议版本
+ public ModbusProperty ProtocolVersion3 { get; set; } = new(40203); // 协议版本
+ public ModbusProperty CommunicationDiagnosis { get; set; } = new(40204); // 通讯诊断
+ public ModbusProperty ModeControl { get; set; } = new(40205); // 模式状态
+ public ModbusProperty DeviceSystemStatus { get; set; } = new(40206); // 设备系统状态
+
+ //public ModbusProperty type00 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT0:复位
+ //public ModbusProperty type01 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT1:启动
+ //public ModbusProperty type02 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT2:暂停
+ //public ModbusProperty type03 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT3:急停
+ //public ModbusProperty type04 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT4:
+ //public ModbusProperty type05 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT5:整站断电
+ //public ModbusProperty type06 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT6:自动运行中
+ //public ModbusProperty type07 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT7:PLC停机报警
+ //public ModbusProperty type08 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT8:PLC提示预警
+
+ public ModbusProperty RemoteLocalControlState { get; set; } = new(40207); // 遥本控状态
+ public ModbusProperty LightStatus { get; set; } = new(40208); // 灯光状态
+ public ModbusProperty ExhaustFanStatus { get; set; } = new(40209); // 排风扇状态
+ public ModbusProperty WaterStatusStation { get; set; } = new(40210); // 站内积水状态
+ public ModbusProperty value09 { get; set; } = new(40211, length: 30); // 备用
+ public ModbusProperty InPosition { get; set; } = new(40241, length: 40); // 在位状态
+ public ModbusProperty value11 { get; set; } = new(40281, length: 20); // 备用
+ public ModbusProperty CarStatus { get; set; } = new(40301); // 载行车设备状态
+
+ public ModbusProperty value13 { get; set; } = new(40302); // 备用
+ public ModbusProperty value14 { get; set; } = new(40303); // 备用
+ public ModbusProperty value15 { get; set; } = new(40304); // 备用
+ public ModbusProperty value16 { get; set; } = new(40305); // 备用
+ public ModbusProperty PercentageTorqueX { get; set; } = new(40306); // x轴扭矩百分比
+ public ModbusProperty PercentageTorqueY { get; set; } = new(40307); // y轴扭矩百分比
+ public ModbusProperty PercentageTorqueZ { get; set; } = new(40308); // z轴扭矩百分比
+ public ModbusProperty value20 { get; set; } = new(40309, length: 92); // 备用
+ public ModbusProperty RadarStatesIn{ get; set; } = new(40401); // " 入口雷达状态"
+ public ModbusProperty RadarStatesOut { get; set; } = new(40402); // " 出口雷达状态"
+ public ModbusProperty SpotPhotoelectricSignal { get; set; } = new(40403); // 到位光电信号
+ public ModbusProperty PhysicalButtonState { get; set; } = new(40404); // 实体按钮状态
+ public ModbusProperty LightIn { get; set; } = new(40405); // "三色灯控制通道状态(入口)"
+ public ModbusProperty LightOut { get; set; } = new(40406); // "三色灯控制通道状态(出口)"
+ public ModbusProperty TaskType { get; set; } = new(40407); // "任务类型状态(是否允许允许执行任务)"
+ public ModbusProperty TaskStates { get; set; } = new(40408); // 任务状态
+ public ModbusProperty OperationalTrainNumber { get; set; } = new(40409); // 执行任务行车号
+ public ModbusProperty ChannelLocationState { get; set; } = new(40410); // 通道定位状态
+ public ModbusProperty DeviationX { get; set; } = new(40411); // x偏差
+ public ModbusProperty DeviationY { get; set; } = new(40412); // y偏差
+ public ModbusProperty DeviationZ { get; set; } = new(40413); // z偏差
+ public ModbusProperty value44 { get; set; } = new(40414, length: 7); // 备用
+
+
+
+ }
+}
diff --git a/WinFormStarter/Form2.resx b/WinFormStarter/Form2.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WinFormStarter/Form2.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinFormStarter/FrmPlc.Designer.cs b/WinFormStarter/FrmPlc.Designer.cs
new file mode 100644
index 0000000..fb1436c
--- /dev/null
+++ b/WinFormStarter/FrmPlc.Designer.cs
@@ -0,0 +1,2048 @@
+namespace WinFormStarter
+{
+ partial class FrmPlc
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ BtnCollectionAssignment = new Button();
+ groupBox2 = new GroupBox();
+ txtValue03 = new TextBox();
+ txtValue02 = new TextBox();
+ txtValue01 = new TextBox();
+ label20 = new Label();
+ button6 = new Button();
+ button4 = new Button();
+ txtValue24 = new TextBox();
+ label25 = new Label();
+ button5 = new Button();
+ txtValue23 = new TextBox();
+ label26 = new Label();
+ button1 = new Button();
+ txtValue22 = new TextBox();
+ label19 = new Label();
+ button2 = new Button();
+ txtValue21 = new TextBox();
+ label23 = new Label();
+ button3 = new Button();
+ txtValue20 = new TextBox();
+ label24 = new Label();
+ txtValue05 = new TextBox();
+ txtValue08 = new TextBox();
+ BtnWrite18 = new Button();
+ label1 = new Label();
+ txtValue19 = new TextBox();
+ txtValue04 = new TextBox();
+ label18 = new Label();
+ BtnWrite01 = new Button();
+ BtnWrite17 = new Button();
+ label2 = new Label();
+ txtValue18 = new TextBox();
+ label17 = new Label();
+ BtnWrite02 = new Button();
+ BtnWrite16 = new Button();
+ label3 = new Label();
+ txtValue17 = new TextBox();
+ txtValue06 = new TextBox();
+ label16 = new Label();
+ BtnWrite03 = new Button();
+ BtnWrite15 = new Button();
+ label4 = new Label();
+ txtValue16 = new TextBox();
+ txtValue07 = new TextBox();
+ label15 = new Label();
+ BtnWrite04 = new Button();
+ label5 = new Label();
+ BtnWrite14 = new Button();
+ BtnWrite05 = new Button();
+ txtValue15 = new TextBox();
+ label6 = new Label();
+ label14 = new Label();
+ txtValue09 = new TextBox();
+ BtnWrite06 = new Button();
+ label7 = new Label();
+ txtValue10 = new TextBox();
+ BtnWrite07 = new Button();
+ label8 = new Label();
+ txtValue11 = new TextBox();
+ BtnWrite11 = new Button();
+ BtnWrite08 = new Button();
+ txtValue14 = new TextBox();
+ label9 = new Label();
+ label11 = new Label();
+ txtValue12 = new TextBox();
+ BtnWrite10 = new Button();
+ BtnWrite09 = new Button();
+ txtValue13 = new TextBox();
+ label10 = new Label();
+ BtnWrite12 = new Button();
+ groupBox3 = new GroupBox();
+ tableLayoutPanel1 = new TableLayoutPanel();
+ textBox20 = new TextBox();
+ textBox19 = new TextBox();
+ textBox1 = new TextBox();
+ textBox2 = new TextBox();
+ textBox17 = new TextBox();
+ textBox3 = new TextBox();
+ textBox4 = new TextBox();
+ textBox5 = new TextBox();
+ textBox6 = new TextBox();
+ textBox7 = new TextBox();
+ textBox9 = new TextBox();
+ textBox8 = new TextBox();
+ textBox10 = new TextBox();
+ textBox13 = new TextBox();
+ textBox14 = new TextBox();
+ textBox12 = new TextBox();
+ textBox11 = new TextBox();
+ textBox15 = new TextBox();
+ textBox16 = new TextBox();
+ textBox18 = new TextBox();
+ groupBox1 = new GroupBox();
+ tableLayoutPanel2 = new TableLayoutPanel();
+ textBox31 = new TextBox();
+ button7 = new Button();
+ textBox21 = new TextBox();
+ textBox24 = new TextBox();
+ textBox25 = new TextBox();
+ textBox30 = new TextBox();
+ textBox26 = new TextBox();
+ textBox29 = new TextBox();
+ textBox27 = new TextBox();
+ textBox28 = new TextBox();
+ textBox33 = new TextBox();
+ textBox32 = new TextBox();
+ textBox35 = new TextBox();
+ textBox34 = new TextBox();
+ textBox36 = new TextBox();
+ textBox37 = new TextBox();
+ textBox38 = new TextBox();
+ textBox39 = new TextBox();
+ textBox40 = new TextBox();
+ textBox23 = new TextBox();
+ textBox22 = new TextBox();
+ groupBox4 = new GroupBox();
+ lblValue26 = new Label();
+ label74 = new Label();
+ lblValue25 = new Label();
+ label72 = new Label();
+ lblValue24 = new Label();
+ label70 = new Label();
+ lblValue23 = new Label();
+ label68 = new Label();
+ lblValue22 = new Label();
+ label66 = new Label();
+ lblValue21 = new Label();
+ label64 = new Label();
+ lblValue20 = new Label();
+ label62 = new Label();
+ lblValue19 = new Label();
+ label60 = new Label();
+ lblValue18 = new Label();
+ label58 = new Label();
+ lblValue17 = new Label();
+ label56 = new Label();
+ lblValue16 = new Label();
+ label54 = new Label();
+ lblValue15 = new Label();
+ label52 = new Label();
+ lblValue14 = new Label();
+ label50 = new Label();
+ lblValue13 = new Label();
+ label48 = new Label();
+ lblValue12 = new Label();
+ label46 = new Label();
+ lblValue11 = new Label();
+ label44 = new Label();
+ lblValue10 = new Label();
+ label42 = new Label();
+ lblValue09 = new Label();
+ label40 = new Label();
+ lblValue08 = new Label();
+ label38 = new Label();
+ lblValue07 = new Label();
+ label36 = new Label();
+ lblValue06 = new Label();
+ label34 = new Label();
+ lblValue05 = new Label();
+ label32 = new Label();
+ lblValue04 = new Label();
+ label30 = new Label();
+ lblValue03 = new Label();
+ label28 = new Label();
+ lblValue02 = new Label();
+ label22 = new Label();
+ lblValue01 = new Label();
+ label12 = new Label();
+ groupBox2.SuspendLayout();
+ groupBox3.SuspendLayout();
+ tableLayoutPanel1.SuspendLayout();
+ groupBox1.SuspendLayout();
+ tableLayoutPanel2.SuspendLayout();
+ groupBox4.SuspendLayout();
+ SuspendLayout();
+ //
+ // BtnCollectionAssignment
+ //
+ BtnCollectionAssignment.Enabled = false;
+ BtnCollectionAssignment.Location = new Point(1159, 198);
+ BtnCollectionAssignment.Name = "BtnCollectionAssignment";
+ BtnCollectionAssignment.Size = new Size(94, 29);
+ BtnCollectionAssignment.TabIndex = 120;
+ BtnCollectionAssignment.Text = "采集赋值";
+ BtnCollectionAssignment.UseVisualStyleBackColor = true;
+ BtnCollectionAssignment.Click += BtnCollectionAssignment_Click;
+ //
+ // groupBox2
+ //
+ groupBox2.Controls.Add(txtValue03);
+ groupBox2.Controls.Add(txtValue02);
+ groupBox2.Controls.Add(txtValue01);
+ groupBox2.Controls.Add(label20);
+ groupBox2.Controls.Add(BtnCollectionAssignment);
+ groupBox2.Controls.Add(button6);
+ groupBox2.Controls.Add(button4);
+ groupBox2.Controls.Add(txtValue24);
+ groupBox2.Controls.Add(label25);
+ groupBox2.Controls.Add(button5);
+ groupBox2.Controls.Add(txtValue23);
+ groupBox2.Controls.Add(label26);
+ groupBox2.Controls.Add(button1);
+ groupBox2.Controls.Add(txtValue22);
+ groupBox2.Controls.Add(label19);
+ groupBox2.Controls.Add(button2);
+ groupBox2.Controls.Add(txtValue21);
+ groupBox2.Controls.Add(label23);
+ groupBox2.Controls.Add(button3);
+ groupBox2.Controls.Add(txtValue20);
+ groupBox2.Controls.Add(label24);
+ groupBox2.Controls.Add(txtValue05);
+ groupBox2.Controls.Add(txtValue08);
+ groupBox2.Controls.Add(BtnWrite18);
+ groupBox2.Controls.Add(label1);
+ groupBox2.Controls.Add(txtValue19);
+ groupBox2.Controls.Add(txtValue04);
+ groupBox2.Controls.Add(label18);
+ groupBox2.Controls.Add(BtnWrite01);
+ groupBox2.Controls.Add(BtnWrite17);
+ groupBox2.Controls.Add(label2);
+ groupBox2.Controls.Add(txtValue18);
+ groupBox2.Controls.Add(label17);
+ groupBox2.Controls.Add(BtnWrite02);
+ groupBox2.Controls.Add(BtnWrite16);
+ groupBox2.Controls.Add(label3);
+ groupBox2.Controls.Add(txtValue17);
+ groupBox2.Controls.Add(txtValue06);
+ groupBox2.Controls.Add(label16);
+ groupBox2.Controls.Add(BtnWrite03);
+ groupBox2.Controls.Add(BtnWrite15);
+ groupBox2.Controls.Add(label4);
+ groupBox2.Controls.Add(txtValue16);
+ groupBox2.Controls.Add(txtValue07);
+ groupBox2.Controls.Add(label15);
+ groupBox2.Controls.Add(BtnWrite04);
+ groupBox2.Controls.Add(label5);
+ groupBox2.Controls.Add(BtnWrite14);
+ groupBox2.Controls.Add(BtnWrite05);
+ groupBox2.Controls.Add(txtValue15);
+ groupBox2.Controls.Add(label6);
+ groupBox2.Controls.Add(label14);
+ groupBox2.Controls.Add(txtValue09);
+ groupBox2.Controls.Add(BtnWrite06);
+ groupBox2.Controls.Add(label7);
+ groupBox2.Controls.Add(txtValue10);
+ groupBox2.Controls.Add(BtnWrite07);
+ groupBox2.Controls.Add(label8);
+ groupBox2.Controls.Add(txtValue11);
+ groupBox2.Controls.Add(BtnWrite11);
+ groupBox2.Controls.Add(BtnWrite08);
+ groupBox2.Controls.Add(txtValue14);
+ groupBox2.Controls.Add(label9);
+ groupBox2.Controls.Add(label11);
+ groupBox2.Controls.Add(txtValue12);
+ groupBox2.Controls.Add(BtnWrite10);
+ groupBox2.Controls.Add(BtnWrite09);
+ groupBox2.Controls.Add(txtValue13);
+ groupBox2.Controls.Add(label10);
+ groupBox2.Location = new Point(17, 12);
+ groupBox2.Name = "groupBox2";
+ groupBox2.Size = new Size(1277, 244);
+ groupBox2.TabIndex = 173;
+ groupBox2.TabStop = false;
+ groupBox2.Text = "可读可写";
+ //
+ // txtValue03
+ //
+ txtValue03.Location = new Point(161, 27);
+ txtValue03.Name = "txtValue03";
+ txtValue03.Size = new Size(28, 27);
+ txtValue03.TabIndex = 191;
+ //
+ // txtValue02
+ //
+ txtValue02.Location = new Point(112, 27);
+ txtValue02.Name = "txtValue02";
+ txtValue02.Size = new Size(32, 27);
+ txtValue02.TabIndex = 190;
+ //
+ // txtValue01
+ //
+ txtValue01.Location = new Point(76, 27);
+ txtValue01.Name = "txtValue01";
+ txtValue01.Size = new Size(30, 27);
+ txtValue01.TabIndex = 189;
+ //
+ // label20
+ //
+ label20.AutoSize = true;
+ label20.Location = new Point(11, 30);
+ label20.Name = "label20";
+ label20.Size = new Size(69, 20);
+ label20.TabIndex = 188;
+ label20.Text = "协议版本";
+ //
+ // button6
+ //
+ button6.Location = new Point(213, 26);
+ button6.Name = "button6";
+ button6.Size = new Size(94, 29);
+ button6.TabIndex = 187;
+ button6.Text = "写";
+ button6.UseVisualStyleBackColor = true;
+ button6.Click += button6_Click;
+ //
+ // button4
+ //
+ button4.Location = new Point(531, 194);
+ button4.Name = "button4";
+ button4.Size = new Size(94, 29);
+ button4.TabIndex = 186;
+ button4.Text = "写";
+ button4.UseVisualStyleBackColor = true;
+ button4.Click += button4_Click;
+ //
+ // txtValue24
+ //
+ txtValue24.Location = new Point(429, 195);
+ txtValue24.Name = "txtValue24";
+ txtValue24.Size = new Size(80, 27);
+ txtValue24.TabIndex = 185;
+ //
+ // label25
+ //
+ label25.AutoSize = true;
+ label25.Location = new Point(344, 198);
+ label25.Name = "label25";
+ label25.Size = new Size(69, 20);
+ label25.TabIndex = 184;
+ label25.Text = "任务使能";
+ //
+ // button5
+ //
+ button5.Location = new Point(213, 194);
+ button5.Name = "button5";
+ button5.Size = new Size(94, 29);
+ button5.TabIndex = 183;
+ button5.Text = "写";
+ button5.UseVisualStyleBackColor = true;
+ button5.Click += button5_Click;
+ //
+ // txtValue23
+ //
+ txtValue23.Location = new Point(97, 195);
+ txtValue23.Name = "txtValue23";
+ txtValue23.Size = new Size(80, 27);
+ txtValue23.TabIndex = 182;
+ //
+ // label26
+ //
+ label26.AutoSize = true;
+ label26.Location = new Point(12, 198);
+ label26.Name = "label26";
+ label26.Size = new Size(84, 20);
+ label26.TabIndex = 181;
+ label26.Text = "电池包类型";
+ //
+ // button1
+ //
+ button1.Location = new Point(1159, 159);
+ button1.Name = "button1";
+ button1.Size = new Size(94, 29);
+ button1.TabIndex = 180;
+ button1.Text = "写";
+ button1.UseVisualStyleBackColor = true;
+ button1.Click += button1_Click;
+ //
+ // txtValue22
+ //
+ txtValue22.Location = new Point(1062, 160);
+ txtValue22.Name = "txtValue22";
+ txtValue22.Size = new Size(80, 27);
+ txtValue22.TabIndex = 179;
+ //
+ // label19
+ //
+ label19.AutoSize = true;
+ label19.Location = new Point(954, 163);
+ label19.Name = "label19";
+ label19.Size = new Size(99, 20);
+ label19.TabIndex = 178;
+ label19.Text = "出仓仓位选择";
+ //
+ // button2
+ //
+ button2.Location = new Point(838, 159);
+ button2.Name = "button2";
+ button2.Size = new Size(94, 29);
+ button2.TabIndex = 177;
+ button2.Text = "写";
+ button2.UseVisualStyleBackColor = true;
+ button2.Click += button2_Click;
+ //
+ // txtValue21
+ //
+ txtValue21.Location = new Point(736, 160);
+ txtValue21.Name = "txtValue21";
+ txtValue21.Size = new Size(80, 27);
+ txtValue21.TabIndex = 176;
+ //
+ // label23
+ //
+ label23.AutoSize = true;
+ label23.Location = new Point(651, 163);
+ label23.Name = "label23";
+ label23.Size = new Size(84, 20);
+ label23.TabIndex = 175;
+ label23.Text = "入仓位选择";
+ //
+ // button3
+ //
+ button3.Location = new Point(531, 159);
+ button3.Name = "button3";
+ button3.Size = new Size(94, 29);
+ button3.TabIndex = 174;
+ button3.Text = "写";
+ button3.UseVisualStyleBackColor = true;
+ button3.Click += button3_Click;
+ //
+ // txtValue20
+ //
+ txtValue20.Location = new Point(429, 160);
+ txtValue20.Name = "txtValue20";
+ txtValue20.Size = new Size(80, 27);
+ txtValue20.TabIndex = 173;
+ //
+ // label24
+ //
+ label24.AutoSize = true;
+ label24.Location = new Point(344, 163);
+ label24.Name = "label24";
+ label24.Size = new Size(69, 20);
+ label24.TabIndex = 172;
+ label24.Text = "任务类型";
+ //
+ // txtValue05
+ //
+ txtValue05.Location = new Point(736, 27);
+ txtValue05.Name = "txtValue05";
+ txtValue05.Size = new Size(80, 27);
+ txtValue05.TabIndex = 121;
+ //
+ // txtValue08
+ //
+ txtValue08.Location = new Point(429, 62);
+ txtValue08.Name = "txtValue08";
+ txtValue08.Size = new Size(80, 27);
+ txtValue08.TabIndex = 130;
+ //
+ // BtnWrite18
+ //
+ BtnWrite18.Location = new Point(213, 159);
+ BtnWrite18.Name = "BtnWrite18";
+ BtnWrite18.Size = new Size(94, 29);
+ BtnWrite18.TabIndex = 171;
+ BtnWrite18.Text = "写";
+ BtnWrite18.UseVisualStyleBackColor = true;
+ BtnWrite18.Click += BtnWrite18_Click;
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.Location = new Point(344, 30);
+ label1.Name = "label1";
+ label1.Size = new Size(69, 20);
+ label1.TabIndex = 117;
+ label1.Text = "通讯诊断";
+ //
+ // txtValue19
+ //
+ txtValue19.Location = new Point(97, 160);
+ txtValue19.Name = "txtValue19";
+ txtValue19.Size = new Size(80, 27);
+ txtValue19.TabIndex = 170;
+ //
+ // txtValue04
+ //
+ txtValue04.Location = new Point(429, 27);
+ txtValue04.Name = "txtValue04";
+ txtValue04.Size = new Size(80, 27);
+ txtValue04.TabIndex = 118;
+ //
+ // label18
+ //
+ label18.AutoSize = true;
+ label18.Location = new Point(-40, 163);
+ label18.Name = "label18";
+ label18.Size = new Size(189, 20);
+ label18.TabIndex = 169;
+ label18.Text = "电池包锁止异常,暂停命令";
+ //
+ // BtnWrite01
+ //
+ BtnWrite01.Location = new Point(531, 26);
+ BtnWrite01.Name = "BtnWrite01";
+ BtnWrite01.Size = new Size(94, 29);
+ BtnWrite01.TabIndex = 119;
+ BtnWrite01.Text = "写";
+ BtnWrite01.UseVisualStyleBackColor = true;
+ BtnWrite01.Click += BtnWrite01_Click;
+ //
+ // BtnWrite17
+ //
+ BtnWrite17.Location = new Point(1159, 124);
+ BtnWrite17.Name = "BtnWrite17";
+ BtnWrite17.Size = new Size(94, 29);
+ BtnWrite17.TabIndex = 168;
+ BtnWrite17.Text = "写";
+ BtnWrite17.UseVisualStyleBackColor = true;
+ BtnWrite17.Click += BtnWrite17_Click;
+ //
+ // label2
+ //
+ label2.AutoSize = true;
+ label2.Location = new Point(659, 30);
+ label2.Name = "label2";
+ label2.Size = new Size(69, 20);
+ label2.TabIndex = 120;
+ label2.Text = "模式控制";
+ //
+ // txtValue18
+ //
+ txtValue18.Location = new Point(1062, 125);
+ txtValue18.Name = "txtValue18";
+ txtValue18.Size = new Size(80, 27);
+ txtValue18.TabIndex = 167;
+ //
+ // label17
+ //
+ label17.AutoSize = true;
+ label17.Location = new Point(961, 128);
+ label17.Name = "label17";
+ label17.Size = new Size(84, 20);
+ label17.TabIndex = 166;
+ label17.Text = "三色灯控制";
+ //
+ // BtnWrite02
+ //
+ BtnWrite02.Location = new Point(838, 26);
+ BtnWrite02.Name = "BtnWrite02";
+ BtnWrite02.Size = new Size(94, 29);
+ BtnWrite02.TabIndex = 122;
+ BtnWrite02.Text = "写";
+ BtnWrite02.UseVisualStyleBackColor = true;
+ BtnWrite02.Click += BtnWrite02_Click;
+ //
+ // BtnWrite16
+ //
+ BtnWrite16.Location = new Point(838, 124);
+ BtnWrite16.Name = "BtnWrite16";
+ BtnWrite16.Size = new Size(94, 29);
+ BtnWrite16.TabIndex = 165;
+ BtnWrite16.Text = "写";
+ BtnWrite16.UseVisualStyleBackColor = true;
+ BtnWrite16.Click += BtnWrite16_Click;
+ //
+ // label3
+ //
+ label3.AutoSize = true;
+ label3.Location = new Point(969, 30);
+ label3.Name = "label3";
+ label3.Size = new Size(69, 20);
+ label3.TabIndex = 123;
+ label3.Text = "设备控制";
+ //
+ // txtValue17
+ //
+ txtValue17.Location = new Point(736, 125);
+ txtValue17.Name = "txtValue17";
+ txtValue17.Size = new Size(80, 27);
+ txtValue17.TabIndex = 164;
+ //
+ // txtValue06
+ //
+ txtValue06.Location = new Point(1062, 27);
+ txtValue06.Name = "txtValue06";
+ txtValue06.Size = new Size(80, 27);
+ txtValue06.TabIndex = 124;
+ //
+ // label16
+ //
+ label16.AutoSize = true;
+ label16.Location = new Point(651, 128);
+ label16.Name = "label16";
+ label16.Size = new Size(84, 20);
+ label16.TabIndex = 163;
+ label16.Text = "三色灯控制";
+ //
+ // BtnWrite03
+ //
+ BtnWrite03.Location = new Point(1159, 26);
+ BtnWrite03.Name = "BtnWrite03";
+ BtnWrite03.Size = new Size(94, 29);
+ BtnWrite03.TabIndex = 125;
+ BtnWrite03.Text = "写";
+ BtnWrite03.UseVisualStyleBackColor = true;
+ BtnWrite03.Click += BtnWrite03_Click;
+ //
+ // BtnWrite15
+ //
+ BtnWrite15.Location = new Point(531, 124);
+ BtnWrite15.Name = "BtnWrite15";
+ BtnWrite15.Size = new Size(94, 29);
+ BtnWrite15.TabIndex = 162;
+ BtnWrite15.Text = "写";
+ BtnWrite15.UseVisualStyleBackColor = true;
+ BtnWrite15.Click += BtnWrite15_Click;
+ //
+ // label4
+ //
+ label4.AutoSize = true;
+ label4.Location = new Point(12, 65);
+ label4.Name = "label4";
+ label4.Size = new Size(84, 20);
+ label4.TabIndex = 126;
+ label4.Text = "排风扇控制";
+ //
+ // txtValue16
+ //
+ txtValue16.Location = new Point(429, 125);
+ txtValue16.Name = "txtValue16";
+ txtValue16.Size = new Size(80, 27);
+ txtValue16.TabIndex = 161;
+ //
+ // txtValue07
+ //
+ txtValue07.Location = new Point(97, 62);
+ txtValue07.Name = "txtValue07";
+ txtValue07.Size = new Size(80, 27);
+ txtValue07.TabIndex = 127;
+ //
+ // label15
+ //
+ label15.AutoSize = true;
+ label15.Location = new Point(329, 128);
+ label15.Name = "label15";
+ label15.Size = new Size(99, 20);
+ label15.TabIndex = 160;
+ label15.Text = "车辆驻车状态";
+ //
+ // BtnWrite04
+ //
+ BtnWrite04.Location = new Point(213, 61);
+ BtnWrite04.Name = "BtnWrite04";
+ BtnWrite04.Size = new Size(94, 29);
+ BtnWrite04.TabIndex = 128;
+ BtnWrite04.Text = "写";
+ BtnWrite04.UseVisualStyleBackColor = true;
+ BtnWrite04.Click += BtnWrite04_Click;
+ //
+ // label5
+ //
+ label5.AutoSize = true;
+ label5.Location = new Point(344, 65);
+ label5.Name = "label5";
+ label5.Size = new Size(69, 20);
+ label5.TabIndex = 129;
+ label5.Text = "灯光控制";
+ //
+ // BtnWrite14
+ //
+ BtnWrite14.Location = new Point(213, 124);
+ BtnWrite14.Name = "BtnWrite14";
+ BtnWrite14.Size = new Size(94, 29);
+ BtnWrite14.TabIndex = 158;
+ BtnWrite14.Text = "写";
+ BtnWrite14.UseVisualStyleBackColor = true;
+ BtnWrite14.Click += BtnWrite14_Click;
+ //
+ // BtnWrite05
+ //
+ BtnWrite05.Location = new Point(531, 61);
+ BtnWrite05.Name = "BtnWrite05";
+ BtnWrite05.Size = new Size(94, 29);
+ BtnWrite05.TabIndex = 131;
+ BtnWrite05.Text = "写";
+ BtnWrite05.UseVisualStyleBackColor = true;
+ BtnWrite05.Click += BtnWrite05_Click;
+ //
+ // txtValue15
+ //
+ txtValue15.Location = new Point(97, 125);
+ txtValue15.Name = "txtValue15";
+ txtValue15.Size = new Size(80, 27);
+ txtValue15.TabIndex = 157;
+ //
+ // label6
+ //
+ label6.AutoSize = true;
+ label6.Location = new Point(681, 65);
+ label6.Name = "label6";
+ label6.Size = new Size(24, 20);
+ label6.TabIndex = 132;
+ label6.Text = "秒";
+ //
+ // label14
+ //
+ label14.AutoSize = true;
+ label14.Location = new Point(5, 128);
+ label14.Name = "label14";
+ label14.Size = new Size(99, 20);
+ label14.TabIndex = 156;
+ label14.Text = "车辆驻车位置";
+ //
+ // txtValue09
+ //
+ txtValue09.Location = new Point(736, 62);
+ txtValue09.Name = "txtValue09";
+ txtValue09.Size = new Size(80, 27);
+ txtValue09.TabIndex = 133;
+ //
+ // BtnWrite06
+ //
+ BtnWrite06.Location = new Point(838, 61);
+ BtnWrite06.Name = "BtnWrite06";
+ BtnWrite06.Size = new Size(94, 29);
+ BtnWrite06.TabIndex = 134;
+ BtnWrite06.Text = "写";
+ BtnWrite06.UseVisualStyleBackColor = true;
+ BtnWrite06.Click += BtnWrite06_Click;
+ //
+ // label7
+ //
+ label7.AutoSize = true;
+ label7.Location = new Point(991, 65);
+ label7.Name = "label7";
+ label7.Size = new Size(24, 20);
+ label7.TabIndex = 135;
+ label7.Text = "分";
+ //
+ // txtValue10
+ //
+ txtValue10.Location = new Point(1062, 62);
+ txtValue10.Name = "txtValue10";
+ txtValue10.Size = new Size(80, 27);
+ txtValue10.TabIndex = 136;
+ //
+ // BtnWrite07
+ //
+ BtnWrite07.Location = new Point(1159, 61);
+ BtnWrite07.Name = "BtnWrite07";
+ BtnWrite07.Size = new Size(94, 29);
+ BtnWrite07.TabIndex = 137;
+ BtnWrite07.Text = "写";
+ BtnWrite07.UseVisualStyleBackColor = true;
+ BtnWrite07.Click += BtnWrite07_Click;
+ //
+ // label8
+ //
+ label8.AutoSize = true;
+ label8.Location = new Point(42, 93);
+ label8.Name = "label8";
+ label8.Size = new Size(24, 20);
+ label8.TabIndex = 138;
+ label8.Text = "时";
+ //
+ // txtValue11
+ //
+ txtValue11.Location = new Point(97, 90);
+ txtValue11.Name = "txtValue11";
+ txtValue11.Size = new Size(80, 27);
+ txtValue11.TabIndex = 139;
+ //
+ // BtnWrite11
+ //
+ BtnWrite11.Location = new Point(1159, 89);
+ BtnWrite11.Name = "BtnWrite11";
+ BtnWrite11.Size = new Size(94, 29);
+ BtnWrite11.TabIndex = 149;
+ BtnWrite11.Text = "写";
+ BtnWrite11.UseVisualStyleBackColor = true;
+ BtnWrite11.Click += BtnWrite11_Click;
+ //
+ // BtnWrite08
+ //
+ BtnWrite08.Location = new Point(213, 89);
+ BtnWrite08.Name = "BtnWrite08";
+ BtnWrite08.Size = new Size(94, 29);
+ BtnWrite08.TabIndex = 140;
+ BtnWrite08.Text = "写";
+ BtnWrite08.UseVisualStyleBackColor = true;
+ BtnWrite08.Click += BtnWrite08_Click;
+ //
+ // txtValue14
+ //
+ txtValue14.Location = new Point(1062, 90);
+ txtValue14.Name = "txtValue14";
+ txtValue14.Size = new Size(80, 27);
+ txtValue14.TabIndex = 148;
+ //
+ // label9
+ //
+ label9.AutoSize = true;
+ label9.Location = new Point(366, 93);
+ label9.Name = "label9";
+ label9.Size = new Size(24, 20);
+ label9.TabIndex = 141;
+ label9.Text = "日";
+ //
+ // label11
+ //
+ label11.AutoSize = true;
+ label11.Location = new Point(991, 93);
+ label11.Name = "label11";
+ label11.Size = new Size(24, 20);
+ label11.TabIndex = 147;
+ label11.Text = "年";
+ //
+ // txtValue12
+ //
+ txtValue12.Location = new Point(429, 90);
+ txtValue12.Name = "txtValue12";
+ txtValue12.Size = new Size(80, 27);
+ txtValue12.TabIndex = 142;
+ //
+ // BtnWrite10
+ //
+ BtnWrite10.Location = new Point(838, 89);
+ BtnWrite10.Name = "BtnWrite10";
+ BtnWrite10.Size = new Size(94, 29);
+ BtnWrite10.TabIndex = 146;
+ BtnWrite10.Text = "写";
+ BtnWrite10.UseVisualStyleBackColor = true;
+ BtnWrite10.Click += BtnWrite10_Click;
+ //
+ // BtnWrite09
+ //
+ BtnWrite09.Location = new Point(531, 89);
+ BtnWrite09.Name = "BtnWrite09";
+ BtnWrite09.Size = new Size(94, 29);
+ BtnWrite09.TabIndex = 143;
+ BtnWrite09.Text = "写";
+ BtnWrite09.UseVisualStyleBackColor = true;
+ BtnWrite09.Click += BtnWrite09_Click;
+ //
+ // txtValue13
+ //
+ txtValue13.Location = new Point(736, 90);
+ txtValue13.Name = "txtValue13";
+ txtValue13.Size = new Size(80, 27);
+ txtValue13.TabIndex = 145;
+ //
+ // label10
+ //
+ label10.AutoSize = true;
+ label10.Location = new Point(681, 93);
+ label10.Name = "label10";
+ label10.Size = new Size(24, 20);
+ label10.TabIndex = 144;
+ label10.Text = "月";
+ //
+ // BtnWrite12
+ //
+ BtnWrite12.Location = new Point(1153, 33);
+ BtnWrite12.Name = "BtnWrite12";
+ BtnWrite12.Size = new Size(94, 25);
+ BtnWrite12.TabIndex = 152;
+ BtnWrite12.Text = "写";
+ BtnWrite12.UseVisualStyleBackColor = true;
+ //
+ // groupBox3
+ //
+ groupBox3.Controls.Add(tableLayoutPanel1);
+ groupBox3.Location = new Point(17, 273);
+ groupBox3.Name = "groupBox3";
+ groupBox3.Size = new Size(1277, 87);
+ groupBox3.TabIndex = 174;
+ groupBox3.TabStop = false;
+ groupBox3.Text = "写电池仓位状态";
+ //
+ // tableLayoutPanel1
+ //
+ tableLayoutPanel1.ColumnCount = 11;
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel1.Controls.Add(textBox20, 9, 1);
+ tableLayoutPanel1.Controls.Add(BtnWrite12, 10, 1);
+ tableLayoutPanel1.Controls.Add(textBox19, 8, 1);
+ tableLayoutPanel1.Controls.Add(textBox1, 0, 0);
+ tableLayoutPanel1.Controls.Add(textBox2, 1, 0);
+ tableLayoutPanel1.Controls.Add(textBox17, 6, 1);
+ tableLayoutPanel1.Controls.Add(textBox3, 2, 0);
+ tableLayoutPanel1.Controls.Add(textBox4, 3, 0);
+ tableLayoutPanel1.Controls.Add(textBox5, 4, 0);
+ tableLayoutPanel1.Controls.Add(textBox6, 5, 0);
+ tableLayoutPanel1.Controls.Add(textBox7, 6, 0);
+ tableLayoutPanel1.Controls.Add(textBox9, 7, 0);
+ tableLayoutPanel1.Controls.Add(textBox8, 8, 0);
+ tableLayoutPanel1.Controls.Add(textBox10, 9, 0);
+ tableLayoutPanel1.Controls.Add(textBox13, 2, 1);
+ tableLayoutPanel1.Controls.Add(textBox14, 3, 1);
+ tableLayoutPanel1.Controls.Add(textBox12, 1, 1);
+ tableLayoutPanel1.Controls.Add(textBox11, 0, 1);
+ tableLayoutPanel1.Controls.Add(textBox15, 4, 1);
+ tableLayoutPanel1.Controls.Add(textBox16, 5, 1);
+ tableLayoutPanel1.Controls.Add(textBox18, 7, 1);
+ tableLayoutPanel1.Dock = DockStyle.Fill;
+ tableLayoutPanel1.Location = new Point(3, 23);
+ tableLayoutPanel1.Name = "tableLayoutPanel1";
+ tableLayoutPanel1.RowCount = 2;
+ tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
+ tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
+ tableLayoutPanel1.Size = new Size(1271, 61);
+ tableLayoutPanel1.TabIndex = 0;
+ //
+ // textBox20
+ //
+ textBox20.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox20.Location = new Point(1038, 33);
+ textBox20.Name = "textBox20";
+ textBox20.Size = new Size(109, 27);
+ textBox20.TabIndex = 172;
+ //
+ // textBox19
+ //
+ textBox19.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox19.Location = new Point(923, 33);
+ textBox19.Name = "textBox19";
+ textBox19.Size = new Size(109, 27);
+ textBox19.TabIndex = 171;
+ //
+ // textBox1
+ //
+ textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox1.Location = new Point(3, 3);
+ textBox1.Name = "textBox1";
+ textBox1.Size = new Size(109, 27);
+ textBox1.TabIndex = 153;
+ //
+ // textBox2
+ //
+ textBox2.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox2.Location = new Point(118, 3);
+ textBox2.Name = "textBox2";
+ textBox2.Size = new Size(109, 27);
+ textBox2.TabIndex = 154;
+ //
+ // textBox17
+ //
+ textBox17.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox17.Location = new Point(693, 33);
+ textBox17.Name = "textBox17";
+ textBox17.Size = new Size(109, 27);
+ textBox17.TabIndex = 169;
+ //
+ // textBox3
+ //
+ textBox3.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox3.Location = new Point(233, 3);
+ textBox3.Name = "textBox3";
+ textBox3.Size = new Size(109, 27);
+ textBox3.TabIndex = 155;
+ //
+ // textBox4
+ //
+ textBox4.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox4.Location = new Point(348, 3);
+ textBox4.Name = "textBox4";
+ textBox4.Size = new Size(109, 27);
+ textBox4.TabIndex = 156;
+ //
+ // textBox5
+ //
+ textBox5.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox5.Location = new Point(463, 3);
+ textBox5.Name = "textBox5";
+ textBox5.Size = new Size(109, 27);
+ textBox5.TabIndex = 157;
+ //
+ // textBox6
+ //
+ textBox6.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox6.Location = new Point(578, 3);
+ textBox6.Name = "textBox6";
+ textBox6.Size = new Size(109, 27);
+ textBox6.TabIndex = 158;
+ //
+ // textBox7
+ //
+ textBox7.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox7.Location = new Point(693, 3);
+ textBox7.Name = "textBox7";
+ textBox7.Size = new Size(109, 27);
+ textBox7.TabIndex = 159;
+ //
+ // textBox9
+ //
+ textBox9.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox9.Location = new Point(808, 3);
+ textBox9.Name = "textBox9";
+ textBox9.Size = new Size(109, 27);
+ textBox9.TabIndex = 161;
+ //
+ // textBox8
+ //
+ textBox8.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox8.Location = new Point(923, 3);
+ textBox8.Name = "textBox8";
+ textBox8.Size = new Size(109, 27);
+ textBox8.TabIndex = 160;
+ //
+ // textBox10
+ //
+ textBox10.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox10.Location = new Point(1038, 3);
+ textBox10.Name = "textBox10";
+ textBox10.Size = new Size(109, 27);
+ textBox10.TabIndex = 162;
+ //
+ // textBox13
+ //
+ textBox13.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox13.Location = new Point(233, 33);
+ textBox13.Name = "textBox13";
+ textBox13.Size = new Size(109, 27);
+ textBox13.TabIndex = 165;
+ //
+ // textBox14
+ //
+ textBox14.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox14.Location = new Point(348, 33);
+ textBox14.Name = "textBox14";
+ textBox14.Size = new Size(109, 27);
+ textBox14.TabIndex = 166;
+ //
+ // textBox12
+ //
+ textBox12.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox12.Location = new Point(118, 33);
+ textBox12.Name = "textBox12";
+ textBox12.Size = new Size(109, 27);
+ textBox12.TabIndex = 164;
+ //
+ // textBox11
+ //
+ textBox11.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox11.Location = new Point(3, 33);
+ textBox11.Name = "textBox11";
+ textBox11.Size = new Size(109, 27);
+ textBox11.TabIndex = 163;
+ //
+ // textBox15
+ //
+ textBox15.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox15.Location = new Point(463, 33);
+ textBox15.Name = "textBox15";
+ textBox15.Size = new Size(109, 27);
+ textBox15.TabIndex = 167;
+ //
+ // textBox16
+ //
+ textBox16.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox16.Location = new Point(578, 33);
+ textBox16.Name = "textBox16";
+ textBox16.Size = new Size(109, 27);
+ textBox16.TabIndex = 168;
+ //
+ // textBox18
+ //
+ textBox18.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox18.Location = new Point(808, 33);
+ textBox18.Name = "textBox18";
+ textBox18.Size = new Size(109, 27);
+ textBox18.TabIndex = 170;
+ //
+ // groupBox1
+ //
+ groupBox1.Controls.Add(tableLayoutPanel2);
+ groupBox1.Location = new Point(17, 366);
+ groupBox1.Name = "groupBox1";
+ groupBox1.Size = new Size(1277, 87);
+ groupBox1.TabIndex = 175;
+ groupBox1.TabStop = false;
+ groupBox1.Text = "仓位电池型号";
+ //
+ // tableLayoutPanel2
+ //
+ tableLayoutPanel2.ColumnCount = 11;
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 9.090909F));
+ tableLayoutPanel2.Controls.Add(textBox31, 0, 1);
+ tableLayoutPanel2.Controls.Add(button7, 10, 1);
+ tableLayoutPanel2.Controls.Add(textBox21, 0, 0);
+ tableLayoutPanel2.Controls.Add(textBox24, 3, 0);
+ tableLayoutPanel2.Controls.Add(textBox25, 4, 0);
+ tableLayoutPanel2.Controls.Add(textBox30, 9, 0);
+ tableLayoutPanel2.Controls.Add(textBox26, 5, 0);
+ tableLayoutPanel2.Controls.Add(textBox29, 8, 0);
+ tableLayoutPanel2.Controls.Add(textBox27, 6, 0);
+ tableLayoutPanel2.Controls.Add(textBox28, 7, 0);
+ tableLayoutPanel2.Controls.Add(textBox33, 2, 1);
+ tableLayoutPanel2.Controls.Add(textBox32, 1, 1);
+ tableLayoutPanel2.Controls.Add(textBox35, 4, 1);
+ tableLayoutPanel2.Controls.Add(textBox34, 3, 1);
+ tableLayoutPanel2.Controls.Add(textBox36, 5, 1);
+ tableLayoutPanel2.Controls.Add(textBox37, 6, 1);
+ tableLayoutPanel2.Controls.Add(textBox38, 7, 1);
+ tableLayoutPanel2.Controls.Add(textBox39, 8, 1);
+ tableLayoutPanel2.Controls.Add(textBox40, 9, 1);
+ tableLayoutPanel2.Controls.Add(textBox23, 2, 0);
+ tableLayoutPanel2.Controls.Add(textBox22, 1, 0);
+ tableLayoutPanel2.Dock = DockStyle.Fill;
+ tableLayoutPanel2.Location = new Point(3, 23);
+ tableLayoutPanel2.Name = "tableLayoutPanel2";
+ tableLayoutPanel2.RowCount = 2;
+ tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
+ tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
+ tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
+ tableLayoutPanel2.Size = new Size(1271, 61);
+ tableLayoutPanel2.TabIndex = 0;
+ //
+ // textBox31
+ //
+ textBox31.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox31.Location = new Point(3, 33);
+ textBox31.Name = "textBox31";
+ textBox31.Size = new Size(109, 27);
+ textBox31.TabIndex = 183;
+ //
+ // button7
+ //
+ button7.Location = new Point(1153, 33);
+ button7.Name = "button7";
+ button7.Size = new Size(109, 25);
+ button7.TabIndex = 152;
+ button7.Text = "写";
+ button7.UseVisualStyleBackColor = true;
+ //
+ // textBox21
+ //
+ textBox21.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox21.Location = new Point(3, 3);
+ textBox21.Name = "textBox21";
+ textBox21.Size = new Size(109, 27);
+ textBox21.TabIndex = 173;
+ //
+ // textBox24
+ //
+ textBox24.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox24.Location = new Point(348, 3);
+ textBox24.Name = "textBox24";
+ textBox24.Size = new Size(109, 27);
+ textBox24.TabIndex = 176;
+ //
+ // textBox25
+ //
+ textBox25.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox25.Location = new Point(463, 3);
+ textBox25.Name = "textBox25";
+ textBox25.Size = new Size(109, 27);
+ textBox25.TabIndex = 177;
+ //
+ // textBox30
+ //
+ textBox30.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox30.Location = new Point(1038, 3);
+ textBox30.Name = "textBox30";
+ textBox30.Size = new Size(109, 27);
+ textBox30.TabIndex = 182;
+ //
+ // textBox26
+ //
+ textBox26.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox26.Location = new Point(578, 3);
+ textBox26.Name = "textBox26";
+ textBox26.Size = new Size(109, 27);
+ textBox26.TabIndex = 178;
+ //
+ // textBox29
+ //
+ textBox29.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox29.Location = new Point(923, 3);
+ textBox29.Name = "textBox29";
+ textBox29.Size = new Size(109, 27);
+ textBox29.TabIndex = 181;
+ //
+ // textBox27
+ //
+ textBox27.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox27.Location = new Point(693, 3);
+ textBox27.Name = "textBox27";
+ textBox27.Size = new Size(109, 27);
+ textBox27.TabIndex = 179;
+ //
+ // textBox28
+ //
+ textBox28.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox28.Location = new Point(808, 3);
+ textBox28.Name = "textBox28";
+ textBox28.Size = new Size(109, 27);
+ textBox28.TabIndex = 185;
+ //
+ // textBox33
+ //
+ textBox33.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox33.Location = new Point(233, 33);
+ textBox33.Name = "textBox33";
+ textBox33.Size = new Size(109, 27);
+ textBox33.TabIndex = 186;
+ //
+ // textBox32
+ //
+ textBox32.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox32.Location = new Point(118, 33);
+ textBox32.Name = "textBox32";
+ textBox32.Size = new Size(109, 27);
+ textBox32.TabIndex = 184;
+ //
+ // textBox35
+ //
+ textBox35.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox35.Location = new Point(463, 33);
+ textBox35.Name = "textBox35";
+ textBox35.Size = new Size(109, 27);
+ textBox35.TabIndex = 188;
+ //
+ // textBox34
+ //
+ textBox34.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox34.Location = new Point(348, 33);
+ textBox34.Name = "textBox34";
+ textBox34.Size = new Size(109, 27);
+ textBox34.TabIndex = 187;
+ //
+ // textBox36
+ //
+ textBox36.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
+ textBox36.Location = new Point(578, 33);
+ textBox36.Name = "textBox36";
+ textBox36.Size = new Size(109, 27);
+ textBox36.TabIndex = 189;
+ //
+ // textBox37
+ //
+ textBox37.Location = new Point(693, 33);
+ textBox37.Name = "textBox37";
+ textBox37.Size = new Size(109, 27);
+ textBox37.TabIndex = 190;
+ //
+ // textBox38
+ //
+ textBox38.Location = new Point(808, 33);
+ textBox38.Name = "textBox38";
+ textBox38.Size = new Size(109, 27);
+ textBox38.TabIndex = 191;
+ //
+ // textBox39
+ //
+ textBox39.Location = new Point(923, 33);
+ textBox39.Name = "textBox39";
+ textBox39.Size = new Size(109, 27);
+ textBox39.TabIndex = 192;
+ //
+ // textBox40
+ //
+ textBox40.Location = new Point(1038, 33);
+ textBox40.Name = "textBox40";
+ textBox40.Size = new Size(109, 27);
+ textBox40.TabIndex = 193;
+ //
+ // textBox23
+ //
+ textBox23.Location = new Point(233, 3);
+ textBox23.Name = "textBox23";
+ textBox23.Size = new Size(109, 27);
+ textBox23.TabIndex = 194;
+ //
+ // textBox22
+ //
+ textBox22.Location = new Point(118, 3);
+ textBox22.Name = "textBox22";
+ textBox22.Size = new Size(109, 27);
+ textBox22.TabIndex = 195;
+ //
+ // groupBox4
+ //
+ groupBox4.Controls.Add(lblValue26);
+ groupBox4.Controls.Add(label74);
+ groupBox4.Controls.Add(lblValue25);
+ groupBox4.Controls.Add(label72);
+ groupBox4.Controls.Add(lblValue24);
+ groupBox4.Controls.Add(label70);
+ groupBox4.Controls.Add(lblValue23);
+ groupBox4.Controls.Add(label68);
+ groupBox4.Controls.Add(lblValue22);
+ groupBox4.Controls.Add(label66);
+ groupBox4.Controls.Add(lblValue21);
+ groupBox4.Controls.Add(label64);
+ groupBox4.Controls.Add(lblValue20);
+ groupBox4.Controls.Add(label62);
+ groupBox4.Controls.Add(lblValue19);
+ groupBox4.Controls.Add(label60);
+ groupBox4.Controls.Add(lblValue18);
+ groupBox4.Controls.Add(label58);
+ groupBox4.Controls.Add(lblValue17);
+ groupBox4.Controls.Add(label56);
+ groupBox4.Controls.Add(lblValue16);
+ groupBox4.Controls.Add(label54);
+ groupBox4.Controls.Add(lblValue15);
+ groupBox4.Controls.Add(label52);
+ groupBox4.Controls.Add(lblValue14);
+ groupBox4.Controls.Add(label50);
+ groupBox4.Controls.Add(lblValue13);
+ groupBox4.Controls.Add(label48);
+ groupBox4.Controls.Add(lblValue12);
+ groupBox4.Controls.Add(label46);
+ groupBox4.Controls.Add(lblValue11);
+ groupBox4.Controls.Add(label44);
+ groupBox4.Controls.Add(lblValue10);
+ groupBox4.Controls.Add(label42);
+ groupBox4.Controls.Add(lblValue09);
+ groupBox4.Controls.Add(label40);
+ groupBox4.Controls.Add(lblValue08);
+ groupBox4.Controls.Add(label38);
+ groupBox4.Controls.Add(lblValue07);
+ groupBox4.Controls.Add(label36);
+ groupBox4.Controls.Add(lblValue06);
+ groupBox4.Controls.Add(label34);
+ groupBox4.Controls.Add(lblValue05);
+ groupBox4.Controls.Add(label32);
+ groupBox4.Controls.Add(lblValue04);
+ groupBox4.Controls.Add(label30);
+ groupBox4.Controls.Add(lblValue03);
+ groupBox4.Controls.Add(label28);
+ groupBox4.Controls.Add(lblValue02);
+ groupBox4.Controls.Add(label22);
+ groupBox4.Controls.Add(lblValue01);
+ groupBox4.Controls.Add(label12);
+ groupBox4.Location = new Point(17, 474);
+ groupBox4.Name = "groupBox4";
+ groupBox4.Size = new Size(1277, 238);
+ groupBox4.TabIndex = 176;
+ groupBox4.TabStop = false;
+ groupBox4.Text = "读";
+ //
+ // lblValue26
+ //
+ lblValue26.AutoSize = true;
+ lblValue26.Location = new Point(336, 180);
+ lblValue26.Name = "lblValue26";
+ lblValue26.Size = new Size(24, 20);
+ lblValue26.TabIndex = 51;
+ lblValue26.Text = "值";
+ //
+ // label74
+ //
+ label74.AutoSize = true;
+ label74.Location = new Point(245, 180);
+ label74.Name = "label74";
+ label74.Size = new Size(46, 20);
+ label74.TabIndex = 50;
+ label74.Text = "z偏差";
+ //
+ // lblValue25
+ //
+ lblValue25.AutoSize = true;
+ lblValue25.Location = new Point(127, 180);
+ lblValue25.Name = "lblValue25";
+ lblValue25.Size = new Size(24, 20);
+ lblValue25.TabIndex = 49;
+ lblValue25.Text = "值";
+ //
+ // label72
+ //
+ label72.AutoSize = true;
+ label72.Location = new Point(36, 180);
+ label72.Name = "label72";
+ label72.Size = new Size(47, 20);
+ label72.TabIndex = 48;
+ label72.Text = "y偏差";
+ //
+ // lblValue24
+ //
+ lblValue24.AutoSize = true;
+ lblValue24.Location = new Point(1179, 141);
+ lblValue24.Name = "lblValue24";
+ lblValue24.Size = new Size(24, 20);
+ lblValue24.TabIndex = 47;
+ lblValue24.Text = "值";
+ //
+ // label70
+ //
+ label70.AutoSize = true;
+ label70.Location = new Point(1088, 141);
+ label70.Name = "label70";
+ label70.Size = new Size(47, 20);
+ label70.TabIndex = 46;
+ label70.Text = "x偏差";
+ //
+ // lblValue23
+ //
+ lblValue23.AutoSize = true;
+ lblValue23.Location = new Point(961, 141);
+ lblValue23.Name = "lblValue23";
+ lblValue23.Size = new Size(24, 20);
+ lblValue23.TabIndex = 45;
+ lblValue23.Text = "值";
+ //
+ // label68
+ //
+ label68.AutoSize = true;
+ label68.Location = new Point(870, 141);
+ label68.Name = "label68";
+ label68.Size = new Size(99, 20);
+ label68.TabIndex = 44;
+ label68.Text = "通道定位状态";
+ //
+ // lblValue22
+ //
+ lblValue22.AutoSize = true;
+ lblValue22.Location = new Point(750, 141);
+ lblValue22.Name = "lblValue22";
+ lblValue22.Size = new Size(24, 20);
+ lblValue22.TabIndex = 43;
+ lblValue22.Text = "值";
+ //
+ // label66
+ //
+ label66.AutoSize = true;
+ label66.Location = new Point(659, 141);
+ label66.Name = "label66";
+ label66.Size = new Size(114, 20);
+ label66.TabIndex = 42;
+ label66.Text = "执行任务行车号";
+ //
+ // lblValue21
+ //
+ lblValue21.AutoSize = true;
+ lblValue21.Location = new Point(538, 141);
+ lblValue21.Name = "lblValue21";
+ lblValue21.Size = new Size(24, 20);
+ lblValue21.TabIndex = 41;
+ lblValue21.Text = "值";
+ //
+ // label64
+ //
+ label64.AutoSize = true;
+ label64.Location = new Point(447, 141);
+ label64.Name = "label64";
+ label64.Size = new Size(69, 20);
+ label64.TabIndex = 40;
+ label64.Text = "任务状态";
+ //
+ // lblValue20
+ //
+ lblValue20.AutoSize = true;
+ lblValue20.Location = new Point(336, 141);
+ lblValue20.Name = "lblValue20";
+ lblValue20.Size = new Size(24, 20);
+ lblValue20.TabIndex = 39;
+ lblValue20.Text = "值";
+ //
+ // label62
+ //
+ label62.AutoSize = true;
+ label62.Location = new Point(245, 141);
+ label62.Name = "label62";
+ label62.Size = new Size(99, 20);
+ label62.TabIndex = 38;
+ label62.Text = "任务类型状态";
+ //
+ // lblValue19
+ //
+ lblValue19.AutoSize = true;
+ lblValue19.Location = new Point(125, 141);
+ lblValue19.Name = "lblValue19";
+ lblValue19.Size = new Size(24, 20);
+ lblValue19.TabIndex = 37;
+ lblValue19.Text = "值";
+ //
+ // label60
+ //
+ label60.AutoSize = true;
+ label60.Location = new Point(34, 141);
+ label60.Name = "label60";
+ label60.Size = new Size(84, 20);
+ label60.TabIndex = 36;
+ label60.Text = "三色灯出口";
+ //
+ // lblValue18
+ //
+ lblValue18.AutoSize = true;
+ lblValue18.Location = new Point(1179, 105);
+ lblValue18.Name = "lblValue18";
+ lblValue18.Size = new Size(24, 20);
+ lblValue18.TabIndex = 35;
+ lblValue18.Text = "值";
+ //
+ // label58
+ //
+ label58.AutoSize = true;
+ label58.Location = new Point(1088, 105);
+ label58.Name = "label58";
+ label58.Size = new Size(84, 20);
+ label58.TabIndex = 34;
+ label58.Text = "三色灯入口";
+ //
+ // lblValue17
+ //
+ lblValue17.AutoSize = true;
+ lblValue17.Location = new Point(961, 105);
+ lblValue17.Name = "lblValue17";
+ lblValue17.Size = new Size(24, 20);
+ lblValue17.TabIndex = 33;
+ lblValue17.Text = "值";
+ //
+ // label56
+ //
+ label56.AutoSize = true;
+ label56.Location = new Point(870, 105);
+ label56.Name = "label56";
+ label56.Size = new Size(99, 20);
+ label56.TabIndex = 32;
+ label56.Text = "实体按钮状态";
+ //
+ // lblValue16
+ //
+ lblValue16.AutoSize = true;
+ lblValue16.Location = new Point(750, 105);
+ lblValue16.Name = "lblValue16";
+ lblValue16.Size = new Size(24, 20);
+ lblValue16.TabIndex = 31;
+ lblValue16.Text = "值";
+ //
+ // label54
+ //
+ label54.AutoSize = true;
+ label54.Location = new Point(659, 105);
+ label54.Name = "label54";
+ label54.Size = new Size(99, 20);
+ label54.TabIndex = 30;
+ label54.Text = "到位光电信号";
+ //
+ // lblValue15
+ //
+ lblValue15.AutoSize = true;
+ lblValue15.Location = new Point(538, 105);
+ lblValue15.Name = "lblValue15";
+ lblValue15.Size = new Size(24, 20);
+ lblValue15.TabIndex = 29;
+ lblValue15.Text = "值";
+ //
+ // label52
+ //
+ label52.AutoSize = true;
+ label52.Location = new Point(447, 105);
+ label52.Name = "label52";
+ label52.Size = new Size(99, 20);
+ label52.TabIndex = 28;
+ label52.Text = "出口雷达状态";
+ //
+ // lblValue14
+ //
+ lblValue14.AutoSize = true;
+ lblValue14.Location = new Point(336, 105);
+ lblValue14.Name = "lblValue14";
+ lblValue14.Size = new Size(24, 20);
+ lblValue14.TabIndex = 27;
+ lblValue14.Text = "值";
+ //
+ // label50
+ //
+ label50.AutoSize = true;
+ label50.Location = new Point(245, 105);
+ label50.Name = "label50";
+ label50.Size = new Size(99, 20);
+ label50.TabIndex = 26;
+ label50.Text = "入口雷达状态";
+ //
+ // lblValue13
+ //
+ lblValue13.AutoSize = true;
+ lblValue13.Location = new Point(127, 105);
+ lblValue13.Name = "lblValue13";
+ lblValue13.Size = new Size(24, 20);
+ lblValue13.TabIndex = 25;
+ lblValue13.Text = "值";
+ //
+ // label48
+ //
+ label48.AutoSize = true;
+ label48.Location = new Point(36, 105);
+ label48.Name = "label48";
+ label48.Size = new Size(106, 20);
+ label48.TabIndex = 24;
+ label48.Text = "z轴扭矩百分比";
+ //
+ // lblValue12
+ //
+ lblValue12.AutoSize = true;
+ lblValue12.Location = new Point(1179, 66);
+ lblValue12.Name = "lblValue12";
+ lblValue12.Size = new Size(24, 20);
+ lblValue12.TabIndex = 23;
+ lblValue12.Text = "值";
+ //
+ // label46
+ //
+ label46.AutoSize = true;
+ label46.Location = new Point(1088, 66);
+ label46.Name = "label46";
+ label46.Size = new Size(107, 20);
+ label46.TabIndex = 22;
+ label46.Text = "y轴扭矩百分比";
+ //
+ // lblValue11
+ //
+ lblValue11.AutoSize = true;
+ lblValue11.Location = new Point(961, 66);
+ lblValue11.Name = "lblValue11";
+ lblValue11.Size = new Size(24, 20);
+ lblValue11.TabIndex = 21;
+ lblValue11.Text = "值";
+ //
+ // label44
+ //
+ label44.AutoSize = true;
+ label44.Location = new Point(870, 66);
+ label44.Name = "label44";
+ label44.Size = new Size(107, 20);
+ label44.TabIndex = 20;
+ label44.Text = "x轴扭矩百分比";
+ //
+ // lblValue10
+ //
+ lblValue10.AutoSize = true;
+ lblValue10.Location = new Point(750, 66);
+ lblValue10.Name = "lblValue10";
+ lblValue10.Size = new Size(24, 20);
+ lblValue10.TabIndex = 19;
+ lblValue10.Text = "值";
+ //
+ // label42
+ //
+ label42.AutoSize = true;
+ label42.Location = new Point(659, 66);
+ label42.Name = "label42";
+ label42.Size = new Size(114, 20);
+ label42.TabIndex = 18;
+ label42.Text = "载行车设备状态";
+ //
+ // lblValue09
+ //
+ lblValue09.AutoSize = true;
+ lblValue09.Location = new Point(538, 66);
+ lblValue09.Name = "lblValue09";
+ lblValue09.Size = new Size(24, 20);
+ lblValue09.TabIndex = 17;
+ lblValue09.Text = "值";
+ //
+ // label40
+ //
+ label40.AutoSize = true;
+ label40.Location = new Point(447, 66);
+ label40.Name = "label40";
+ label40.Size = new Size(69, 20);
+ label40.TabIndex = 16;
+ label40.Text = "在位状态";
+ //
+ // lblValue08
+ //
+ lblValue08.AutoSize = true;
+ lblValue08.Location = new Point(336, 66);
+ lblValue08.Name = "lblValue08";
+ lblValue08.Size = new Size(24, 20);
+ lblValue08.TabIndex = 15;
+ lblValue08.Text = "值";
+ //
+ // label38
+ //
+ label38.AutoSize = true;
+ label38.Location = new Point(245, 66);
+ label38.Name = "label38";
+ label38.Size = new Size(99, 20);
+ label38.TabIndex = 14;
+ label38.Text = "站内积水状态";
+ //
+ // lblValue07
+ //
+ lblValue07.AutoSize = true;
+ lblValue07.Location = new Point(127, 66);
+ lblValue07.Name = "lblValue07";
+ lblValue07.Size = new Size(24, 20);
+ lblValue07.TabIndex = 13;
+ lblValue07.Text = "值";
+ //
+ // label36
+ //
+ label36.AutoSize = true;
+ label36.Location = new Point(36, 66);
+ label36.Name = "label36";
+ label36.Size = new Size(84, 20);
+ label36.TabIndex = 12;
+ label36.Text = "排风扇状态";
+ //
+ // lblValue06
+ //
+ lblValue06.AutoSize = true;
+ lblValue06.Location = new Point(1179, 32);
+ lblValue06.Name = "lblValue06";
+ lblValue06.Size = new Size(24, 20);
+ lblValue06.TabIndex = 11;
+ lblValue06.Text = "值";
+ //
+ // label34
+ //
+ label34.AutoSize = true;
+ label34.Location = new Point(1088, 32);
+ label34.Name = "label34";
+ label34.Size = new Size(69, 20);
+ label34.TabIndex = 10;
+ label34.Text = "灯光状态";
+ //
+ // lblValue05
+ //
+ lblValue05.AutoSize = true;
+ lblValue05.Location = new Point(961, 32);
+ lblValue05.Name = "lblValue05";
+ lblValue05.Size = new Size(24, 20);
+ lblValue05.TabIndex = 9;
+ lblValue05.Text = "值";
+ //
+ // label32
+ //
+ label32.AutoSize = true;
+ label32.Location = new Point(870, 32);
+ label32.Name = "label32";
+ label32.Size = new Size(84, 20);
+ label32.TabIndex = 8;
+ label32.Text = "遥本控状态";
+ //
+ // lblValue04
+ //
+ lblValue04.AutoSize = true;
+ lblValue04.Location = new Point(750, 32);
+ lblValue04.Name = "lblValue04";
+ lblValue04.Size = new Size(24, 20);
+ lblValue04.TabIndex = 7;
+ lblValue04.Text = "值";
+ //
+ // label30
+ //
+ label30.AutoSize = true;
+ label30.Location = new Point(659, 32);
+ label30.Name = "label30";
+ label30.Size = new Size(99, 20);
+ label30.TabIndex = 6;
+ label30.Text = "设备系统状态";
+ //
+ // lblValue03
+ //
+ lblValue03.AutoSize = true;
+ lblValue03.Location = new Point(538, 32);
+ lblValue03.Name = "lblValue03";
+ lblValue03.Size = new Size(24, 20);
+ lblValue03.TabIndex = 5;
+ lblValue03.Text = "值";
+ //
+ // label28
+ //
+ label28.AutoSize = true;
+ label28.Location = new Point(447, 32);
+ label28.Name = "label28";
+ label28.Size = new Size(69, 20);
+ label28.TabIndex = 4;
+ label28.Text = "模式状态";
+ //
+ // lblValue02
+ //
+ lblValue02.AutoSize = true;
+ lblValue02.Location = new Point(336, 32);
+ lblValue02.Name = "lblValue02";
+ lblValue02.Size = new Size(24, 20);
+ lblValue02.TabIndex = 3;
+ lblValue02.Text = "值";
+ //
+ // label22
+ //
+ label22.AutoSize = true;
+ label22.Location = new Point(245, 32);
+ label22.Name = "label22";
+ label22.Size = new Size(69, 20);
+ label22.TabIndex = 2;
+ label22.Text = "通讯诊断";
+ //
+ // lblValue01
+ //
+ lblValue01.AutoSize = true;
+ lblValue01.Location = new Point(127, 32);
+ lblValue01.Name = "lblValue01";
+ lblValue01.Size = new Size(24, 20);
+ lblValue01.TabIndex = 1;
+ lblValue01.Text = "值";
+ //
+ // label12
+ //
+ label12.AutoSize = true;
+ label12.Location = new Point(36, 32);
+ label12.Name = "label12";
+ label12.Size = new Size(69, 20);
+ label12.TabIndex = 0;
+ label12.Text = "协议版本";
+ //
+ // FrmPlc
+ //
+ AutoScaleDimensions = new SizeF(9F, 20F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(1319, 724);
+ Controls.Add(groupBox4);
+ Controls.Add(groupBox1);
+ Controls.Add(groupBox3);
+ Controls.Add(groupBox2);
+ Name = "FrmPlc";
+ Text = "FrmPlc";
+ groupBox2.ResumeLayout(false);
+ groupBox2.PerformLayout();
+ groupBox3.ResumeLayout(false);
+ tableLayoutPanel1.ResumeLayout(false);
+ tableLayoutPanel1.PerformLayout();
+ groupBox1.ResumeLayout(false);
+ tableLayoutPanel2.ResumeLayout(false);
+ tableLayoutPanel2.PerformLayout();
+ groupBox4.ResumeLayout(false);
+ groupBox4.PerformLayout();
+ ResumeLayout(false);
+ }
+
+ #endregion
+ private Button BtnCollectionAssignment;
+ private GroupBox groupBox2;
+ private TextBox txtValue05;
+ private TextBox txtValue08;
+ private Button BtnWrite18;
+ private Label label1;
+ private TextBox txtValue19;
+ private TextBox txtValue04;
+ private Label label18;
+ private Button BtnWrite01;
+ private Button BtnWrite17;
+ private Label label2;
+ private TextBox txtValue18;
+ private Label label17;
+ private Button BtnWrite02;
+ private Button BtnWrite16;
+ private Label label3;
+ private TextBox txtValue17;
+ private TextBox txtValue06;
+ private Label label16;
+ private Button BtnWrite03;
+ private Button BtnWrite15;
+ private Label label4;
+ private TextBox txtValue16;
+ private TextBox txtValue07;
+ private Label label15;
+ private Button BtnWrite04;
+ private Label label5;
+ private Button BtnWrite14;
+ private Button BtnWrite05;
+ private TextBox txtValue15;
+ private Label label6;
+ private Label label14;
+ private TextBox txtValue09;
+ private Button BtnWrite06;
+ private Label label7;
+ private TextBox txtValue10;
+ private Button BtnWrite12;
+ private Button BtnWrite07;
+ private Label label8;
+ private TextBox txtValue11;
+ private Button BtnWrite11;
+ private Button BtnWrite08;
+ private TextBox txtValue14;
+ private Label label9;
+ private Label label11;
+ private TextBox txtValue12;
+ private Button BtnWrite10;
+ private Button BtnWrite09;
+ private TextBox txtValue13;
+ private Label label10;
+ private Button button1;
+ private TextBox txtValue22;
+ private Label label19;
+ private Button button2;
+ private TextBox txtValue21;
+ private Label label23;
+ private Button button3;
+ private TextBox txtValue20;
+ private Label label24;
+ private Button button4;
+ private TextBox txtValue24;
+ private Label label25;
+ private Button button5;
+ private TextBox txtValue23;
+ private Label label26;
+ private GroupBox groupBox3;
+ private Button button6;
+ private TextBox txtValue03;
+ private TextBox txtValue02;
+ private TextBox txtValue01;
+ private Label label20;
+ private TableLayoutPanel tableLayoutPanel1;
+ private GroupBox groupBox1;
+ private TableLayoutPanel tableLayoutPanel2;
+ private Button button7;
+ private GroupBox groupBox4;
+ private Label lblValue24;
+ private Label label70;
+ private Label lblValue23;
+ private Label label68;
+ private Label lblValue22;
+ private Label label66;
+ private Label lblValue21;
+ private Label label64;
+ private Label lblValue20;
+ private Label label62;
+ private Label lblValue19;
+ private Label label60;
+ private Label lblValue18;
+ private Label label58;
+ private Label lblValue17;
+ private Label label56;
+ private Label lblValue16;
+ private Label label54;
+ private Label lblValue15;
+ private Label label52;
+ private Label lblValue14;
+ private Label label50;
+ private Label lblValue13;
+ private Label label48;
+ private Label lblValue12;
+ private Label label46;
+ private Label lblValue11;
+ private Label label44;
+ private Label lblValue10;
+ private Label label42;
+ private Label lblValue09;
+ private Label label40;
+ private Label lblValue08;
+ private Label label38;
+ private Label lblValue07;
+ private Label label36;
+ private Label lblValue06;
+ private Label label34;
+ private Label lblValue05;
+ private Label label32;
+ private Label lblValue04;
+ private Label label30;
+ private Label lblValue03;
+ private Label label28;
+ private Label lblValue02;
+ private Label label22;
+ private Label lblValue01;
+ private Label label12;
+ private Label lblValue26;
+ private Label label74;
+ private Label lblValue25;
+ private Label label72;
+ private TextBox textBox20;
+ private TextBox textBox19;
+ private TextBox textBox1;
+ private TextBox textBox2;
+ private TextBox textBox17;
+ private TextBox textBox3;
+ private TextBox textBox4;
+ private TextBox textBox5;
+ private TextBox textBox6;
+ private TextBox textBox7;
+ private TextBox textBox9;
+ private TextBox textBox8;
+ private TextBox textBox10;
+ private TextBox textBox13;
+ private TextBox textBox14;
+ private TextBox textBox12;
+ private TextBox textBox11;
+ private TextBox textBox15;
+ private TextBox textBox16;
+ private TextBox textBox18;
+ private TextBox textBox32;
+ private TextBox textBox31;
+ private TextBox textBox30;
+ private TextBox textBox29;
+ private TextBox textBox27;
+ private TextBox textBox26;
+ private TextBox textBox25;
+ private TextBox textBox24;
+ private TextBox textBox21;
+ private TextBox textBox28;
+ private TextBox textBox33;
+ private TextBox textBox35;
+ private TextBox textBox34;
+ private TextBox textBox36;
+ private TextBox textBox37;
+ private TextBox textBox38;
+ private TextBox textBox39;
+ private TextBox textBox40;
+ private TextBox textBox23;
+ private TextBox textBox22;
+ }
+}
\ No newline at end of file
diff --git a/WinFormStarter/FrmPlc.cs b/WinFormStarter/FrmPlc.cs
new file mode 100644
index 0000000..8c10e8b
--- /dev/null
+++ b/WinFormStarter/FrmPlc.cs
@@ -0,0 +1,555 @@
+using HslCommunication.ModBus;
+using HslCommunication;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using HybirdFrameworkDriver.ModbusTcpMaster;
+using HybirdFrameworkServices.Init.Entity;
+using HybirdFrameworkServices.Plc;
+using HybirdFrameworkDriver.TcpServer;
+using Newtonsoft.Json.Linq;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+
+namespace WinFormStarter
+{
+ public partial class FrmPlc : Form
+ {
+ public FrmPlc()
+ {
+ InitializeComponent();
+ }
+
+ ModbusTcpNet ModbusTcpNet;
+ int heart = 0;
+
+ private void BtnWrite01_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue04.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.CommunicationDiagnosis.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.CommunicationDiagnosis);
+ }
+
+ private void BtnWrite02_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue05.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.ModeControl.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.ModeControl);
+ }
+
+ private void BtnWrite03_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue06.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.EquipmentControl.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.EquipmentControl);
+ }
+
+ private void BtnWrite04_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue07.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.ExhaustFanControl.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.ExhaustFanControl);
+ }
+
+ private void BtnWrite05_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue08.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.LightingControl.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.LightingControl);
+ }
+
+ private void BtnWrite06_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue09.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Seconds.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Seconds);
+ }
+
+ private void BtnWrite07_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue10.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Points.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Points);
+ }
+
+ private void BtnWrite08_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue11.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Hour.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Hour);
+ }
+
+ private void BtnWrite09_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue12.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Day.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Day);
+ }
+
+ private void BtnWrite10_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue13.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Month.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Month);
+ }
+
+ private void BtnWrite11_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue14.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.Years.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.Years);
+ }
+
+ ///
+ /// 车辆驻车位置
+ ///
+ ///
+ ///
+ private void BtnWrite14_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue15.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.VehicleParkingLocation.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.VehicleParkingLocation);
+ }
+
+ private void BtnWrite15_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue16.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.VehicleParkingStatus.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.VehicleParkingStatus);
+ }
+
+ ///
+ /// 三色灯
+ ///
+ ///
+ ///
+ private void BtnWrite16_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue17.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.LightIn.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.LightIn);
+ }
+
+ private void BtnWrite17_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue16.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.LightOut.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.LightOut);
+ }
+ ///
+ /// 锁止异常
+ ///
+ ///
+ ///
+ private void BtnWrite18_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue19.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.StopCommand.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.StopCommand);
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue20.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.TaskType.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.TaskType);
+ }
+ ///
+ /// 入仓仓位选择
+ ///
+ ///
+ ///
+ private void button2_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue21.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.EntrySelection.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.EntrySelection);
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue22.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.ExitSelection.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.ExitSelection);
+ }
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue23.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.BatteryPackType.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.BatteryPackType);
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ bool bConvert = ushort.TryParse(this.txtValue24.Text, out ushort iValue);
+ if (!bConvert)
+ {
+ MessageBox.Show("请输入有效值");
+ return;
+ }
+ ChargerStaticInfo.PlcInfos.TryGetValue(1, out PlcInfo plcInfo);
+ if (plcInfo == null)
+ {
+ MessageBox.Show("PLC未连接");
+ return;
+ }
+ plcInfo.hostToPlc.TaskEnablement.Value = iValue;
+ bool bResult = plcInfo.WriteUint16(plcInfo.hostToPlc.TaskEnablement);
+ }
+
+ private void button6_Click(object sender, EventArgs e)
+ {
+ bool bConvert1 = short.TryParse(this.txtValue01.Text, out short iValue1);
+ bool bConvert2 = short.TryParse(this.txtValue02.Text, out short iValue2);
+ bool bConvert3 = short.TryParse(this.txtValue03.Text, out short iValue3);
+
+ ChargerStaticInfo.PlcInfos.TryGetValue(3, out PlcInfo plcInfo);
+ if (plcInfo != null)
+ {
+ HostToPlc hostToPlc = new HostToPlc();
+ hostToPlc.ProtocolVersion1.Value = iValue1;
+ hostToPlc.ProtocolVersion2.Value = iValue2;
+ hostToPlc.ProtocolVersion3.Value = iValue3;
+ plcInfo.Writeint16(hostToPlc.ProtocolVersion1);
+ plcInfo.Writeint16(hostToPlc.ProtocolVersion2);
+ plcInfo.Writeint16(hostToPlc.ProtocolVersion3);
+ }
+ }
+
+ ///
+ /// 把采集值显示上来
+ ///
+ ///
+ ///
+ private void BtnCollectionAssignment_Click(object sender, EventArgs e)
+ {
+ ChargerStaticInfo.PlcInfos.TryGetValue(3, out PlcInfo plcInfo);
+ if (plcInfo != null)
+ {
+ lblValue01.Text = plcInfo.plcToHost.ProtocolVersion1.Value + "." +
+ plcInfo.plcToHost.ProtocolVersion2.Value + "." +
+ plcInfo.plcToHost.ProtocolVersion3.Value;
+
+ lblValue02.Text = plcInfo.plcToHost.CommunicationDiagnosis.Value.ToString();
+ lblValue03.Text = plcInfo.plcToHost.ModeControl.Value.ToString();
+ lblValue04.Text = plcInfo.plcToHost.DeviceSystemStatus.Value.ToString();
+ lblValue05.Text = plcInfo.plcToHost.RemoteLocalControlState.Value.ToString();
+ lblValue06.Text = plcInfo.plcToHost.LightStatus.Value.ToString();
+ lblValue07.Text = plcInfo.plcToHost.ExhaustFanStatus.Value.ToString();
+ lblValue08.Text = plcInfo.plcToHost.WaterStatusStation.Value.ToString();
+ lblValue09.Text = plcInfo.plcToHost.InPosition.Value.ToString();
+ lblValue10.Text = plcInfo.plcToHost.CarStatus.Value.ToString();
+ lblValue11.Text = plcInfo.plcToHost.PercentageTorqueX.Value.ToString();
+ lblValue12.Text = plcInfo.plcToHost.PercentageTorqueY.Value.ToString();
+ lblValue13.Text = plcInfo.plcToHost.PercentageTorqueZ.Value.ToString();
+ lblValue14.Text = plcInfo.plcToHost.RadarStatesIn.Value.ToString();
+ lblValue15.Text = plcInfo.plcToHost.RadarStatesOut.Value.ToString();
+ lblValue16.Text = plcInfo.plcToHost.SpotPhotoelectricSignal.Value.ToString();
+ lblValue17.Text = plcInfo.plcToHost.PhysicalButtonState.Value.ToString();
+ lblValue18.Text = plcInfo.plcToHost.LightIn.Value.ToString();
+ lblValue19.Text = plcInfo.plcToHost.LightOut.Value.ToString();
+ lblValue20.Text = plcInfo.plcToHost.TaskType.Value.ToString();
+ lblValue21.Text = plcInfo.plcToHost.TaskStates.Value.ToString();
+ lblValue22.Text = plcInfo.plcToHost.OperationalTrainNumber.Value.ToString();
+ lblValue23.Text = plcInfo.plcToHost.ChannelLocationState.Value.ToString();
+ lblValue24.Text = plcInfo.plcToHost.DeviationX.Value.ToString();
+ lblValue25.Text = plcInfo.plcToHost.DeviationY.Value.ToString();
+ lblValue26.Text = plcInfo.plcToHost.DeviationZ.Value.ToString();
+
+ txtValue01.Text = plcInfo.hostToPlc.ProtocolVersion1.Value.ToString();
+ txtValue02.Text = plcInfo.hostToPlc.ProtocolVersion2.Value.ToString();
+ txtValue03.Text = plcInfo.hostToPlc.ProtocolVersion3.Value.ToString();
+ txtValue04.Text = plcInfo.hostToPlc.CommunicationDiagnosis.Value.ToString();
+ txtValue05.Text = plcInfo.hostToPlc.ModeControl.Value.ToString();
+ txtValue06.Text = plcInfo.hostToPlc.EquipmentControl.Value.ToString();
+ txtValue07.Text = plcInfo.hostToPlc.ExhaustFanControl.Value.ToString();
+ txtValue08.Text = plcInfo.hostToPlc.LightingControl.Value.ToString();
+ txtValue09.Text = plcInfo.hostToPlc.Seconds.Value.ToString();
+ txtValue10.Text = plcInfo.hostToPlc.Points.Value.ToString();
+ txtValue11.Text = plcInfo.hostToPlc.Hour.Value.ToString();
+ txtValue12.Text = plcInfo.hostToPlc.Day.Value.ToString();
+ txtValue13.Text = plcInfo.hostToPlc.Month.Value.ToString();
+ txtValue14.Text = plcInfo.hostToPlc.Years.Value.ToString();
+ txtValue15.Text = plcInfo.hostToPlc.VehicleParkingLocation.Value.ToString();
+ txtValue16.Text = plcInfo.hostToPlc.VehicleParkingStatus.Value.ToString();
+ txtValue17.Text = plcInfo.hostToPlc.LightIn.Value.ToString();
+ txtValue18.Text = plcInfo.hostToPlc.LightOut.Value.ToString();
+ txtValue19.Text = plcInfo.hostToPlc.StopCommand.Value.ToString();
+ txtValue20.Text = plcInfo.hostToPlc.TaskType.Value.ToString();
+ txtValue21.Text = plcInfo.hostToPlc.EntrySelection.Value.ToString();
+ txtValue22.Text = plcInfo.hostToPlc.ExitSelection.Value.ToString();
+ txtValue23.Text = plcInfo.hostToPlc.BatteryPackType.Value.ToString();
+ txtValue24.Text = plcInfo.hostToPlc.TaskEnablement.Value.ToString();
+
+ textBox1.Text = plcInfo.hostToPlc.ChargingStatus01.Value.ToString();
+ textBox2.Text = plcInfo.hostToPlc.ChargingStatus02.Value.ToString();
+ textBox3.Text = plcInfo.hostToPlc.ChargingStatus03.Value.ToString();
+ textBox4.Text = plcInfo.hostToPlc.ChargingStatus04.Value.ToString();
+ textBox5.Text = plcInfo.hostToPlc.ChargingStatus05.Value.ToString();
+ textBox6.Text = plcInfo.hostToPlc.ChargingStatus06.Value.ToString();
+ textBox7.Text = plcInfo.hostToPlc.ChargingStatus07.Value.ToString();
+ textBox8.Text = plcInfo.hostToPlc.ChargingStatus08.Value.ToString();
+ textBox9.Text = plcInfo.hostToPlc.ChargingStatus09.Value.ToString();
+ textBox10.Text = plcInfo.hostToPlc.ChargingStatus10.Value.ToString();
+ textBox11.Text = plcInfo.hostToPlc.ChargingStatus11.Value.ToString();
+ textBox12.Text = plcInfo.hostToPlc.ChargingStatus12.Value.ToString();
+ textBox13.Text = plcInfo.hostToPlc.ChargingStatus13.Value.ToString();
+ textBox14.Text = plcInfo.hostToPlc.ChargingStatus14.Value.ToString();
+ textBox15.Text = plcInfo.hostToPlc.ChargingStatus15.Value.ToString();
+ textBox16.Text = plcInfo.hostToPlc.ChargingStatus16.Value.ToString();
+ textBox17.Text = plcInfo.hostToPlc.ChargingStatus17.Value.ToString();
+ textBox18.Text = plcInfo.hostToPlc.ChargingStatus18.Value.ToString();
+ textBox19.Text = plcInfo.hostToPlc.ChargingStatus19.Value.ToString();
+ textBox20.Text = plcInfo.hostToPlc.ChargingStatus20.Value.ToString();
+
+ textBox21.Text = plcInfo.hostToPlc.BatteryType01.Value.ToString();
+ textBox22.Text = plcInfo.hostToPlc.BatteryType02.Value.ToString();
+ textBox23.Text = plcInfo.hostToPlc.BatteryType03.Value.ToString();
+ textBox24.Text = plcInfo.hostToPlc.BatteryType04.Value.ToString();
+ textBox25.Text = plcInfo.hostToPlc.BatteryType05.Value.ToString();
+ textBox26.Text = plcInfo.hostToPlc.BatteryType06.Value.ToString();
+ textBox27.Text = plcInfo.hostToPlc.BatteryType07.Value.ToString();
+ textBox28.Text = plcInfo.hostToPlc.BatteryType08.Value.ToString();
+ textBox29.Text = plcInfo.hostToPlc.BatteryType09.Value.ToString();
+ textBox30.Text = plcInfo.hostToPlc.BatteryType10.Value.ToString();
+ textBox31.Text = plcInfo.hostToPlc.BatteryType11.Value.ToString();
+ textBox32.Text = plcInfo.hostToPlc.BatteryType12.Value.ToString();
+ textBox33.Text = plcInfo.hostToPlc.BatteryType13.Value.ToString();
+ textBox34.Text = plcInfo.hostToPlc.BatteryType14.Value.ToString();
+ textBox35.Text = plcInfo.hostToPlc.BatteryType15.Value.ToString();
+ textBox36.Text = plcInfo.hostToPlc.BatteryType16.Value.ToString();
+ textBox37.Text = plcInfo.hostToPlc.BatteryType17.Value.ToString();
+ textBox38.Text = plcInfo.hostToPlc.BatteryType18.Value.ToString();
+ textBox39.Text = plcInfo.hostToPlc.BatteryType19.Value.ToString();
+ textBox40.Text = plcInfo.hostToPlc.BatteryType20.Value.ToString();
+ }
+ }
+ }
+}
diff --git a/WinFormStarter/FrmPlc.resx b/WinFormStarter/FrmPlc.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/WinFormStarter/FrmPlc.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinFormStarter/Program.cs b/WinFormStarter/Program.cs
index 72a6f73..ebd446a 100644
--- a/WinFormStarter/Program.cs
+++ b/WinFormStarter/Program.cs
@@ -1,6 +1,7 @@
using Autofac;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Configuration;
+using HybirdFrameworkServices;
using log4net.Config;
using SqlSugar;
using SqlSugar.IOC;
@@ -50,7 +51,10 @@ internal static class Program
// 构建容器
Container = builder.Build();
AppInfo.Container = Container.BeginLifetimeScope("root");
+ EquipmentInit equipmentInit = AppInfo.Container.Resolve();
+ equipmentInit.Connect();
Application.Run(AppInfo.Container.ResolveNamed