Complete the following steps to measure the execution time of a While Loop in an FPGA VI.

  1. Add a While Loop to the block diagram.
  2. 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.
  3. Add the code you want to execute to the While Loop.
  4. Add a Tick Count Express VI to the While Loop and click the OK button in the Configure Tick Count dialog box.
  5. Right-click the While Loop and select Add Shift Register from the shortcut menu.
  6. Add a Subtract function to the While Loop.
  7. 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.
  8. Wire the left shift register to the y terminal of the Subtract function.
  9. Right-click the x–y terminal of the Subtract function and select Create»Indicator.
  10. Run the VI. The value shown in the x–y indicator is the While Loop execution rate.