01-31-2013 01:18 PM
I am incorporating Labview 2012 and the Multifunction DAQ (USB 6210) to program a few sensors.
I'm just not sure how to change the scanning interval, because I would ultimately like to scan every second, average those points and then record the average to send to a spreadsheet file. I have gotten this far after trying quite a few solutions.
I'm not very experienced with programming and am making the switch from Campbell Sci to Labview, so my terminology might be what's slipping me up.
Thank you for your help!
01-31-2013 01:30 PM - edited 01-31-2013 01:32 PM
Since you did not include your code and everything is hidden in the DAQ Assistant, no one has any idea what you have done so far. There is some basic math involved. When you configure the DAQ Assistant, you set the acquisition mode, number of samples, and the rate. If you set the rate to N Samples/sec and number of samples to N, your acquisition will take 1 second. If you set the number of samples to N/2, the acquisition will take .5 seconds. If your acquisition mode is continuous, you won't have any gaps. With N Samples, you get the requested number of samples, the acquisition stops and then restarts when the loop iterates again.
Your saving to file is all wrong. You pass a scalar out of the loop. This is just the very last value you have acquired. You would need to place the file write inside the loop or right click on the exit tunnel and select Enable Indexing to create an array of all values. Both methods have their drawbacks and you could have problems with either one. A better, more sophisticated method is to use a producer/consumer architecture as shown by the templates when you do a File>New...
Edit: If you are going to create a png, use the Edit>Create VI Snippet From Selection. Look up what a snippet is in the LabVIEW Help.
01-31-2013 05:42 PM
I set it to continuously, so I'll make the switch to N Samples/Sec. If I want to average 15 samples every fifteen seconds, and then record that averaged value. Would I be able to accomplish that using the producer/consumer you had mentioned.
I also tried earlier using the Write to Measurement file VI inside the while loop (the photo shown was a few steps later), but I was unable to connect the adjusted output value to the VI. I also tried forming it in an array because I intend to have up to ten sensors gathering data at once for environment data gathering. Should I just botch what I have and start new using the producer/consumer template?
Thank you for your input.
01-31-2013 06:13 PM
02-01-2013 08:51 AM
I understand. I'm getting out readings like 230 C but this is probably becaue I'm using a run of the mill T-Type thermocouple that I just soldered without the thermocouple extension.
Thank you for all of your help!