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.

Injecting Live-data into an open excel spreadsheet?

Status
Not open for further replies.
Hola @JimB
Excel 2016 here. The latest versions of PLX DAQ were rewritten specifically for Arduino. Would they be of any use to me working with PICs? Hard to find concrete information in the Web.
Sincerely I am at lost here. Thanks.

Yes, you are completely messed up in your head.
Let me explain.

Here is the "DATA command" from my version of the PLX-DAQ help file, it talks about BASIC Stamp. I don't have a basic stamp.
PLX DAQ 1.png


The important thing to note is the column on the left "Control and Data Directives"
Look at the first command:

DATA, value1, value2,...

This is what your data source should send to the PC for PLX-DAQ to intercept it and write it into an Excel spreadsheet.

Look at this fragment of code from my PIC16F887:

Code:
                movlw           'D'                     ;Header
                call            Send_Data
                movlw           'A'
                call            Send_Data
                movlw           'T'
                call            Send_Data
                movlw           'A'
                call            Send_Data               ; 1st column is the time, ignore.
                movlw           ','
                call            Send_Data
                movlw           ','
                call            Send_Data               ; 2nd column is the marker bit.
                btfsc           PORTC, Marker
                goto            main1                   ; Marker button is pushed
                movlw           0x00
                call            Send_Data
                goto            main2
main1           
                movlw           '1'
                call            Send_Data                 
main2                 
                movlw           ','
                call            Send_Data               

                movf            BCD3, W
                addlw           0x30         
                call            Send_Data               
                movf            BCD2, W
                addlw           0x30           
                call            Send_Data               
                movf            BCD1, W
                addlw           0x30           
                call            Send_Data               
                movf            BCD0, W
                addlw           0x30           
                call            Send_Data               
                
                movlw           0x0D                    ;Carraige Return
                call            Send_Data

It sends
DATA,,
this wakes up PLX-DAQ, the first comma ( , ) terminates the DATA statement, the second comma makes it skip the first column in the spreadsheet,

The PIC then reads a digital input port and sends a "1" if it sees that a pushbutton is pressed.
Then it sends a comma to move on to the next column in the spreadsheet.

Then it sends four BCD numbers BCD3 to BCD0
this is the number which the PIC had earlier read from its ADC.
Notice that it does not send a comma between the BCD data, all the BCD goes into the one cell of the spreadsheet.

Finally, the hexadecimal value 0x0D is sent. This is a carriage return character.
This terminates this line of data, and starts a new line for the next reading.

In the PC, it looks like this:
PLX DAQ 2.png


Notice that column A is empty (because of the first comma sent from the PIC)
The second column "Marker" is empty because I had not pressed the marker button yet.
Column C is the value from the ADC.

The rest of the information is processing which takes place in Excel.
The ADC value is converted into a voltage, that voltage is then converted into a signal level (in dBm).
The column with the -59 data is a way of displaying the marker on the graph, (the pink ish coloured trace).
The whole lot is then drawn on a graph in Excel.


I hope this lot makes sense.

JimB
 
JimB

Quite clear Jim, things are making sense now. Gracias for that.

Prior to you mentioning PLX-DAQ, I had never heard of it and the guy who rewrote the so many versions after Parallax, posts always in the Arduino forum, thus my monumental confusion.

I worked intensively with VBA in the past for a rather different type of application. Never could try serial comms because I could not get the MSComm thing for some reason ($$?). A quick check in my laptop, shows, after opening VBA, that I have no complements at all. Excel 2013 IIRC.

Would that be a problem?
 
I worked intensively with VBA in the past for a rather different type of application. Never could try serial comms because I could not get the MSComm thing for some reason ($$?). A quick check in my laptop, shows, after opening VBA, that I have no complements at all. Excel 2013 IIRC.

Would that be a problem?

Sorry but I have no idea.
I know nothing about VBA.

JimB
 
Thanks Jim.
 
The MSCOMM component in VB6 isn't installed into the toolbox as standard, you need to right click on it, add components and browse to the OCX, tick the box then you get the component available to use. I've been using older VB6 machines for the last 5 years but don't know if this is the same in VBA.
 
The MSCOMM component in VB6 isn't installed into the toolbox as standard, you need to right click on it, add components and browse to the OCX, tick the box then you get the component available to use. I've been using older VB6 machines for the last 5 years but don't know if this is the same in VBA.
Hola picbits
All Excel versions I got had not that component available not sure because my licence's level or what. Right now Excel 2016.

Nowadays I read there is some XXXXX.NET that again is not in my list. Not even sure how to get it from the MS download center.

In maybe two days I will start taking care of that. Gracias.
 
Hola picbits
All Excel versions I got had not that component available not sure because my licence's level or what. Right now Excel 2016.

Nowadays I read there is some XXXXX.NET that again is not in my list. Not even sure how to get it from the MS download center.

In maybe two days I will start taking care of that. Gracias.


Do you really need PIC and are you trying to dynamically update a chart or an excel data table?
There are other ways to do data logging and display on a PC as a chart.
 
A Google of Arduino to Excel will get you a few dozen hits on how to do it. Microsoft has an add on for Excel called Microsoft Data Streamer which I use and like. They want membership in Office 365 but I just ran the download (Windows 10) and it works fine. I also use the mentioned PLX-DAQ and it also does fine.

