| Visit Our Catalog at SteelGuitarShopper.com |

Post new topic DATA I/O to EXCEL =?
Reply to topic
Author Topic:  DATA I/O to EXCEL =?
ed packard

 

From:
Show Low AZ
Post  Posted 11 Jul 2009 10:18 am    
Reply with quote

Need input on streaming data to & from Excel via USB, Firewire, or ?

Edp
View user's profile Send private message Send e-mail
John Cipriano


From:
San Francisco
Post  Posted 11 Jul 2009 2:31 pm    
Reply with quote

I'm curious: why Excel, and why does it have to be live? What does the data look like, and what are you hoping to do with it?

Does the data become useless once it's old, or is something like a laboratory measurement, where it might be sufficient just to capture everything for an hour or so and then analyze it once it's captured?

If you weren't using Excel, how would the data be coming in? Is this some special USB gear with its own driver?

Or are we talking about text or other excel files stored on an external drive?
View user's profile Send private message Send e-mail
ed packard

 

From:
Show Low AZ
Post  Posted 11 Jul 2009 3:25 pm     Curiosity killed the cat
Reply with quote

John..."Why Excel?"...#1. because I have "stuff" that I have worked up since there was only VisiCalc.#2. I want to minimize the lines of code I would need to write.

The data is a stream of digital numbers in....they are processed...and then streamed out. Latency is an issue.

Right, "useless when it is old". I have pgms that take measurements, allow storing them in Excel, and bringing the data back later.

Real time...latency is an issue.

Not text....not other Excel files...not on an external hard drive.
View user's profile Send private message Send e-mail
b0b


From:
Cloverdale, CA, USA
Post  Posted 11 Jul 2009 4:02 pm    
Reply with quote

Capture the data in memory and write it as an XML file. Then import the XML file into Excel.
_________________
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
View user's profile Send private message Visit poster's website
ed packard

 

From:
Show Low AZ
Post  Posted 11 Jul 2009 4:14 pm     in and out
Reply with quote

And the thruput time might be?
View user's profile Send private message Send e-mail
b0b


From:
Cloverdale, CA, USA
Post  Posted 11 Jul 2009 4:19 pm    
Reply with quote

Oh, you want real time acquisition? I think you'd have to write that in VB or C#. Not my area of expertise. Sorry.
_________________
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
View user's profile Send private message Visit poster's website
ed packard

 

From:
Show Low AZ
Post  Posted 11 Jul 2009 4:22 pm    
Reply with quote

I was afraid of that!

VBA can control Excel, so maybe....

Thanks for the thought.
View user's profile Send private message Send e-mail
John Cipriano


From:
San Francisco
Post  Posted 11 Jul 2009 4:39 pm    
Reply with quote

What's the worst latency you can tolerate?

Because my first thought (and keep in mind I have very rarely done any VBA) was to write a program in a different language that will listen for the data and write it to a text file. Then have an Excel macro that reads from the file on some time interval. Like you write the file more or less live but you have excel refresh at some time interval that works for you, maybe every 5 seconds as an example.

There might be an issue on Windows with trying to access the file while it's being written. Which makes me think that there's got to be a better way than that. There may or may not be a way to have VBA listen for the data, but I don't know.

My mostly uninformed hunch is that a solution that doesn't require storing to a temporary file will require COM / the Excel API.
http://msdn.microsoft.com/en-us/library/bb687829.aspx

But how do you currently receive the data? You say it's not written to a file. Is it a USB-to-Serial link? Is there a program that displays the data?

I just remembered that you said the stream has to go back out. Depending on how the data is coming in and the way in which you're trying to transform it, Excel might not be the best way to go. Python is, in my opinion, very easy as far as programming languages go, and yet extremely flexible. You might be able to do something in Python. I guess it depends on how much time this is worth Smile
_________________
MSA Semi-Classic S10 w/ 4P+4L and some shiny new tuners
View user's profile Send private message Send e-mail

All times are GMT - 8 Hours
Jump to:  
Please review our Forum Rules and Policies
Our Online Catalog
Strings, CDs, instruction, and steel guitar accessories
www.SteelGuitarShopper.com

The Steel Guitar Forum
148 S. Cloverdale Blvd.
Cloverdale, CA 95425 USA

Click Here to Send a Donation

Email SteelGuitarForum@gmail.com for technical support.


BIAB Styles
Ray Price Shuffles for Band-in-a-Box
by Jim Baron