Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 15th August 2004, 04:45 AM   (permalink)
Default High speed data logging question

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
:-)
cubdh23 is offline   Reply With Quote
Old 15th August 2004, 10:35 PM   (permalink)
Default

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.
lavenatti is offline   Reply With Quote
Old 19th August 2004, 09:45 AM   (permalink)
Default

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.
StupidDum is offline   Reply With Quote
Old 19th August 2004, 11:54 AM   (permalink)
Default

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.
pittuck is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 09:03 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.