Hello,
I am using Simulink and I could perform the Motor Driver Initialization properly.
However I faced a strange behavior after the initialization, sending the PWM signals output:
I can not update the PWM output when the PWM ports are externally triggered, as shown below:
However I can update my PWM outputs when the ports are inside the Initialization block, as can be seen below:
What is the cause of this issue?
How to make the PWM port execute externally by the trigger?
Also I am sending the models attached to make the situation easier for understanding.
Kind Regards, Rafael
Hello ext-rafael.barbosa@chassisbrakes.com,
Do you still facing this strange behavior?
Best Regards,
Marius
Hello ext-rafael.barbosa@chassisbrakes.com,
I run the both models but without the GD3000 attached (probably I didn't reproduced exactly the same conditions like you) I didn't notice big changes between models. However, the diff between the code generation revealed that in the working model the PWM is initialized before the MC34GD3000_EN_Start() function is called while in the Not Working model the PWM is initialized after the GD3000 initialization is called. This might produce the issue you are facing. Please check the block priorities.
Hope this helps,
Marius