Hi David,
I understand that you got a data type mismatch error for the input ports.
You have used less than equal to block in your PWM mathematical solution. Please check the output data type of the less than equal to block. By default, it is boolean. You will find the “Output data type” field under the “Data Type” tab in the block parameters.
Regards,
Balavignesh