Active3 years, 10 months ago
I'm working on an embedded system and it uses one serial port for all it's logging purposes.
Is there a tool out there that allows you to filter lines into different windows (or remove them altogether) so that I can separate the output of the various logging sub-systems and remove spam messages that show up multiple times a second?
I'd prefer an open-source solution, but a highly-recommend closed product might do.
Bill KBill KExporting real-time data and charting in OpenOffice or LibreOffice Calc| Advanced Serial Data Logger.
![Port Port](https://www.aggsoft.com/serial-port-monitor/hex-data-window.gif)
- 13 thoughts on “ [MATLAB] Real Time Serial Data Logger ” Chris Dourd on October 30.% define COM port # plotTitle = ‘Serial Data Log’;% plot title.
- Get data from the serial port into Excel with free serial and TCP/IP data logger software. Connect RS232, RS485, Ethernet, Internet and Modbus instruments.
- Get data from the serial port into Excel with free serial and TCP/IP data logger software. Connect RS232, RS485, Ethernet, Internet and Modbus instruments.
54.9k1313 gold badges8787 silver badges140140 bronze badges
closed as off-topic by Machavity, Pang, Makyen, Paul Roub, Petter FribergMar 17 '17 at 20:35
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Machavity, Pang, Makyen, Paul Roub, Petter Friberg
10 Answers
I've never thought of doing such a thing, but here's one product that might do the trick: Eltima Serial Port Splitter. It claims to be able to take one COM port and turn it into multiple virtual ports to connect to many applications. You might be able to take each application and just look at one kind of output.
Personally, I would just write a python script with PySerial and something like PyQT or wxPython (GUI libraries) to filter the data to different windows. It's an easy language to learn and makes a handy tool for embedded systems development for things such as this.
Jay AtkinsonJay Atkinson2,68611 gold badge2121 silver badges3939 bronze badges
I would do the following:
Use Python.
- Use Python's logging module
- Use 3rd-party pySerial module
Write a Python program to read the serial data from the device, and translate it into log item for Python's logging module.
- If your device's log messages have some sort of source identifier, translate that to a Python 'logger' name according to your needs, using the
getLogger()
function. You can define logger names any way that you need, e.g. to define log source or category. - If your device's log messages have a severity indication, translate it to the
lvl
parameter to the logger'slog()
method. Otherwise just use one of the logger methods such asinfo()
.
Make use of the Python logging module's config file feature to filter the data as you want in a particular situation.
- You can filter particular log items by severity and logger name.
- You can log to multiple destinations: You can filter and print certain log items to screen, and at the same time filter and print certain log items to one or more files. You can mix these in any combination that you want. It's very flexible.
- You could have several logging config files, for several different logging purposes, and simply specify which one you want to use via the command line each time you run your program.
I've used Python's logging module with config files to set up my filtering, and it's really terrific.
Craig McQueenCraig McQueen28.4k2525 gold badges102102 silver badges158158 bronze badges
You can use the Eltima's splitter with Advanced Serial Data Logger, this software has several filter plug-ins that can filter out unnecessary messages.
Helen DownsHelen Downs
I guess it will depend on the format your logs have. If they looks like (or you can make them look like) the syslog format, you can try the following:
AlejandroAlejandro
I would personally use the Python method described above, but another (relatively easy) way to go about it would be to use
sed
.Build a couple different filters to show precisely what you want from the stream, and then pipe in
Paul McMillanPaul McMillantail -f
of your serial device file.16.7k77 gold badges4848 silver badges6868 bronze badges
SmarTerm allows you to connect to many different serial ports in a tabbed interface. It also has a Visual Basic like scripting language that allows you to write scripts for different needs. I wrote quite a few scripts for updating embedded software and also automating the saving of logs in multiple tabs.
Mark NorgrenMark Norgren1,13455 gold badges2121 silver badges2828 bronze badges
Try Powershell. You obviously need to add filtering, but this should get you started
Mathias FMathias F9,2111818 gold badges7070 silver badges136136 bronze badges
sanmaisanmai11.4k88 gold badges4444 silver badges6868 bronze badges
My first choice is to always run PortMon (originally from SysInternals). It has a filter option where you can type in strings to include, exclude, or highlight:
I have used this for years on Windows NT/2000/XP with great success.
Hopefully, you're running a 32-bit Windows OS, because if you're running 64bit, you'll have to go with something like Eltima's product.
DaveDave9,6671212 gold badges7676 silver badges136136 bronze badges
There's always the venerable protocol analyzer.
You might only get one color on the screen, but it's a platform independent serial port logging solution.
WildCrustaceanWildCrustacean5,16611 gold badge2626 silver badges4040 bronze badges
Not the answer you're looking for? Browse other questions tagged debuggingembeddedserial-port or ask your own question.
- Advanced Serial Data Logger
Advanced Serial Data Logger
Trust In Confidence!
For Windows 2000 - Windows 10 (2019) (incl. Server, x86 and x64). Latest version: 4.4.2 build 807. August 7, 2019.
Problem scenario:
I want to connect an RS-2322 port to OpenOffice Calc or LibreOffice Calc. The com port will provide a stream of ASCII numeric characters to OpenOffice Calc. I want OpenOffice Calc to automatically receive and graph the ASCII data, sort of like an oscilloscope. I can control the format of the incoming ASCII data.
Requirements:
- Advanced Serial Data Logger Professional, Enterprise, or trial version;
- Direct OpenOffice/LibreOffice Connection
It is assumed that:
You've prepared parser items for export.
You can work in OpenOffice Calc or LibreOffice Calc, specifically create charts in Calc.
For this tutorial all items were prepared in the previous part.
Also you may read other examples:
Solution:
All parser items are now ready for export using the 'Direct OpenOffice/LibreOffice Connection' plug-in. Please, open the configuration window of the 'Direct OpenOffice/LibreOffice Connection' plug-in (fig.2) by selecting the module in a list (fig. 1, pos. 4) and clicking the 'Setup' button on the 'Data export' page (fig. 1).
The configuration is very similar to the 'Direct Excel Connection' plug-in.
Note: Please, interpret the 'Excel' word on the screenshots and in the program interface as 'OpenOffice Calc'.
Fig.1. Data export plug-in for OpenOffice Calc.
Fig.2. Charting. OpenOffice Calc connection.
Just select options in the field #1 and the field #2. These options will allow you to start OpenOffice Calc and display it on your desktop. OpenOffice Calc will be started automatically on program start.
Because we want to draw a chart in a real-time environment, then we should prepare an OpenOffice ODS file before the next step. In this example we've created a diagram with 3 plots. Each plot is based on a data from columns A, B or C. We'll place FLOW1, VOLW1 and TEMP1 to columns and the chart will use these values and automatically redraw every time. We'll use last 30 values on the diagram only.
Fig.3. Charting. OpenOffice/LibreOffice file.
The figure above contains following elements:
- Data source for plots in this example;
- Diagram;
- OpenOffice worksheet.
The ODS file, which we've created you can download here and use it in your work.
In the next tab, you should specify your workbook options as per your requirements (real-time charting). Depeche mode singles discography.
Fig.4. OpenOffice Calc. Workbook options.
You should select the 'Use a workbook from a file' option (fig.4 pos.1) that allows you to use an existing file and write data to this file. The path and name of this file, which you created before (fig.3), you should specify in the field #2. The option at the pos. 3 allows you to save all the written data when the program exits.
Data Logger Cheap
Fig.5. OpenOffice Calc. Worksheet options.
In the next tab, with help of the option at the pos. 3, you should specify your worksheet number in the workbook. We've created the workbook, where the worksheet is first. Therefore we've specified this number on the 'Worksheet' page.
Fig.6. OpenOffice Calc. Data format.
The last page 'Binding' (fig.7) is very important. On this page the column description and column position that you require to be bound to the variables names are specified.
Fig.7. OpenOffice Calc. Binding.
Any new items may be added by clicking the 'Add item' button (Fig.7, pos. 7). Before adding an item the program will ask you about an item description. You can type any characters here, which will help you to remember a variable's content. For this example 3 variables with their corresponding descriptions have been added.
Each data export item has a number of properties:
- Parser item name - is a parser variable name, which you have created in the parser configuration. You may select a variable name from a drop-down box or type this name manually;
- Filling mode - data is sent to OpenOffice/LibreOffice Calc in this mode in such a way that if the number of cells for filling is exceeded, data is moved upwards (if it is filled by columns) or to the left (if it is filled by rows) and new data is written to the position that becomes unoccupied after data is moved. Thus, the FIFO filling method is used. In this example we need last 30 values, therefore we've selected the 'Move' method;
- Filling orientation - In this example we need to send data to OpenOffice/LibreOffice Calc , by columns. Therefore we've selected the 'Vertically' method;
- Left top cell - here you should specify the coordinates of the upper-left cell starting from which data will be sent to OpenOffice/LibreOffice Calc. The format the coordinates are specified in should comply with the standard accepted in OpenOffice/LibreOffice Calc. For example, a record like A1 will mean the coordinates of the top left cell on the worksheet;
- Cells to fill count - here you can specify the maximum number of cells in a column or in a row that will be filled when data is sent to OpenOffice/LibreOffice Calc.
Click the 'OK' button and close the Direct OpenOffice/LibreOffice Connection plug-in configuration window and the 'OK' button in the options window.
Serial Port Data Logger
Business proposal for cctv installation. Okay, all settings have been completed and we are ready to capture data to an ODS file.
If the data export module and the parser had been correctly set up, then you should see real-time drawing in OpenOffice/LibreOffice Calc (fig.8).
Fig.8. Charting in OpenOffice Calc
The figure above contains following elements:
- Last 30 values of the parsed data ;
- Diagram with plots.
The ODS file with all values and plots you can download here.
The backup copy of the configuration you may download here (Right click - Save As) and restore it from the 'File' menu in the main window.
Read more about:
Temperature Data Logger
Copyright © 1999-2019, AGG Software.Serial Port Data Logger With Sms
All rights reserved. Terms of use | Privacy policy- |
- |
- |
- |
- |
- |
- |