MegunoLink Pro has built in scheduling that allows you to, at periodic intervals export images of plots, and save table data to separate files. This is perfect if you have a system running somewhere remote, simply send reports to a Dropbox folder allowing you to keep up with what is going on from afar.
Configure Reporting
To begin with its useful to name the visualizer windows in order to easily identify them from the reporting configuration menu. Once your visualizers are named click on the arrow next to the small scroll icon on the main toolbar, click configure reporting.
This opens up the configuration window and you can see a list of the current visualizers. In the example you can see that the visualizer named Sine Waveform has been ticked and we have clicked on it to see its current configuration. In this case where the visualizer is a plot you can configure the size of the captured images, its resolution, and the naming sequence you require. For the table you can set the output format and the naming sequence.
The final step is to set the destination directory for where you want the reports to go. You also need to set the frequency at which you want the reporting to occur. Once this is configured close the reporting window.
You can manually send a report using the hotkey “F2”, this is perfect for testing that you have set everything up correctly. Once you have checked that your report is working you need to enable the scheduling, this is done by clicking on the scroll icon on the main toolbar.
Arduino Control
Scheduled reports can be enabled or disabled and a manual report can be triggered by serial commands from your Arduino sketch as shown in the example below. See Arduino library reporting reference for a complete description of methods and parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include "MegunoLink.h" void TriggerManualReport() { Report r; r.GenerateNow(); } void EnableScheduledReports() { Report r; r.EnablePeriodicReports(true); } void DisableScheduledReports() { Report r; r.EnablePeriodicReports(false); } |