RTbox PWM Capture exceeds range of 'bool'

I use PWM out (variable) generates two PWM signal with 0.25 period phase shift to PWM capture but have the issue saying Value ‘1.0000000149011612’ exceeds range of ‘bool’ in component PWM Capture.

However, it was correct when I use PWM out to generate 2 signal with 0.25 period phase shift to the same setting PWM capture.

I wonder if there is any problem for me using PWM out (variable), the figure is how I set to it.

This problem can occur for offline simulations of the RT Box components when you directly connect the output of an Atomic (Code Generation) subsystem back to the input. This introduces an algebraic loop which in turn can induce this error. The solution is to break the algebraic loop. One approach is to use a Pulse Delay block with the step size representing the sampling delay of your model. That is 3.333 nsec RT Box 2/3 and 3.75 nsec RT Box 1 for sub-cycle average switches or 4 nsec for RT Box 2/3 Nanostep and 7.5 nsec for RT Box 1 Nanostep components.

1 Like