Example Code

Set to 0dB

Code and Documents

Attachment

Often times in LabVIEW, we might want to set the output of a signal to 0 dB and display this signal on a LabVIEW graph, this is usually achieved by setting the graph scales and intercept.

This works when you know before hand what kinda of signal you are looking at, however if you do not know what signal you will be getting in you might want a better way to achieve this.

The LabVIEW VI attached below will set the reference of the input signal to 0 dB by finding the maximum value in the signal and substracting this from all the value of all the other signal inputs.

(VI courtesy of LabVIEW for Digital Signal Processing, you will need LabVIEW 2009 to open VI)

Set0dB front panel.png

Christian A
National Instruments
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors