LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone please help me solve this?

Can anyone please help me solve this?

Certified LabVIEW Architect
System Test Architect
Electrical Engineering
JLR
Download All
0 Kudos
Message 1 of 6
(3,241 Views)

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…

 

Spoiler

 

B… (most probably as dataflow/execution order is undefined inside the loop…)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,222 Views)

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


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
0 Kudos
Message 3 of 6
(3,207 Views)

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?

Certified LabVIEW Architect
System Test Architect
Electrical Engineering
JLR
0 Kudos
Message 4 of 6
(3,192 Views)

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.

Certified LabVIEW Architect
System Test Architect
Electrical Engineering
JLR
0 Kudos
Message 5 of 6
(3,188 Views)

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


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
0 Kudos
Message 6 of 6
(3,182 Views)