From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-28-2015 07:11 AM
Hello! I am working on my faculty project and I have to do acquisition on NI sbRIO-9636. How can I choose sampling period of acquisition? I am working according to an example on NI website below:
http://www.ni.com/tutorial/4534/en/
I can't figure it out which sampling period should I put in Host.vi and which in Target.vi in order to have proper acquisition? For an example, I would like to have sampling period 10 milliseconds. How to configure loop-time in Host.vi and how in Target.vi?
Thank you
Solved! Go to Solution.
06-29-2015 03:59 PM
Hi Chupka,
Essentially, you are only going to have a sampling period on the target where you are acquiring the data. This will be set by your loop time which is how fast you are polling you IO. For the Host side, you just need to do some calculations to ensure that the loop time you are reading at and the number of samples you are reading per loop do no go so fast that you underflow and not so slow that you overflow your buffer.
06-30-2015 04:59 AM
Hi Aaron!
Thank You for Yout reply.
Could you please help me with that calculations? Could you give me a very simple example?
Here is my Target.vi. I put here 1000 Ticks in Count control.
Here is my Host.vi.
Like I am using only one element out of 100. And like other data 'arrives' late on the graph. I've put here 10 ms loop period.
Could You please explain me what happened and how to fix this?
Thank You
07-01-2015 02:31 PM
Chupka,
The calculations really depend on how much data you want to pass and or how fast you want to pass it. The first issue I can see with your data arriving late is because your timeout on the FIFO read is only 5ms but your loop wait is 10ms. so your data is always going to arrive late. try adding a longer timeout to this and see if it helps get rid of that problem.
07-02-2015 04:12 AM
Aaron,
Thank You for Your reply.
Okay, I will now suggest corrections on my LV Project.
I have period of sampling that is 1000 ticks, which is 25 microseconds. I can acquire 400 samples in 10 milliseconds.
Can I put in Number of Elements 400 to take all data I acquire? And in Timeout... I suppose I should put time that is longer than Host loop rate (I suppose it can be equals to Host loop rate).
Could You please anwer if I did calculations well?
Thank You
07-06-2015 09:32 AM
Chupka,
Yes, the sampling calculation does look correct This way you are getting all your data every loop, but you want to ensure you have a case to avoid having FIFO underflows if you are reading every data point. As for the host loop, you do want to ensure it is greater than the host loop so that if you experience jitter in your loops, you will not timeout.