11-03-2010 10:37 AM
Hello, I am new to Labview and am running into what may be very easily solved problems, although I'm not sure.
I have a thermocouple attached to the NI 9211 thermocouple input which is plugged into my computer via USB. I know that my computer recognizes the thermocouple because when I open up Measurments and Automation and open up the test panel, it shows a signal. This signal drops when I warm the tip of the TC up and rises when I cool it down. I am therefore certain that it is not a hardware issue and that the software recognizes the TC.
However, when I try to make a simple data aquisition progam and graph in Labview, it does not work. I tried to aquire the signal as both voltage or temperature and neither works. I simply have the DAQ Assistant block connected to a graph indicator. When I try to run it, it waits a few seconds before telling me that it has not aquired anything and gives me an error.
I have attached a screen shot of both the settings of my DAQ Assistant block and the error message. Any help would be very much appreciated.
Thanks!
11-03-2010 10:48 AM
I don't use the DAQ Assistant but I suspect your timing settings should be:
Acq Mode: Continuous
Samples to Read: 1
Rate: 1
That'll give you a 1 Sample/Sec until you stop.
11-03-2010 12:59 PM
Hi Depthcharge623,
Acquiring 600 samples at 3 S/s takes 200 seconds, and the DAQ Asisstant in "N Samples" mode reads all N samples. The default timeout for the DAQ Assistant is 10 seconds, which is far too short. You can increase the timeout by clicking on the "Advanced Timing" tab and changing the value of the "Timeout (s)" control.
Brad
11-03-2010 02:10 PM
OK, that makes sense, I didn't realize it worked like that. I want to do more of what the previous comment says by collecting data continuously. His advice worked, as I have a numeric indicator showing the changing values and I also have a table that the values are outputed to. Only problem is the graph indicator displays nothing when I run. Any idea why this might be?
Also, I'm ultimately going to want write 3 things to a file. The time at which each measurment was taken (relative to the start), the distance that the thermocouple has traveled (it is on a conveyor belt with a constant speed. I plan to enter the speed into the program at the beginning) and the temperature at that time and distance. How can I do this?
11-03-2010 02:38 PM - edited 11-03-2010 02:42 PM
@Depthcharge623 wrote:
OK, that makes sense, I didn't realize it worked like that. I want to do more of what the previous comment says by collecting data continuously. His advice worked, as I have a numeric indicator showing the changing values and I also have a table that the values are outputed to. Only problem is the graph indicator displays nothing when I run. Any idea why this might be?
--- We would have to see the actual code for that. A screenshot of the Assistant is not sufficient unless you open its front panel to expose the underlying code first.
Also, I'm ultimately going to want write 3 things to a file. The time at which each measurment was taken (relative to the start), the distance that the thermocouple has traveled (it is on a conveyor belt with a constant speed. I plan to enter the speed into the program at the beginning) and the temperature at that time and distance. How can I do this?
This is easy with the write to file VIs (file palette). Try some things first and then post your code with any questions if it doesn't work as you expect.
EDIT: If you haven't already done so, the place to start with many apps is to look in Help>Example Finder and look for examples that are close to your need and then modify them. It's a great way to learn LabVIEW along with the tutorials available.
11-03-2010 02:41 PM
I can do that. How do I view the actual code itself? I know there's a way to do it, just not sure how.
11-03-2010 02:43 PM
Ummm... Right-click the assistant and 'Open Front Panel' or something. I don't use the Assistants so I'm not really sure but I know it's easy!.
11-04-2010 09:28 AM
Do you know if Mathscript automatically comes on Labview 2010 or is there some sort of add-on? I want to put a Mathscript node that will create an array from an integer (the duration time of the data aquisition) and then do some calcs with it.
11-04-2010 09:34 AM
Or Matlab? A matlab script node shows up but when I try to run everything it says "Labview cannot initialize the script server. Ensure the server software is installed."
11-04-2010 09:37 AM
There is a Matlab node. I think you have to buy Matlab and install it to use it though. A NI Engineer will know for sure.