保德站消防、电表协议对接

master
rszn 7 months ago
parent 9d29261660
commit 174242fc87

@ -27,19 +27,19 @@ namespace Module.EMeter.ModbusTcp
/// <summary>
/// 2号充电机电表
/// </summary>haiy
public static EMeterModbus527Tool EBC02 = new EMeterModbus527Tool("172.0.50.100", 405, 4, "蓄水池水泵");
public static EMeterModbus527Tool EBC02 = new EMeterModbus527Tool("172.0.50.100", 405, 5, "蓄水池水泵");
/// <summary>
/// 3号充电机电表
/// </summary>
public static EMeterModbus527Tool EBC03 = new EMeterModbus527Tool("172.0.50.100", 405, 5, "2号换电站11号充电机");
public static EMeterModbus527Tool EBC03 = new EMeterModbus527Tool("172.0.50.100", 405, 6, "2号换电站11号充电机");
/// </summary>
public static EMeterModbus527Tool EBC04 = new EMeterModbus527Tool("172.0.50.100", 405, 6, "2号换电站配电总柜");
public static EMeterModbus527Tool EBC04 = new EMeterModbus527Tool("172.0.50.100", 405, 7, "2号换电站配电总柜");
/// <summary>
/// 2号充电机电表
/// </summary>haiy
public static EMeterModbus527Tool EBC05 = new EMeterModbus527Tool("172.0.50.100", 405, 8, "换电站场地照明及监控");
public static EMeterModbus527Tool EBC05 = new EMeterModbus527Tool("172.0.50.100", 405, 9, "换电站场地照明及监控");
/// <summary>
/// 3号充电机电表
/// </summary>

@ -513,7 +513,7 @@ namespace Module.EMeter.ModbusTcp
var CT = _client.ByteTransform.TransInt16(operateResult.Content, 8);
//_total_active_power = _client.ByteTransform.TransUInt16(_client.Read("x=3;45", 150).Content, 4);
//_total_active_energy = _client.ByteTransform.TransSingle(_client.Read("x=3;45", 150).Content, 56) / 1000f;
var transInt16 = (new decimal(_client.ByteTransform.TransInt16(operateResult.Content, 126))*65536+_client.ByteTransform.TransInt16(operateResult.Content, 128)/ new decimal(1000f))*new decimal(PT) *new decimal(CT);
var transInt16 = (new decimal(_client.ByteTransform.TransUInt16(operateResult.Content, 126))*65536+_client.ByteTransform.TransUInt16(operateResult.Content, 128)/ new decimal(1000f))*new decimal(PT) *new decimal(CT);
_show_energy = (float)transInt16;
MEMeterParamResult paramRlt = new MEMeterParamResult()
{

@ -76,10 +76,10 @@ namespace Module.EMeter.ModbusTcp
CmnElecMeterBaseInfo.EBC01.Connect();
}
Thread.Sleep(200);
if (!CmnElecMeterBaseInfo.EBC02.F_NetConnected)
{
CmnElecMeterBaseInfo.EBC02.Connect();
}
// if (!CmnElecMeterBaseInfo.EBC02.F_NetConnected)
// {
// CmnElecMeterBaseInfo.EBC02.Connect();
// }
Thread.Sleep(200);
if (!CmnElecMeterBaseInfo.EBC03.F_NetConnected)
{

@ -498,7 +498,7 @@ namespace Module.FireCtrl.ModBusTcp
if (_net_connected)
{
#region 系统状态
OperateResult<byte[]> statusValue = _client.Read("x=1;0", 9);
OperateResult<byte[]> statusValue = _client.Read("x=1;0", 17);
_fire_status_value = new MFireStatusValue();
if (statusValue.IsSuccess)
{
@ -513,9 +513,9 @@ namespace Module.FireCtrl.ModBusTcp
_fire_status_value.F_StartManually = BitsConvertUtils.ByteToBitValue(results_16, 1, 1);
_fire_status_value.F_ManualEmergencyStop = BitsConvertUtils.ByteToBitValue(results_16, 1, 2);
_fire_status_value.F_AudibleVisualStatus = BitsConvertUtils.ByteToBitValue(results_16, 1, 6);
_fire_status_value.F_DeflatedState = BitsConvertUtils.ByteToBitValue(results_16, 1, 7);
_fire_status_value.F_AudibleVisualStatus = BitsConvertUtils.ByteToBitValue(results_16, 1, 7);
_fire_status_value.F_DeflatedState = BitsConvertUtils.ByteToBitValue(results_16, 2, 0);
//new FireValueToRedis().StoredFireStatusValue(_eqm_code, _fire_status_value);
}
#endregion

@ -50,8 +50,6 @@ namespace Module.FireCtrl.ModBusTcp
/// 放气勿入状态 1放气勿入状态 0默认状态
/// </summary>
public byte F_DeflatedState { get; set; }
}
}

@ -61,7 +61,7 @@ namespace Monitor.EqmMgr.WebApi.Controllers
}
/// <summary>
/// 消防灭火器状态
/// 消防灭火器状态
/// </summary>
/// <returns></returns>
[HttpPost]

@ -33,8 +33,8 @@ app.UseCors(policy =>
.AllowCredentials());
new ElecMeterEqmManger().ElecMeterNetConnectThread();
//Thread.Sleep(100);
//new FireEqmManager().FireNetConnectThread();
Thread.Sleep(100);
new FireEqmManager().FireNetConnectThread();
//Thread.Sleep(100);
//new UpsEqmManger().UpsNetConnectThread();
Thread.Sleep(100);

Loading…
Cancel
Save