09-06-2011 12:40 PM
Hi,
My sample rate from DAQ is 100kHz, but I only see about 10 samples per second were saved by using write to spreadsheet file.vi. Anyone has an idea how often does write to spreadsheet file.vi save data? How can I increase saving the number data per second.
09-06-2011 12:43 PM
It writes it as often as you call it, and it writes the amount of data you provide it. Have you verified that you're actually providing it the amount of data you think you are providing it?
09-06-2011 12:43 PM
It writes all of the data passed to it whenever you call it.
You need to attach your code.
09-14-2011 11:47 PM
Sorry for the late response. Has been busy dealing with school works. I attached my vi this time. I have two major issue for this vi.
First, the fastest speed that I can save the data to a spreadsheet file is about 60 samples per second. And from the data I saved (time and angular position),I found out a same time somtiems occurs twice on different postion datas. I assume it is because the time stamp can't not precise enough to catch up the sample speed?? How can I save about 1000 sample per second?
Secondly, I am trying to measure the frequency by using counter at the same time while measuring the angular position, but I always get the error message saying that the source was using by the "encoder", and it cannot be use again for reading the frequency. How can I get both readings at the same time?
Thanks,
Bella
09-19-2011 12:08 PM
There are two approaches you could take to speeding up your loop. First, if you continue to do software timing, pull as much out of your while loop as possible in order to decrease the number of operations being performed each iteration. For example, place your motor control in a separate while loop from your reads. Second, you could try implementing hardware timing with buffered reads in order to increase your speed. Have a look at the LabVIEW example for this by going to Help -> Find Examples... -> Hardware Input and Output -> DAQmx -> Counter Measurements -> Position -> Meas Angular Position-Buffered-Cont-Ext Clk.vi
As for your second question, I'm a little confused as to what frequency you're trying to find. I see in your Encoder and DAQ Assistants that you're using ctr0 for the encoder and ctr1 for your frequency measurement, but what do you have coming into your ctr1? Also, what hardware setup are you using (i.e., cDAQ chassis and module(s))? Could you please attach a screenshot of the error that it's giving you?
10-18-2011 02:28 AM
I have a problem with storing all my data.
The function write to spreadsheetfile stops automatically after storing 1046 data points. Can anybody tell me how to this change?
Thanks in advance
Best regards
Elly
10-18-2011 03:03 AM
HoekstraE wrote:The function write to spreadsheetfile stops automatically after storing 1046 data points. Can anybody tell me how to this change?
You don't provide enough information to troubleshoot. In order to see what you are doing wrong, please attach your VI.
10-18-2011 03:29 AM
Thank you for your fast reply
I indeed made a programming mistake which I overlooked several times, but the problem is solved now.
Thanks for helping
Best regards
Elly