Dynamically select EPWM master and slave depending on the logic in Simulink

3 次查看(过去 30 天)
Hello,
I am working with F28379D controller in Simulink. I am using the EPWM block and ADC block. I am having a problem to dynamically select EPWM master which is typically EPWM 1. I am using 6 EPWM block in the design. Lets consider,
I have a variable x in the simulink model, when x is less then 5 EPWM 1 acts as master EPWM, if x is greater then 5 then I want to make EPWM 3 or 4 as master and rest as slave. I want to do this dynamically when the model is build and running on the board. How can I do that?
Is there any way to use set_param command while building the model in the board? I tried to use set_param command to change the phase (TBPHS) value but its not working. It doesn't execute the command.
Please let me know how to solve this problem. Please let me know if you need more info. Thanks.
Best regards
Shamsul

回答(0 个)

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by