You can try and write your own, but there is existing stuff out there. My Excel is a 2010 version running on Windows 10. I use both MS Data Streamer and Plex DAQ. No reason for me to write my own when what is available works.

Ron

Thanks Ron. I will try that. Hope this time is the time.
 
Do you really need PIC and are you trying to dynamically update a chart or an excel data table?
There are other ways to do data logging and display on a PC as a chart.

Hola gophert

Most of what I do is with PICs (Assembly only). Reading data on a 2x16 LCD, I do all the time. I would like to solve the registry and eventual graph.

When developing a PID controller, to visualize performance during / after adjustments I wanted temperature (output) against Vref, along time. As I said, I could never get Excel recording / graph of the values issued by the PIC. Had to go instead via a Bluetooth connection and graph them on my tablet. Very laborious, precarious and unreliable.

My problem is that I ignore most of what is related to communications with a PC. You speak at ease about OLE, DDE, DLL and whatnot. Not my case.

My two PCs, this year, died. Had to change my software, Excel inclusive. Lost a lot. Mumbo jumbo is an understatement. What Reloadron mentions seems simple.

Thanks for any suggestion you could make.
 
I'm working on an ESP8266 and ESP32 microcontroller as a web server to send out a web-based chart of collected data (temp, rpm, whatever). Good if you want to monitor something, less good (but workable via cut/paste) if you want to do some mathematical manipulations on the collected data.
 
I'm working on an ESP8266 and ESP32 microcontroller as a web server to send out a web-based chart of collected data (temp, rpm, whatever). Good if you want to monitor something, less good (but workable via cut/paste) if you want to do some mathematical manipulations on the collected data.

Just upload it to a MYSQL database, and you can then do what you want with it via PHP or whatever you like. I upload it via a PHP script as well, it lets you do most of the processing server side, rather than on the source processor.
 
What Reloadron mentions seems simple.
Have you seen the system requirements?
Supported Operating System
Windows 10

Operating System: Windows 10
Excel Version: Microsoft Excel 2016 with an Office 365 subscription with the latest version of Excel. (Students and teachers are eligible for Office 365 Education, which includes Word, Excel, PowerPoint, and OneNote, plus additional classroom tools for free.)
.NET 4.6.1 and VS 2010 Tools for Office

Mike.
 
Have you seen the system requirements?
Mike.

Yes I did, Mike.
After rereading his encouraging post I went straight and downloaded it. Later I opened PLX-DAQ and up there, the data streamer label showed up. Waiting to get ready some serial input to confirm it works.
 
A Google of Arduino to Excel will get you a few dozen hits on how to do it. Microsoft has an add on for Excel called Microsoft Data Streamer which I use and like. They want membership in Office 365 but I just ran the download (Windows 10) and it works fine. I also use the mentioned PLX-DAQ and it also does fine.

You can try and write your own, but there is existing stuff out there. My Excel is a 2010 version running on Windows 10. I use both MS Data Streamer and Plex DAQ. No reason for me to write my own when what is available works.
Ron
Have you seen the system requirements?
Mike.

When starting to program a PIC micro to send data to PLX-ADQ (see my post here) still with Excel 2016 I downloaded Data Streamer with no difficulties.

Few days later I moved to the newest Office version, 2019 (the one you pay once). New attempts to download it again,failed miserably, every time I tried.

Nothing like being in the legal side of things. :arghh::happy::happy:
 
I went here, clicked download and it downloaded just fine and is running on Excel 2010. Just downloaded it again and it downloaded just fine and I am not using Office 365. Beats me?

Ron
 
I went here, clicked download and it downloaded just fine and is running on Excel 2010. Just downloaded it again and it downloaded just fine and I am not using Office 365. Beats me?

Ron
Same place where I could, now I don't

/EDIT After rereading the log below I finally understood that no install is needed. Excel 2019 has it as an option as an add-in for Excel.

It finally started to work in my laptop. Needs some tweaking but it works.. In less than 5 days I got two options to plot data online in real time. Good /EDIT
 

Attachments

  • install.txt
    5.9 KB · Views: 159
Last edited:
Well go figure huh? Next year I will likely upgrade a few things and Office 2010 is one of them. :)

Ron
 
How does your version performs Ron?

The first tests I did an hour ago, were discouraging. Rather crude, it seems. I will persist.

What I do not like at all, when opening Excel now, I get a warning that there are "no certificates" (no reference to anything) to what I have to click somewhere to go ahead and open. Too clunky all that. In the sheet dedicated to settings I asked for six columns but no joy. Just one!!

What about on your side? PLX_DAQ v2.11 for the moment, much much better.
 
I agree Excel has become a PITA with all the protection features.

As to writing to Excel while PLX-DAQ V2.11 works it doesn't work all the time for me. It works best when using it with for example an Arduino interface and then only when the Arduino code is written around it.

Column and row count is another problem with everything. I do have some software which works but is specific to other software, for example some Agilent HP stuff which I use with their products. I have played around with writing my own but not being a guru at code I haven't had the best results or more like luck. Maybe I'll play with it more this week. I still have an old Visual Studio 2008 suite.

Since retiring I really don't have the needs I once did. :)

Ron
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top