02-07-2018 12:39 PM
Good evening,
I am writing because I need some clarifications.
Solved! Go to Solution.
02-07-2018 12:46 PM
Fs = Sample Frequency in Samples/sec
N = Number of samples being read
T = Time to read N samples in seconds = N/Fs
So with the setup in the question, it will take (5 S)/(1S/sec) = 5 seconds.
02-07-2018 01:05 PM
Firstly, thank you for answering.
I agree with you. 5 seconds corrisponds to 5 columns in the array. But what about the rows?
thanks in advanced
02-07-2018 01:21 PM
wrote:
Firstly, thank you for answering.
I agree with you. 5 seconds corrisponds to 5 columns in the array. But what about the rows?
thanks in advanced
Ask yourself what needs to happen in order to exit the While loop. Remember the Principle of Data Flow -- all of the functions inside the loop need to complete in order to (a) present data to the output tunnel and (b) present a True to the Stop indicator. That will give you your answer. [You should "work it out for yourself"].
Bob Schor
02-08-2018 02:59 AM
Hi,
I thought about it and I got a conclusion but I am not sure about that.
The timed loop repeats every 4 seconds but since it takes 5 seconds to have back the 5 samples, the loop must repeat twice in order to complete the task. Then it stops.
Eventually the size of the array is made of two rows.
Let me know if I am right
Thanks again
02-08-2018 05:26 AM
wrote:
The timed loop repeats every 4 seconds...
No. There is no Timed Loop in this snippet. That function is Elapsed Time. All it does is grab a snapshot of how much time has passed since its last reset (or first call). So the first iteration it will state that 0 time has passed and the Boolean "Time Elapsed" will be FALSE. That loop will take 5 seconds to complete due to the DAQmx Read reading 5 seconds worth of data. So the next iteration, the Elapsed Time will state 5 seconds have passed. Since this is more than the desired limit of 4 seconds, the Boolean will be TRUE and the loop will stop when that iteration is complete.
02-08-2018 06:02 AM
ok, I think I must get more into timing inside loops.
I hadn't understood the meaning of the Elapsed time.
Now I think it's clearer.