PLX-DAQ version 2 - now with 64 bit support! (and further new features)

NetDevil:


@Snaggles,
hi :slight_smile: there are two ways to solve your problem I think.

The first one is to use CELL,SET,ONSHEET,SheetNameX => what didn't work here? The big advantage of the DATA command is that it automatically writes to the next free row; CELL,SET on the other hand does not. For that one to work in your case you need a counter for each probe indicating the current line to write to on the respective sheet. Also please note the information in the Beginners Guide about adding a short delay of maybe 3 ms before each CELL,SET command to clear the buffer. Otherwise many times 0's were written in Excel.

The other option is indeed using VBA and to write an own command like "SETACTIVESHEET,SheetNameX" to set the globally used variable in PLX DAQ to the posted SheetNameX. That way all DATA commands coming in afterwards will be routed to that sheet. The command can be added within the CustomDevPoint function. However I guess there might be issues with the row variable for the sheet since that is a global counter as well I guess. Therefore it should be adjusted as well each time the sheet changes (there is a function to get the currentMaxRow for a sheet).

If I were you I'd start with the first option as all changes can be done in Arduino code.

@NetDevil[/b] Thanks for your reply. I would prefer to get it to work in Arduino myself. Here are some troubleshooting trials I've tried.
If I put in
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2");[/u]** **[u]
(Probe 2 is my 2nd sheet name) I get all the data printed on the first sheet still and a Error within command 9/Subscript out of range. I've tried different combinations of commas added in thinking it might be a missing variable confusing it but get the same problem.
If I put in my string that I want printed
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2, (String)DATA,TIME,TIMER," + channel_ids[channel] + "," + sensordata + ",AUTOSCROLL_20");[/u]** **[u]
I get nothing printed and an error 13/Type mismatch
If I follow the beginner's guide and do
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2,B,2,DATA");[/u]** **[u]
It prints the actual word DATA in sheet Probe 2, Cell B2 just fine but also keeps overwriting it. All the probe data is still printed on the first sheet as well even though I'm not changing the sheet again.
I guess I'm not exactly clear on the syntax of the command or maybe I'm trying to do something that it can't do...?

Thanks for this program.
it works ,but sometimes comerror pops up

hi, does anyone know the fastest sampling rate the plx-daq/excel can handle?

trying to analyze sound frequencies and so need to take readings at a few hundred Hz at the minimum, not sure if i can do that with excel. was initially going for a sampling rate of 1000Hz

after experimenting I feel like what I'm having trouble with also is printing the time elapsed from progam start to excel as the code works fine with serial monitor

// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3

#include "EmonLib.h"             // Include Emon Library



#define VOLT_CAL 269
#define CURRENT_CAL 60
unsigned long time;

EnergyMonitor emon1;             // Create an instance

void setup()
{  
  Serial.begin(9600);

  Serial.println("CLEARDATE");
  Serial.println("LABEL, Time Elapsed,Wall Voltage,Wall Current, Wall Power, Mic Voltage");
 
  emon1.voltage(A0, VOLT_CAL, 1.7);  // Voltage: input pin, calibration, phase_shift
  emon1.current(A1, CURRENT_CAL);       // Current: input pin, calibration.
}

void loop()
{
  emon1.calcVI(20,50);         // Calculate all. No.of half wavelengths (crossings), time-out

  float currentDraw     = emon1.Irms;             //extract Irms into Variable
  float supplyVoltage   = emon1.Vrms;                    //extract Vrms into Variable
  int sensorValue = analogRead(A4);

   time = millis();

  Serial.print(time);
  Serial.print(",");
  
Serial.print(supplyVoltage);
Serial.print(",");
Serial.print(currentDraw);
Serial.print(",");
Serial.print(supplyVoltage*currentDraw);
Serial.print(",");
Serial.println(sensorValue);

 
}

Hi. I have some problems printing data from MPU6050. Excel goes out frecuently. I want print almost 1000 data but I get around 100. Thanks.

