05-07-2025 03:31 AM
I am sending and recieving the data in the same VI. And I am getting the following error. I am using less samples and different channels of the port yet the error occurs.
05-07-2025 07:25 AM
A common rule of thumb for continuous acquisition is to read at least 1/10 sec worth of samples per iteration.
Your default values show an expected sample rate of 1000 and a # samples to read of 1000. So that part *seems* fine *except* that you also seem to be using an external signal at PFI0 as a sample clock.
Is that signal really a 1000 Hz clock? I'll bet it's something much faster than that, up in the MHz realm or nearly so. In such a case, the 1000 samples you read might only represent a millisec or two.
Solutions:
- read more samples per iteration, starting with roughly 1/10 the frequency of the external signal
- don't try to update your graph display inside your acq loop with that many samples at a time. You're wasting CPU trying to jam 10's or 100's of thousands of data points into a couple hundred pixels!
- be sure to tell DAQmx the *real* clock frequency in the call to DAQmx Timing. When you use an external clock, DAQmx does *NOT* try to measure the frequency for you. It's just going to believe what you tell it so the property node is just going to repeat it back.
-Kevin P
05-07-2025 07:52 AM
What is the actual clock signal frequency on PFI0? Is it 1kHz?
Try setting Samples per Loop to 1/10 of the sample rate. This will allow your NI-DAQmx Read VI to run more frequently.
05-08-2025 03:05 AM
Thank you. I understood
05-08-2025 03:08 AM
I actually used 'onboard clock' for USB6341.
The National Instruments USB-6341 DAQ (Data Acquisition) device has the following clock frequency specifications based on its documentation: