Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

High speed data logging question

Status
Not open for further replies.

cubdh23

New Member
I posted this in the general chat section so i applogise if i made u read this twice......

Hi, I was posting questions for my project couple weeks ago, i took a break and now i want to finish it. I got tons of help from here but i have a problem. Im logging data from a microcontroller to VB and export it to Excell. I have a 2 part question. Question #1 Im fulling up rows at a rate of 160 rows per sec. The problem is that the rows dont fill up that fast and if transmit for 10 secs which means 1600 rows. It takes like 20 more secs for all the rows to fill with data even though i stopped transmitting 20 secs ago. No data is lost but im guessing there is a lag when u transport from VB to excell. Any ideas on how to speed up this process????? Question number #2 which is the more important question.
Any ideas how to pre program the excell columns so that for example if i import the numbers i want the columns to perform specific calculations on the values. Like if i want to multiply all the values by 3. How do i write an equation that automatically lets excell do that. Rather than each time i manually do it in excell??
Thanks for the help
Prior pitches tomarrow
:)
 
You could just put a formula in a cell to calculate whatever you would like.

for example, if in column C row 3 you type =A3+B3 you will add the contents of row 3 column A to row 3 column B and place the sum in row 3 column C.

There is a formula button at the top of the screen for more advanced stuff.

Also, you can grab the corner of the cell you just typed the formula into and drag it down the column to copy the formula into all the cells below it. The row and column are automatically adjusted.
 
If not mistaken, there is..a ..hmm.
some sort of integration between excel and VB.
I think VB code could be run in Excel, but you will need to get a copy of VB6 Complete.
 
Ok, use VBA easier. Use a buffer file (or memory but that could get slow as putting lots of data into arrays will eventually crash the PC)

I am not sure if its possible to do this in VBA / VB but it might be possible to dump 1000 rows in a txt file and then when full start a new file and start dumping the first file in Excel.

If not then do the 1000 rows per file and then dump them in when the loggin has finnished. This will mean even in a crash the most data recorded lost will be 1000 lines.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top