Andres Bravo

Hi friends!
Firts, thanks for this fantastic program! But, I have a question about PLX-DAQ. I need to import about 50 columns of dates in Excel. Is it possible to do? Exist any version capable to do it?
Thanks you!

Hi,

Thank you for this beautiful application.

I currently use it to test it with an Arduino Uno, and that seems to work.

I would like to use your Macro to read and place in Excel the value of a RFID Tag.

The RFID reader is directly connected to RS232 (without Arduino).

Could you guide me to change the part of the macro?

I am asking you this because I am absolutely not a specialist in this language VBA.

Regards

Oh wow, a lot that happened here!
Internet is still not stable, but good enough to post some replies (although time is short as well, should be building furniture instead of Arduino :slight_smile: )



@Snaggles
Yeah you need to use the full command for writing to a specific sheet.
Serial.println("CELL,SET,ONSHEET,Probe 2");missing arguments (too few)
Serial.println("CELL,SET,ONSHEET,Probe 2, (String)DATA,TIME,TIMER," + channel_ids[channel] + "," + sensordata + ",AUTOSCROLL_20");wrong syntax of String parsing. The "(String)" thing needs to be right after the "(" of "Serial.println(". Also the AUTOSCROLL might not work with CELL,SET - not quite sure right now.
Serial.println("CELL,SET,ONSHEET,Probe 2,B,2,DATA");that code will only print the word DATA to cell B2 on sheet "Probe 2", you should use a counter to increase the row (here 2) by one in each loop.
What seems to be best for you is:

Serial.println((String)"CELL,SET,ONSHEET,Probe 2,A," + i + "," + "TIMER");
Serial.println((String)"CELL,SET,ONSHEET,Probe 2,B," + i + "," + channel_ids[channel]);
Serial.println((String)"CELL,SET,ONSHEET,Probe 2,C," + i + "," + sensordata);
i = i + 1;

You need to paste each value you want to have specifically to a cell. Thus in your example it is three data per row what makes three commands one for each column A and B and C. Starting with row "i" which is increased afterwards.

I must admin that command is not very cool at the moment - I should put that on my bucket list to improve it with the next version.



@dasaya007
You're welcome :slight_smile: Thanks for the feedback.
The COM error is typically a result of an already in use COM port. Most likely the running PLX DAQ was closed without disconnecting first or the connection between the computer and Arduino was interrupted e.g. by pulling the cable. Afterwards the port is still blocked and it is best to close PLX DAQ and disconnect + reconnect Arduino.



@zueses
I transferred data at over 1.000.000 baud but it got unstable. At the moment I would recommend going over 18.000. But it also depends on how many delays you have in your code. The baud rate is only the speed of transfer - if you transfer one data set every 10 seconds all is fine, but if you spam data at 1.000.000 baud in your loop function it will most likely crash.
1000 Hz is once every millisecond which is quite fast. That will most likely not work at the moment.

Regarding your issue: your code is fine, but you need to start with the "DATA" key word for the correct command in Excel to trigger.
Using String class your code can be shortened (however this is not good regarding performance since the class has a huge memory consumption):

  Serial.println( (String) "DATA," + time + "," + supplyVoltage + "," + currentDraw + "," + (supplyVoltage*currentDraw) + "," + sensorValue );


@jandres
Try lowering your baud rate (at maybe 5xxx) and building in some delays of maybe 3 to 10 milliseconds. Spamming too much data in too little time can kill PLX DAQ



@JRArduino
Thank you very much :slight_smile:
The standard version of PLX DAQ should be able to do that. Using the DATA command followed by each value separated by a comma from the next one. I programmed it to be dynamically in size - let's hope that works with up to 50 :slight_smile:



