How PLECS menages the SOC for the ADC

Hi, I’m using PLECS with the C2000 block’s family. I want to drive an SPM motor by using an inverter built in PLECS. I want to detect the three currents by using three ADCs. The LaunchPad target is LAUNCHXLF28069.

first, I used three different ADCs to detect the currents and I imposed the SOC by one ePWM block. I used ADCA3 ADCA4 ADCA11.

But If I use this solution PLECS pops up an error window saying that I cannot use the same ADC register for more inputs.

So I use only one ADC block but with a vectorized output made by the three ADC I want to use. My question is how does PLECS menage the SOC for the ADC? In simulink the ADC block allows the user to select the SOC input but in PLECS not. Does It use only SOC0 for every ADC?

motore_adc.plecs (29.1 KB)

The PLECS TI C2000 Target Support does not require the user the explicitly set any SOC settings.

The behavioral description of the ADC is as follows, taken from the “Control Task Execution” section of the TI C2000 manual.

“ADC triggers configure the ADC start-of-conversion. The ADC start-of-conversion is driven by an interrupt from either a PWM carrier or the CPU Timer. All ADC channels associated with the ADC unit are converted sequentially when the ADC trigger is activated. The order of conversion is based on the order of the analog input channel vector.”

In practice this means that the ADC SOCs are triggered sequentially. If you review the generated *_hal.c file you can see comments indicating how the SOCs are configured for each ADC channel.