# RTbox cannot generate normal sawtooth waves

**URL:** <https://forum.plexim.com/t/rtbox-cannot-generate-normal-sawtooth-waves/2104>\
**Category:** RT Box\
**Created:** [May 10, 2025, 9:57am UTC](https://forum.plexim.com/t/rtbox-cannot-generate-normal-sawtooth-waves/2104 "2025-05-10T09:57:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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 12, 2025, 6:26am UTC](https://forum.plexim.com/t/rtbox-cannot-generate-normal-sawtooth-waves/2104/6 "2025-05-12T06:26:23Z")

</div>

You are generating a 10 KHz sawtooth signal with a sampling frequency of 30 KHz. This means that you only get 3 sample values per period. If used as a carrier for PWM, you’d only be able to generate 3 distinct duty cycles. This will become more obvious if you switch the curve type to ‘discrete’ in the scope (see [here](https://forum.plexim.com/t/the-pwm-curve-is-not-straight/988)).

One obvious solution is to increase the sample rate to e.g. 300 KHz. However, for PWM generation, we strongly recommend to use the PWM blocks from the RT Box library. With these blocks, the carrier signal is generated on the FPGA with a resolution of 6.67ns (for RT Box 2/3). If you need more control over the generated PWM pulse, use the “PWM out (Variable)” block.

I’d recommend to watch the [tutorial videos on the RT Box](https://www.plexim.com/support/videos/intro_to_rt_box).

---

_[View the full topic](https://forum.plexim.com/t/rtbox-cannot-generate-normal-sawtooth-waves/2104)._
