Download Print this page

Plexim PLECS RT Box Manual

Spi interface loop-back demo on a single device
Hide thumbs Also See for PLECS RT Box:

Advertisement

Quick Links

dx
SPI interface loop-back demo on a single RT Box
Last updated in RT Box Target Support Package 2.1.1
Request a PLECS and PLECS Coder trial license
Get the latest RT Box Target Support Package
Check the PLECS and RT Box documentation
RT Box
DEMO MODEL
www.plexim.com

Advertisement

loading
Need help?

Need help?

Do you have a question about the PLECS RT Box and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Plexim PLECS RT Box

  • Page 1 DEMO MODEL SPI interface loop-back demo on a single RT Box Last updated in RT Box Target Support Package 2.1.1 www.plexim.com Request a PLECS and PLECS Coder trial license Get the latest RT Box Target Support Package Check the PLECS and RT Box documentation...
  • Page 2 1.1 Requirements • One PLECS RT Box and one PLECS Coder license. • The RT Box Target Support Package (minimum version 2.1.1). • Follow the step-by-step instructions on configuring PLECS and the RT Box in the Quick Start guide of the RT Box User Manual.
  • Page 3 • Words per transmission: In this demo, one word is used for the Sine wave and the other word is used for the Pulse wave. • Sample time: Putting here means that the SPI transmission happens within every single model www.plexim.com...
  • Page 4 Once the real-time simulation is running on the RT Box and the external mode is enabled, the wave- forms on “TX/RX Overview” Scope are shown in Fig. 3. The received value matches the reference value in terms of amplitude and frequency for both the sine wave and the pulse wave, which validates the SPI loop-back function. www.plexim.com...
  • Page 5 Fig. 7 provides more insight with the oscilloscope measurement. Probe CH1 shows the 0.5 duty cycle PWM indicating the new 5 s model step size. CH2 to CH4 show the SPI transmission at 20 s sample time, which are exactly 4 times a model step. www.plexim.com...
  • Page 6 This RT Box demo model demonstrates a loop-back test using the integrated SPI interface on the RT Box. It shows how to set up the SPI Master block in a PLECS model. The demo model runs in both offline and in real-time simulation. www.plexim.com...
  • Page 7 PWMs synchronized with the SPI transmission sample time can be properly adjusted to achieve the desired signals. The RT Box subsystem circuit schematic is shown in Fig. 9. Scope “Ref/RX Overview” shows the com- www.plexim.com...
  • Page 8 Figure 9: Subsystem circuit schematic for the advanced SPI demo on the RT Box External ADC sampled digital data (16-bit) × 1e4 Received value Digital data converted to analog value Analog reference Received value Valid port SPI Master: v × 1e-2 Time (s) Figure 10: Real-time simulation result on PLECS Scope of the advanced SPI demo References [1] Analog Devices AD7980 datasheet [Online]. Available: https://www.analog.com/media/en/technical- documentation/data-sheets/AD7980.pdf. www.plexim.com...
  • Page 9: Revision History

    Plexim GmbH. PLECS is a registered trademark of Plexim GmbH. MATLAB, Simulink and Simulink Coder are regis- tered trademarks of The MathWorks, Inc. Other product or brand names are trademarks or registered...

This manual is also suitable for:

Plecs rt box 1Plecs rt box 2Plecs rt box 3