Main Content

Connect Triggered Subsystem by Using Thread Trigger

This example shows how to connect the Thread Trigger block and create a triggered subsystem.

This not-often-used approach lets you use conditions in the model to trigger tasks instead of by using the much more typical approach of using a hardware interrupt from an I/O device in the target computer to trigger tasks.

Create Target Object and Connect

Create a Target object for the default target computer and connect to the target computer. In the Command Window, type:

tg = slrealtime;
connect(tg);

Open Model

To open the model, in the Command Window, type:

model = 'slrt_ex_thread_trigger_fc_subsystem';
open_system(model);
modelSTF = getSTFName(tg);
set_param(model,"SystemTargetFile",modelSTF);

See Also