Consider the VI, which of the following is the configuration of DAQmx Read.vi that would result in the data shown in Waveform Graph?
As we have an integer input “Samples/Channel” and we would like to read 15 samples per channel answer C and D are no valid answers. So we need the NSamp and NChan in the name of the mode(instance). The difference between answer A and B is the output data type. Answer A gives a waveform data type and B gives a 2 D Array. So answer A is the correct answer. Do I am right that B gives the same DAQ measurement values like answer A just in another data type?
Yes, the sample data is the same. I personally care about all of the timing parameters, so I almost always use the Waveform type outputs.
If we're taking 15 samples at a rate of 1000 samples/s, shouldn't the last data point be located at 0.015s, and not 0.0085s? What am I missing?
Nice observation. The last data point should actually be at 14ms (first data point it as time = 0).
Though, it could also be based on the DAQ module used. It could be that 1kS/s is not possible with the module and the driver rounded the rate to the next highest available rate (~1.65kS/s). Yet another reason I like to keep with the waveform data type.
My thought process: there are 4 plots on the waveform so on the DAQ read, options C and D are no good because they have "Nchan 1 sample" where we clearly need 4 samples. Is that correct?
Between A and B, we want to match the X axis with the appropriate datatype. "time" is for waveform and "samples" for 2D DBL therefore answer is A.
Your logic is close. We have 4 plots. So that means 4 channels (all work so far). But we need 15 samples per channel, which eliminates C and D (N Channels, 1 sample). And then the data type coming out of the function in the code snippet is an array of waveforms, which eliminates B. That leaves A.
What about the comment regarding the label of the axis: Samples vs Time ?
I think that is true, but would have to verify if the axis name automatically changes. Though, there are ways to fake the 2D array appear like the waveforms in the graph (set the axis name, apply scaling). So it is probably safer to look at the actual data type coming out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.