取消
显示结果 
搜索替代 
您的意思是: 

Analog gauge with damping

已解决!
转到解答

Whenever I place a guage to display analog data, i always feel it should behave like a car speedometer. Smooth with no jerks ... most times the user is interested the level of a parameter and it makes no sense if the needle flutters reacting to all data variations.

 

I have tried a concept with shift registers as below and it seems to work - but the downside is the number of shift registers cannot be altered by the end user as its hard coded.  Ideally i would like to have a control called "Damping Factor " which the user can adjust depending on the raw data. Like for instance there is little to gain by damping a Temperature reading which anyway does not change fast.  Here is the Sub.VI that does it  :

 

DampingIdea.png

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
下载全部
0 项奖励
1 条消息(共 7 条)
4,413 次查看
解答
已被主题作者 MogaRaghu 接受

damping.png

 

edit: and I would not call it "damped" value, but "moving average" or "rolling average", as it is...

2 条消息(共 7 条)
4,383 次查看

Excellent Blokk !!

The exact solution that I was looking for .. initial check outs are fine and I have full control over the behaviour.

I am a bit not clear about the Initialize input though. When I close the main VI where I will be using this sub, the data always comes to zero. So I am not if I should wire it to a control at all.

 

( The location of the Mean Point By Point is inside Signal Processing and I missed it looking inside Mathematics !!)

 

Thanks.

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 项奖励
3 条消息(共 7 条)
4,368 次查看

... and a "moving average" can be shown to be the equivalent of a low-pass filter (a bit of Fourier math is involved).

 

Bob Schor

0 项奖励
4 条消息(共 7 条)
4,365 次查看

@MogaRaghu wrote:

Excellent Blokk !!

The exact solution that I was looking for .. initial check outs are fine and I have full control over the behaviour.

I am a bit not clear about the Initialize input though. When I close the main VI where I will be using this sub, the data always comes to zero. So I am not if I should wire it to a control at all.

 

( The location of the Mean Point By Point is inside Signal Processing and I missed it looking inside Mathematics !!)

 

Thanks.


If you want to empty the buffer of the internal moving average, you can set the Initialize input to True value for once. Of course, after that you need to use it again with False. Naturally, if you keep this input True, no value will be produced at the output (always emptying the buffer).

0 项奖励
5 条消息(共 7 条)
4,357 次查看

@Bob_Schor wrote:

... and a "moving average" can be shown to be the equivalent of a low-pass filter (a bit of Fourier math is involved).

 

Bob Schor


Fourier math chapter left in choice in third year control technique paper 眨眼表情

Incidentally when I am using this to smoothen out about six analogue gauges on the same screen I guess I need to set the Execution property of the sub VI to "Preallocated clone re-entrant execution"  ?

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 项奖励
6 条消息(共 7 条)
4,334 次查看

@MogaRaghu wrote:

@Bob_Schor wrote:

... and a "moving average" can be shown to be the equivalent of a low-pass filter (a bit of Fourier math is involved).

 

Bob Schor


Fourier math chapter left in choice in third year control technique paper 眨眼表情

Incidentally when I am using this to smoothen out about six analogue gauges on the same screen I guess I need to set the Execution property of the sub VI to "Preallocated clone re-entrant execution"  ?


If you mean the subVI which contains this Point by point Mean calculation, yes (never change the code or execution mode of a built-in LV vi). So if you have your subVI 6 times present in the block diagram, you can set its mode to re-entrant as you mentioned, and in this way 6 instances of the subVI will be present in the memory, holding the 6 "Mean Point by Point.vi" separated.

0 项奖励
7 条消息(共 7 条)
4,327 次查看