How to pause input signal from function call subsystem
2 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152892/image.png)
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/152893/image.png)
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.
0 个评论
回答(2 个)
Mohamed Akrarai
2017-5-7
Hello, did you find a solution for this? I also have the same problem, please help!
0 个评论
AbhimanyuSingh
2018-5-29
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!