How to pause input signal from function call subsystem

1 Ansicht (letzte 30 Tage)
wei
wei am 8 Nov. 2013
Beantwortet: AbhimanyuSingh am 29 Mai 2018
Hi there,
I am doing hardware & simulink synchronization. In order to let both hardware and simulink runing at the same time step, I created a function call subsystem which is triggered by an external function shown below.
The function is from a third party toolbox which I have no idea how it is implemented. But it works fine in my other project.
The error is from the red block which contains only a sine wave generator
I set the sample time type of the function-call to periodic and the sample time to 0.01 which is the same as the same time of the whole model. I want the subsystem generate sine signal only when there is signal coming from Can Receive block. But when I ran this, I got below error
"Function-call block 'can_f_triggered/Function-Call Subsystem1' must be executed periodically when it is activated (enabled) by its function-call initiator because it has a periodic sample time. The function-call initiator did not execute the function-call block on time step '0.0'."
I search online but noting helpful. Can anyone give me a hint how to solve this problem? Thanks in advance.

Antworten (2)

Mohamed Akrarai
Mohamed Akrarai am 7 Mai 2017
Hello, did you find a solution for this? I also have the same problem, please help!

AbhimanyuSingh
AbhimanyuSingh am 29 Mai 2018
As per my understanding your third party is generating periodic signal so please do the following changes on the function call port:
Sample time type: triggered
Also, the "Sample time" should match that of the function-call generator that you are using as trigger. Chose the sample time that you need the MATLAB Function block to run at.

Kategorien

Mehr zu Schedule Model Components finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by