6 Plot Graph In MPLAB® Data Visualizer
MPLAB Data Visualizer is a program for processing and visualizing data from a running embedded target and can be accessed as a plugin or a stand-alone program. This application note describes the configuration of the Data Visualizer to graph ADC acquisitions received over USART. The configuration is done using a saved workspace, and the basics of displaying the data are explained. Click the Documentation button in MPLAB Data Visualizer for a detailed guide on how to set up your workspace.
Todo: Configure
            MPLAB Data Visualizer to graph received ADC samples.
        - MPLAB® X IDE has
                an internal Data Visualizer. Click on the DV button at the top to open it. If this
                button is not there, go into Tools and Plugins to install the Data Visualizer.
Figure 6-1. Opening the Data Visualizer in MPLAB® X IDE  - Open the program and plug in an
                already flashed device. Make sure the COM-port used for USART communication is not
                already in use. The start screen will look similar to the one in Figure 6-2, apart from the plotted graph. 
Figure 6-2. MPLAB® Data Visualizer Starting Page - Highlight the correct COM-port by clicking it.
 - Set Baud rate to 19200.
 - On the right-hand side, select ATtiny1627 from the source drop-down menu.
 - Click on the play button.
 - If the Data Visualizer plots a graph similar to the one in Figure 6-2, the USART configuration is set up correctly.
 - Click the stop button.
 
 - Find and open the Variable Streamer
                configuration panel to graph the streamed data output of the device.
Figure 6-3. Open the Variable Streamer - Click the Variable Streamers panel on the left-hand side.
 - Click on New to open the Variable Streamer configuration panel.
 
 - Configure the Variable Streamer to
                decode the streamed data output according to the Stream Format.
Figure 6-4. Configure Variable Streamer - Set a Variable Streamer Name.
 - For Framing Mode, select Ones’ Complement from the drop-down menu.
 - Set the Start of Frame byte to 0x3c.
 - Add variables by clicking the plus sign. Remember to add them in the correct order, as shown in Figure 6-5.
 - For Type, set all variables to Float32.
 - Click Save in the bottom right when all variables have been added.
 
Figure 6-5. Plot Variables - Select the correct COM-port from the source drop-down menu.
 - Click the graph icon at the top to plot all variables.
 - You can now delete the data axis containing the non-arranged data by clicking the trash can on the right-hand side.
 - Add Plot allows you to add a new source to plot in a given data axis set.
 - Add Data Axis allows you to add a new set of axes to plot several sources.
 - Figure 6-6 shows an example of how to group the different variables in different axes to give a better visual representation of the values.
 
 - Click Show Live Data to start
                plotting live data from the device. If set to auto-adjust, the axes will scale
                according to the input from USART. Figure 6-6
                shows an example of the plotted result when pushing the button on the Curiosity
                Nano, which cycles through the four different states in which the load on the
                breadboard circuit can be.Info: By clicking on “Save Workspace”, Data Visualizer generates a file that can be used for an agile loading of the workspace by clicking “Load Workspace” and choosing the generated file.
Figure 6-6. Plot Configuration Completed  
Result: The
                MPLAB Data Visualizer has been configured to graph data received from the
                nEDBG USART serial gateway.
        