Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Proper sampling setup USB 9211A?

Hello, first time poster here. No formal Labview training, just trying to figure it out as I go. (Also new to taking temperature readings on anything more sophisticated than a hand-held pyrometer)
 
I'm using a USB9211A with NI-DAQmx for temperature measurement with four type K thermocouples, each with 50 foot long type K extensions.
I don't need hyper-accurate readings, +/- 1/2  degree C would be just fine.
I have a VI written in Labview 8.2 with a timed loop to log the data. The interval of the loop is input by the user (1 second, 1 minute, 1 hour, or whatever). Also in the loop is a write to spreadsheet that logs the time and five measurements (one of the channels is used twice, so I can display/log in °C and °F). When I set up my DAQ assistant, I used "one sample on demand", and I tested my system with an ice bath and found all four tc's to be less than 1/2 degree C off. Good enough for me.
I only want to get a measurement at the end of each interval, not measurements during. In other words, I just want to log the five readings once every (x)minutes, where x is the interval.
 
My question is this:
What is the proper sampling method to get a "good" reliable set of data that has minimal effects from noise or other influences? Should I stick with the one sample on demand, or try to set it up for multiple samples in the last second of the interval, and average them? I'm worried I'm not getting reliable data if, for example, the interval is 5 minutes, and I'm only taking one microsecond sample at the end of the five minutes.
 
 
 
Thanks in advance for any replies,
 
Ken
0 Kudos
Message 1 of 4
(3,416 Views)

Hi Ken,

I would recommend taking the average of a number of samples at the end of your 5 minute periods.  Since thermocouples are low voltage measurements, it would be better to take an average to ensure that any noise is uniform.  Since you already get samples within an acceptable range, you know you already don't have much noise and averaging would help.  You never know, but you don't want that one sample to be the one that is way off. Taking say 10 samples at 1kHz during the last second of the 5 minute period would give you a pretty good single point average.

Alex A.
Applications Engineer
0 Kudos
Message 2 of 4
(3,394 Views)
Hello Ken,

    I'm also using a 9211A with DAQmx for temperature measurements... save that I only use one K type thermocouple. My question from me to you is... How do I set up the 9211A so it only reads and writes data every fifteen minutes to a spreadsheet? I have a DAQmx set to Analog Wfm 1 Chan NSamp and set some parameters within the Polymorphic vi selector by selecting/checking the following:


* Analog
* Single Channel
* Multiple Samples
*Waveform

When it writes to the "Write to spreadsheet file.vi" it only records one reading (The last measurement when the VI stops)...... How can I write data every fifteen minutes? In other words, after a time interval of fifteen minutes I want the data from each interval to be recorded on the spreadsheet. Do you have any Ideas? Thank you so very much in advance for your time and consideration regarding this matter.

Best regards,

Ludwig.

0 Kudos
Message 3 of 4
(3,233 Views)

Hi Ludwig,

I’m assuming you are doing a continuous acquisition and have a DAQmx read and write to spreadsheet file inside a while loop. A possible cause of it only having the last read in the spreadsheet file is if you have not wired a true constant to the “append to file?” input on the write to spreadsheet file vi. The default value for this input is false which means each time you call write to spreadsheet it overwrites any existing files of the same name.  Also since you are reading multiple samples you may want to turn on the transpose input also.  This will make it so that each sample is on its own row in the spreadsheet. You can turn this on by wiring a true constant to the “transpose?” input of the write to spreadsheet file vi. If these suggestions don’t help can you post a screenshot of your block diagram? This will let me get a better understanding of your program. Let me know if you have any questions.

Thanks,

Nathan
NI Chief Hardware Engineer
0 Kudos
Message 4 of 4
(3,207 Views)