03-09-2009 03:55 PM
Hi ,
I am measuring force curve and plot them in a waveform graph in realtime. I found that the waveform graph does not refresh until 1000 samples are obtained. For example, if I set the sample rate at 1000Hz, I will see the graph is updated every second. If I set the sample rate at 100 Hz, it will not update until 10 seconds.
Does anyone know how to make the graph updated quicker?
Thanks a lot,
Nihaoo
03-10-2009 11:54 AM
Hello Nihaoo,
Thank you for posting to the NI Forums! I imagine that you are experiencing this behavior becasue you have the "samples to read" input wired to 1000 samples. Please post a screen shot of this portion of your code, and we can take a closer look. Have a great day!
03-11-2009 02:39 PM
Hello Margaret,
Thanks for your reply.
Yes, you are right. I have set a sample rate of 1000. Attached is the screen shot of this part. Please provide your suggestion.
Thanks again,
Eric
03-11-2009 02:41 PM
Hi Margaret,
I am not sure if you can see the picture. Please let me know if you can not see it.
Thanks,
Eric
03-12-2009 10:18 AM
Hi Eric,
No, I can't see the picture. Please try reattaching as a .jpg or something similar. Thanks!
03-12-2009 10:21 AM
Hi Margaret,
I was attaching it as .jpg picture. I tried again. It does not work. Is there any other way to send you the picture?
thanks,
Eric
03-13-2009 02:59 PM
Hello,
I am sorry that you are having difficulties posting the picture. I imagine that one of two things is happening here. Either you are doing an N-Sample acquisition in which case you are going to have to wait for the number of samples you have specified to be acquire before they are displayed. In N-Sample mode, the number of samples to read dictates how many samples are read in total and the sampling rate dictates how fast they are read.
The other alternative is that you are doing a continuous acquisition. If this is the case, you can reduce your number of samples to read and maintain your sampling rate. In continuous mode, the sample rate dictates how fast samples are acquired. Since there is not limit on the amound of samples being read, samples to read in continuous mode dictates how many samples are read at a given time. For instance, if your sample rate is 1000Hz and your samples to read is 1000, you will be given 1000 samples in 1 second intervals. If your sampling rate is 1000Hz and your samples to read is 100, you will acquire 100 samples every 1/10 of a second.
Let me know which of these applies and if we are still struggling to solve this, we will figure out a way to receive your screen shot. Thanks!