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.

Problem with ADC block from TI C2000 library

0 votes
151 views
Hi,

I'm currently working with the RT Box 1 and the TMS320F28379D. I use the LaunchPad Interface to connect both systems.

I can send and receive digital signals from the RT Box in the 28379D but, for some reason, I can't read correctly the analog signals from the RT Box with the ADC block in the 28379D. When I connect the External Mode, the scope associated with the ADC block shows a constant value inconsistent with the transformation formula currently in use. I've tried changing the ADC Channels, changing the value sent from the RT Box, modifying the transformation equation but so far none of it has worked. What could be the error?

the model that I'm using to test the ADC channel is attached
asked Apr 14 by fherr71 (12 points)

1 Answer

0 votes

Hello,

This type of question is best suited for Plexim support -- support@plexim.com.

I looked at your model, one issue that I noticed is that in the External Mode tab, the "decimation" value under "Sampling" is too large. One of my colleagues explained what this setting does in this answer here. In your model, the sample time is 1e-4, and you are asking for 1000 samples. If the decimation setting is 1, you will receive 1000 samples, with each point sampled at 1e-4 sample time. If the decimation setting is 100, you will still receive 1000 samples, but each point is now sampled at 1e-4*100=0.01 sample rate. So you will have lower resolution on the received waveform, if the decimation setting is higher.

For example in your model, if you apply a sine wave of frequency 50 Hz at the Analog In port of the RT Box, with your current decimation setting (100), you will notice a distorted sine wave at the scope of ADC, as shown in the attached screenshot.

If you decrease the "decimation" to 10, or 1, you will see the waveform that you're expecting.

As for applying a constant value, I am seeing a small deviation of about 0.1-1%, which is expected from ADC sampling. How much deviation are you seeing from the requested value? Are you able to share a screenshot?

Regards,
Manu

 

answered Apr 16 by Manu Parimi (297 points)

Hello Manu,

Thank you for your answer. Next time I'll send questions like this one to Plexim Support

Regarding the deviation from the requested value, I have a couple of screenshots.

In the screenshot below, I'm sending a sinusoidal signal from the RT box

But in the ADC, I'm reading a constant value

Regards,

Felipe

This is strange. Are you using the same model that you attached in your question above?

Also, how are you routing your signals from the RT Box to the launchpad? Are you using a launchpad interface board? If yes, make sure the launchpad is plugged in properly and double-check the pin-outs here.

Do you happen to have an oscilloscope? If yes, try measuring the ADC pin in question and observe the waveforms. 

Regards,
Manu

...