UPS数据读取

master
CZ 6 days ago
parent 09408ae18b
commit df071df52f

@ -0,0 +1,86 @@
using HybirdFrameworkCore.Const;
using HybirdFrameworkDriver.ModbusTcpMaster;
using Service.UpsAfrica.Msg;
namespace Service.UpsAfrica.Client;
public class UpsAfricaClient: ModbusTcpMaster
{
public UpsAfricaClient()
{
ReadAction = BatchRead;
Ip = "192.168.3.100";
Port = 23;
Duration = 1000;
AutoReConnect = true;
ByteSeq = EndingConst.ByteSeq.BA;
WordSeq= EndingConst.WordSeq.CD;
}
private bool BatchRead(ModbusTcpMaster master)
{
bool resul = Connected;
var bytes01 = master.Read("x=3;48", 2).Content;
if (bytes01 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndex30>(bytes01, UpsAfricaMgr.UpsIndex30, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
var bytes02 = master.Read("x=3;64", 17).Content;
if (bytes02 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndex40>(bytes02, UpsAfricaMgr.UpsIndex40, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
var bytes03 = master.Read("x=3;80", 4).Content;
if (bytes03 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndex50>(bytes03, UpsAfricaMgr.UpsIndex50, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
var bytes04 = master.Read("x=3;96", 8).Content;
if (bytes04 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndex60>(bytes04, UpsAfricaMgr.UpsIndex60, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
var bytes05 = master.Read("x=3;160", 1).Content;
if (bytes05 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndexA0>(bytes05, UpsAfricaMgr.UpsIndexA0, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
var bytes06 = master.Read("x=3;192", 1).Content;
if (bytes06 != null)
{
UpsAfricaMgr.DataValidityTime = DateTime.Now;
ModbusDecoder.Decode<UpsIndexC0>(bytes06, UpsAfricaMgr.UpsIndexC0, EndingConst.ByteSeq.AB,
EndingConst.WordSeq.DC);
resul = true;
}
return resul;
}
}

@ -0,0 +1,42 @@
using HybirdFrameworkCore.Autofac.Attribute;
using Service.UpsAfrica.Msg;
using HybirdFrameworkCore.Autofac;
using Autofac;
namespace Service.UpsAfrica.Client;
[Scope]
public class UpsAfricaMgr
{
public static UpsAfricaClient? UpsAfricaClient;
public static readonly UpsIndex30 UpsIndex30 = new UpsIndex30();
public static readonly UpsIndex40 UpsIndex40 = new UpsIndex40();
public static readonly UpsIndex50 UpsIndex50 = new UpsIndex50();
public static readonly UpsIndex60 UpsIndex60 = new UpsIndex60();
public static readonly UpsIndexA0 UpsIndexA0 = new UpsIndexA0();
public static readonly UpsIndexC0 UpsIndexC0 = new UpsIndexC0();
/// <summary>
/// 数据有效时间。单位秒
/// </summary>
static int DataTimeSeconds = 20;
/// <summary>
/// 数据刷新时间
/// </summary>
public static DateTime DataValidityTime = DateTime.Now;
public static void UpsInit()
{
if (UpsAfricaClient == null)
{
UpsAfricaClient = AppInfo.Container.Resolve<UpsAfricaClient>();
}
Task.Run(() => UpsAfricaClient.Connect());
}
}

@ -0,0 +1,87 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndex30
{
/// <summary>
/// 0:蝙蝠沉默(仅适用于集中)
/// </summary>
public ModbusProperty<bool> Batsilence { get; set; } = new(30030,start:0,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:关机激活/关机模式1:过程中测试/BatTest模式
/// </summary>
public ModbusProperty<bool> Shutdownactive { get; set; } = new(30030,start:1,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:过程中测试/BatTest模式
/// </summary>
public ModbusProperty<bool> TestInProcess { get; set; } = new(30030,start:2,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 0在线UPS 1离线UPS
/// </summary>
public ModbusProperty<bool> OnlineUPSOfflineUPS { get; set; } = new(30030,start:3,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:UPS故障/故障模式
/// </summary>
public ModbusProperty<bool> UPSFailed { get; set; } = new(30030,start:4,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1 旁路/升压激活/旁路模式
/// </summary>
public ModbusProperty<bool> Bypass { get; set; } = new(30030,start:5,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1 电池电量低警告
/// </summary>
public ModbusProperty<bool> BatteryLowWarning { get; set; } = new(30030,start:6,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:实用程序故障(立即)/电池模
/// </summary>
public ModbusProperty<bool> UtilityFail { get; set; } = new(30030,start:7,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1 空闲
/// </summary>
public ModbusProperty<bool> Idle { get; set; } = new(30030,start:8,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:加工
/// </summary>
public ModbusProperty<bool> Processing { get; set; } = new(30030,start:9,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1结果无故障
/// </summary>
public ModbusProperty<bool> ResultNoFailure { get; set; } = new(30030,start:10,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:结果:故障/警告
/// </summary>
public ModbusProperty<bool> ResultFailure { get; set; } = new(30030,start:11,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1不可能或抑制
/// </summary>
public ModbusProperty<bool> NotPossibleOrInhibit { get; set; } = new(30030,start:12,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1测试取消
/// </summary>
public ModbusProperty<bool> TestCancel { get; set; } = new(30030,start:13,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<bool> Reserved { get; set; } = new(30030,start:14,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 1:其他值
/// </summary>
public ModbusProperty<bool> OtherValues { get; set; } = new(30030,start:15,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 待机模式
/// </summary>
public ModbusProperty<bool> StandbyMode { get; set; } = new(30031,start:0,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 线路模式
/// </summary>
public ModbusProperty<bool> LineMode { get; set; } = new(30031,start:1,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 转换器模式
/// </summary>
public ModbusProperty<bool> ConverterMode { get; set; } = new(30031,start:2,length:1,type:ModbusDataType.Bit);
/// <summary>
/// ECO模式
/// </summary>
public ModbusProperty<bool> ECOMode { get; set; } = new(30031,start:3,length:1,type:ModbusDataType.Bit);
}

@ -0,0 +1,503 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndex40
{
/// <summary>
/// 变频器温度过高
/// </summary>
public ModbusProperty<bool> TemperatureConverterHigh = new(30040,start:0,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 34内部故障34
/// </summary>
public ModbusProperty<bool> InternalFault = new(30040,start:0,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 参数不正确逆变器MLFB
/// </summary>
public ModbusProperty<bool> IncorrectParameter = new(30040,start:0,length:2,type:ModbusDataType.Bit);
/// <summary>
/// 逆变器接触器有缺陷
/// </summary>
public ModbusProperty<bool> InverterContactorDefective = new(30040,start:3,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 多个逆变器因过电流而切断
/// </summary>
public ModbusProperty<bool> MultipleInverterCutOff = new(30040,start:4,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 电源电子故障
/// </summary>
public ModbusProperty<bool> FailurePowerSupplyElectronic = new(30040,start:5,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 中间电路过电压
/// </summary>
public ModbusProperty<bool> OverVoltageIntermediate = new(30040,start:6,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 外部快速关机已激活
/// </summary>
public ModbusProperty<bool> ExternalQuickShutdownActive = new(30040,start:7,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 电子故障(信号处理器故障)
/// </summary>
public ModbusProperty<bool> ElectronicDefective = new(30040,start:0,length:8,type:ModbusDataType.Bit);
/// <summary>
/// 电力电子(整流器)缺陷
/// </summary>
public ModbusProperty<bool> DefectPowerElectronicRectifier = new(30040,start:9,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 电力电子缺陷UCE监督
/// </summary>
public ModbusProperty<bool> DefectPowerElectronicUCE = new(30040,start:10,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 过电流切断
/// </summary>
public ModbusProperty<bool> OverCurrentCutoff = new(30040,start:11,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 期间参数输入错误
/// </summary>
public ModbusProperty<bool> FalseParameterInputDuring = new(30040,start:12,length:1,type:ModbusDataType.Bit);
/// <summary>
/// UPS输出超出容差
/// </summary>
public ModbusProperty<bool> UPSOutputTolerance = new(30040,start:13,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 输出过载i2t监控
/// </summary>
public ModbusProperty<bool> OutputOverload = new(30040,start:14,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed01 = new(30040,start:15,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed02 = new(30041,start:0,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 旁路有缺陷
/// </summary>
public ModbusProperty<bool> BypassDefective = new(30041,start:1,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 旁路故障(在传输过程中)
/// </summary>
public ModbusProperty<bool> BypassDefectiveDuringTransfer = new(30041,start:2,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 旁路过载
/// </summary>
public ModbusProperty<bool> BypassOverload = new(30041,start:3,length:1,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed03 = new(30041,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed04 = new(30041,start:0,length:5,type:ModbusDataType.Bit);
/// <summary>
/// 电子故障EEPROM逆变器
/// </summary>
public ModbusProperty<bool> ElectronicDefectiveEeprom = new(30041,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 与电池管理器的通信有缺陷
/// </summary>
public ModbusProperty<bool> CommunicationBatteryManagerDefective = new(30041,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电子故障校验和EPROM
/// </summary>
public ModbusProperty<bool> ElectronicDefectiveCheck = new(30041,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 环境温度低于0度或测量有缺陷
/// </summary>
public ModbusProperty<bool> EnvironmentTemperatureSmaller = new(30041,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 可选模块故障或未插入
/// </summary>
public ModbusProperty<bool> OptionalModuleFailedNotPut = new(30041,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 并联旁路失败
/// </summary>
public ModbusProperty<bool> ParallelBypassFailed =new(30041,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 并联模块信号故障
/// </summary>
public ModbusProperty<bool> SignalFaultParallelModule = new(30041,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed05 = new(30041,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed06 = new(30041,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed07 = new(30041,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed08 = new(30042,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed09 = new(30042,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed20= new(30042,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed21 =new(30042,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed22 =new(30042,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed23 =new(30042,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed24= new(30042,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed25= new(30042,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed26= new(30042,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed27=new(30042,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed28 =new(30042,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed29 =new(30042,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed30 =new(30042,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 充电器过度充电
/// </summary>
public ModbusProperty<bool> ChargerOverCharging =new(30042,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed31 =new(30042,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed32 = new(30042,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed33 =new(30043,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed34 =new(30043,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed35 =new(30043,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed36 =new(30043,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed37 =new(30043,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed38 =new(30043,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed39 =new(30043,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 预留用于led测试无故障
/// </summary>
public ModbusProperty<bool> ReservedForLedTest =new(30043,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed40 =new(30043,start:0,length:8,type:ModbusDataType.Bit);
/// <summary>
/// Psdr至总线保险丝断开
/// </summary>
public ModbusProperty<bool> PsdrBusFuseOpen =new(30043,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 50%负载不平衡超过50%
/// </summary>
public ModbusProperty<bool> LoadUnbalanceOver =new(30043,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed41 =new(30043,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed42 =new(30043,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 故障
/// </summary>
public ModbusProperty<bool> ProfibusFaultProfibus =new(30043,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 系统频率超出容差
/// </summary>
public ModbusProperty<bool> SystemFrequency =new(30043,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 系统电压超出公差
/// </summary>
public ModbusProperty<bool> SystemVoltage =new(30043,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed43 =new(30044,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed44 =new(30044,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// LCD与Cudsmc通信故障
/// </summary>
public ModbusProperty<bool> LCDCudsmcCommunicationFailure =new(30044,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<bool> Reserved01 =new(30044,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<bool> Reserved02 =new(30044,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// BUS软启动超时
/// </summary>
public ModbusProperty<bool> cBusSoftTimeOut =new(30044,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// BUS高压Fault
/// </summary>
public ModbusProperty<bool> cBusOver =new(30044,start:0,length:6,type:ModbusDataType.Bit);
/// <summary>
/// BUS低压Fault
/// </summary>
public ModbusProperty<bool> cBusUnder =new(30044,start:0,length:7,type:ModbusDataType.Bit);
/// <summary>
/// cBus不平衡
/// </summary>
public ModbusProperty<bool> cBusUnbalance =new(30044,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// Bus短路故障
/// </summary>
public ModbusProperty<bool> cBusbool =new(30044,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 逆变软启动超时
/// </summary>
public ModbusProperty<bool> cInvSoftTimeOut =new(30044,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 逆变电压高压Fault
/// </summary>
public ModbusProperty<bool> cInvVoltHigh =new(30044,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 逆变电压低压Fault
/// </summary>
public ModbusProperty<bool> cInvVoltLow =new(30044,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 输出电压短路
/// </summary>
public ModbusProperty<bool> cOPVoltbool =new(30044,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// R相逆变电压短路
/// </summary>
public ModbusProperty<bool> cRInvVoltbool =new(30044,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// S相逆变电压短路
/// </summary>
public ModbusProperty<bool> cSInvVoltbool =new(30044,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// T相逆变电压短路
/// </summary>
public ModbusProperty<bool> cTInvVoltbool =new(30045,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// RS相线电压短路
/// </summary>
public ModbusProperty<bool> cRSInvVoltbool =new(30045,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// ST相线电压短路
/// </summary>
public ModbusProperty<bool> cSTInvVoltbool =new(30045,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// TR相线电压短路
/// </summary>
public ModbusProperty<bool> cTRInvVoltbool =new(30045,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 负功Fault
/// </summary>
public ModbusProperty<bool> cInvNegPow =new(30045,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// R相负功Fault
/// </summary>
public ModbusProperty<bool> cInvRNegPow =new(30045,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// S相负功Fault
/// </summary>
public ModbusProperty<bool> cInvSNegPow =new(30045,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// T相负功Fault
/// </summary>
public ModbusProperty<bool> cInvTNegPow =new(30045,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 三相总负功Fault
/// </summary>
public ModbusProperty<bool> cTotalInvNegPow =new(30045,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 不均流Fault
/// </summary>
public ModbusProperty<bool> cReactPowFault =new(30045,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// INVRly无法闭合
/// </summary>
public ModbusProperty<bool> cInvRlyOpenFault =new(30045,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// INVRly粘死
/// </summary>
public ModbusProperty<bool> cInvRlyStickFault =new(30045,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 市电输入SCR故障
/// </summary>
public ModbusProperty<bool> cLineSCRFault =new(30045,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池输入SCR故障
/// </summary>
public ModbusProperty<bool> cBatScrFault =new(30045,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路输入SCR故障
/// </summary>
public ModbusProperty<bool> cByPassScrFault =new(30045,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 输入输出接线错误
/// </summary>
public ModbusProperty<bool> cWiringFault =new(30045,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 通讯线未连
/// </summary>
public ModbusProperty<bool> cCommLineLoss =new(30046,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 主机线故障
/// </summary>
public ModbusProperty<bool> cHostlineFault =new(30046,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// CAN通讯线故障
/// </summary>
public ModbusProperty<bool> cCanFault =new(30046,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 同步信号线故障
/// </summary>
public ModbusProperty<bool> cSynLineFault =new(30046,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 所有风扇全故障
/// </summary>
public ModbusProperty<bool> cAllFansLockedFault =new(30046,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// DSP异常
/// </summary>
public ModbusProperty<bool> cOCCoreFault =new(30046,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 充电器输出软启动超时
/// </summary>
public ModbusProperty<bool> cChgOpSoftTimeOut =new(30046,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// UPS模块全故障
/// </summary>
public ModbusProperty<bool> cUpsAllFault =new(30046,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// UPS市电输入NTC开路故障
/// </summary>
public ModbusProperty<bool> cLineInNtcOpenFault =new(30046,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 市电输入fuse开路故障
/// </summary>
public ModbusProperty<bool> cLineInFuseOpenFault =new(30046,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 输入不一致故障
/// </summary>
public ModbusProperty<bool> cCoherencyFault =new(30046,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// Eeprom数据丢失
/// </summary>
public ModbusProperty<bool> cEepromFault =new(30046,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 市电支援失效
/// </summary>
public ModbusProperty<bool> cLinesupportFail =new(30046,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电源失效
/// </summary>
public ModbusProperty<bool> cPowerBreakDown =new(30046,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 系统过容
/// </summary>
public ModbusProperty<bool> cSysOverCapacity =new(30046,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// ADS7869错误
/// </summary>
public ModbusProperty<bool> cADS7869Fault =new(30046,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路模式无OP
/// </summary>
public ModbusProperty<bool> cSTSHardwareFault =new(30047,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P断路器在并联模式下关闭
/// </summary>
public ModbusProperty<bool> cOpBreakerOffFault =new(30047,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// NTC故障
/// </summary>
public ModbusProperty<bool> cNTCAbnormal =new(30047,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池故障
/// </summary>
public ModbusProperty<bool> cBatAbnormal =new(30047,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 频繁过流故障
/// </summary>
public ModbusProperty<bool> cWC1_ForbidComeBackFromByp =new(30047,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// EPO故障(最高优先级故障,此故障一旦置位就不能被其它故障码覆盖)
/// </summary>
public ModbusProperty<bool> cEpoFault =new(30047,start:0,length:5,type:ModbusDataType.Bit);
/// <summary>
/// 未使用
/// </summary>
public ModbusProperty<bool> NotUsed =new(30047,start:0,length:6,type:ModbusDataType.Bit);
}

@ -0,0 +1,246 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndex50
{
/// <summary>
/// 超温逆变器
/// </summary>
public ModbusProperty<short> OverTemperatureInverter =new(30080,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路电源故障
/// </summary>
public ModbusProperty<short> BypassMainsFailure =new(30080,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 整流器电源故障
/// </summary>
public ModbusProperty<short> RectifierMainsFailure =new(30080,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// (i2-t-Supervision)负载过高i2-监控)
/// </summary>
public ModbusProperty<short> LoadTooHigh =new(30080,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 欠压中间电路
/// </summary>
public ModbusProperty<short> UnderVoltageIntermediateCircuit =new(30080,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 过载
/// </summary>
public ModbusProperty<short> OverLoad =new(30080,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路中的相序不正确
/// </summary>
public ModbusProperty<short> PhaseSequenceIncorrectBypass =new(30080,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 服务旁路已打开
/// </summary>
public ModbusProperty<short> ServiceBypass =new(30080,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池操作
/// </summary>
public ModbusProperty<short> BatteryOperation =new(30080,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 超过电池休息时间
/// </summary>
public ModbusProperty<short> BatteryRestTimeExceeded =new(30080,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池欠压
/// </summary>
public ModbusProperty<short> BatteryUnderVoltage =new(30080,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 变频器运行条件调试
/// </summary>
public ModbusProperty<short> OperatingConditionComConverter =new(30080,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池开关未接合
/// </summary>
public ModbusProperty<short> BatterySwitchNotEngaged =new(30080,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 超过呼吸机寿命
/// </summary>
public ModbusProperty<short> VentilatorLifetimeExceeded =new(30080,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 充电器连接丢失
/// </summary>
public ModbusProperty<short> ConnectionToChargerLost =new(30080,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 内部警告16
/// </summary>
public ModbusProperty<short> InternalWarning16 =new(30080,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<short> ReservedA16 =new(30081,start:0,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA17 =new(30081,start:1,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA18 =new(30081,start:2,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA19 =new(30081,start:3,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA20 =new(30081,start:4,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA21 =new(30081,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池充电器通信故障
/// </summary>
public ModbusProperty<short> BatteryChargerCommunicateFailure =new(30081,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 一般蓄电池充电器故障
/// </summary>
public ModbusProperty<short> GeneralBatteryChargerFailure =new(30081,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<short> ReservedA24 =new(30081,start:8,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA25 =new(30081,start:9,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA26 =new(30081,start:10,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA27 =new(30081,start:11,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA28 =new(30081,start:12,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> ReservedA29 =new(30081,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 负载不平衡
/// </summary>
public ModbusProperty<short> LoadUnbalance =new(30081,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 内部警告32
/// </summary>
public ModbusProperty<short> InternalWarning32=new(30081,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// EPO开关未接
/// </summary>
public ModbusProperty<short> cWC1EpoActive =new(30082,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 模块未锁
/// </summary>
public ModbusProperty<short> cWC1ModuleUnLock =new(30082,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 输入中线丢失
/// </summary>
public ModbusProperty<short> cWC1IPNLoss =new(30082,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// L、N反接
/// </summary>
public ModbusProperty<short> cWC1SiteFail =new(30082,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路异常
/// </summary>
public ModbusProperty<short> cWC1BypassLoss =new(30082,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路相序错误
/// </summary>
public ModbusProperty<short> cWC1ByPassPhaseErr =new(30082,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池过充
/// </summary>
public ModbusProperty<short> cWC1OverChg =new(30082,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池反接
/// </summary>
public ModbusProperty<short> cWC1BatReverse =new(30082,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 维修旁路盖板打开
/// </summary>
public ModbusProperty<short> cWC1MaintainOn =new(30082,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 物理位置错误
/// </summary>
public ModbusProperty<short> cWC1ErrorLocation =new(30082,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 不满足开机条件,无法开机
/// </summary>
public ModbusProperty<short> cWC1HcTurnOnAbornaml =new(30083,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 冗余丢失
/// </summary>
public ModbusProperty<short> cWC1HcRedundantLoss =new(30083,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 模块未插紧
/// </summary>
public ModbusProperty<short> cWC1ModuleHotSwapActive =new(30083,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池维护时间到
/// </summary>
public ModbusProperty<short> cWC1BatteryInform =new(30083,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 巡检维护时间到
/// </summary>
public ModbusProperty<short> cWC1InspectionInform =new(30083,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 过保维护时间到
/// </summary>
public ModbusProperty<short> cWC1GuaranteeInform =new(30083,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 温度过低
/// </summary>
public ModbusProperty<short> cWC1TempLow =new(30083,start:0,length:6,type:ModbusDataType.Bit);
/// <summary>
/// 电池过温
/// </summary>
public ModbusProperty<short> cWC1BatOverTemp =new(30083,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// BUS电容维护时间到
/// </summary>
public ModbusProperty<short> cWC1BusCapMainInform =new(30083,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 系统过容
/// </summary>
public ModbusProperty<short> cWC1SysOverCapacity=new(30083,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 外部告警高32位
/// </summary>
public ModbusProperty<short> cWC1HighExternalWarning=new(30083,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<short> reservedA53 =new(30083,start:11,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA54 =new(30083,start:12,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA55 =new(30083,start:13,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA56 =new(30083,start:14,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA57 =new(30083,start:15,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA58 =new(30084,start:0,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA59 =new(30084,start:1,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA60 =new(30084,start:2,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA61 =new(30084,start:3,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA62 =new(30084,start:4,length:4,type:ModbusDataType.Bit);
public ModbusProperty<short> reservedA63 =new(30084,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 模块故障
/// </summary>
public ModbusProperty<short> cOuterWarningCode2LModuleFault =new(30084,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路N线丢失
/// </summary>
public ModbusProperty<short> cOuterWarningCode2LBypassNLoss =new(30084,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池N线断开
/// </summary>
public ModbusProperty<short> cOuterWarningCode2LBatNLoss =new(30084,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// EXCHG故障
/// </summary>
public ModbusProperty<short> cOuterWarningCode2LExChgFail =new(30084,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池温度过低
/// </summary>
public ModbusProperty<short> cOuterWarningCode2L_BatTempLow =new(30084,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池不平衡
/// </summary>
public ModbusProperty<short> cOuterWarningCode2L_BatUnbalance =new(30084,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// AD校准失败
/// </summary>
public ModbusProperty<short> cOuterWarningCode2L_ADCalibrationFail=new(30084,start:11,length:4,type:ModbusDataType.Bit);
}

@ -0,0 +1,159 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndex60
{
/// <summary>
/// I/P电压R
/// </summary>
public ModbusProperty<short> IPVoltageR =new(30096,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// I/P电压S
/// </summary>
public ModbusProperty<short> IPVoltageS =new(30096,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// I/P电压T
/// </summary>
public ModbusProperty<short> IPVoltageT =new(30096,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// I/P故障电压R或S或T
/// </summary>
public ModbusProperty<short> IPFaultVoltage=new(30096,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路I/P电压R
/// </summary>
public ModbusProperty<short> BypassIPVoltageR =new(30096,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路I/P电压S
/// </summary>
public ModbusProperty<short> BypassIPVoltageS =new(30096,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路I/P电压T
/// </summary>
public ModbusProperty<short> BypassIPVoltageT =new(30096,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// I/P频率
/// </summary>
public ModbusProperty<short> IPFrequency =new(30096,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 旁路I/P频率
/// </summary>
public ModbusProperty<short> BypassIPFrequency =new(30096,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电压R
/// </summary>
public ModbusProperty<short> OPVoltageR =new(30096,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电压S
/// </summary>
public ModbusProperty<short> OPVoltageS =new(30096,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电压T
/// </summary>
public ModbusProperty<short> OPVoltageT =new(30096,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电流R
/// </summary>
public ModbusProperty<short> OPCurrentR =new(30096,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电流S
/// </summary>
public ModbusProperty<short> OPCurrentS =new(30096,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P电流T
/// </summary>
public ModbusProperty<short> OPCurrentT =new(30096,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P功率R
/// </summary>
public ModbusProperty<short> OPPowerR =new(30096,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P功率S
/// </summary>
public ModbusProperty<short> OPPowerS =new(30097,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P功率T
/// </summary>
public ModbusProperty<short> OPPowerT =new(30097,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 总功率
/// </summary>
public ModbusProperty<short> TotalPower =new(30097,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P复合功率R
/// </summary>
public ModbusProperty<short> OPComplexPowerR =new(30097,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P复合功率S
/// </summary>
public ModbusProperty<short> OPComplexPowerS =new(30097,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P复合功率T
/// </summary>
public ModbusProperty<short> OPComplexPowerT =new(30097,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 总综合功率
/// </summary>
public ModbusProperty<short> TotalComplexPower =new(30097,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P负载
/// </summary>
public ModbusProperty<short> OPLoad =new(30097,start:0,length:7,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池单体电压
/// </summary>
public ModbusProperty<short> BatteryCellVoltage =new(30097,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池电压/蓄电池正极电压
/// </summary>
public ModbusProperty<short> BatteryVoltage =new(30097,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 温度
/// </summary>
public ModbusProperty<short> Temperature =new(30097,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 充电状态
/// </summary>
public ModbusProperty<short> ChargeStatus =new(30097,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池容量百分比
/// </summary>
public ModbusProperty<short> BatteryCapacityPercentage =new(30097,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 充电时间达到95%
/// </summary>
public ModbusProperty<short> RechargeTimeTo95 =new(30097,start:13,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 预计运行时间/剩余电池备份时间
/// </summary>
public ModbusProperty<short> EstimatedRunTime =new(30097,start:14,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 100%负载下的保持时间
/// </summary>
public ModbusProperty<short> HoldTimeAt100Load =new(30097,start:15,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 50%负载下的保持时间
/// </summary>
public ModbusProperty<short> HoldTimeAt50Load =new(30098,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// O/P频率
/// </summary>
public ModbusProperty<short> OPFrequency =new(30098,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 蓄电池负极电压
/// </summary>
public ModbusProperty<short> NegativeBatteryVoltage =new(30098,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<short> Reserved =new(30098,start:3,length:4,type:ModbusDataType.Bit);
}

@ -0,0 +1,63 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndexA0
{
/// <summary>
/// 标称电源电压
/// </summary>
public ModbusProperty<short> NominalMainsVoltage =new(30160,start:0,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 标称电源频率
/// </summary>
public ModbusProperty<short> NominalMainsFrequency =new(30160,start:1,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 标称电池电压
/// </summary>
public ModbusProperty<short> NominalCellVoltage =new(30160,start:2,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最大电源电压
/// </summary>
public ModbusProperty<short> MaximumMainsVoltage=new(30160,start:3,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最低电源电压
/// </summary>
public ModbusProperty<short> MinimumMainsVoltage =new(30160,start:4,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最大电源频率
/// </summary>
public ModbusProperty<short> MaximumMainsFrequency =new(30160,start:5,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最低电源频率
/// </summary>
public ModbusProperty<short> MinimumMainsFrequency =new(30160,start:6,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最高电源环境温度
/// </summary>
public ModbusProperty<short> MaximumMainsAmbientTemperature =new(30160,start:7,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 最低电源环境温度
/// </summary>
public ModbusProperty<short> MinimumMainsAmbientTemperature=new(30160,start:8,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 电池单元编号
/// </summary>
public ModbusProperty<short> BatteryCellNumber =new(30160,start:9,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 串联的电池单元数量
/// </summary>
public ModbusProperty<short> NumberBatteryCellsSeries =new(30160,start:10,length:4,type:ModbusDataType.Bit);
/// <summary>
/// Y型或Delta型输入变压器
/// </summary>
public ModbusProperty<short> InputTransformerTypeYDelta =new(30160,start:11,length:4,type:ModbusDataType.Bit);
/// <summary>
/// LCD显示器输出电压线或相
/// </summary>
public ModbusProperty<short> LCDDisplayOutputVoltageLinePhase =new(30160,start:12,length:4,type:ModbusDataType.Bit);
/// <summary>
/// 保留
/// </summary>
public ModbusProperty<short> Reserved=new(30160,start:13,length:4,type:ModbusDataType.Bit);
}

@ -0,0 +1,12 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.UpsAfrica.Msg;
public class UpsIndexC0
{
/// <summary>
/// 获取/设置波特率
/// </summary>
public ModbusProperty<short> GettingSettingBaudRate=new(30192,start:0,length:4,type:ModbusDataType.Bit);
}

@ -23,6 +23,7 @@ using Service.Padar.Client;
using Service.RealTime;
using Service.Sound.SoundClient;
using Service.Ups;
using Service.UpsAfrica.Client;
using SqlSugar;
using SqlSugar.IOC;
using AppInfo = HybirdFrameworkCore.Autofac.AppInfo;
@ -212,6 +213,11 @@ if (AppSettingsHelper.GetBool("ups", "enable"))
{
UpsMgr.UpsInit();
}
//ups
if (AppSettingsHelper.GetBool("upsAfrica", "enable"))
{
UpsAfricaMgr.UpsInit();
}
//new SoundClient().SoundConn();
@ -237,6 +243,6 @@ app.UseRequestLocalization(new RequestLocalizationOptions
SupportedCultures = supportedCultures,
SupportedUICultures = supportedCultures,
});
var dateTime = SysInfo.Now;
//var dateTime = SysInfo.Now;
app.Run();

Loading…
Cancel
Save