# Can i use the PLECS block "Space Vector PWM (3-Level)" with RT Box 1

**URL:** <https://forum.plexim.com/t/can-i-use-the-plecs-block-space-vector-pwm-3-level-with-rt-box-1/1421>\
**Category:** RT Box\
**Tags:** plecs, c-script, rt-box\
**Created:** [October 24, 2024, 2:36pm UTC](https://forum.plexim.com/t/can-i-use-the-plecs-block-space-vector-pwm-3-level-with-rt-box-1/1421 "2024-10-24T14:36:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jose](https://forum.plexim.com/u/jose)\
**Post date:** [October 24, 2024, 2:36pm UTC](https://forum.plexim.com/t/can-i-use-the-plecs-block-space-vector-pwm-3-level-with-rt-box-1/1421/1 "2024-10-24T14:36:52Z")

</div>

Hi!  
I’m trying to use the Space Vector PWM (3-Level)" block with RT Box 1. and I always have this error.

Variable-step discrete tasks are not supported with a fixed-step solver or a ‘Discrete state-space’ model.

How can I fix it?

thank you all.

 ![image](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/5/596c97ae00b7179d9e255a6ec926a6579dfcea13.png)

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [October 28, 2024, 3:46pm UTC](https://forum.plexim.com/t/can-i-use-the-plecs-block-space-vector-pwm-3-level-with-rt-box-1/1421/2 "2024-10-28T15:46:10Z")

</div>

The **Space Vector PWM (3-Level)** block from the PLECS library directly outputs switching pulses. It uses a specific timing scheme (Variable-step discrete) to ensure the timing of various switching events, which is not possible to execute on the RT Box.

For generating PWM signals with the RT Box, one should use the **PWM Out** blocks from the RT Box Target Support Package Library to ensure the highest PWM resolution. The input to the PWM Out block is the modulation index and therefore one should use a modulation index based space vector modulation scheme. The **Three-level Grid-connected NPC Solar Inverter with LCL-ﬁlter and Active Damping** demo model in the RT Box Demo Model Library highlights such an approach along with a reasonably detailed theoretic write-up. I recommend reviewing that implementation and applying it to your model.
