LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Project Help Data Logging using USB 6008 and AD595 with K Type TC

Hi there,

 

I'm currently using Labview as part of a module for a college course i am doing and I have a couple of projects to complete as assignments.

 

The 1st is to use a K-type thermocouple and USB-6008 DAQ along with an AD595 to record ambient temp and display and log the data of the signal output.

 

I have most of the VI completed (i think) but I need help if possible with the data logging, all the college contacts are on holidays so I am a bit stuck for help. Attached is the VI so if someone could review and tell me if there any  major errors in my programme/chart/graphs etc. It runs fine but if I'm sure it could be tidied up a little better.

 

The data logging issue has got the better of me and I cant seem to get a system that works. I would like to recored the temp every 5 or 10 seconds for each day and then do that for a rolling 7 days if possible. 

 

The criteria for the programme are as follows:

  • Temp range is 0-50
  • Best resolution available from equipment 
  • Current numerical data
  • Alarm band <20 >30C
  • Graphical output
  • File storage.

Anyway thanks for any help or advice that you can give me. Projects are due the 10th Aug so under a small bit of pressure now to get them done.

 

G2S

0 Kudos
Message 1 of 6
(3,488 Views)

Hi G2S,

 

Thanks for posting.

I've taken a look at your project and it apeears that you have completed all the tasks necessary with the exception of the datalogging.

I have refactored your code to tidy it up and have also implemented some datalogging for you using the "Write to Measurement File" Express VI. You may wish to implement a producer-consumer type architecture for the datalogging however so as not to cause a buffer overflow on your device (if we do not extract the data fast enough the buffer will overflow, the datalogging can slow down our loop speed and cause this). Buffer overflow will not be an issue with your code as you are only acquiring data every 5 seconds so we can keep everything in the same loop however for other applications it would be worth using this design pattern. More information on this can be found at the following link.

Application Design Patterns: Producer/Consumer - https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

One main thing that will help you when programming in LabVIEW is to keep your inputs on the left and your outputs on the right - your data should flow from left to right as it is much easier to read this way. To keep your Block Diagram free from clutter I unchecked the "View as Icon" box in the shortcut menu for the terminals (see Picture1 attached).

 

Paul

Download All
0 Kudos
Message 2 of 6
(3,437 Views)
Hi Paul, I really appreciate the reply but unfortunately I cant seem to open the VI as it appears to be on a newer version of Labview than I have. The error is attached. I also have another issue with getting a Probability Density Function chart or graph to display any output of the raw unfiltered signal. The assignment also calls for a PSD and PDF of the raw signal so that should determine the Filter type and Sample rate. I am struggling to find how the 4 of these interact and how to properly configure them to get the cleanest possible signal. I imagine I have made a mistake in amplifying the signal before the filter as any noise will be amplified also ? ? ? Really appreciate the help !!! G2S
0 Kudos
Message 3 of 6
(3,427 Views)

Hi G2S,

 

Sorry I didn't get back to you earlier, I received your PM this morning. Please find a version of your code compiled for LabVIEW 2010 and also an image of the code.

There is a Probability density Function that comes as part of the Advanced Signal Processing Toolkit - https://www.ni.com/en/shop/labview/select-edition.html. In respect to amplifying the signal before the filter have you tried using one of the filter functions to remove the noise (i.e. Butterworth Filter)?

 

Paul

Download All
0 Kudos
Message 4 of 6
(3,370 Views)

Hi Paul,

 

Thanks again for the response. I am working through the solution you provided at the moment and looking at where I was going wrong.

 

I have a low pass Butterworth filter after the signal is amplified but i wasn't sure if it made more sense to filter the signal first then amplify the filtereed signal or amplify and then filter.

 

What type of chart should I use for the PDF function. I have the advanced toolkit installed it seems and I have connected the signal to the PDF icon inout but any chart I connect to the output gives the error that i have connected 2 items that are not complatible and i just get broken wires. ? ? ?

 

G2S

0 Kudos
Message 5 of 6
(3,348 Views)

Hi G2S,

 

It really won't matter if you filter before or after amplification of your signal as the Butterworth filter filters noise out by frequency. It will filter out very high frequency waveforms (noise) and leave the lower frequencies in (the data you are concerned with).

The PDF function outputs data in XY graph format, you can create one by right-clicking on the output terminal of the PDF VI and selecting "Create>>Indicator". Please see the example attached where I have done this. I've also wired through the errors between functions so that the loop will stop if an error is encountered and then report the error to the user.

 

Paul

0 Kudos
Message 6 of 6
(3,327 Views)