Importing data from Serial to Excel using PLX-DAQ

Hi,
I am a bit confused on how this software works and am looking for some guidance.

What I want to do is obtain serial data from my Oxygen analyser and import it directly into excel at one second intervals (along with a timestamp). I downloaded PLX-DAQ and was able to connect my data, it reads it as connecting (green button flashing), but it will not transmit it or record it anywhere.

My question: Is it possible to download serial data directly into excel using the PLX-DAQ software? If so, how do I code it to record the data in the manor I need?

Thanks for any help!

Comments

  • Do you have one of the example programs in the PLX-DAX.zip file running on your Stamp or Propeller?
    Did you open the PLX-DAQ.xls file in the "C:\Program Files (x86)\Parallax Inc\PLX-DAQ" folder? Was it able to launch the Active X control box? I think I had to do 2 different enables to allow it to run.
    Once I had the Active X control running with the example program on my Propeller, it works great in Excel.

    When I first tried PLX-DAQ tonight in efforts to answer your question, I made the mistake of trying to use Excel's built-in Data Streamer. After about 20 minutes, it never worked, even though it created a nice looking 10 channel Data I/O spreadsheet. I may still look at using it somehow to skip the PLX-DAQ Active X tool.

    I am no expert, I literally ran PLX-DAQ for the first time tonight, but did stumble through it, so I might be able to help a little.
  • Wren,
    Recently I revisited the old PLX-DAQ and I find that it works well with Excel and Windows 10.
    The examples provided by Martin Hebel are easy to use and adapt for your own use.
    I was really looking for data capture in Excel with scrolling which was not available in the old PLX-DAQ.
    I found that Excel scrolling is supported in PLX-DAQ v2, which is is claimed to be an enhanced, open version tool for data acquisition into Excel compatible with the latest versions of Windows.
    However, PLX-DAQ v2 is targeted at the Arduino, and I could not get it to work with Propeller 1.
    I have a feeling that all that is needed serial data tweak to bridge the difference between Arduino and Propeller 1 serial flow, but I could not achieve it and have since moved on.
    Maybe WBA or some other skilled Prop 1 coder may be able to get PLX-DAQ v2 to interface to Prop 1.
    All the PLX-DAQ v2 development and Excel code is well documented on the Arduino forum but it seems that the author has moved on and is not providing support.
  • WBA ConsultingWBA Consulting Posts: 2,885
    edited 2019-11-07 - 19:25:08
    I looked into the Data Streamer function within Excel and it seems to be really easy to use. The data is sent to excel with a standard CSV format. When you connect the Data Streamer to a microcontroller, Excel creates a spreadsheet with tabs for Data In, Data Out, and Settings for parameters like the number of channels, etc. From there it's as simple as using excel to manipulate data like usual. To use this with a Propeller or Stamp, you just need to use the basic serial communication methods and hand over the data separated by commas. Here is a basic Arduino example that makes it pretty clear.
    Someone with good Propeller and Excel skills could make some killer examples fairly easily.

    macrobeak, I hope you weren't implying that I am a skilled Prop 1 coder, because I am not. I am just really good at mashing together other people's good code for my own projects, LOL.
  • WBA,
    I am also a masher, but I must acknowledge your superior skills because I missed this Excel Data Streamer option when I was doing my Excel research.
    It seems a great data aquistion option, but I could not get it to work - it seems to be a Microsoft internal problem, and I am still troubleshooting.
    I set up a simple csv serial data stream on the USB port using FullDuplexSerial and I verified it was a valid serial stream by using ParallaxSerialTerminal and Bray Terminal at the PC.
    However, I could not get the Excel Data Streamer to accept the serial data stream, despite the USB port being recognized.
  • Well, to be honest, I only stumbled across it thinking that was the way to get PLX-DAQ setup.

    Anyhow, a colleague and I have both spent numerous hours over the last couple days and cannot get the data streamer to work. He even tried the example setup on an arduino and Excel would not see the stream. Not sure what the trick is to getting it to see the data, but the console interface in Excel never sees anything from the serial port. That's a bummer because this would have given me a way to feed data into Excel from a Prop with no software to install on the client PC.
  • BeanBean Posts: 8,068
    edited 2019-11-10 - 13:13:00
    I use the FTD2XX.DLL with VBA to get serial data into excel.
    It works very well, but only works with FTDI chips USB to serial interface chips.
    So it works with the Prop Plug and the USB2Ser adapter.

    I have attached a demo excel sheet to demonstrate.

    Bean

    P.S. Further down I have posted a version that allows multi-column data using TAB as the column seperator.
  • The FTDI DLL works well because it totally bypasses Windows. To call the Windows serial functions a hot mess would be a serious insult to hot messes. I've done it straight to the API in VB6, which is similar to VBA, and it takes two pages of code just to open a serial port. And it doesn't work in 16-bit versions of Windows, or under emulation, because the OS is thread-bound and you're SUPPOSED to launch a thread to keep snarfing up incoming data so it doesn't get lost. The 32 and 64-bit Windows do that for you but it's not documented, and of course VB can't do threading because M$ deliberately crippled it that way.
  • Bean,
    Thanks for sharing your ftdi demo.
    It works perfectly for me, importing a serial string of variables into a single Excel column.
    I guess one would have to write additional VBA code for importing multiple columns of csv data and also scrolling.
    Could I ask if you have any pointers or ideas on these enhancements.

  • Bean, ditto to what macrobeak said. The FTD2XX.dll looks like a clean way to leverage serial data with Excel, albeit my VBA is a little rusty. I did find the D2XX Programmers Guide that explains all the functions on the FTDI guide page.

    But, like macrobeak, I noticed I can only get data into a single column. Sending a tab character in SPIN using
    serial.Tx($09)
    
    is just placing a tab inside the single string of text in one cell.
  • Here is a multi-column version using tab as the column seperator.

    Enjoy, Bean
  • Since there seems to be some interest in an excel data logger I have created a new thread to develop one.

    https://forums.parallax.com/discussion/170735/excel-ftdi-serial-data-logger#latest

    The one at this link allows you to insert a timestamp by outputting "[TIME]", and programmable timeout and max lines.

    Bean
  • Cluso99Cluso99 Posts: 15,549
    edited 2019-11-10 - 21:05:30
    localroger wrote: »
    The FTDI DLL works well because it totally bypasses Windows. To call the Windows serial functions a hot mess would be a serious insult to hot messes. I've done it straight to the API in VB6, which is similar to VBA, and it takes two pages of code just to open a serial port. And it doesn't work in 16-bit versions of Windows, or under emulation, because the OS is thread-bound and you're SUPPOSED to launch a thread to keep snarfing up incoming data so it doesn't get lost. The 32 and 64-bit Windows do that for you but it's not documented, and of course VB can't do threading because M$ deliberately crippled it that way.
    Yes, amazing how they managed to butcher such a basic and fundamentally simple interface. Then again, they butchered USB too.
    It’s amazing that they got the USB mouse to work.

    Meanwhile they seem to have broken the USB keyboard recently. We are finding more and more that the keyboard lag can be many seconds while the screens seem to repaint slowly while some background task takes over - possibly sending all our data home???
    My Prop boards: P8XBlade2 , RamBlade , CpuBlade , TriBlade
    P1 Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    P1: Tools (Index) , Emulators (Index) , ZiCog (Z80)
    P2: Tools & Code , Tricks & Traps
Sign In or Register to comment.