Exchange of digital and analog data between Excel and Arduino

Using PLX-DAQ which can be obtained here:

digital and analog data can be exchanged between Excel and Arduino.

This has been tested with Excel 2010 on Windows 7 Enterprise and also
with Excel 365 on Windows 10 Enterprise.
The plx_daq_install.exe contained in the downloadable PLX-DAQ.zip file
has to be executed in order to install the required PLX-DAQ interface.

The attached PLX_DAQ_Data_IO.ino file should be loaded into the
Arduino IDE compiled and loaded into the attached Arduino board
(tested with an Arduino Leonardo).

If the PLX-DAQ.xls file, which is contained in the PLX-DAQ folder
created on the desktop after the execution of the plx_daq_install.exe
file, is opened with Excel then usually the user is asked to approved
that an Active-X control element is to be initialized so by clicking "OK"
this should be approved. Along with the opening of the Excel file a
user control called "Data Acquisition for Excel" is also opened and remains
in the foreground. On it under "Settings" the correct port (9 in my case)
where the Arduino COM-port is attached and which has also been used
by the Arduino IDE has to be set.

By clicking on the "Connect" button the data transfer between Excel
and Arduino is started.

With the attached ino file runing on hr Arduino now every second the
absolute time in hours:minutes:seconds is written in consecutive rows
starting in row 2 until row 362in column A. The digital signal on input pin 2
is written as 0 or 1 in column B. The analog signal from 0 to 5 Volt as 0 to 1023
is read from the analog input pin 0 and written into column C (input has 10 bit
resolution).

From the cell E1 the data is read and if 100 is contained in Excel cell E1 the digital
output pin 13 (also the yellow led named "L" on the Arduino Leonardo board)
is switched on (5 volt, led L on). If any other value is contained in Excel cell E1
output pin 13 and led L are switched off (0 volt, led off).
At the same time the value of cell E1 is written to the PWM output pin 9.
The output of this pin can be converted into an analog output signal with two
consecutive resistors (910 ohms) connected in series with this output pin
connecting a capacitor (1 µF) behind each resistor to GND. An output value of
255 will make an output voltage of 5 volts, an output value of 0 will make an
output voltage of 0 volts. The output has an 8 bit resolution.

I hope this example can be useful to somebody.

Rolf

PLX_DAQ_Data_IO.ino (1.23 KB)

wichmannr:
This has been tested with Excel 2010
Along with the opening of the Excel file a user control called "Data Acquisition for Excel" is also opened and remains in the foreground. .
.............
I hope this example can be useful to somebody.

If you have that right, I'm sure it will be. The common view is that PLX will not work with versions of Excel later than 2003, and it is certainly not supported. Maybe the "user control" that you allude to is the secret that nobody else has been able to properly explain. I raise this because, over the years, there has been a litany of grief on this matter, and you could be the first person who actually knows what he/she is doing. So it would be good if you can elaborate on this. I have used PLX a lot but I use Office 2000 and therefore don't have a problem, but plenty of others do. This to the point where "My PLX won't work" is an affliction pretty well exclusive to users of later versions on Excel. The best advice I have known is to upgrade to Excel 2000, but I have never heard of user controls.

Hi Nick,

I have attached a screen shot with everything in action and an inserted photo
of the Leonardo board.

I have read somewhere that an installed solver should help to have PLX-DAQ
working properly. The solver add-in is installed on my Excel 2010, but I doubt
that this is really required as I quickly also have tested PLX-DAQ on my little
new Lattepanda 4GB/64GB-eMMC-system with Excel 365 on a WIndows 10
Enterprise OS. The Lattepanda system includes an onboard Arduino Leonardo.
It worked immediately.

I don't know what the problem of other people has been, but sou can see everything
in action on the attached screen shot.

Rolf

I tried to use PLX DAQ on a Windows 7 x64 system with Office 2013 and it failed.

Upon open Excel claimed that an object could not be found on the machine. The issue has already been discussed here: problem with PLX DAQ - Interfacing w/ Software on the Computer - Arduino Forum

