Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How PLECS menages the SOC for the ADC

0 votes
391 views
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?
asked Sep 16, 2022 by Luca Mincato (32 points)

1 Answer

+1 vote
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.
answered Sep 16, 2022 by Bryan Lieblick (1,849 points)
edited Sep 16, 2022 by Bryan Lieblick
...