Global Periodic Trigger Slip and Execution Metric Definition

This MotoHawk™ block allows the developer to install a global periodic trigger slip monitoring definition into the application. The block also allows the developer to specify that the application shall calculate periodic trigger execution metrics.

Block ID

Global Periodic Trigger Slip Def

Library

motohawk_tasking_lib/Trigger Blocks

Description

Periodic Trigger Slip

Periodic triggers, like the periodic form of the Common Event Trigger, execute work periodically. Tasks are used by the developer to prioritize the importance of the work such that a task of higher relative priority will execute its work in preference to work assigned to a lower priority task. Preferential work execution can mean that some work can be late in its execution. That is, it slips relative to its intended rate of execution. This MotoHawk™ block allows the developer to install code that will monitor the execution of all the periodic triggers and detect when a trigger's execution has slipped. Additionally it offers an option to issue a module reset if such tardiness in execution warrants it.

Periodic triggers are grouped for monitoring based upon their rate of execution and their priority of execution (which is implied by the task that is associated with the trigger). This is why such triggers are often referred to as Rate Groups. Thus two independent triggers with an execution rate of 5ms that target (say) the FGNDTask will be treated as one body of work. While potentially independent, to be on time requires that both complete their execution, which is why they are grouped together.

The definition is global because the slip attributes apply to all periodic triggers in an application. Use the explicit version of the block if a finer level of control is desired.

Trigger group slip is detected when an instance of trigger group execution does not complete in time. Elapsed Time is a measure of the time between the trigger group being requested to execute and that execution completing. The allowed time for completion is calculated by multiplying the slip tolerance attribute by the trigger group's periodic rate of execution. For example, a 5ms trigger group that took more than 2ms to complete its execution would be said to not have completed in time (which is known as a Slip Event) if the slip tolerance attribute was 40% (5ms x 0.4 = 2ms).

Execution Metrics

The execution metrics offered by this block allow the application to monitor how long the work that a particular group of triggers takes to execute. A current as well as a minimum and maximum execution time is calculated for each group of triggers when this feature is enabled. A minimum and maximum are necessary since a body of work can be pre-empted, which can impact the total time it takes to complete its execution. The minimum is an approximation of the volume of work within the trigger group, while the maximum conveys how pre-emption impacts the total time it takes to execute the work.

Use the Global Trigger Execution Metric Reset block to have the application reset the minimum and maximum values.

Block Parameters

Defn

Parameter Field Values Comments/Description
Resource Dropdown This block is not universally supported within MotoHawk™. A resource other than (None) indicates that the behavior is supported. Code generation will not occur if (None) is selected.
Install Slip Detection Checkbox Check to install slip detection into the application. Uncheck to prevent code generation related to slip detection from occurring. This might be desired if only the execution metrics are to be installed.
Calculate Execution Metrics Checkbox Check to have MotoHawk calculate execution metrics for the trigger groups. This will consume a small amount of CPU.
Warn on (None) Checkbox Some modules do not support this feature and will automatically set the Resource back to (None), which will result in no code generation. Checking this will generate a warning if the resource is ever reset to (None).

Config

Parameter Field Values Comments/Description
Condition Dropdown Define the condition of the slip strategy. Slip will be actively detected when the strategy is Enabled. Supports calibration. Only visible when Install Slip Detection is checked. An Enabled condition will only become active if that is the condition on start-up out of reset.
Reset On Slip Checkbox When checked the module will reset if a trigger group is considered to have slipped. Supports calibration. Only visible when Install Slip Detection is checked
Slip Tolerance Spin Dialog (0-199%) Defines the percentage of the trigger groups periodic interval that an instance of trigger group execution must complete within to avoid being considered late. For example a 5ms trigger group that completed 2ms after being scheduled to occur would be considered to have suffered a slip event if the Slip Tolerance was set to 40% (5ms x 0.4 = 2ms). A typical value is 100%, which implies that execution will complete before the trigger group would be scheduled to occur again. Supports calibration. Only visible when Install Slip Detection is checked.
Slip OK Down Count Positive Non Zero Integer Each time a trigger group meets its timing (i.e. no slip event observed) a counter decrements by this value until that counter reaches zero. Supports calibration. Only visible when Install Slip Detection is checked.
Slip Fail Up Count Positive Non Zero Integer Each time a trigger group fails to meet its timing (i.e. a slip event is observed) a counter increments by this value. If the value of the counter equals or exceeds the Slip Threshold then a slip failure is considered to have been observed. Supports calibration. Only visible when Install Slip Detection is checked.
Slip Threshold Positive Non Zero Integer Defines count threshold that when reached or exceeded is considered a slip failure. A slip failure can result in a reset if the Reset On Slip is checked. Supports calibration. Only visible when Detect Slip is checked.

Slip Instrumentation

Parameter Field Values Comments/Description
Allow Calibration of * attributes Checkbox Check to have Slip Definition attributes exposed to calibration. Only visible when Detect Slip is checked.
Read Access Level Dropdown Defines the read access level of the calibrations. Only visible when Allow Calibration of * attributes and Detect Slip are checked.
Write Access Level Dropdown Defines the write access level of the calibrations. Only visible when Allow Calibration of * attributes and Install Slip Detection are checked.
Instrumentation Group Single quote enclosed alphanumeric Defines the instrumentation group that will be associated to any calibrations exposed to instrumentation. Only visible when Allow Calibration of * attributes and DInstall Slip Detection are checked.
Expose Status to Instrumentation Checkbox A status variable is exposed to Instrumentation indicating the status of each trigger group when this is checked. Only visible when Install Slip Detection is checked.
Read Access Level Dropdown Defines the read access level of the status variables. Only visible when Expose Status to Instrumentation and Install Slip Detection are checked.
Instrumentation Group Single quote enclosed alphanumeric Defines the instrumentation group that will be associated to status variables. Only visible when Expose Status to Instrumentation and Install Slip Detection are checked.

Metrics

Parameter Field Values Comments/Description
Expose Execution Metrics to Instrumentation Checkbox Check to have MotoHawk automatically expose the execution metrics to Instrumentation.
Read Access Level Dropdown Defines the access level of the automatically exposed execution metrics. Only visible when Expose Execution Metrics to Instrumentation is checked.
Instrumentation Group Single quote enclosed alphanumeric Defines the instrumentation group that will be associated to any execution metrics exposed to Instrumentation. Only visible when Expose Execution Metrics to Instrumentation is checked.