Problem with discontinued output signal from C-script block

Attached are the waveforms of the output signal from one of the C-script blocks. Prior to using the ADC block from the TI C2000 Target library to capture the inputs for the C-script block, I did not encounter a discontinuous output as shown in the file attached. Previously the inputs to the C-script block were captured using Analog-in blocks.

Is there a way to resolve this issue ? Since the discontinued output from the C-script block resulted in unwanted behavior on the power-stage of the system.

Thank you so much.

Ricky

scope_PLECSforum.pdf (126 KB)

If you post your model or a minimum representative example you will receive better support from the online forum. Without a model or C-Script one can only guess as to why you’re seeing these results.

My initial guess would be an error resulting in NaN/Inf output from your C-Script, such as a divide-by-zero or square root of a negative number.

Yes, it is indeed caused by an Inf output from the C-Script.

Thank you so much.