Serial Port Plotter

Serial Port Plotter

This is a Windows application that displays real time data from serial port. I had to create it for a project and I would like to put the code here so more people could use it. The application is 32-bit and built with Qt and QCustomPlot library. It can plot up to three axes and 1000 data points. Plot refresh rate is 20 Hz, independent of incoming data frequency. It can also export JPG with the plot.

The application supports zooming and dragging using the mouse wheel. Clicking anywhere in the plot displays the X and Y values of the graph in the status bar.

Screenshot

/media/uploads/borislav/screen.jpg

How to use the application

Just send your integer data over the serial port. The application expects certain format so it can differentiate between values. Each message you send must start with '$' and end with ';' (semi-colon) and the integers inside need to be comma-separated. The Help button displays comprehensive instructions. Example: If you need to plot three values, use this code in your mbed source file:

send data over the serial port

pc.printf("$%d %d;", data1, data2);
wait_ms(10); 

Depending on how much data you want to display, you can adjust the number of data points. For example, if you send data from the serial port of the mbed every 10 ms (100 Hz) and the plotter is set to display 500 points, it will contain information for 5 seconds of data.

Source

The zip contains the source and .pro file of the Qt Project. A standalone .exe is included for the people who do not want to build the source. Download from here


Report

14 comments on Serial Port Plotter:

27 Feb 2015

Hi

I have used this program and it works seems well, however, i have to disconnect then connect it again then the next data will be plotted, how to solve it? And how to clear the data in the buffer then store the new one?

Thank you!

05 Aug 2015

unable to connect port problem is showing...at the bottom

24 Nov 2015

Hi,

Please note that the (very nice) utility doesn't deal with negative values -

the string "$21; $-34;" will draw +21, +34 on the graph.

Hope you can fix it.

Thanks /media/uploads/eyalasko/capture.png

19 May 2016

Hi,

this very nice utility can deal with negative values. You just need to replace this part :

else if(isdigit(temp[i]) || isspace(temp[i])  )

by

else if(isdigit(temp[i]) || isspace(temp[i]) || temp[i] =='-' )

Cheers

12 Jan 2017

ambps plus wrote:

unable to connect port problem is showing...at the bottom

Hi Guys, I am trying to use the Serial Plotter, I get at the bottom " Cannot open Port " I changed the baudrate settings to the Settings i have congfigured in the Serial Terminal !

Help Appreciated !! Thanks sbw

29 Mar 2017

cap we wrote:

Hi,

this very nice utility can deal with negative values. You just need to replace this part :

else if(isdigit(temp[i]) || isspace(temp[i]) )

by

else if(isdigit(temp[i]) || isspace(temp[i]) || temp[i] =='-' )

Cheers

In which file?

07 Sep 2017

Nice.

What file, line number, in the Qt project is the fix for negative integers?

Thanks

File is 'mainwindow.cpp', line 440.

Thanks,

16 Mar 2018

Hi, Please help me. I do not know where to send the print command. And if my data has a format: dd/mmm/yyyy hh:mm:ss %Sat pH DegC For example: 16/Mar/2018 09:04:56 20.7 %Sat 6.68 pH 31.5 DegC Should the command code be? I am not a developer, please help me. Thanks.

28 Mar 2018

How to add $ sign and ; to &data in the below code:

HAL_UART_Transmit (&huart2, &data, 1, 0xFFFF)

24 May 2018

Thanks for the tool, I succesfully compiled and got running on my MAC and Linux machines.

/media/uploads/uLipe/screen_shot_2018-05-24_at_11.45.37.png

Felipe

17 Jun 2018

Hi Borislav K I want to run this program in WinXp SP3 (System Hardware is : 586 Processor, 799MHz, 256MB RAM) It does not run and the "SerialPortPlotter has encountered with problem and needs to close" message appears on screen.

Should i install any prerequisite software to successfully run SerialPortPlotter ? Is it possible to run it on this hardware at all ?

26 Sep 2018

Hi Borislav! The download link does not work - "403 Forbidden"

18 Oct 2018

The plotter can be found in the github repo

https://github.com/CieNTi/serial_port_plotter

09 Dec 2018

Thanks a great software.

Please log in to post comments.