The missing OCX file "selmaDAQ_Ver2.ocx" was located properly in C:\Windows\SysWOW64 as well as C:\Windows\system32. The file was tried to be registered using regsvr32.exe (both 32-bit and 64-bit version of regsvr) but failed. The OCX was manually added as a reference within the VBA editor of Excel.

Still the programm crashed at the "stamp.disconnect" line with "can't load object because it isn't available on this machine" (free translation, copied from above mentioned post).

I wasn't able to get it to work.

So best guess is, that only Excel < 2013 is supported (thus 2000, 2002, 2003, 2007, 2010) ?

NetDevil:
So best guess is, that only Excel < 2013 is supported (thus 2000, 2002, 2003, 2007, 2010) ?

Excel 2003 and older are fine. In the link you referred to, success was achieved by upgrading to XP and Office 2003, and this is the clearest path. The problem is due to changes in Excel, not Windows. What you are implying is that, whatever the change to Excel was, they changed it back for 2013. Not very likely. And the OP got a result with v 2010 anyway.

I have found that it is necessary to execute the plx_daq_install.exe contained in the downloadable PLX-DAQ.zip file to install a working Macro in Excel. On the Windows 10 system with Excel 365 at first I tried to just copy the PLX-DAQ-folder which has been placed on my Win 7 system which gave this error message. Then I copied the "Parallax Inc"-folder which had been placed as a subdirectory in "C:\Program files (x86)", which also did not work. Only after I actually executed the plx_daq_install.exe it worked at last. Now even in Excel 365, so the most recent Excel, on a Windows 10 enterprise system.

The installer makes a number of entries in the registry which it apparently needs on execution. So the port number and the baud rate is stored in the registry.Thus without using the proper installer it cannot work properly.

I have to add that I have installed Microsoft Visual Studio 2010 on the Windows 7 Enterprise system and have installed Microsoft Visual Studio Community on the Windows 10 Enterprise system if that possibly might make a difference, as the PLX-DAQ-Macro contains a Visual Basic portion.

The Excel 365 is the newest Excel available, so if it is true that only Excel < 2013 work, then Excel 365 works as well (at least for me).

Rolf

Visual Studio etc. may have something to do with this. I can't comment further, but Arduino-PLX-Excel is a menage-a-trois made in heaven, and your constructive comments may help others on this path.

One more thing I recognized: it might have to do with 64 or 32 bit version of Excel.

I was running Office 2010 32bit in a VM (Windows 7 64bit) and got it to work.
Later I installed Office 2010 64bit on the computer directly and failed (same error as usual with selmaDAQ_Ver2.ocx)
So I installed Office 2010 32bit on the computer and now it is working fine (still Windows 7 64bit)

Unfortunately I don't have a Office 2013 32bit version (yet) but I'll keep you updated.

Sorry for double post but I think I found the solution :smiley:

I tried on a Windows 7 64 bit computer a connection between Arduino Uno and PLX DAQ Excel with:

  • Excel 2010 @ 32 bit: it did work

  • Excel 2010 @ 64 bit: it did NOT work

  • Excel 2013 @ 32 bit: it did work

  • Excel 2013 @ 64 bit: it did NOT work

  • Excel 2016 @ 32 bit: it did work

  • Excel 2016 @ 64 bit: ... didn't try - I got tired :-/

I guess I must say that: PLX DAQ seems to be working on 32 bit Excel / Office only - but up to Office 2016.

The Windows installation itself can be 64 bit (at least Windows 7).

I tried taking care of installation, reboot and installation order. Hopefully it is not running only because I had installed one of the 2010 versions at some some.

Testing order:

  • Install new Office version
  • restart
  • Install PLX DAQ
  • restart
  • Try demo sheet and custom development
  • restart
  • Uninstall Office version
  • restart
  • Uninstall PLX DAQ
  • restart

and then start over at 1.

If anyone can verify on another OS that would be perfect :slight_smile:

NetDevil:
PLX DAQ seems to be working on 32 bit Excel / Office only - but up to Office 2016.

Thank you!

This may explain why some people got it to work and others did not, with newer versions of Excel.

Well, there you go, and it is great that such constructive work is being done by newbies! This is a problem that has been running for years.

