ADC Complete Trigger

Triggers a Simulink Function-Call subsystem when the analog to digital conversions associated with the assigned IO triggered resource have completed.

Block ID

ADC Complete Trigger

Library

MotoHawk_lib/Analog I/O Blocks

Description

Triggers a Simulink Function-Call subsystem when the analog to digital conversions associated with the assigned IO triggered resource have completed. Typically this behavior is used to assign execution to analog conversions that have a relationship with a hardware event.

Generally this block allows execution associated with a hardware event like say a PWM having been instantiated on the similarly named resource. (Say) The IO associated with that resource is connected to analog-to-digital converter hardware that triggers conversions when a rising edge is observed. Thus the frequency of those conversions are controlled by the frequency assigned to the PWM. This trigger will result in execution when those triggered analog-to-digital conversions have completed.

For example, the ECM-5644A-112-064-1400 module supports an internal AD_SYNCH trigger that is shared by the main core and the auxillary S12G core. Analog conversions are triggered on both cores by this hardware. This block provides the developer with the means to associate execution to the completion of these analog conversions. Typically the trigger would be used to have the model read the results of these conversions and trigger further processing. Thus instantiating a PWM on the AD_SYNCH resource would allow a synchronized periodic sample of some analogs to be taken by both cores.

Failure to instantiate the hardware event may mean that a conversion is never triggered and thus a conversion complete event will never occur and thus the associated trigger will never execute.

More than one trigger may be placed in a model hooking off of the same event. In this case, the 'Priority Order' can be used to order these independent triggers. If the priorities are the same, then the order is implementation dependent.

Checking 'This trigger is inside another triggered subsystem' will attempt to simulate the block inside of another triggered rate, when the rate is periodic. The most common reason to check this 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.

Note that 'This trigger is inside another triggered subsystem' should not be checked on top-level triggers, otherwise the block will not simulate at all.

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 'Trigger even when containing subsystem is disabled' will cause triggers to occur even while the parent is disabled. Note that this feature will not simulate, but will execute correctly on the target.

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.
Resource Drop-down list The resource that this conversion complete trigger is to be associated with.
Execution Order within Task (lower executes first) 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.
Specify task that trigger executes within by name Check Box Check to specify the task by name rather than specify via the Trigger Tasking Priority dropdown.

Only visible if the block is used by a model whose target supports this feature.
Reference 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 task that trigger executes within by name has been checked and is supported by a model whose target supports this feature.
Trigger Tasking Priority ApplicationInteruptTask
BGNDTask
FGNDTask
Selects which task priority this trigger will execute in.

Only visible when the option to Specify task that trigger executes within by name has not been checked and is supported by a model whose target supports this feature.
This trigger is inside another triggered subsystem Check Box (enable) Enable to allow placement inside another triggered subsystem.
Trigger even when containing subsystem is disabled Check Box (enable) Only visible when trigger is inside another triggered subsystem is checked. When this attribute is checked the trigger will execute even if the subsystem that contains this trigger has been disabled. If not checked then disabling the containing sub-system will disable the execution of this trigger. This functionality won't simulate, but will execute as intended on the target.