LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Method for Taking Subtractive Baseline

Hello All,

 

I have been scratching my head over this for about 2 days now.  Perhaps someone with more experience can help me solve the problem in an elegant way.

 

Algorithm:

 

1. Sample 12 Analog In Channels

2. For Each Channel:

         If "Baseline" Boolean = True: Subtract current Analog In reading from all future readings on that channel (Example: Read 1.2 V NOW, Read 4 Later: Subtract 1.2 V).

         Else: Do nothing.

 

That's the algorithm in a nutshell - I just can't figure out how to store/sample or keep around the baseline value in a way that Labview is comfortable with.

 

The "PRESSURE" values in the attached VI are the ones that need to be baselined, the temperature values are dealt with seperately.  Also, I only included 2 of the 12 measurements in this VI because any more than 2 is redundant.

 

 

0 Kudos
Message 1 of 2
(1,930 Views)

Store your baseline data in a shift register.  When the button is True, update the baseline value with the current reading.  Initialize the shift regsiter with zero.  That way you can always subtract the baseline.  Before pressing the button the first time the value subtracted will be zero.

 

For twelve channels you cna have a separate shift register for each channel or combine the baselines into a cluster or array and pass all of them in one shift register. If the number of channels will change, the array method is the most easily expanded.

 

Lynn

0 Kudos
Message 2 of 2
(1,925 Views)