Can s-function run in simulink REAL-TIME model?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am running the PMSM block and the S-function block (sfun_pwm) in a Simulink REAL-TIME model, and the solver of the model is a fixed step. An error occurs.
Block 'PWMSfunction1/S-Function' has a controllable sample time, but the model 'PWMSfunction1' is not using single tasking mode. Currently, controllable sample times can only be used in single tasking mode.

0 Kommentare
Antworten (1)
Ishu
am 28 Aug. 2024
Hello Xueying!
I understand that you are running "PWM" block in real-time simulation and facing single-tasking mode issues.
The "PWM" block can only be used in single tasking and not multitasking mode.
The workaround for this is to disable multitasking mode by unchecking the option "Treat each discrete rate as a separate task", which is under “Tasking and sample time options” in the solver settings.
For more information on single-tasking mode you can refer the following documentation:
I hope this resolves the issue!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multicore Processor Targets finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!