Programmatically Add or Remove an Offset on My Input Signal Using LabVIEW

Updated Oct 22, 2018

Reported In

Hardware

  • CompactDAQ Chassis
  • myDAQ Student Kit

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I acquired a signal from one of my devices and now I want to modify it adding or removing an offset. If I add an offset to my signal I sum the offset magnitude to all the acquired values. Whereas if I remove the offset from my signal I subtract this magnitude from all the values.

Solution

To do this processing we only need to add or subtract the defined offset on the Input signal. This can be done using simple arithmetic functions however, the Waveform Scale and Offset.vi can be used to faciliate the process. This Waveform and Scale Offset belongs to the Analog Waveform palette . This is a simple implementation of this function adding an offset:

Block Diagram


Front Panel


If you want to subtract the offset, you can use a negative value as the offset input on the Waveform Scale and Offset function.

Additional Information

If the signal we are obtaining is not what we expect and we want to fix it using an offset, we should first analyze the nature of the measurement. In other words, before we perform any programmatic post-processing it is always better to check the possible causes of the unexpected measurement. This issue can lie under the category of noise or ghosting .

WAS THIS ARTICLE HELPFUL?

Not Helpful