Shop OBEX P1 Docs P2 Docs Learn Events
VBA with Propeller where VBA is used as library — Parallax Forums

VBA with Propeller where VBA is used as library

AImanAIman Posts: 531
edited 2011-10-03 15:23 in General Discussion
I was doing some research the other day for work and noticed that VBA - especially Excel - is very good at holding small libraries of data were the tidbits are logged into cells and the cells scanned for additional informtion later.

Example - I am scanning with a PING and IR and logging the results. Instead of putting the information into EEProm I send it to Excel who creates it in a worksheet. The worksheet has a series of three columns - first is a time stamp, second is Ping distance, third is IR distance. Later when the program is restarted, since the same starting point is used, a new set of three columns holding the same information is collected. Each time the program runs new information is collected and then averaged to show what happens.

So here's my question - can a library created in Excel be used to update the information collected and then passed into a Propeller or other such chip in real time?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-03 08:32
    Why not? It depends on what you mean by "update the information" and "passed into". None of this happens automatically. The connection between the Propeller (or other microcontroller) and the PC is just an ordinary bidirectional serial channel. You (or your program really) can structure and control the information going back and forth any way you want. A Propeller can easily handle data rates of at least 115KBps with an attached PC. With higher data rates, the limiting factors may be more PC related than Propeller related.

    Examples of this sort of thing include StampPlot Pro and PLX-DAQ (here). Both are written for the Stamps, but can be used with the Propeller or other microcontroller.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-10-03 15:23
    I think you may be better off switching to VB.Net, and using Excel to make comma delimited files you can then import as a database in your application (such a database is easily accessed using built-in data provider tools).

    The .Net platform has better support for things like serial communications, which is really all you need to communicate -- via the FullDuplexSerial object -- with any application running on your PC. With VBA you'd need to do serial with the older fashioned OCX/ActiveX stuff, and depending on the library you use is likely to be more restrictive than the standard and by very well documented serial classes available in .Net.

    To flow data INTO Excel, you can create a "honey, I'm home" program for the Propeller that downloads its data via serial to a file. Format the file in standard CSV format, and open it in Excel. Excel will know what to do with it.

    -- Gordon
Sign In or Register to comment.