One of the most important things in the robot design is the possibility to check and control the values feeded by the analogic sensors, i.e. accelerometers, gyros, IR sensors.
In order to view the sensor values you can use the Serial Port that can be displayed in the Serial Monitor inside the Arduino IDE environment.
But it isn’t possible to show charts or save the data read from the sensors.
There are several software that allow to show the graphs derived from the sensors data, and I published in the past a tutorial (here).
Usually you use Processing or similar language that require always to write some code. You have to write code to change the charts or to implement new lines in the graphs.
I thought that the ideal situation would be to use a software that everyone knows: Microsoft Excel.
If it were possible to use Excel to receive the data from the serial port, it would be easy to make very nice and user friendly charts.
I searched in Google and i found a sw that allows easily to view the serial port values in Excel.
The sw is made by a competitor of Arduino, Parallax, the company that sells the Boe-Bot and the Propeller, wich are in direct competition with Arduino.
The sw is called PLX-DAQ and it is a free software. You can download it here. It works only in Windows, sorry.
In practice it is a little sw in VBA that adds some features to Excel to receive and elaborate real time data. If the data are in Excel it is also possible to save them in a file and it is possible to use the amazing function library already present in the spreadsheet software. The documentation about PLX-DAQ is complete and clear.
The PLX-DAQ takes commands in uppercase and every data row have to end with a ‘carriage return’. The serial port speed required by PLX-DAQ is particular, because it derives from Parallax world. In any case the rate is from 9600 bit/sec to 128.000 bit/sec. The speed of 128.000 bit/sec works fine in the Arduino!!
The main commands are:
- LABEL used to define the column headings. The command format is: Serial.println (“LABEL, INT_COLUMN”);
- DATE, TIME that allows the serial port to send data to Excel. The first field is always TIME, then the fields of interest (val). The command format is: Serial. print (“DATE, TIME,”); Serial.println (val)
- ROW, SET, k, which allows you to define the next line to write. It is useful if you want to plot n data and then go back to first row and cycle. For example, you can plot 1000 data on the chart and then start again from the first position, in order to avoid a graph too large. The command format is: Serial.println (ROW, SET, 2) put the cursor in the second line next step.
Here’s an example that shows Excel function sin (x).
The Arduino code:
int x = 0; int row = 0; void setup() { Serial.begin(128000); // opens serial port, sets data rate to 9600 bps Serial.println("CLEARDATA"); Serial.println("LABEL,Time,x,sin(x)"); } void loop() { Serial.print("DATA,TIME,"); Serial.print(x); Serial.print(","); Serial.println(sin(x*PI/180)); row++; x++; if (row > 360) { row=0; Serial.println("ROW,SET,2"); } delay(100); }
PLX-DAQ enable a more complex interaction with Excel. It can take the cell values from Excel, it can read and write check box. You can see the PLX-DAW documentation for other details.

#1 by Vander on 8 January 2012 - 23:39
Quote
So Great!!!!!
Congratulations Man, it’s work very well!!!
Thanks…
#2 by Varun on 15 August 2012 - 06:01
Quote
Hey I’ve downloaded the folder from http://www.parallax.com/tabid/393/Default.aspx.
Inside it were 2 files a help one and an excel file, PLX-DAQ Spreadsheet.
When I click on the spreadsheet, I get an error saying:
Could not load an object because it is not available on this machine.
After pressing okay a couple of times a Microsoft Visual Basic window pops up saying Run time error 424: Object required.
I get 4 options, continue(pressable) debug and end and help.
If I press debug it takes me to this visual basic window.
I really need this software to for a project Im doing at uni as unlike processing it can save my data in now only just one row of excel but also COLUMNS.
#3 by robottini on 15 August 2012 - 22:10
Quote
I tried just now an installation in a new computer with windows 7 and the Excel 2007. It works very well. Are the macros in excel enabled?
I don’t know, I think the problem is the excel installation or in the computer, not in the PLX-DAQ.
#4 by james on 7 November 2012 - 19:40
Quote
Could you post a basic Arduino code for data logging analog signal values?
#5 by robottini on 7 November 2012 - 20:28
Quote
I haven’t a real basic code. I used it in many programs, but always inside complex elaborations, with IMU and kalman filter and so on.
Read the analog values and call this little code:
int row=0;
int grafo=1;
int testata=1;
void serial_graphic() {
Serial.println(“CLEARDATA”);
Serial.println(“LABEL,Time,Acc, Gyro, AngK, Angc, Motors”);
testata=0; }
Serial.print(“DATA,TIME,”);
Serial.print(ACC_angle, DEC);
Serial.print(“,”);
Serial.print(raw_gyro, DEC);
Serial.print(“,”);
Serial.print(actAngle, DEC);
Serial.print(“,”);
Serial.println(actAngleC, DEC);
}
row++;
if (row > 2000)
{
row=0;
Serial.println(“ROW,SET,2″);
}
}
#6 by Vennish Muthu on 21 November 2012 - 11:04
Quote
Hey guys i am doin a small project on Data Acquisition from a vernier Caliper to PC. i was some what successful in transferring the data from Vernier to Arduino Serial window Screen.
but now i want to transfer my data to a Excel file. I have used ihe PLX-DAQ software but i frankly don’t know how to use this software,should we program some where or if we connect directly will it work.
can someone help about this…
#7 by sleli on 22 January 2013 - 19:34
Quote
Hello,
Great idea! Why don’t you provide the VBA code ?
Thanks
Stephane
#8 by robottini on 22 January 2013 - 22:08
Quote
Because the PLX-DAQ sw is a commercial software. It is not mine. So the source code is not available.
#9 by Polet on 27 January 2013 - 01:48
Quote
Hi, I’m just a newbie here. Can you kindly post a tutorial or simple guide to use the PLX-DAQ?
Do you need to connect it to Arduino? How?
Thanks in advance!
#10 by everaldo on 29 January 2013 - 15:08
Quote
Thanks for the tip. But I must, also, direct access by VB application. Any suggestions?
#11 by vennishmuthu on 4 March 2013 - 16:12
Quote
I want to get the data in second sheet, Is it possible in PLX daq….?
#12 by robottini on 4 March 2013 - 17:19
Quote
No, only in the first sheet.
#13 by xxduyxx10 on 5 March 2013 - 05:35
Quote
Hello, I need help sending my code from Arduino to the program. I’m trying to measure the RPMs in real time. Here is my code for reading RPMs:
int ledPin = 13;
int statusPin = 12;
volatile float time = 0;
volatile float time_last = 0;
volatile int rpm_array[5] = {0,0,0,0,0};
volatile int stat;
void fan_interrupt() {
time = (micros()-time_last);
time_last = micros();
if(stat == LOW) {
stat = HIGH;
}
else {
stat = LOW;
}
digitalWrite(statusPin, stat);
}
void setup() {
Serial.begin(9600);
attachInterrupt(0, fan_interrupt, FALLING);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
pinMode(statusPin, OUTPUT);
}
void loop() {
int rpm = 0;
while(1) {
delay(1000);
if(time>0) {
rpm_array[0] = rpm_array[1];
rpm_array[1] = rpm_array[2];
rpm_array[2] = rpm_array[3];
rpm_array[3] = rpm_array[4];
rpm_array[4] = 60*(1000000/(time*4));
rpm = (rpm_array[0] + rpm_array[1] + rpm_array[2] + rpm_array[3] + rpm_array[4])/5;
Serial.println(rpm,DEC);
}
}
Thank you.
#14 by MR_Fahmy on 12 March 2013 - 12:13
Quote
Hi,
I’m using Arduino uno and Plx-daq to get data aquisition
there’s no problem with sending data FROM arduino TO plx-daq..
but now i want send data FROM excel TO arduino
I have tried using Serial.println(“CELL,GET,A2″); //A2 is the cell i want to retrieve the data//
fyi, i’m using ms. excel 2010
is it possible to send data from excel to arduino?
how’s it like? using serial.read()?
what’s the code to send data from excel to arduino?
i’m very pleasant if you can help me.
thanks.
regards, MR_Fahmy.
#15 by robottini on 12 March 2013 - 13:11
Quote
Sorry, I have no experience sending data from Excel to Arduino.
#16 by Lorenzo on 16 March 2013 - 15:03
Quote
Hi
i have a problem and i can’t understand where it is….
I’ve installed the parallax software, but when i open the excell spreadsheet i get an error (unspecified) from windows that terminate excel. Why?
——–
Riscrivo in italiano, perchè l’autore mi capisca meglio
In pratica quando apro excell mi si pianta subito, senza motivo, appena fa partire automaticamente le macro (le ho attivate di default). Se le disattivo non si pianta, ma ovviamente non succede niente…
Ho excel 2000, un po’ vecchiotto, ma dovrebbe essere compatibile con il sw della parallax…qualche idea?
——–
Grazie!
Lorenzo
#17 by robottini on 16 March 2013 - 19:10
Quote
Sorry, I don’t know why Excel 2000 doesn’t work. I tried only with Excel 2003 and 2007 and it works.
Scusa ma non so quale sia il motivo per cui Excel 2000 non funzioni. Ho provato solo con Excel 2003 e 2007 e funziona.
#18 by Lorenzo on 16 March 2013 - 21:56
Quote
Maybe it’s excell 2000: on my pc it doesn’t work at all, on an other pc (always with excell 2000) it start very well and it correctly chek TX RX status, but i can’t download any datas..
I’ll try with others excell versions. Many thanx! GRAZIE!
#19 by Lorenzo on 17 March 2013 - 16:06
Quote
Solved!

For the others that have my same problem:
- it’s a problem of excell
- unistall, repair or reinstall the office suite doesn’t solve the problem (maybe it’s time to update
- the problem is caused by this file /windows/system32/fm20.dll
- Microsoft suggest to operate in this way (http://support.microsoft.com/kb/182500/en), tiping “Regsvr32.exe fm20.dll” in start->run.
- In my case this doesn’t solve the problem so i have renamed (or deleted) the fm20.dll files and then i have re-opened excel.
- Office find that something doesn’t work so it ask for office CD to repair the error.
- After it ALL WORK OK!!!!
Note: if you are using arduino on windows system like me, maybe that the systema assigned to your arduino borad a COM port >15 (and so this VBA can’t operate with these ports). So you must disable an hardware device that you don’t use and assign a COM port <9 to your arduino board. All done throught "hardware configuration" in PC prop.
Now you are ready to enjoy this VBA and get a very and powerfull datalogger real time
#20 by robottini on 17 March 2013 - 17:29
Quote
Hy Lorenzo, thanks for your support!!
#21 by meghan on 28 March 2013 - 10:24
Quote
Hi
I was using PLX-DAAQ with bluetooth over serial port and it can’t find the port. It only finds the port when i wire it with arduino. Why?? Project due in 10 hours! Pls help me!
#22 by robottini on 28 March 2013 - 11:42
Quote
Sorry, I don’t use bluetooth with Arduino. So I don’t know the problems related to the bluetooth with Arduino and Serial port.
You can ask for help in the Arduino forum: arduino.cc/forum/
#23 by Ben on 22 April 2013 - 13:34
Quote
Hi there, pretty new to the whole programming world, this is my arduino code that works great with my sensors, but I’m not sure how I would turn it into graphical form, any help? I need bar charts for each individual sensor, and if possible a summation of all of them for a line graph vs time
int analogPin1 = 0;
int analogPin2 = 1;
int analogPin3 = 2;
int analogPin4 = 3;
int analogPin5 = 4;
int analogPin6 = 5;
int val = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
val = analogRead(analogPin1); // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin2); // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin3); // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin4); // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin5); // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin6); // read the input pin
Serial.println(val); // debug value
delay(250);
}
#24 by robottini on 23 April 2013 - 03:10
Quote
Try this code:
int analogPin1 = 0;
int analogPin2 = 1;
int analogPin3 = 2;
int analogPin4 = 3;
int analogPin5 = 4;
int analogPin6 = 5;
int row = 0;
void setup() {
Serial.begin(128000);
Serial.println(“CLEARDATA”);
Serial.println(“LABEL,A0,A1,A2,A3,A4,A5″);
}
void loop() {
Serial.print(“DATA,TIME,”); Serial.print(analogRead(analogPin1)); Serial.print(“,”); Serial.print(analogRead(analogPin2));Serial.print(“,”); Serial.print(analogRead(analogPin3));Serial.print(“,”); Serial.print(analogRead(analogPin4));Serial.print(“,”); Serial.println(analogRead(analogPin5));
row++;
if (row > 360)
{
row=0;
Serial.println(“ROW,SET,2″);
}
delay(250);
}