LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how often does write to spreadsheet file.vi save data

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.

0 Kudos
Message 1 of 8
(3,663 Views)

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?

0 Kudos
Message 2 of 8
(3,661 Views)

It writes all of the data passed to it whenever you call it.

 

You need to attach your code.

0 Kudos
Message 3 of 8
(3,660 Views)

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

0 Kudos
Message 4 of 8
(3,619 Views)

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?

0 Kudos
Message 5 of 8
(3,583 Views)

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

0 Kudos
Message 6 of 8
(3,552 Views)

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.

0 Kudos
Message 7 of 8
(3,547 Views)

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

0 Kudos
Message 8 of 8
(3,544 Views)