|
|
@@ -1912,12 +1912,12 @@ int g_switch_get_t_ac_all_out_info(void* manger,int saddr,int nNumb,PowerInfo* _
|
|
|
}
|
|
|
else {
|
|
|
val = (data_temp[15 + Index] << 16) | data_temp[14 + Index];
|
|
|
- _power[i].factor = val / 1023.0;
|
|
|
- if(_power[i].factor>=0.0f && _power[i].factor<0.1f) {
|
|
|
- _power[i].power = 0.0f;
|
|
|
- _power[i].current = 0.0f;
|
|
|
- }
|
|
|
- else {
|
|
|
+ _power[i].factor = val / 1000.0;
|
|
|
+ // if(_power[i].factor>=0.0f && _power[i].factor<0.1f) {
|
|
|
+ // _power[i].power = 0.0f;
|
|
|
+ // _power[i].current = 0.0f;
|
|
|
+ // }
|
|
|
+ // else {
|
|
|
val = (data_temp[3 + Index] << 16) | data_temp[2 + Index];
|
|
|
_power[i].current = val / 1000.0f;
|
|
|
|
|
|
@@ -1928,7 +1928,7 @@ int g_switch_get_t_ac_all_out_info(void* manger,int saddr,int nNumb,PowerInfo* _
|
|
|
//val = (data_temp[7+Index] << 16) + data_temp[6+Index];
|
|
|
// 视在功率
|
|
|
//val = (data_temp[9+Index] << 16) + data_temp[8+Index];
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
val = (data_temp[11 + Index] << 16) | data_temp[10+ Index];
|
|
|
@@ -1965,7 +1965,8 @@ int g_switch_get_t_ac_all_out_info(void* manger,int saddr,int nNumb,PowerInfo* _
|
|
|
}
|
|
|
|
|
|
//获取零线状态
|
|
|
- /*offset = _SWITCH_T_AC_NF_STATUS;
|
|
|
+/*
|
|
|
+ offset = _SWITCH_T_AC_NF_STATUS;
|
|
|
memset(data_temp,0,sizeof(data_temp));
|
|
|
ret = g_modbus_read_x_reg(manger,saddr,offset, 2,data_temp);
|
|
|
if (ret < 0)
|
|
|
@@ -1976,7 +1977,8 @@ int g_switch_get_t_ac_all_out_info(void* manger,int saddr,int nNumb,PowerInfo* _
|
|
|
for (size_t i = 0; i < nNumb; i++)
|
|
|
{
|
|
|
_power[i].NF_status = data_temp[18] & BIT_00;
|
|
|
- }*/
|
|
|
+ }
|
|
|
+*/
|
|
|
//获取故障状态
|
|
|
offset = _SWITCH_T_AC_OUT_ERROR;
|
|
|
memset(data_temp,0,sizeof(data_temp));
|