|
|
|
|
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<short> ProtocolVersion1 { get; set; } = new(40001); // 协议版本
|
|
|
|
|
public ModbusProperty<short> ProtocolVersion2 { get; set; } = new(40002); // 协议版本
|
|
|
|
|
public ModbusProperty<short> ProtocolVersion3 { get; set; } = new(40003); // 协议版本
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通讯诊断
|
|
|
|
|
/// 站控PC心跳(0、1 跳变)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> CommunicationDiagnosis { get; set; } = new(40004); //
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 模式控制
|
|
|
|
|
/// <para>0:无操作</para>
|
|
|
|
|
/// <para>1000:自动</para>
|
|
|
|
|
/// <para>1010:手动</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> ModeControl { get; set; } = new(40005); //
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备控制
|
|
|
|
|
/// <para>0:无操作</para>
|
|
|
|
|
/// <para>1000:复位</para>
|
|
|
|
|
/// <para>1010:启动</para>
|
|
|
|
|
/// <para>1020:暂停</para>
|
|
|
|
|
/// <para>1030:急停</para>
|
|
|
|
|
/// <para>1050:整站断电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> EquipmentControl { get; set; } = new(40006); //
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 排风扇控制
|
|
|
|
|
/// <para>0:无操作</para>
|
|
|
|
|
/// <para>1000:全部打开</para>
|
|
|
|
|
/// <para>1010:全部关闭</para>
|
|
|
|
|
/// <para>1020:预留</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> ExhaustFanControl { get; set; } = new(40007); //
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 灯光控制
|
|
|
|
|
/// <para>0:无操作</para>
|
|
|
|
|
/// <para>1000:全部打开</para>
|
|
|
|
|
/// <para>1010:全部关闭</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> LightingControl { get; set; } = new(40008); //
|
|
|
|
|
|
|
|
|
|
public ModbusProperty<ushort> Standby1 { get; set; } = new(40009); // 备用
|
|
|
|
|
public ModbusProperty<ushort> Standby2 { get; set; } = new(40010); // 备用
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:秒
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Seconds { get; set; } = new(40011);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:分
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Points { get; set; } = new(40012);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:时
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Hour { get; set; } = new(40013);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:天
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Day { get; set; } = new(40014);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:月
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Month { get; set; } = new(40015);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对时时钟:年
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> Years { get; set; } = new(40016);
|
|
|
|
|
public ModbusProperty<string> Standby3 { get; set; } = new(40017, length: 4); // 备用3
|
|
|
|
|
//public ModbusProperty<string> ChargingStatus { get; set; } = new(40021, length: 40); // 仓位充电状态
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus01 { get; set; } = new(40021);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus02 { get; set; } = new(40022);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus03 { get; set; } = new(40023);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus04 { get; set; } = new(40024);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus05 { get; set; } = new(40025);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus06 { get; set; } = new(40026);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus07 { get; set; } = new(40027);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus08 { get; set; } = new(40028);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus09 { get; set; } = new(40029);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus10 { get; set; } = new(40030);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus11 { get; set; } = new(40031);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus12 { get; set; } = new(40032);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus13 { get; set; } = new(40033);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus14 { get; set; } = new(40034);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus15 { get; set; } = new(40035);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus16 { get; set; } = new(40036);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus17 { get; set; } = new(40037);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus18 { get; set; } = new(40038);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus19 { get; set; } = new(40039);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位充电状态
|
|
|
|
|
/// <para>0:未知</para>
|
|
|
|
|
/// <para>1000:空闲</para>
|
|
|
|
|
/// <para>1010:充电</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> ChargingStatus20 { get; set; } = new(40040);
|
|
|
|
|
//public ModbusProperty<string> BatteryType { get; set; } = new(40061, length: 40); // 仓位所在电池型号
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType01 { get; set; } = new(40061);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType02 { get; set; } = new(40062);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType03 { get; set; } = new(40063);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType04 { get; set; } = new(40064);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType05 { get; set; } = new(40065);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType06 { get; set; } = new(40066);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType07 { get; set; } = new(40067);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType08 { get; set; } = new(40068);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType09 { get; set; } = new(40069);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType10 { get; set; } = new(40070);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType11 { get; set; } = new(40071);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType12 { get; set; } = new(40072);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType13 { get; set; } = new(40073);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType14 { get; set; } = new(40074);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType15 { get; set; } = new(40075);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType16 { get; set; } = new(40076);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType17 { get; set; } = new(40077);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType18 { get; set; } = new(40078);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType19 { get; set; } = new(40079);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 仓位所在电池型号
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> BatteryType20 { get; set; } = new(40080);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 车辆驻车位置
|
|
|
|
|
/// <para>0 无效</para>
|
|
|
|
|
/// <para>2=2#换电位</para>
|
|
|
|
|
/// <para>3=3#换电位</para>
|
|
|
|
|
/// <para>4=4#换电位</para>
|
|
|
|
|
/// <para>5=5#换电位</para>
|
|
|
|
|
/// <para>6=6#换电位</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> VehicleParkingLocation { get; set; } = new(40101);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 车辆驻车状态
|
|
|
|
|
/// <para>0=车辆状态未知</para>
|
|
|
|
|
/// <para>1=车辆运动中</para>
|
|
|
|
|
/// <para>2=车辆停止、驻停</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> VehicleParkingStatus { get; set; } = new(40102);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 三色灯控制整站状态(入口)
|
|
|
|
|
/// <para>0:无效值</para>
|
|
|
|
|
/// <para>1000:绿灯</para>
|
|
|
|
|
/// <para>1010:绿灯闪烁</para>
|
|
|
|
|
/// <para>1020:红灯</para>
|
|
|
|
|
/// <para>1030:红灯闪烁</para>
|
|
|
|
|
/// <para>1040:黄灯</para>
|
|
|
|
|
/// <para>1050:黄灯闪烁</para>
|
|
|
|
|
/// <para>1100:所有灯亮</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> LightIn { get; set; } = new(40103);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 三色灯控制整站状态(出口)
|
|
|
|
|
/// <para>0:无效值</para>
|
|
|
|
|
/// <para>1000:绿灯</para>
|
|
|
|
|
/// <para>1010:绿灯闪烁</para>
|
|
|
|
|
/// <para>1020:红灯</para>
|
|
|
|
|
/// <para>1030:红灯闪烁</para>
|
|
|
|
|
/// <para>1040:黄灯</para>
|
|
|
|
|
/// <para>1050:黄灯闪烁</para>
|
|
|
|
|
/// <para>1100:所有灯亮</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> LightOut { get; set; } = new(40104);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 电池包锁止异常,暂停命令 0:无命令;1000:暂停使能
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> StopCommand { get; set; } = new(40105);
|
|
|
|
|
public ModbusProperty<string> Standby4 { get; set; } = new(40106, length: 5); // 备用4
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务类型
|
|
|
|
|
/// <para>0.无任务</para>
|
|
|
|
|
/// <para>1.换电任务</para>
|
|
|
|
|
/// <para>2.移舱任务</para>
|
|
|
|
|
/// <para>3.移出任务</para>
|
|
|
|
|
/// <para>4.移入任务</para>
|
|
|
|
|
/// <para>5.消防任务</para>
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> TaskType { get; set; } = new(40111);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 入仓位选择
|
|
|
|
|
/// 0:无操作
|
|
|
|
|
/// 范围:1-20
|
|
|
|
|
/// 1:缓存位舱位号
|
|
|
|
|
/// 2-20 电池存储舱位
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> EntrySelection { get; set; } = new(40112);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 出仓仓位选择
|
|
|
|
|
/// 0:无操作
|
|
|
|
|
/// 范围:1-20
|
|
|
|
|
/// 1:缓存位舱位号
|
|
|
|
|
/// 2-20 电池存储舱位
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> ExitSelection { get; set; } = new(40113);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 电池包类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> BatteryPackType { get; set; } = new(40114);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 0:无操作
|
|
|
|
|
/// 1000:任务使能
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> TaskEnablement { get; set; } = new(40115);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|