Control Task Trigger
Purpose
Specify the base sample time and trigger for the main control tasks
Library
STM32
Description
The digital control loop executes at a nominal base sample time. The input to the Control Task Trigger specifies the interrupt that triggers a control loop execution. The source of the interrupt can be from the ADC end-of-conversion signal, PWM counter underflow and overflow events, or the Timer block. When a Control Task Trigger is not included in the subsystem an appropriate trigger source is automatically determined.
In a multi-tasking mode (defined in the Scheduling tab of the Coder > Coder Options… window), the Control Task Trigger block triggers the Base task associated with the base sample time.
The offline simulation will model the impact of controller discretization when the Control Task Trigger is included. For offline simulations the Forward Euler method with the nominal base sample time is used to integrate continuous states within the subsystem containing the Control Task Trigger. Offline simulations will use the default subsystem execution settings when the Control Task Trigger block is not included in the subsystem.
Parameters
- Nominal base sample time
Specifies the nominal sample time of the discretized model in seconds \((\mathrm{s})\). The nominal base sample time value is synchronized with the model Discretization step size of the PLECS Coder settings.