Flexible Encoder Active Source Lock Trigger

This block executes when the active source achieves a lock.

Block ID

Flexible Encoder Source Lock Trigger

Library

motohawk_flexenc_lib

Description

This block executes when the active source achieves lock. A source, once locked, will only lose lock if it is switched from being the active source, or it detects a zero speed condition. A lock is similar to when the active source achieves synchronization and thus in some respects this trigger has similarities with the execution of the Encoder State Trigger. The key difference is this trigger will also fire when the application switches to another source via the Encoder System block, even if the source that is being switched to has already achieved synchronization. An Encoder State Trigger would not occur in this situation because the encoder state hasn't changed (just the source that is providing crank synchronous information to the encoder system). However the encoder system must still lock to this new source (even though its state may be known), which can take a finite amount of time. The figure illustrates.

Crank synchronous events won't occur between the switch being requested and the lock occurring. This includes angle based scheduler events like a TDC event.

Block Parameters

Parameter Field Values Comments/Description
Trigger Name Alpha-numeric text, single-quote enclosed Set the text that will be appended to code generated function name. This is useful when using a difference tool to compare the difference from one build to another. If this is left as an empty cell the appended value will be generated at build time, and can change from build to build.
Reference System Name Alpha-numeric text, quote enclosed The name of the Flexible Encoder System Block

that is to generate this trigger. This attribute may be hidden (not visible) if the implementation is implicitly inferring the name. 
Execution Order within Task Numeric (Integer) More than one trigger may be placed in a model that is driven by the same event. Use the Execution Order within Task attribute to define the execution order of these triggers relative to one another. The triggers will execute from the lowest Execution Order within Task value to the highest.

Only triggers with the same Trigger Tasking Priority will be guaranteed to execute in the defined order. See the Control Core Tasking help topic for more information.
This trigger is inside another triggered subsystem Check Box (enable) Enable if trigger is inside another triggered subsystem. Trigger attempts to simulate the block inside of another triggered rate, when the rate is periodic. The most common reason to enable is to place a background periodic task inside of a foreground periodic task, or vice versa. The trigger from this block may occur in bursts, synchronized to the outer rate, while simulating, but will perform as expected on the target. Do not enable on top-level triggers, otherwise the block will not simulate at all.
Trigger even when containing subsystem is disabled Check Box (enable) If this trigger is used inside of a containing subsystem, normally the triggered subsystem will pause and resume based on the enable/disable status of the containing subsystem. Checking this causes triggers to occur even while the parent is disabled. Note that this feature will not simulate, but will execute correctly on the target.
Trigger Tasking Priority ApplicationInteruptTask
BGNDTask
FGNDTimeTask
FGNDAngleTask
Selects which task priority this trigger will execute in.

Only visible when the option to Specify the name of the task to execute within has not been checked.
Specify the name of the task to execute within Check Box (enable) Check to specify the task rather than specify via the Trigger Tasking Priority dropdown.
Task Name Alpha-numeric text, single quote enclosed The name of the task that this trigger will be executed within.

Only visible when the option to Specify the name of the task to execute within has been checked.