projects
/
yn
/
weldingcontroller.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7f09d3
)
修改脉冲焊接电流为计算有效值
author
kyz
<kongyuzhong@google.com>
Fri, 26 Jul 2024 08:52:43 +0000
(16:52 +0800)
committer
kyz
<kongyuzhong@google.com>
Mon, 29 Jul 2024 01:13:35 +0000
(09:13 +0800)
user/user_adc.c
patch
|
blob
|
history
diff --git
a/user/user_adc.c
b/user/user_adc.c
index af6d3c4e471645c314d092278318f124a96f2c28..e8284d0d58a373bd55afc344f467a4a7945d2ee6 100644
(file)
--- a/
user/user_adc.c
+++ b/
user/user_adc.c
@@
-122,8
+122,15
@@
float calc_welding_current( float *values, uint32_t len )
if( l_nr )
curr_l = sqrt( s_l/l_nr );
if( l_nr && h_nr && curr_h > curr_l + 20 ){
+#if 0
//脉冲, 峰值比基值大20A,判断为点焊, 取峰值输出
welding_curr = curr_h;
+#else
+ //脉冲, 峰值比基值大20A,判断为脉冲
+ //2024/7/26, 客户现场测试反馈,显示电流和焊机不一致,焊机显示210,设备显示320A.
+ //所以改成计算有效值
+ welding_curr = sqrt( (s_l+s_h)/len );
+#endif
}else{
//直流,取平均值输出,或有效值输出
//welding_curr = sqrt( (s_l+s_h)/len );