image1 image2 image3
3Dmicro Toolkit Performance Tests
Written by Paolo Raspa   
Thursday, 05 April 2012 09:58
Many users asked us about 3Dmicro Toolkit performances. We concern about your questions, therefore we publish this report, which clarify that 3Dmicro Toolkit introduces only a 0.02% overhead while executing a standard test code.
 

We tested the performance of an application developed with the 3Dmicro Toolkit Evaluation on a PIC32 microcontroller (PIC32MX795F512L). This performance test is inspired by the tests on other embedded platforms supported by LabVIEW

Source: http://forums.ni.com/t5/LabVIEW-Embedded/LabVIEW-Embedded-Performance-Testing-Different-Platforms/td-p/1882581

You can repeat this test downloading the Evaluation performance test project or drag and drop this VI snippet in a empty "main_LV.vi" block diagram.

Vi snippets for I O Test

Test notes:

The following software is used for testing:
a. LabVIEW 2011
b. Evaluation version of the 3Dmicro Toolkit for LabVIEW 2011
c. NI LabVIEW C Generator 2011

Hardware Platform

The tested platform is a PIC32 Ethernet Starter Kit with a PIC32MX795F512L Microchip processor running at:
• 72 MHz
• 1.5 DMIPS/MHz using 32-bit instructions
• 1.2 DMIPS/MHz using 16-bit instructions

Source: http://www.microcontroller.com/news/microchip_pic32.asp

Test VI

The following VI contains the executed LabVIEW code:

Initialization

Initialization VI

















Main Code

Main code VI

The test configuration and results are reporter in table. The test is repeated both with Ethernet
communication turned on and off, because the inclusion of Ethernet libraries can actually produce
some overhead

 PIC32MX795F512L

without Ethernet

 with Ethernet

Microchip compiler options: 

Debugging mode 

OFF

OFF
Ethernet communication

OFF

ON

C Generator compiler options:

Expression folding

ON

ON
General guard code ON ON
Generate integer only OFF OFF
Treat doubles as singles OFF OFF
Preserve state OFF OFF
Use stack variables OFF OFF
Test Results
Run Time  66.760 ms  67.598 ms
Flash Memory  214 KB  933 KB

3Dmicro Toolkit Efficiency

To test the effective execution time of the FOR loop in the main code the pin BIT10 of the PIC32 PORTD is set ad digital output. In this way the digital output indicates the FOR loop start and end.
Using a digital oscilloscope (Tektronix TDS 101C-EDU) the digital output value was sampled to calculate the real execution time of the code. In fact setting to 1 the digital output at the starting moment of the FOR loop and setting it to 0 at the end, the On time of the generated signal represents the elapsed time during the FOR loop, and the Off time represents the overhead introduced by LabVIEW C Generator and 3Dmicro Toolkit with their C Code structures.

Results Summary

Total execution FOR loop execution Overhead

PIC32MX795F512L

without Ethernet

66.900 ms 66.760 ms 0.02 %

PIC32MX795F512L

with Ethernet

67.613 ms 67.598 ms 0.19 %

Oscilloscope graphs – BIT10 – PORTD

Oscilloscope graph

 

 

 

 

 

 

 

 

Analysis

From the test results, we can conclude that the Graphical programming using NI LabVIEW and 3Dmicro Toolkit provides full use of the microcontroller processing power, introducing at most an overhead of 0.19% when Ethernet communication libraries are included and 0.02% when they are not. Therefore the inclusion of communication libraries slightly affects the 3Dmicro Toolkit performances.
In fact all the functionalities provided by the 3Dmicro Toolkit as VIs, to access the PIC32 I/O functions, are “inline C node” containing ANSI compliant C code for MPLAB C32 Compiler that does not overload the program, while the 3Dmicro palette VIs are only an interface, editable by the LabVIEW user.