07-31-2013 03:51 PM
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:
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
08-06-2013
08:33 AM
- last edited on
03-27-2025
10:41 AM
by
Content Cleaner
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
08-06-2013 02:59 PM
08-20-2013
03:19 AM
- last edited on
03-27-2025
10:42 AM
by
Content Cleaner
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
08-21-2013 06:32 AM
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
08-22-2013 06:11 AM
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