Complete the following steps to measure the execution time of a While Loop in an FPGA VI.
- Place a While Loop on the block diagram.
- Right-click the conditional terminal of the While Loop and select either Create Constant or Create Control from the shortcut menu, depending on the needs of the application.
- Place the code you want to execute in the While Loop.
- Place a Tick Count Express VI in the While Loop and click the OK button in the Configure Tick Count dialog box.
- Right-click the While Loop and select Add Shift Register from the shortcut menu.
- Place a Subtract function in the While Loop.
- Wire the Tick Count terminal of the Tick Count Express VI to the right shift register on the While Loop and to the x terminal of the Subtract function.
- Wire the left shift register to the y terminal of the Subtract function.
- Right-click the x–y terminal of the Subtract function and select Create»Indicator.
- Run the VI. The the value shown in the x–y indicator is the While Loop execution rate.