# An issue with the PLECS RT Box PWM blocks

**URL:** <https://forum.plexim.com/t/an-issue-with-the-plecs-rt-box-pwm-blocks/3398>\
**Category:** General\
**Created:** [November 26, 2026, 11:58am UTC](https://forum.plexim.com/t/an-issue-with-the-plecs-rt-box-pwm-blocks/3398 "2026-11-26T11:58:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liberty\_63](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Liberty\_63](https://forum.plexim.com/u/Liberty_63)\
**Post date:** [November 26, 2026, 11:58am UTC](https://forum.plexim.com/t/an-issue-with-the-plecs-rt-box-pwm-blocks/3398/1 "2026-11-26T11:58:05Z")

</div>

Hello, I would like to ask about an issue with the PLECS RT Box PWM blocks.

- PLECS version: 5.0.6
- RT Box TSP/library version: 4.0.7
- Target device: PLECS RT Box 3
- PWM Out: 12 channels, 5 kHz
- PWM Capture: 12 channels, Sub-cycle average
- Model sample time: 5 μs

With identical parameter settings:

- Offline simulation works correctly when using the embedded TargetCode PWM Out/PWM Capture blocks without the blue library-link indicator. (model 1)
- When using PLECSRTBoxLib/PWM Out1 and PWM Capture1 with the blue library-link indicator, the model runs, but the PWM Capture output remains zero. (model 2)

I have confirmed that:

- The duty-cycle signals at the PWM Out input are valid.
- The offline loopback connection from PWM Out to PWM Capture is present at the top level.
- Both signals have a width of 12.
- No related fatal diagnostic errors are reported.

Could you please clarify:

1. Is this a compatibility issue between PLECS 5.0.6 and RT Box TSP 4.0.7?
2. Do the library-linked blocks require any additional configuration for offline simulation?
3. Could this issue affect the actual PWM output and capture functions on the RT Box 3?
4. Would you recommend upgrading PLECS/TSP or continuing to use the embedded TargetCode blocks?  
[model1.plecs](https://forum.plexim.com/uploads/short-url/aSixJTXSZfR920DSejMbAZVuc7R.plecs) (769.0 KB)  
[model2.plecs](https://forum.plexim.com/uploads/short-url/232HWRwaAO5IrpzagPzXbHndkOn.plecs) (615.5 KB)  
 ![1](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/2/2b5ff1102197701ea45c0ccb6f8c702c4921a551.png)  
 ![2](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/f/f3c091b0060bd5af550971c3194950272d2d24ef.png)  
 ![3](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/0/018e3503482ea020986bf4aecadab425db2e3183.png)  
 ![4](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/4/4e1048ee702a677ba24b382f4f6af761acf3d6dc.png)

---

<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:** [November 26, 2026, 5:11pm UTC](https://forum.plexim.com/t/an-issue-with-the-plecs-rt-box-pwm-blocks/3398/2 "2026-11-26T17:11:06Z")

</div>

You have enabled the option “Synchronization with model step” in your PWM generation block, with a PWM frequency of 5 kHz and a discretization step size of 5 µs (200 kHz). The effect is that the PWM carriers are reset every 5µs, so they never run a complete period.

Note that for both of your models, actual code generation for the RT Box results in an error. For offline simulation, however, the check for mismatching carrier frequencies / step sizes is currently missing.
