LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx "wait for next sample clock" never shows "is Late" !

Hello friends,

I've attached a picture of my VI , and the Vi itself (labview 2013), and vi converted to 2011.

I'm Deliberately inserting delay into my loop, so i can see that "wait for next sample clock" - is Late parameter,

returns True.

why does it allways false ?

 

please help !

0 Kudos
Message 1 of 30
(2,732 Views)

Can't open your VI here so I'll ask what is probably a silly question- your delay does have a non zero value going in I assume?

 

By the way, the sequence structure around the case structure is unnecessary, not that it is a problem.

0 Kudos
Message 2 of 30
(2,721 Views)

Belive me it's not zero Smiley Happy

0 Kudos
Message 3 of 30
(2,718 Views)

Is this a student assignment? Look at the setup of your DAQ and you should be able to answer your own question quickly!

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 30
(2,695 Views)
It is not a student assignment , and i dont see a problem in the setup of the daq
Can you tell me whats wrong?
0 Kudos
Message 5 of 30
(2,683 Views)

*HINT* Your first point can't be late-it's before the delay and besides the sample clock only starts at this point. Look at the inputs to your DAQ setup. There are only 3 to consider.

0 Kudos
Message 6 of 30
(2,673 Views)
I dont understand why are you giving me hints instead of pointing out the solution.
Steal dont see any problem with the code.
0 Kudos
Message 7 of 30
(2,663 Views)

Well,

 

you set DAQmx to acquire one sample, start the task, read that one sample - then wait and check for "too late?".

So that one sample will never be too late…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 30
(2,657 Views)

In other words, after you have read the single sample you setup the acquisition task to do, the task is fini, terminated, finito and there can be nothing to late anymore.

 

This looks suspiciously like a task a somewhat sneaky professor might give to his students to test them, which is why I didn't feel like giving the answer right away (which happened to look almost exactly as Gerd formulated it then).

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 30
(2,644 Views)

"I dont understand why are you giving me hints instead of pointing out the solution."

 

If the question is amenable to it, I find people gain more from a hint than a fish on a plate- it forces them to engage brain and learn how to solve problems rather than just furnishing the answer in this specific instance.

 

Those who get enthused and have a crack at it- even if they don't get it straight away- are those who will advance quickly.

Those who just demand the fish are those who I see asking the same basic questions year after year.

 

Your choice.

0 Kudos
Message 10 of 30
(2,635 Views)