|
|
@ -439,6 +439,9 @@ namespace Module.UpsEqm.ModBusTcp
|
|
|
|
_ups_param_value.F_UpsID = _client.ByteTransform.TransUInt16(results, 30);
|
|
|
|
_ups_param_value.F_UpsID = _client.ByteTransform.TransUInt16(results, 30);
|
|
|
|
_ups_param_value.F_ProtocolNumber = _client.ByteTransform.TransUInt16(results, 32);
|
|
|
|
_ups_param_value.F_ProtocolNumber = _client.ByteTransform.TransUInt16(results, 32);
|
|
|
|
_ups_param_value.F_UpsVersion = _client.ByteTransform.TransUInt16(results, 34);
|
|
|
|
_ups_param_value.F_UpsVersion = _client.ByteTransform.TransUInt16(results, 34);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.upsType = _ups_param_value.F_UpsName;
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.upsVersion = _ups_param_value.F_UpsVersion;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//状态信息
|
|
|
|
//状态信息
|
|
|
@ -459,6 +462,47 @@ namespace Module.UpsEqm.ModBusTcp
|
|
|
|
_ups_param_value.F_UpsSystemModal = state_results[2];
|
|
|
|
_ups_param_value.F_UpsSystemModal = state_results[2];
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//前端页面信息展示
|
|
|
|
|
|
|
|
OperateResult<byte[]> upsStateInfoResult = _client.Read("x=3;96", 60);
|
|
|
|
|
|
|
|
if (upsStateInfoResult.IsSuccess)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
byte[] config_results = upsStateInfoResult.Content;
|
|
|
|
|
|
|
|
//96
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.inputVolt = _client.ByteTransform.TransUInt16(config_results, 0);
|
|
|
|
|
|
|
|
//105
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.outputVolt = _client.ByteTransform.TransUInt16(config_results, 18);
|
|
|
|
|
|
|
|
//122
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.outPutLoadPct = _client.ByteTransform.TransUInt16(config_results, 52);
|
|
|
|
|
|
|
|
//103
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.inputFreq = _client.ByteTransform.TransUInt16(config_results, 14);
|
|
|
|
|
|
|
|
//124
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.batteryVolt = _client.ByteTransform.TransUInt16(config_results, 56);
|
|
|
|
|
|
|
|
//125
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.temp = _client.ByteTransform.TransUInt16(config_results, 58);
|
|
|
|
|
|
|
|
//111
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.tatedCurrent = _client.ByteTransform.TransUInt16(config_results, 30);
|
|
|
|
|
|
|
|
//123
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.batteryTotalVolt = _client.ByteTransform.TransUInt16(config_results, 54);
|
|
|
|
|
|
|
|
//134
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.frequency = _client.ByteTransform.TransUInt16(config_results, 76);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//前端页面信息展示
|
|
|
|
|
|
|
|
OperateResult<byte[]> upsInfoResult = _client.Read("x=3;30", 30);
|
|
|
|
|
|
|
|
if (upsInfoResult.IsSuccess)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
byte[] state_results = upsInfoResult.Content;
|
|
|
|
|
|
|
|
//BitsConvertUtils
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.mainsPowerFail = BitsConvertUtils.GetBitValue(state_results[41], 1);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.lowBatteryVolt = BitsConvertUtils.GetBitValue(state_results[41], 4);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.bypassVoltageStableModel = BitsConvertUtils.GetBitValue(state_results[1], 5);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.upsFault = BitsConvertUtils.GetBitValue(state_results[35], 4);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.systemTesting = BitsConvertUtils.GetBitValue(state_results[1], 9);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.remoteSystemShutdown = BitsConvertUtils.GetBitValue(state_results[1], 1);
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.alarmSounOn = BitsConvertUtils.GetBitValue(state_results[1], 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//配置数据
|
|
|
|
//配置数据
|
|
|
|
OperateResult<byte[]> configResult = _client.Read("x=3;160", 16);
|
|
|
|
OperateResult<byte[]> configResult = _client.Read("x=3;160", 16);
|
|
|
@ -477,6 +521,8 @@ namespace Module.UpsEqm.ModBusTcp
|
|
|
|
_ups_param_value.F_BatCellNumber = _client.ByteTransform.TransUInt16(config_results, 18);
|
|
|
|
_ups_param_value.F_BatCellNumber = _client.ByteTransform.TransUInt16(config_results, 18);
|
|
|
|
_ups_param_value.F_BatCellSeries = _client.ByteTransform.TransUInt16(config_results, 20);
|
|
|
|
_ups_param_value.F_BatCellSeries = _client.ByteTransform.TransUInt16(config_results, 20);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CmnUpsBaseInfo.upsPageShowInfo.ratedVolt = _ups_param_value.F_MainVoltage;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//故障信息
|
|
|
|
//故障信息
|
|
|
|