01-04-2010 12:20 PM
I am using the following sequence: AITemp.vi -> Sample Clock.vi ->Start task.vi -> Analog Wfm 1 Chan NSamp.vi -> end Task.vi
What is the difference between setting the number of samples/channel in the Sample Clock.vi and the number of samples/channel in the Analog Wfm.vi? Obviously I am very green with LabView but both seem possible. Thanks in advance.
01-05-2010 05:59 PM
Hi,
If I understand correctly, your code is set up as follows. The samples per channel on the sample clock vi is a control, i.e. input, while the number of samples written per channel on the waveform is an indicator, output. This would be a display of the number that was written to the sample.
There are also examples that are installed with the DAQmx driver that I recommend taking a look at. They are a great starting point and you may find something that fits your needs. They are in the NI Example Finder. In LabVIEW go to Help>>Find Examples and once the NI Example Finder opens select Hardware Input/Output>>DAQmx>>Analog Measurements>>Temperature
This document is also a helpful document that is worth reviewing.
Hopefully this helps!
01-06-2010 04:40 AM
01-07-2010 04:19 PM
Are you sure that we are talking about the same vi? This is a polymorphic vi and its inputs/outputs will vary depending on which selection you have made. Either way I am glad to hear that you have it working. Context Help is a useful tool that I always personally leave on. It shows all of the inputs/outputs the subvi has with an explanation, as well as, a link to navigate to the detailed help. You can either use CTRL+H or Help>>Show Context Help.
01-07-2010 10:17 PM
Hi,
The DAQmx Timing VI (Sample Clock) and the DAQmx Read VI (Analog Wfm 1 Chan NSamp) configure different aspects of your DAQmx task. When you call the DAQmx Timing VI, you are specifying the rate at which you would like to sample data, and if your task is a finite task, the total number of samples you would like to acquire. Essentially, this controls the timing of your acquisition. When you start your task, your hardware will begin to acquire data as specified. For most operations, this acquired data will collect in a buffer in your computer's memory. When you configure the number of samples property on the DAQmx Read Vi (Analog Wfm 1 Chan NSamp), you are really specifying how many samples of data to read out of this buffer. To summarize, the input on the DAQmx Timing VI is used to configure how your device will sample data, and the input on the DAQmx Read VI will configure how you retrieve that data.
That's a very brief explanation which I hope helps clarify things. If not, please reply and I'll try to clarify things further.
Dan