Execution timing

Knowing the level of target CPU utilization for each conditionally executed subsystem is extremely important in embedded applications. Typically, values in the 70% range are considered acceptable. Applications that consume more are prone to over framing, a situation where not all the control functions are fully executed and completed in the sample time allotted for the controller.

CPU utilization is measured at the system level or within any conditionally executed compound block:

      System Level CPU Utilization:  The targetInterface block lets you create an output connector that displays the percent CPU utilization on the target while the target application is running. In addition, you can place Get CPU Usage blocks within any conditionally executed compound block to output the CPU usage for that specific block.

      Compound block level CPU Utilization:  You can add a Get CPU Usage block within any compound block to measure the CPU utilization of that block only. The measured utilization can be captured in a Monitor Buffer Read block or directly fed out of the compound block for display or plotting.

      Over Framing Detection:  By activating Check for Performance Issues during code generation, Embed displays a warning message if the target is not able to execute at its commanded sample rate.