Frequency value of "Analog In (triggered)

Hello,
I have to set up a buck converter to be controlled with the RT toolbox. In the controller I have to use a ST Analog In (triggered), receiving a ADC trigger from a PWM. I get the following error and do not know which settings to change:

Error in component ‘buck_analog_problem/Controller/Analog In (Triggered)/Pulse Generator’ while evaluating parameter ‘Frequency (Hz)’: The value must be a non-empty vector of non-NaN values.
buck_analog_prpblem.plecs (38.5 KB)

The error here is a bit confusing - there is an effort underway to improve the error messaging for these kinds of situations. Several components need a discretization step size specified in the Coder Options window to properly determine the sample time for offline models.

In this model you need to specify both subsystems for code generation and assign the step size. This is covered in the introductory tutorials on code generation. The relevant step-by-step is as follows.

First, right click a subsystem and selecting Subsystem + Execution Settings and then click the Enable Code Generation checkbox.

From there you need to assign a sample time for each subsystem. You can click the Open coder options and open the Scheduling tab where you can assign the step size. In your model the PWM → ADC → Control Task Trigger configuration means that the PWM frequency determines the discretization step size, or Tdisc = 1/Fpwm.