The Daily CLAD

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

Re: CLAD2017 - Hardware - DAQmx - What is my Configuration?

SercoSteveB
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

Comments
crossrulz
Knight of NI

A


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
RayFarmer
Trusted Enthusiast

a)

Regards
Ray Farmer
sankar06
Member

A

Happy to Wire
Baltur
Member

a)

ArAmM
Member

A

CLD

A.Bernau
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?

crossrulz
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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Tsjabrantes
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
sankar06
Member

A

Happy to Wire
Tiger5hark
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?

crossrulz
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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
proph
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.

crossrulz
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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
proph
Member

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

crossrulz
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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
rak84
Member

A

rak84
Member

To get multiple plot as shown in above question, what modification I have to do in the below attached block diagram 

q.pnga.png

crossrulz
Knight of NI

rak84,

You need to configure your task to have more channels.  Try changing your channel to Dev1/ai0:1.  This will have ai0 and ai1 in your task, which will then show 2 plots in your graph.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
rak84
Member

Crossrulz,

Thank you very much for your valuable information.

Raajkumar
Member

Please answer this question:

 

Raajkumar_0-1591719256527.png

No.of sample per chaneel is :4000

rate:100000

Time target:4

what is answer?

Raajkumar
Member

Raajkumar_0-1591720267247.png

VI run:4 time in this case what happened?

moni0607
Member

Raajkumar,

1. I am guessing 101 rows and 4000 coulmns

2. i=3, time difference is 1s

moni11
Member

Stop is wired to True constant. that means it will run only once every time you click run. So i (loop iteration) will always be 0. And time indicator value will be the difference between the 2nd iteration and 3rd iteration because of shift register.

istan0227
Member

A