# PWM variable RTbox block

**URL:** <https://forum.plexim.com/t/pwm-variable-rtbox-block/2125>\
**Category:** RT Box\
**Tags:** rt-box\
**Created:** [May 14, 2025, 6:17am UTC](https://forum.plexim.com/t/pwm-variable-rtbox-block/2125 "2025-05-14T06:17:58Z")\
**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:** [May 14, 2025, 6:17am UTC](https://forum.plexim.com/t/pwm-variable-rtbox-block/2125/1 "2025-05-14T06:17:58Z")

</div>

I am using the variable pwm block of the at box 1. the characteristics are in the pictures. when i put an offset of 180 degrees the resulting pwm is not the correct one. and if i go inside the block and look at the carrier i see the following. does anybody know what is happening? Fsw=10000 Hz

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

 ![image](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/1/11d01eb5c6262ca46d994652fb07c6ae3e93130c.png)

[simulation 1.plecs](https://forum.plexim.com/uploads/short-url/9RBndbl3dhPPcrgiQkq4D5pqDKH.plecs) (11.7 KB)

---

<div class="post-metadata">

**Author:** ![Oliver\_Schwartz](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/oliver_schwartz/32/6_2.png) [@Oliver\_Schwartz](https://forum.plexim.com/u/Oliver_Schwartz)\
**Post date:** [May 15, 2025, 3:53pm UTC](https://forum.plexim.com/t/pwm-variable-rtbox-block/2125/2 "2025-05-15T15:53:59Z")

</div>

The problem is the triangular wave being fed as phase offset for the first channel. It’s not clear what you want to achieve by this. The phase offset for the first channel will have no effect in realtime simulation unless you enable the option ‘Synchronization with model step’. But even then it doesn’t make a lot of sense to feed in a triangular wave.
