Compare commits

...

2 Commits

Author SHA1 Message Date
REASEARCHER\18383 cfb888ee99 220Vheat80Gear
增加水平回零角度显示异常处理
2025-09-03 11:41:18 +08:00
REASEARCHER\18383 b9c7ebb4fc 220Vheat80Gear
工作电流阈值7.0(原5.5)
过流:g_ptz.electric_current > 4.0改为5.5
 电流恢复正常:g_ptz.electric_current < 2.0 ) 改为3.5
新增  #define PHASE_CURRENT_VERT      20.0
2025-09-03 11:39:43 +08:00
4 changed files with 23 additions and 14 deletions

View File

@ -2882,17 +2882,25 @@ static char ptz_hori_get_angle_a()
// tem4 = tem4 + 360.0; // tem4 = tem4 + 360.0;
// } // }
} }
if(tem4 == 360.0)///////˝âžöźČĎÔĘž360ÓÖĎÔĘž˝ÇśČ0ľÄÎĘĚâ //避免出现异常
for(uint8_t i = 0; i < 3; i++)
{ {
tem4 = 0; if(tem4 == 360.0)///////解决既显示360又显示角度0的问题
} {
if(tem4 < 0) tem4 = 0;
{ }
tem4 = tem4 + 360.0; else if( tem4 < 0 )
} {
if(tem4>360.0) tem4 = tem4 + 360.0;
{ }
tem4 = tem4 - 360.0; else if( tem4 > 360.0 )
{
tem4 = tem4 - 360.0;
}
if (tem4 >=0 && tem4 <= 360.0)
{
break;
}
} }
g_ptz.hori_angle_actual = tem4; g_ptz.hori_angle_actual = tem4;

View File

@ -485,7 +485,7 @@ static char ptz_heat_data_collect_task()
{ {
ptz_heat_collect_adc1_task(); ptz_heat_collect_adc1_task();
if ( g_ptz.electric_current > 4.0 ) //过流 if ( g_ptz.electric_current > 5.5 ) //过流
{ {
overCurrTime++; overCurrTime++;
} }
@ -503,7 +503,7 @@ static char ptz_heat_data_collect_task()
} }
else else
{ {
if ( g_ptz.electric_current < 2.0 ) //电流恢复正常 if ( g_ptz.electric_current < 3.5 ) //电流恢复正常
{ {
currTime++; currTime++;
} }

View File

@ -36,7 +36,7 @@ static char ptz_temp_volt_current_fault_detect_task()
hori_fault = 0; hori_fault = 0;
} }
if(V_ADC_Collect.Phase_curr_V >= PHASE_CURRENT ||V_ADC_Collect.Phase_curr_U >= PHASE_CURRENT ||V_ADC_Collect.Phase_curr_W >= PHASE_CURRENT ) if(V_ADC_Collect.Phase_curr_V >= PHASE_CURRENT_VERT ||V_ADC_Collect.Phase_curr_U >= PHASE_CURRENT_VERT ||V_ADC_Collect.Phase_curr_W >= PHASE_CURRENT_VERT )
{//堵转检测,防止电机堵转烧坏,结合电机卡死故障监测,与云台工作电流监测。 {//堵转检测,防止电机堵转烧坏,结合电机卡死故障监测,与云台工作电流监测。
if ( g_ptz.fault_detect.Phase_curr_V != FAULT ) if ( g_ptz.fault_detect.Phase_curr_V != FAULT )
{ {

View File

@ -107,7 +107,7 @@
#define PTZ_VOLT_DETECT_MIN 18.0//30.0 #define PTZ_VOLT_DETECT_MIN 18.0//30.0
//工作电流阈值 //工作电流阈值
#define PTZ_CURRENT_DETECT 5.5//5.0 #define PTZ_CURRENT_DETECT 7.0//5.0
//霍尔故障阈值 //霍尔故障阈值
#define PTZ_HALL_DETECT 30//30 #define PTZ_HALL_DETECT 30//30
@ -115,6 +115,7 @@
//相电流运行最大值 //相电流运行最大值
// #define PHASE_CURRENT 5.0 // #define PHASE_CURRENT 5.0
#define PHASE_CURRENT 10.0 #define PHASE_CURRENT 10.0
#define PHASE_CURRENT_VERT 20.0
#endif #endif
//L6235D涡轮蜗杆重型云台 //L6235D涡轮蜗杆重型云台