05-17-2012 01:59 PM - edited 05-17-2012 02:00 PM
Hi,
I have a question about the NI 9223 samping rate in our cRIO 9076 system.
Since we are hoping to samping at a rate up to 500K or 1M, we are now using the user controlled I/O sampling.
Right now, we are sampling at 500K (2us). But I got a tick count of 99 ticks (around 2.5us) for the sampling node only.
Should I be expecting so many ticks for the sampling block? Did I do anything wrong?
Thank you so much!
Solved! Go to Solution.
05-18-2012 02:27 PM
Hi hang-up,
It looks like you are specifying the loop rate for the entire while loop you are in, and not just that one specific part of code. Because you have your loop timer controlled by an front panel object, it is possible that the code compiled, but if you change the loop time to a low value, the code cannot complete in time. I would suggest that you isolate the acquisition you are trying to do in it's own loop so that it can run at full speed.
Additionally, in order to get the full MS/s acquisition, you are going to need to architect your acquisition. I would encourage you to check out the example code in our Example Finder for the NI 9223 User Controlled II Compositionally for the best way to get these maximum acquisition rates. Additionally, depending on how you are going to be exporting this data from the FPGA, your ART controller may not be able to handle a sustained MS/s throughput.
To explicitly answer your question, I suspect that because you are trying to complete a large loop in a short amount of time, the FPGA cannot complete the task in time, so it defaults to a rate that can be better handled. For the control you are looking for, I would encourage you to move your application over to the architecture found in the example project to get the behavior you are looking for.
05-18-2012 02:34 PM - edited 05-18-2012 02:38 PM
Thank you so much for replying.
You are totally right. I was hoping that I could get my large loop calculated within 80 ticks.But it seems like the acquisition takes 80 ticks already. I tried to put the AI acquisition in the isolated loop yesterday and it was better than 99 ticks. It took 80 ticks to finish the acquisition, still not 40 ticks.
I'll try the way you suggest to take a look at the example code for the user controlled sampling. We'll see what happens.