@ddominique
Beautiful is a nice word :slight_smile: thanks a lot :slight_smile:
There is no need for you to be a VBA specialist. All you need is the C language as you will write all your code in Arduino IDE. Simply read your RFID ID as normal with Arduino, maybe save it in a variable and use the CELL,SET command to post it to a sheet in Excel with a specific column + row combination (e.g. cell D5 if you want it there).
Otherwise you can also use the DATA command to just post it to the next free row on your Excel sheet.
Take a look at the Beginners Guide where all those commands are explained.



Greetings to all of you.

Hey NetDevil,

I want to ask, I am using Mac OS currently, and is trying to use the PLX-DAQ. What I am confused is that in my arduino application, which I have reinstalled multiple times just in case. I just can't seem to find COM in port? Or is it possible to use usbmodem in PLX-DAQ excel?

Thx

Hello!
Thank you for the great effort

I'm trying to send data from an Excel Document to Arduino UNO

Basically what I'm doing is changing the set point of the temperature every second to make a "Reflow profile for soldering"

is it possible to do that with the PLX-DAQ ?

Thanks

If you look at the "Beginners Guide" that comes packaged with PLX-DAQ-v2 there is a command called CELL,GET, this is a command sent from the arduino, the Excel app responds with the value of the specified row + column. Although it does not show in the example you might realize that if the row value is replaced by a variable you would be able to retrieve different values from the desired column at any particular time period you set in your arduino code.

CarlosOliveira:
I'm trying to send data from an Excel Document to Arduino UNO
is it possible to do that with the PLX-DAQ ?

Hi Carlos,
yes it is possible, just the way sumguy described it. And many thanks for the feedback :slight_smile:



sumguy:
If you look at the "Beginners Guide" that comes packaged with PLX-DAQ-v2 there is a command called CELL,GET, this is a command sent from the arduino, the Excel app responds with the value of the specified row + column. Although it does not show in the example you might realize that if the row value is replaced by a variable you would be able to retrieve different values from the desired column at any particular time period you set in your arduino code.

@sumguy:
thanks for the perfect answer, Karma for you! Welcome to the team ;D no we are ..... two :grin:



Brilliantgp:
I want to ask, I am using Mac OS currently, and is trying to use the PLX-DAQ. What I am confused is that in my arduino application, which I have reinstalled multiple times just in case. I just can't seem to find COM in port? Or is it possible to use usbmodem in PLX-DAQ excel?

Hi Brilliantgp,
MacOS is nothing I was ever able to test, therefore I can not give you an answer. Nevertheless it was discussed multiple times in the past, sadly no one has ever taken the time to deep dive into it, research, trial and error or post feedback.
It would be much appreciated if you can take a shot at it?
See previous requests first one here and second one here.



Greetings to all of you

Good day !
If it is inappropriate please ignore.

I just want to ask what is the difference of using PLX-DAQ to other such as Cool Term, Tera Term, Putty, etc. ?
And is the latest version 2.11?
Lastly, this is compatible with sensors (current)?
Thanks and sorry for the inconvenience.

OneLeafAutumn:
I just want to ask what is the difference of using PLX-DAQ to other such as Cool Term, Tera Term, Putty, etc. ?
And is the latest version 2.11?
Lastly, this is compatible with sensors (current)?

Hi OneLeafAutumn,

well no problem asking those questions. I don't know CoolTerm and Tera Term but it lines in with PuTTY as command line orientated tools for serial communication I guess? In some way PLX DAQ is similar but the main difference is, that PLX DAQ comes shipped as a bundle with Microsoft Excel, whereby in Excel macros were programmed to listed to the data being received via the serial port and to act accordingly (e.g. adding data to rows, deleting data, transforming certain key words to variables). It is more then just communication via serial port, it is about plotting received data in a more structured format.

2.11 is the currently newest version, yes. Although it already is a bit older and there is a certain change list in my head I am not having the time at the moment to implement further changes.

It is compatible with everything that the Arduino (or other micro controller) can work with. All it does is receive data in a structure format via the serial interface. There should be any kind of hardware between PLX DAQ and the sensors which can read the current values from the sensors and transform that into plain text.

