Serial Port Plotter
Page last updated
31 Dec 2014, by
Borislav K.
17
replies
Plotting,
Serial
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
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
17 comments on Serial Port Plotter:
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!
unable to connect port problem is showing...at the bottom
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
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
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
achmad_fathoni
#
29 Mar 2017
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?
Nice.
What file, line number, in the Qt project is the fix for negative integers?
Thanks
File is 'mainwindow.cpp', line 440.
Thanks,
trungnghiatn
#
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.
How to add $ sign and ; to &data in the below code:
HAL_UART_Transmit (&huart2, &data, 1, 0xFFFF)
Thanks for the tool, I succesfully compiled and got running on my MAC and Linux machines.
Felipe
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 ?
zubovskiii98
#
26 Sep 2018
Hi Borislav! The download link does not work - "403 Forbidden"
Thanks for the tool, I succesfully compiled and got running on my MAC and Linux machines.
Felipe
Hi Felipe,
Can you give me any tips on how you compiled this for Mac? I'm used to Windows dev but would love to use this program on Mac.
Ben
Hi, can anyone tell me how do i need to use this github folder to get this Serial Port Plotter because i have no idea how to do it. :/
nicolas_abraham
#
06 Apr 2020
Hi, i need the program, the link is broken :/
Hello. I also want this program. Is it possible to repair the link?
Please log in to post comments.
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!