01-03-2017 02:53 AM
Hii Yamaeda..,
I ran this program and got this error. I introduced the delay so that both the loops could be synchronised. Also, i have to run this code for 8 hours continously. So, I am looking for a most stable code for acquisition.
01-03-2017 03:00 AM
And on providing no. of samples per channel in sample clock.vi which defines buffer size 1M , the program ran and then I got this error.
01-03-2017 03:01 AM - edited 01-03-2017 03:02 AM
Hi shivam,
I introduced the delay so that both the loops could be synchronised.
Which is wrong here!
Remove this delay. Your loops are "synchronized" by the queue…
got this error
Read the DAQmx data more often, the DAQmx-internal is full!
On your 2nd error: Use smaller data blocks when your device cannot handle 1M samples at a time…
01-03-2017 03:10 AM
Hii Gerdw
I introduced the delay so that both the loops could be synchronised.
Which is wrong here!
Remove this delay. Your loops are "synchronized" by the queue…
Ok.
got this error
Read the DAQmx data more often, the DAQmx-internal is full!
how??
On your 2nd error: Use smaller data blocks when your device cannot handle 1M samples at a time…
The device is meant for 1MS/sec rate. It was working perfectly fine earlier.
And now i am getting this error also.
01-03-2017 03:22 AM - edited 01-03-2017 03:23 AM
Hi shivam,
The device is meant for 1MS/sec rate. It was working perfectly fine earlier.
Allowing this sample rate doesn't mean to be able to handle several channels with 1M samples each in the DAQ board internally!
Example: when the board uses a 16bit ADC you need 1M samples * 2bytes/sample = 2MiB memory on the board internally - for each channel!
Why don't you stream blocks of 100k samples (or 0.1s of data)?
That's the "rule of thumb": set the block size to 1/10 of the sample rate…
01-03-2017 03:57 AM
@shivam_2 wrote:
Hii Yamaeda..,
I ran this program and got this error. I introduced the delay so that both the loops could be synchronised. Also, i have to run this code for 8 hours continously. So, I am looking for a most stable code for acquisition.
I changed the default path for the file as to be able to test it, check that you're not writing to somewhere strange.
/Y
01-03-2017 04:27 AM
No I changed the File paths and channels. Thats not the problem. I even changed the no. of samples to be read to 100k. But this onboard memory full error is showing up.
01-03-2017 04:42 AM - edited 01-03-2017 04:42 AM
Hi shivam,
remove the graph/charts from your DAQ loop. They also need (maybe a lot of) time to display your 100k/1M samples and so block the DAQ loop from iterating!
Two remarks:
- It's not useful to display 100k samples in a chart/graph which is maybe 300 pixels wide!
- Use the producer-consumer scheme to transport DAQ data to your TMDS loop. Use a 2nd producer-consumer scheme to transport data from TDMS loop to a display loop: maybe you can use a notifier here instead of a queue?
01-03-2017 07:43 AM - edited 01-03-2017 07:46 AM
Since you are just logging to a TDMS file, I highly recommend to use the DAQmx Configure Logging VI to make DAQmx do all of the logging for you. This will work a lot more efficiently than a producer/consumer and is a lot easier for you to write.
If you are still getting a buffer overflow error, then try a Master/Slave setup (just like a producer/consumer except it uses a Notifier) to move the graph updates to another loop. Use the Notifier since you only care about showing the latest data.
01-03-2017 08:19 AM - edited 01-03-2017 08:30 AM
OK,. This has nothing to do with clusters or type defs. Time to start a new thread.
But, I'll chime in. DAQmx acquire tasks are the penultimate producer-consumer NATIVELY. Signals arrive,are converted and held in a buffer untill you read the buffer's contents. What is not a "P-C Loop" here?
All you need to do after starting an acquisition task is "Read" the buffer before it gets full! How hard can it be? Samples to read multiplied by sample rate is how often you need to call the DAQmx Read. Call it early and DAQmx waits for the samples to be acquired. Call DAQnx Read too slowly the buffer fills up and, you get an error.
What is a type def going to help with here?