MATLAB: Can we use pulse generator as input to Embedded Matlab Function

embedded matlab functionstateflowvhdl to matlab

Hi Every one, I am trying build a stateflow chart in simulink. This stateflow has a code written in VHDL. As I am new to stateflow I am trying to convert the code in VHDL to Matlab code and use it in Matlab Embedded Function. The stateflow chart has inputs from a pulse generator. My question is can a Matlab Embedded function block have inputs from a pulse generator. If we can't can you suggest me any other options. Appreciate your time and help.

Best Answer

Yes, as far as I know, it's just a standard Simulink input. Just make sure the chart is updated with a fast enough sample time to capture the PWM switching.
HTH,
Arnaud