Thank you very much :-[

Additional information: I tried to register the selmadaq_ver2.ocx on my Win7 x64 myself with various methods for a 64 bit Excel but nothing worked.

Running a command line with Admin permissions I tried:

  • C:\Windows\SysWOW64\regsvr32.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\SysWOW64\regsvr32.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

  • C:\Windows\system32\regsvr32.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\system32\regsvr32.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework<all versions>\RegSvcs.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework<all versions>\RegAsm.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework<all versions>\RegSvcs.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework<all versions>\RegAsm.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework64<all versions>\RegSvcs.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework64<all versions>\RegAsm.exe C:\Windows\SysWOW64\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework64<all versions>\RegSvcs.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

  • C:\Windows\Microsoft.NET\Framework64<all versions>\RegAsm.exe C:\Windows\system32\selmaDAQ_Ver2.ocx

All and everything failed ....

Maybe a newer version of selmaDAQ_Ver*.ocx would help. But as far as I can see selmaDAQ was developed by the company SelmaWare Solutions and they sell a more professional Software "makerplot" by now. I think they won't release an update on selmaDAQ anytime soon.
Maybe someone ones a version of makerplot and can look whether or not there is a new version of selmaDAQ.ocx in there?

So long it is a choice between Office 32 bit and 64 bit.

Using a 64 bit operating system (e.g. Windows) is definitely a must have now a days (as almost each and everyone of us is using more than 4 GB of RAM) - but you can install a 32 bit of Office on these machines without a problem. There are only minor reasons for using a 64 bit Office as well and those might apply to professional power users only ==> compare article of Microsoft with benefits of 32/64 bit Office

Most important: you can't use both versions on the same computer!
Therefore I decided to stick with MS Office 2013 32 bit for now.

You can’t install 64-bit versions of Office side-by-side with 32-bit versions Office, or 32-bit standalone Office applications, such as the 32-bit version of Visio or Project. Likewise, you can't install 32-bit side-by-side with 64-bit.

NetDevil:
There are only minor reasons for using a 64 bit Office........
Therefore I decided to stick with MS Office 2013 32 bit for now.

Sounds like a wise move.

Well well well .... seems to becoming my favourite thread here :slight_smile:

I downloaded the free trial version of Makerplot and tried to get it to run with Excel 2013 32 bit. No success. Thus there will be no progress with 64 bit either.

In the end I contacted SelmaSoft and (according to header of PLX DAQ example spreadsheet VBA macro) the responsible programmer "Martin Hebel". He replied very friendly, we had a quick chat back and forth but in the end it seems like there won't be a new version available as the software is pretty much outdated.

He said:

.
The only option is to rewrite the control using API controls right now, which I don't have time for.
(...)
The control is written in VB6 and is simply a wrapper for the MSComm control
(...)
I think once a person wrote a Spanish version using API calls, but the macro was locked and I never saw the source code.
(...)
If it was easy as updating I would have done it myself by now, so posting the current code would gain nothing as I doubt anyone runs vb6 any longer. It's up to someone else to find a new solution. Good luck to all.

Martin
SelmaWare Solutions

PLX DAQ is gorgeous piece of software in combination with the wrapper - but unless some one is going to come up with a 64 bit compatible version of the selmaDAQ_Ver2.ocx by writing it anew using API calls we need to stick to Office 32 bit.

Cheers

Thank you NetDevil for contacting the original programmer of the source code.

Before I started this thread I searched and found that some people had problems
with using PLX-PAQ and others had succeded using it. The following web page:

gave me the final impulse to try it myself and I found out how it works
both way around, so sending analog and digital data from Excel to Arduino
and obtaining the corresponding analog output voltage and the digital switch
from 0 to 5 volts and receiving analog input signals or digital input signals from
the Aduino. As I have not found it summarized anywhere I decided to post
my findings.

Good luck to everybody with their respective projects

Rolf

New version of PLX DAQ available with 64 bit support!

Check forum link: PLX-DAQ version 2 - now with 64 bit support! (and further new features) - Interfacing w/ Software on the Computer - Arduino Forum