01-06-2009 12:01 AM - edited 01-06-2009 12:04 AM
I use 9229 (usb case) to collect 4CH data simultaneously with 10 seconds duration.
Since there is no memory in USB case, I use the attached vi to polling data from 9229 continusly.
But I am not sure if the polling is fast enough, so that their is no gap or data lost between each polling.
Is there any way to verify it?
No matter what value I set to sampling rate and data length, it can only poll back 256 data point (double) each time.
If the sampling rate is 50k, the 256 points will last for 5ms. I am not sure if my PC is fast enough.
Any suggestion? Thanks.
Solved! Go to Solution.
01-06-2009 06:25 AM
Hi Turbot,
Thanks for the post and I hope your well today.
The9229 Data rate range (fs) is:
Minimum....................................1.613 kS/s
Maximum................................... 50 kS/s
I'm not sure why your polling?
Can't you setup up a DAQ task to continously acquire and rate of 50kS/s. You are right, the polling method would be difficult to get data every 5ms..in the sense of being accurate.
Have you also considered the producer/consumer architecture which allows you to acquire data a constant rate by placing the processing of the data acquired into a second parallel loop?
Hope this helps,
01-06-2009 10:55 PM
How to setup up a DAQ task to continously acquire and rate of 50kS/s. I am trying to do so in the attached vi of the first post. But the polling loop is existing. There may be gap between each loop.
May you give any details of producer/consumer architecture. Now I have 2 loops. One for data collecting, one for data processing as the first attachment.
01-07-2009 03:13 AM
Hi Turbot,
Thanks for the reply and I hope your well today.
Your architecture seems very good and almost correct. (you have the produce /consumer setup). Two pointers:
1. I would not advice having a 1ms wait until next multiple. I would set it to 10ms. A windows machine can't poll at that rate - as the jitter of a windows machine is a few ms and then the time it would take to action the read would also take sometime. This will only make the buffer(the points read) larger.
2. You do not require timing in the second loop, as this only iterates when an itme appears in the queue.
Let me know if this helps,
01-07-2009 03:25 AM
01-08-2009 03:27 AM
Hi Turbot,
Thanks for your posts
I would like to remind you that you should not post multiple times for the same issue.
I am in the process of getting a USB DAQmx Carreir to test things out on. However, it would appear that your code is correct.
1. In MAX if you run a test panel with the same settings i.e. Number of samples of 20k and Sample Rate of 10k does it work? Currently, under simulated devices this works fine for me. If you get an error - then there could be an error with what we're requesting. If this does work, then its an issue with the code.
2. I would then ask if you could try some NI Example code which can be found in the NI Example Finder (Help>>Find Examples..). I would suggest trying Cont Acq&Graph Voltage - Int Clk.vi
3. What version of DAQmx are you using?
*****
You have just now posted on 9161 VS 9162 Any difference - and I will answer here.
I would recommend read this post Buffer Size USB 6009 -which explains about buffers.
I beleive that 9229 has a buffer of 2048samples.. youcan find the information your looking for ni.com, search the device and look up the specification.
Let me know what you think (in this post),
01-11-2009 09:46 PM
I am using 9229+9162 ( usb carrier ). But no documents for FIFO on them.
Can USB Bulk transfer data to PC's memory bypass the PC's CPU like DMA.
By using 9229+9162, the default buffer size is 100k. But I can only get 250x4CH samples MAX, and I tried to set the buffer size on PC memory but failed. Any suggestion?
01-12-2009 07:45 PM
01-12-2009 08:15 PM
Thanks, what's the meaning of 'to set sample to read to 25-50% of sampling rate',
By using 9239+9162(usb carrier), I am trying to collect 4CH data simultaneously at 50k/s with 10 seconds length.
Not sure how does USB Bulk work, I need to confirm no data lost or gap in transfer from 9239 to 9162, 9162 to PC's memory, PC's memory to my application. Any suggestion?
01-13-2009 09:41 AM