Delay in C++ block

The logic you showed above is generally used to generate dead time. We had a discussion and code sample for delay implementation in the C-block. @RDunn and I both have code posted there. If you run the delay in ns, you have to change “ttol” in “Trunc()” in ps to ensure the transient timestep is relatively small compared to the delay to reform a sharp transition.
https://forum.qorvo.com/t/creating-delay-loop-in-c/16970/3

1 Like