How to pause input signal from function call subsystem
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Mohamed Akrarai
il 7 Mag 2017
Hello, did you find a solution for this? I also have the same problem, please help!
0 Commenti
AbhimanyuSingh
il 29 Mag 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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Schedule Model Components in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!