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 to store more sampling data in the external mode of C2000 launchpad

0 votes

I want to store more data in the scope to see the entire period of a sine wave ,which means I need at least the 0.02s period of data to do so, but as the sampling rate is limited to 20HZ, so can we store the data of the whole period?

asked Mar 6, 2021 by shichenseu (299 points)

1 Answer

+1 vote
Best answer

The 20 Hz Rate setting is the minimum refresh rate to get a new set of data.  It does not have to do with the sample times of the data set itself.  The minimum sample time is defined by the Discretization Step Size when generating code.

There are two approaches you can use to capture more data.  You can use the two approaches at the same time:

  1. Increase the Target buffer size.  This is set in the Coder Options + Target + External Mode tab as shown below. I also copied the help description of this parameter.
  2. Increase the Decimation setting in the Coder Options + External Mode tab.  The same total number of samples is recorded but the results are downsampled.  For example with a decimation setting of 1 and N samples, data1=[k0,k1,k2,k3,...kN] and a setting of 3 is data3=[k0,k3,k6,...kN*3].


answered Mar 10, 2021 by Bryan Lieblick (1,301 points)
selected Apr 23, 2021 by shichenseu

Thank U ,hero!!!!

Hello, just so you are aware, flagging typically means that an answer may not be correct and should be reviewed by the moderator. If you are happy with an answer, it would be great if you could "choose it as best answer" or vote it up instead. Thanks!