Use the RT Box like a gate driver (one high side one low side) in the 200k-500k Hz range

I made a simple simulation where I have 2, 200Khz switching frequency signals and a 20nS dead time. One output is high, while the other is low and there is 20ns of dead time in between. This is often how one would drive 2 MOSFETS; though that is not my exact application. See attached example. Maybe this is not the best method, so please feel free to recommend a better one.

Step two is to then use the RT box to do the same. AKA send the 2 signals to a physical scope through the digital outs on the RT box.

I have tried several methods and have failed to do so and was hoping to get some recommendations. In the attached example I added the “digital output” to the pulse generators. Not show in the example I have also tried using the “PWM Out” signal as that is what is recommended. In the Coder options for the RT box, if I set the “Discretization step size” to high I get an error on the RT Box. If I set the step size to low I get software error saying the step size is not a multiple of the base step size.

Please recommend a best practice for what I am trying to do.

Edit: grammar.

200Khz simulated gate driver.plecs (9.5 KB)

Please see the attached model.

You should use the PWM Out component for generating PWMs with the RT Box. With the Digital Out component the output can only change once per model time step. With the PWM Out component the output’s are generated by the RT Box’s programmable logic and can change state between model steps. The PWM Out component also has a configurable dead-time setting.

For a control applications, generally the model step should be synchronized with the PWM generation as configured in the PWM Out component. The step size is then set to an integer multiple of the PWM period.

The following video on the Plexim YouTube page might be informative: https://www.youtube.com/watch?v=8cRU65tga-s

200Khz simulated gate driver_BL.plecs (10.8 KB)

@Bryan Lieblick

I do not have PLECS 4.5 with a matching coder license so I got multiple errors trying to open your example. Ignoring the errors I was able to see what you did and recreated it in my older version.

I attached an image of what I did and it worked just the same. Thank you very much,

Todd