07-02-2017 03:04 AM
Can anyone please help me solve this?
07-02-2017 03:42 AM - edited 07-02-2017 03:43 AM
Hi Rishi,
what have you tried to get the answer on your own?
All you need are basics of autoindexing, dataflow and how DAQmx handles the shown Read request…
B… (most probably as dataflow/execution order is undefined inside the loop…)
07-02-2017 05:06 AM
The important thing to see here is that you are reading 5 second's worth of data each iteration, but the Elapsed Time is set to 4 seconds. Therefore the loop will run twice (first iteration will show 0 time elasped, second will show 5).
07-02-2017 08:28 AM
Hi,
Thanks for your time. I'm going to take CLAD exam but I have not worked with the DAQMX that much. Can you please tell me easiest way to solve these kind of problems?
07-02-2017 08:40 AM
As per my understanding, the trigger task will trigger the task as soon as one sample is given to it. And it passes the taskout info into the loop. Inside the loop, the sample rate is set as 5. The DAQMX read function waits till 5 samples are received. But, by then the clock inside the loop will have started running and before receiving 5 input samples, the stop terminal will be true. I have seen the answer is 2 rows and 5 columns. But I need to know how we have got that answer.
07-02-2017 08:58 AM
@RishiDivakar wrote:
As per my understanding, the trigger task will trigger the task as soon as one sample is given to it. And it passes the taskout info into the loop. Inside the loop, the sample rate is set as 5. The DAQMX read function waits till 5 samples are received. But, by then the clock inside the loop will have started running and before receiving 5 input samples, the stop terminal will be true. I have seen the answer is 2 rows and 5 columns. But I need to know how we have got that answer.
Trigger Task is not in there. Or do you mean Start Task? The sample rate is set to 1 S/sec by the DAQmx Timing VI before the Start Task. Inside the loop, the DAQmx Read is reading 5 samples.
I highly suggest you read the context help on the DAQmx functions. Then use the detailed help to find some more of the nuances. You will get answers a lot sooner than by asking us.