The Daily CLAD

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

Re: CLAD2017 - DAQmx - Configuration Series 3 of 5

SercoSteveB
Active Participant

What is Numeric Value Out following execution of the VI?

 

DAQmx ai0 1 Chan 1 Samp.png

a) 0

b) 2

c) 20

d) 40

Comments
crossrulz
Knight of NI

B


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
PakAsia
Member

b

timmy
agc_19
NI Employee (retired)

B

GladysToMeetYou
Member

B

 

For a given channel with multiple samples per channel (diagram above shows 20 samples per channel) and with the DAQmx Read function set to "1Samp", which sample in that channel is read by the function? First? Last?

A_rid
Member

B

mini09
Active Participant

nik35324
Member

B

crossrulz
Knight of NI

Gladys,

When the DAQmx task is ran (at the DAQmx Run), a buffer starts to be filled with data.  When you perform a DAQmx Read, you are taking the oldest data out of that buffer.


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
Ellie90
Member

B

qubirt
Member

B

Matt-A.
Member

B

CataM
NI Employee (retired)

b)

Tsjabrantes
Member

Answer BAnswer B

 

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

fff.PNG

 

hi

can anyone please tell me why the vi will stop in less than 4 seconds?

thanks

PakAsia
Member

Hi mon3am,

As per my understanding, the upper loop with 10,000 samples read takes one second and lower loop with 2000 samples read takes 2 second to complete one iteration (time = number of samples/channel divided by sample rate).

As the emergency button local variable keeps updating at the start of each iteration so when you press stop it update after one iteration so it takes 2 full second of 2nd iteration and <=2sec of first iteration (when you pressed the button). I think that how it works

 

timmy
SercoSteveB
Active Participant

Hi mon3am

 

I agree with PakAsia, the top loop takes 1 second to complete and the bottom loop takes 2 seconds.  The state of the Emergency Stop button is read every 1 second, so you would expect the top loop to stop in less than 2 seconds (1 second for the data acquisition + some additional time for other processing).  Using the same rationale you would expect the bottom loop to stop in less than four seconds (2 seconds for the data acquisition + some additional time for other processing).

 

The time for other processing is very small (for LabVIEW to evaluate the While Loop Stop Condition) but is enough when added to the data acquisition time to push the total time over the time boundaries in the answer.  For this question VI stop time would be in the order of 2.01 seconds.

 

Steve

 

 

mon3am
Member

thank you Steve & PakAsia 

Steve can you please post some questions from this style "" which of the VI will generate a human readble text?"" they are questions based on text file functions i think?

thanks

SercoSteveB
Active Participant

Yes, will do.  I can feel a text file series coming on.

Priya16
Member

_20171128_152625.jpg

 If the above question, the daqmx read is changed to 1channel Nsamples then the numeric value out will be 40, ans d because counting terminal N=2 (20 samples per channel) which means the output values are concatenated. Is that right?

 

uma13
Member

Please explain the above VI ...how it is ans BPlease explain the above VI ...how it is ans B

crossrulz
Knight of NI

This blog should not be about answering questions from the CLAD example exams.  There is a board dedicated for that: https://forums.ni.com/t5/Certification/bd-p/Certification


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
SercoSteveB
Active Participant

Answer: B.  Nice one all. 

 

DAQmx Read is configured to Read 1Chan 1Samp, so each call within the FOR Loop returns a single data sample.  The individual data points are auto indexed on the output of the FOR Loop, so after the two iterations of the FOR Loop the samples have been built into a 1D array containing 2 elements.

Lysandros
Member

Refering to this quiz by SercoSteveB, I am wondering how Labview handles following case:

daqMX_n.PNGThe SampleClock.vi is configured to 20 samples per channel, however the Read.vi is set to read 15. Now, does the last setting of 15 overwrite the first of 20?

THanks alot



crossrulz
Knight of NI

The DAQmx Read will attempt to get 15 samples from the buffer.  If the task is not closed out, another 5 samples will be put into the buffer that you can read with a later DAQmx Read.  If you set the number of samples per channel to be less than the number you told DAQmx Read to read, you will get an error of some sort (at least a timeout error, not sure if there is an error for requesting more data than the buffer holds).


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
AdityaAbhishek
Member

Hi  SercoSteveB

 

Can you please explain this question. I didn't get your above explanation.image.png

crossrulz
Knight of NI

AdityaAbhishek,

That is off topic for this blog.  But I see you did ask in the proper place here.


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