Log to File
Use the log to file visualizer to save all data received from a serial connection to a text file. MegunoLink automatically flushes the file whenever you switch to a new window so if you have the log file open in your favorite editor you can immediately see the latest changes (if you don’t have a favorite editor yet, check out PSPAD).
Using a Log File
Open a Log to File visualiser, select a connection that you have set up in the Connection Manager, choose a file and enable logging using the Enable button on the visualizer’s toolbar. Any data being sent to your computer on that connection will be added to the file as it arrives. The Enable button will flash briefly whenever new data is written.
You can erase the current log file to start a new one by clicking the Clear button on the toolbar.
To time-stamp each line that is written to the log file, select one of the options from the time-stamp menu on the visualizer’s toolbar.
The message logger picks out specially formatted messages from the serial data and writes them to a log file.
By using a message logger, your Arduino program can select which data should be written to the log file. You’ll get a cleaner log containing only the data you need. It won’t get cluttered by other messages like commands for plotting data.
Using the Message Logger
Open a Message Logger visualizer and choose a file. the Message Logger supports MegunoLink’s channel tags. If you want to log only a single channel of messages then choose the channel before enabling the logger.
Enable the logger using the button circled in the screenshot.
To send data, for example
Hello World! to the message logger, use a command like
If you want to send the message to a specific channel use:
This Arduino function allows you to send time and temperature separated by a comma through a specified message channel. This can then be logged and easily displayed in software like Microsoft Excel, FreeMat or MATLAB.
void MessageLogger_CSVData(long time, float temperature, String channelName)