How to disable an ePWM block by means of an enabled subsystem with RTW (running on a TI DSP)

12 visualizaciones (últimos 30 días)
We wonder how to disable or not in real-time a ePWM block that belongs to a TI DSP.
We are using Deadtime Active complementary High option, so whenever we try to disable the block either of one its outputs goes high and we don't want that.
We wonder whether is posible to control the execution of that pwm block my means of an enable subsystem or other technique welcome. We suppose that when not execution the block....will not process its output and then should be both zero as we want.
Thanks !

Respuestas (1)

Aditya Srikar
Aditya Srikar el 26 de Mayo de 2023
To disable the ePWM block in real-time, you can try using an enable subsystem or control the execution of the pwm block using a condition in your code. For example, you can use a MATLAB function that sets the ePWM block enable signal based on your desired conditions.
Here are the general steps to create an enable subsystem:
1. Right-click on the ePWM block and select "Create > Subsystem > Enable Subsystem" from the menu.
2. Connect the enable signal to the Enable port of the newly created subsystem.
3. Inside the subsystem, connect the ePWM block to the main output signal path.
4. Write a MATLAB function that sets the enable signal based on your desired conditions.
5. Pass the enable signal to the subsystem input port in your model and use the MATLAB function to control its value.
By using this approach, the ePWM block will not process its output when it is disabled and its output will be both zero.

Community Treasure Hunt

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

Start Hunting!

Translated by