Interfacing arduino with PLX DAQ and Plot some curves

Hello everyone, I allow myself to create a topic about the PLX DAQ interface with ARDUINO and EXCEL. I work on DC motors, I can get several data (like, voltage, current, rotational speed, power) with PLX DAQ in real time. To go further I would like to get this data in real time with plot. For exemple, in this project: https://www.hackster.io/Aboubakr_Elhammoumi/real-time-data-acquisition-of-solar-panel-using-arduino-2c4705 they can display the data directly on several curves. My question is how to get this type of curve ?

Please, someone, had already meet the same problem ?

Best regards,

Victor

What your stated problem is is far from clear. What your real problem [u]might[/u] be is that you are using the wrong software. PLX-DAQ only works with Excel 2003 and older. I thought the only person who still uses it is me, and I'm surprised you got any result at all.

If you are using MS Office later than 2003, you should look here, which is very close by.

Arduino is only involved in getting the data to Excel. Drawing the curves is an Excel problem.

Hello, thank you for your quick answer, I use excel 2016, and I guess it works correctly because there is data acquisition in Excel. However, I see in PLX site that it is possible to plot some curves in real time with PLX on excel. My question is, how to edit those curves ?

As I said, this is Excel, not Arduino.

This might help, I have not done this for quite a few years, and I think you will be better off using PLX v2 even if you have succeeded with the original. https://www.dropbox.com/s/pl7kiji1buecb9z/GUIDE_2PLX.pdf?dl=0 As I recall it, Excel automatically updates the graph as you supply the data - no special input from you. This is what happens when you update a spreadsheet manually; you just don't see the effect because you are too busy filling the boxes.

Hello sorry for bad english

I don’t find the link to create a new post…

I make a project for school : it’s a boxe captor made with the Arduino nano 33 ble sense. I only use the accelerometer and gyroscope include on the card.
But when i want to transfer the data to excel in live, i have a error message “Error :DATA < ASCII 10 or >ACSII 200 with PLX-DAQ…”

#include <Arduino_LSM9DS1.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Started");

  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU!");
    while (1);
  }

  Serial.print("Accelerometer sample rate = ");
  Serial.print(IMU.accelerationSampleRate());
  Serial.println(" Hz");
  Serial.println();
  Serial.println("Acceleration in G's");
  Serial.println("X\tY\tZ");

  Serial.println("CLEARDATA");  // on efface les données déjà présentes, s'il y a lieu
  Serial.println("LABEL,Temps,Mesure"); // titre des colonnes, dans Excel
}

void loop() {
  
  Serial.print("DATA,TIME,");  // envoi du temps et la mesure à Excel
  float x, y, z;

  if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);

    Serial.print(x);
    Serial.print('\t');
    Serial.print(y);
    Serial.print('\t');
    Serial.println(z);
  }
     
}

Thanks you for you help !

Your English is quite adequate, even though I don't know what a boxe captor is. Your problem is far from clear, but that has nothing to do with language. What you need to be absolutely clear about in this particular forum thread is which version of PLX you are trying to use, and which version of Excel. This particularly applies here because the last version of Excel that the original PLX reliably works with is in Office 2003 and therefore probably older than you are. So, where are we with that?

IF you are using PLXv2, I suggest you take the problem to that forum, linked to in reply #1. IF you are using the original version from Parallax AND NOT using Office 2003 or older, I suggest you cease doing so and get v2, same link.

Either way, I suggest you studiously refrain from reading reply#2. That 12volt guy is either guessing wrong, or lying, or is very lucky, or is very, very smart.

Now, that I have looked at your code, it seems reasonably kosher, apart from the complete lack of any timing control. The speed of the loop is governed by the amount of data and the ability of Arduino to communicate it. Maybe this is your intention, I recognise that the occurence of the events may not be regular, but it is probably bad practice, and you may be presenting Excel with a mess it cannot handle.

If you put a delay(100); in the loop is may work sensibly.

Hello thank you for your answer

I use EXCEL 2016 and i guess PLX DAQ v1

UPDATE

I put a comma instead of “\t” and its work but can you say to me how to trace the graph while i make the measures ? (excel)

UPDATE

A boxing captor sorry. I want to know the acceleration of the boxer’s hit in order to deduce the hit power of the boxer. Also the inclinaison of the punching bag will be useful. The captor will be put on the punching bag.

In fact, I just want to have “in live” the acceleration of the bag on excel when vthe boxer hit the punching bag.

I am a novice in arduino programmation …

thank you

faiz42: I put a comma instead of "\t" and its work but can you say to me how to trace the graph while i make the measures ? (excel)

See reply #3. If you have sent data to Excel, that is the end of the job for Arduino. You have to set up the graph in Excel just like you do for any other graph.

Nick_Pyner: See reply #3. If you have sent data to Excel, that is the end of the job for Arduino. You have to set up the graph in Excel just like you do for any other graph.

yes but the graph do not plot all the values that are measuring . It do not work ... it only plot the fisrt data lign...

How i suppose to do to make the graph plot data per data wile the arduino is sending the measures ?

Have you read reply#3? Have you read the link therein? Does the Excel sheet have more than one line? If yes, you have an Ecxel problem. If no, you have an Arduino problem, and it might be time to post your code.

Nick_Pyner:
Have you read reply#3?
Have you read the link therein?
Does the Excel sheet have more than one line? If yes, you have an Ecxel problem. If no, you have an Arduino problem, and it might be time to post your code.

yes i read the reply#3.
UPDATE : In fact, i manage to plot a graph in real time but just if i say to Excel (example) “from line 3 to line 100” but it do not take the 101st value…
How we can automatize this to plot the graph until the measurement is finished ?
the code just here :

#include <Arduino_LSM9DS1.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Started");

  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU!");
    while (1);
  }

  Serial.print("Accelerometer sample rate = ");
  Serial.print(IMU.accelerationSampleRate());
  Serial.println(" Hz");
  Serial.println();
  Serial.println("Acceleration in G's");
  Serial.println("X\tY\tZ");

  Serial.println("CLEARDATA");  // on efface les données déjà présentes, s'il y a lieu
  Serial.println("LABEL,Temps,x,y,z"); // titre des colonnes, dans Excel
}

void loop() {
  
  Serial.print("DATA,TIME,");  // envoi du temps et la mesure à Excel
  float x, y, z;

  if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);

    Serial.print(x);
    Serial.print(',');
    Serial.print(y);
    Serial.print(',');
    Serial.println(z);
  }
    delay(1000);     
}
void loop() {
 if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);
  Serial.print("DATA,TIME,");
  Serial.print(',');
    Serial.print(x);
    Serial.print(',');
    Serial.print(y);
    Serial.print(',');
    Serial.println(z);
    delay(1000);     
}
}

?... Just a guess....

I already try this method but with and without it, it doesnt work ...

For example if i put this on the parameters of the graph :

='Simple Data'!$A$3:$A$10 ='Simple Data'!$B$3:$B$10

the graph will stop at the tenth measurement and it will eb the same with an other number instead of 10...

its problematic because i dont know how much values i will measure... its never the same

I dont know how to fix that ....

Does the Excel sheet fill out in the proper manner? If yes, this is a chart formatting problem.

Yes she did. Thank you for all you answers i will see that.