LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RMS skewing signal

I am having trouble using the Average DC/RMS VI.  First, when I use the VI, I get a DC signal but no RMS.  Second, the raw data is interrupted with bands of no signal at all.  The data I am acquiring is voltage from a thermistor circuit.  An additional problem is that I am having trouble acquiring the voltage from the external excitation source(dc power supply) in the same IV that is collect the thermistor voltage data.  Any idea why this would happen?

 

Katie

0 Kudos
Message 1 of 13
(3,922 Views)

Katie,

 

It sounds as though you may have several problems.  Can you post the program you have developed so far along with some typical data?  Your description does not provide enough specifics to really do any troubleshooting.

 

What data acquisition system are you using?  What is the sample rate?  How many samples do you acquire in each iteration?  Do you get any errors and, if so, what are they?

 

What is the expected value of the RMS for your data?  When you say "no RMS," precisely what do you mean?  RMS value = 0?  RMS value is grayed out? Value is NaN?  An error?

 

Lynn 

0 Kudos
Message 2 of 13
(3,900 Views)

Hey Lynn,

 

I have posted my VI with the web publishing tool because I did not know how else to publish it online.  I don't see an attachment option here.  So here is the front panel of it...  Thermistor Data Collection

 

I got the RMS working.  But there are still bands in my signal.  It is being collected from pins 1 and 2 (AI 0 and AI 😎 of my NI DAQPad 6015.  I have a voltage dividing circuit which is taking the voltage measurement across the thermistor.  A DC Power Supply is feeding into the circuit and ideally I will have it fed into this IV so that I can measure and compensate so any imperfect voltage readings.  

 

I got the RMS working, but need that average to feed into an formula node.   The error says that it is the wire is connected to a polymorphic termina that cannot accept this datatype.  

 

So my question is how to convert the data into a readable average that can be fed into the formula node to produce a graph which displays temperature?

 

I know there is a VI which does the thermistor calculations.  I did not use this because I did not want to use a 2, 3, 4 wire configuration and I want to know what caculations are happening.

 

Thanks,

Katie

0 Kudos
Message 3 of 13
(3,884 Views)

Katie,

 

There is an "Add Attachments" link just below the "Submit Post" button.

 

I could not see your front panel.  It looked like the URL was pointing to a 172. ... address.  Was that file stored on your hard drive?

 

If the data is in a waveform datatype,  you can use the Get waveform components from the Waveform Palette.  If it is Dynamic Data type, use the From DDT function in the Express >> Signal Manipulation palette to convert to a DBL.

 

Lynn 

0 Kudos
Message 4 of 13
(3,878 Views)

Hey Lynn,

 

I have figured it out.  I used the collector VI which seemed to work.

 

I have a new question.  I am trying to take data from two physical channels in the same VI.  I am taking the resistance voltage return from the thermistor and want to also include the voltage from the excitation source.  When I created a separate VI to collect the voltage source data, it worked perfectly.  When I added that physical channel to the VI that is collecting the thermistor data it says that it has an incorrect buffer size or sampling rate.  I tried changing the sampling rate, which I would rather keep the same as the thermistor's rate, and it just gummed up the VI.

 

How do you collect data from two physical channels in the same VI?

 

Katie

0 Kudos
Message 5 of 13
(3,867 Views)

Katie,

 

You should be able to create a two-channel data acquisition task.  Details may depend on the device and the  DAQ driver.  Can you post what you have done so far?

 

Lynn 

0 Kudos
Message 6 of 13
(3,846 Views)
0 Kudos
Message 7 of 13
(3,834 Views)

Katie,

 

I don't have DAQmx (not supported on the Mac), but I think you need to specify the channels as "SC1Mod1/ai0:ai1" or something like that.  Look up the exact syntax in the help.

 

Then you get both channels at the same time.  That is what the "NChan NSamp" selector in the Analog input VIs is about.  Channel 0 will be your thermistor and Channel 1 the excitation (or however you wire it).  You can remove the lower set of DAQ VIs and the DAQ Assistant.  They are not needed and will cause problems when they also try to run.

 

The output of the DAQ Read VI is an  array of waveforms.  Index the array to get the two channels separated.

 

You have the sample Rate wired to both the  rate input on the timing VI and the Samples to read on the Read VI.  That means that the reads will take one second to accumulate the requested number of samples.  So  the Wait until Next ms Multiple function is not necessary.  Your loop times  most likely will be slightly longer than 1 second, but could possibly be up to 1.1 seconds.

 

Wire the error out from the DAQ Read to the error in of the Averaged DC-RMS VI and  its error out to the tunnel and the stop logic.  The Error handler outside the loop will report errors from any source that way.

 

Lynn 

0 Kudos
Message 8 of 13
(3,829 Views)

Thanks Lynn,

 

I eliminated the bottom set of IVs and included both pins into one physical channel.  As for indexing, I have read about the index array and index waveform array.  I am trying to use two index waveform arrays and wired a string to each channel name node with the respective physical channel name.  The output is two identical waveforms.  Would you recommend a index array over an index waveform array?

 

Katie 

0 Kudos
Message 9 of 13
(3,822 Views)

It's working now.  Thanks again for your help.

 

 

0 Kudos
Message 10 of 13
(3,821 Views)