In case you have further questions please feel free to ask.

Greetings

Jonathan

Hello NetDevil,

Sorry haven't checked your reply, been busy with school and stuffs.
Thanks for answering my questions. It's a great help since I am currently planning to do a project and wondering whether I can use PLX-DAQ.

Hey, I am new to arduino and programming in general. For school I am working on a project where I want to meassure Humidity and Temperature using the DHT22 sensor. I also have to transfer the data on Excel to make diagramms and tables. Could you please take a look at the attached sketch and help me with the PLX-DAQ ?
Thanks for all the efforts in advance,
Jonas

DHT22.ino (2.03 KB)

Hello!

I'm currently using PLX-DAQ V2.11 on a laptop on which Windows 10 has just been installed and I have issues that I didn't have before.

Indeed, even if my Arduino is connected on COM4 and I set the frequency to 128000 as it used to work on Windows 7, when I start my analysis, no data are written on my Excel File.

I discovered that when I connect my Arduino/Mega to my PC, when I go into the "Device Manager", in the "COM & USB" Section, my Arduino is called "USB Serial Device" while it used to be "Arduino Mega".
I thought it could come from Arduino Drivers that should be re installed for Windows 10 maybe?

Any help is appreciated, thanks!

Hugo

ScapeZ:
Could you please take a look at the attached sketch and help me with the PLX-DAQ ?

Hi Jonas,
we are both German but let's keep this in English thus everyone can participate (just wanted to say I do understand your code and comments made :wink: )
What is your problem anyways? You are prompting two outputs to Serial Monitor I see. First one being in line 28 looks fine, although you just send your i variable to Excel - nothing fancy there I guess?
Next one in line 34 to 39 is a bit tricky. Do you not want to have in Excel via PLX DAQ? In that case ok, but if you want it you need to do it in the proper format (like the one in line 28). Just replace your i variable with the once for humidity and temperature.



Hugocad:
I discovered that when I connect my Arduino/Mega to my PC, when I go into the "Device Manager", in the "COM & USB" Section, my Arduino is called "USB Serial Device" while it used to be "Arduino Mega".
I thought it could come from Arduino Drivers that should be re installed for Windows 10 maybe?

Hi Hugo,

sadly I do not have any experience with Win10 and PLX DAQ / Arduino yet. Still using Win 7 :wink: but there were some users with Win10 being able to use the software I guess already. Have you tried reinstalling the drivers? As long as your Arduino is not working fine on Win10 I guess PLX DAQ would suffer recognizing the device as well and won't work. Just try to solve that one out and everything should be fine.


Greetings to both of you.

Brilliant, please keep up the great work.

Net_Devil this is great work you have done. I'm having trouble figuring out how to add more analog channels to the PLX-DAQ v2.
Arduino code:
oid loop() {
milli_time = millis();
voltTC = 5.000 * analogRead(A0) / 1024.000;
voltTH = 5.000 * analogRead(A1) / 1024.000;
voltpH = 5.000 * analogRead(A2) / 1024.000;
Serial.print("DATA,TIME,");
Serial.print(milli_time);
Serial.print(",");
Serial.println(voltTC);
Serial.print(",");
Serial.println(voltTH);
Serial.print(",");
Serial.println(voltpH);
//Serial.print(",");

delay(1000);

Is there anything I have to do in DataReady subroutine?
Thanks

Try using just the one println and see if it helps.

oid loop() {
  milli_time = millis();
  voltTC = 5.000 * analogRead(A0) / 1024.000;
  voltTH = 5.000 * analogRead(A1) / 1024.000;
  voltpH = 5.000 * analogRead(A2) / 1024.000;
  Serial.print("DATA,TIME,");
  Serial.print(milli_time);
  Serial.print(",");
  Serial.print(voltTC);
  Serial.print(",");
  Serial.print(voltTH);
  Serial.print(",");
  Serial.println(voltpH);  //last serial command uses println
  
    
  delay(1000);