Re: High Speed PWM special event Trigger for ADC
We provide with the v3.38 and next releases a Sliding Mode Observer for PMSM motor which could illustrate ADC trig at one specific point of the PWM period.
In the PWM High Speed block GUI, you will find one input "Initial ADC Trigger (s)". You could set any value in SI (second) here. You could also make this trigger a block input allowing to update the trig point during run time (required with Single Shunt based Estimator).
In the ADC block, go to the Trig and Time Step panel. You could set the Trigger to "PWM Primary Special Event Trigger".
It is then also possible to trig the simulink base rate time step at the end of the ADC conversion with the option: "Trig Time Step => With each update of the ADC block output".
Make sure that the solver period match with the PWM/ADC trig period otherwise generated code will no be consistent.
Please see Single/Dual Shunt PMSM examples provided.