diff --git a/Module.EMeter.ModbusTcp.Tool/Common/CmnElecMeterBaseInfo.cs b/Module.EMeter.ModbusTcp.Tool/Common/CmnElecMeterBaseInfo.cs index ddbca88..b89ecf6 100644 --- a/Module.EMeter.ModbusTcp.Tool/Common/CmnElecMeterBaseInfo.cs +++ b/Module.EMeter.ModbusTcp.Tool/Common/CmnElecMeterBaseInfo.cs @@ -27,19 +27,19 @@ namespace Module.EMeter.ModbusTcp /// /// 2号充电机电表 /// 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, "蓄水池水泵"); /// /// 3号充电机电表 /// - 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号充电机"); /// - 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号换电站配电总柜"); /// /// 2号充电机电表 /// 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, "换电站场地照明及监控"); /// /// 3号充电机电表 /// diff --git a/Module.EMeter.ModbusTcp.Tool/Manager/EMeterModbus527Tool.cs b/Module.EMeter.ModbusTcp.Tool/Manager/EMeterModbus527Tool.cs index b7385ab..fab6a4d 100644 --- a/Module.EMeter.ModbusTcp.Tool/Manager/EMeterModbus527Tool.cs +++ b/Module.EMeter.ModbusTcp.Tool/Manager/EMeterModbus527Tool.cs @@ -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() { diff --git a/Module.EMeter.ModbusTcp.Tool/Manager/ElecMeterEqmManger.cs b/Module.EMeter.ModbusTcp.Tool/Manager/ElecMeterEqmManger.cs index cd1e860..3399aa3 100644 --- a/Module.EMeter.ModbusTcp.Tool/Manager/ElecMeterEqmManger.cs +++ b/Module.EMeter.ModbusTcp.Tool/Manager/ElecMeterEqmManger.cs @@ -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) { diff --git a/Module.FireControl.ModBusTcp/Manager/FireModbusTool.cs b/Module.FireControl.ModBusTcp/Manager/FireModbusTool.cs index 0c134d3..2c8e2e3 100644 --- a/Module.FireControl.ModBusTcp/Manager/FireModbusTool.cs +++ b/Module.FireControl.ModBusTcp/Manager/FireModbusTool.cs @@ -498,7 +498,7 @@ namespace Module.FireCtrl.ModBusTcp if (_net_connected) { #region 系统状态 - OperateResult statusValue = _client.Read("x=1;0", 9); + OperateResult 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 diff --git a/Module.FireControl.ModBusTcp/Models/MFireStatusValue.cs b/Module.FireControl.ModBusTcp/Models/MFireStatusValue.cs index 4cfc5fa..67f3c82 100644 --- a/Module.FireControl.ModBusTcp/Models/MFireStatusValue.cs +++ b/Module.FireControl.ModBusTcp/Models/MFireStatusValue.cs @@ -50,8 +50,6 @@ namespace Module.FireCtrl.ModBusTcp /// 放气勿入状态 1:放气勿入状态 0:默认状态 /// public byte F_DeflatedState { get; set; } - - - + } } \ No newline at end of file diff --git a/Monitor.EqmMgr.WebApi/Controllers/FireCtrlParamController.cs b/Monitor.EqmMgr.WebApi/Controllers/FireCtrlParamController.cs index 613a29b..9196619 100644 --- a/Monitor.EqmMgr.WebApi/Controllers/FireCtrlParamController.cs +++ b/Monitor.EqmMgr.WebApi/Controllers/FireCtrlParamController.cs @@ -61,7 +61,7 @@ namespace Monitor.EqmMgr.WebApi.Controllers } /// - /// 消防灭火器状态 + /// 消防灭火器状态 /// /// [HttpPost] diff --git a/Monitor.EqmMgr.WebApi/Program.cs b/Monitor.EqmMgr.WebApi/Program.cs index 464ed51..9a9db45 100644 --- a/Monitor.EqmMgr.WebApi/Program.cs +++ b/Monitor.EqmMgr.WebApi/Program.cs @@ -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);