Clear Filters
Clear Filters

Simulink Error: You must not connect Task Manager to multiple model blocks

3 views (last 30 days)
Hardware Used: Xilinx SoC with programming support from Matalb's SoC blockset
I am trying to run two tasks at an Arm Processor on my Xilinx SoC board. The problems I have been facing for past few days is that simulink gives following error if i try to connect two 'referenced models' to the task manager(regardless of using single core or two cores):
You must not connect Task Manager to multiple model blocks
The same error happens if I use two event driven tasks, both tasks timer driven or one task event & other timer driven.
If I run only one task at the Task Manger (either timer driven or event driven) and connect the "Task Output" to the referenced model which contains code for the task application, it runs perfectly. But as soon as I try to run two tasks in two separate refrenced models, it gives this error.
NOTE: If I run the Event Driven task in 'Refrenced Model' and run the second timer driven task in triggered subsystem ( with trigger as function call), it can run two tasks(used single core only). But I want both tasks to be in refrenced models.
  1 Comment
Shahzad Anwar Khan
Shahzad Anwar Khan on 28 Feb 2024
If someone else trying to run multiple tasks is getting confused, then please refer to this matlab example:
To run Multiple Processor tasks, define your tasks as subsystems within the Processor Refrenced model. Then, if you want to make a task event driven, change its subsytem to triggered by using a trigger block( use function call option) inside the task logic. Outsied the task subsystem, connect the function trigger port to "Asynchronous Task Specification" block and connect this async task spec block to the input port. Change input port type to "Output Function Call" in execution tab of port properties. Now, you can connect this input port of precessor model to a event driven task of task manager.
To define a timer driven task, put your logic in an Enabled Subsystem and drive the enable port of subsytem via some constant. Change the sample time of constant to the time period of task you want. Then, Enable "Schedule Rates" option in the "Block Parameters" of the processor model. When you update the diagram, a timer icon will appear in the top left corner of processor model showing the timer period you set. Now, connect this timer icon port to a timer driven task in the task manager.
To define multiple tasks, create multiple subsytems(either function trigger or enabled subsytems depending on task type) within the processor model. Drive their corresponding input ports by the coressponding tasks of task manager.
To supply events to the task manager, use "IO Source Block" to generate events. "Event Source" Block does compile the code but it never runs on processor and even causes the "ExtTargetPacketSending() Failed" error on ZCU RFSoC ( hardware tested).

Sign in to comment.

Answers (0)

Categories

Find more on System on Chip (SoC) in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!