The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

CLAD2017 - Hardware - DAQmx - What is my Configuration?

Active Participant

Consider the VI, which of the following is the configuration of DAQmx Read.vi that would result in the data shown in Waveform Graph?

 

WaveformGraph2.png

 

WaveformGraph2Graph.png

 

WaveformGraph2Answers.png

Combined.png

Comments
Knight of NI

A


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Trusted Enthusiast

a)

Regards
Ray Farmer
Member

A

Happy to Wire
Member

a)

Member

A

CLD

Member

http://zone.ni.com/reference/en-XX/help/370469AD-01/lvdaqmx/mxread/

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?

Knight of NI

A.Bernau,

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

A...

Smiley Happy

Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
Member

A

Happy to Wire
Member

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?

Knight of NI

Tiger5hark,

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

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.

Knight of NI

proph,

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Member

What about the comment regarding the label of the axis: Samples vs Time ?

Knight of NI

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines