Tutorials

This page gives an overview on all available tutorials for PLECS, RT Box and Embedded Code Generation. Please note that only the PLECS Standalone files are provided for download. However, these can be easily imported into PLECS Blockset, by opening a new empty PLECS Circuit block inside a Simulink model and clicking File → Import from Standalone.

A complete list of PLECS-related videos can be found on the Plexim Youtube page.

The filters below will help you navigate through the collection of application examples. By clicking on the column headings in the table, the results are sorted in ascending or descending order.

Title Description Files PDF Video No.
Automatic Code Generation for Microcontrollers: Introduction to the TI C2000 Series

This tutorial introduces the major functional blocks of the PLECS embedded code generation tool for the Texas Instruments (TI) C2000 processor family, the simple workflow for going from an offline model to working controller, and advanced features such as the External Mode allowing live inspection and verification of the working code. In addition to PLECS, PLECS Coder, and the target support library, a Piccolo MCU F28069 LaunchPad development kit is required for this exercise. Further, if you have access to a PLECS RT Box, it provides a virtual circuit environment for testing the generated code. In the first exercise you will create a simple program to blink an LED on the LaunchPad, followed by instructions for pulse-width modulation (PWM) signal generation, Analog-to-Digital Converter (ADC) sampling techniques, and closed-loop control design.

301
Automatic Code Generation for Microcontrollers: Introduction to the STM32 Series

This tutorial covers using STM32 microcontrollers (MCUs) with the PLECS Coder and STM32 Target Support Package. Required tools include PLECS Standalone or Blockset, a PLECS Coder license, the STM32 Target Support Package, an STM32 NUCLEO-G474RE board, and jumper wires. The first exercise involves creating a model to blink an LED on the G474RE board. In later exercises PWM generation and analog measurements are discussed.

- 302
Automatic Code Generation for Microcontrollers: Trigger Configuration for STM32

This advanced tutorial continues teaching how to use STM32 microcontrollers with the PLECS Coder and STM32 Target Support Package. Ensure familiarity with the basic concepts from the "Introduction to PLECS STM32 Code Generation" tutorial. The tutorial uses the STM32 NUCLEO-G474RE board and focuses on configuring the ADC and control loop interrupts for time synchronization in a digital power electronic control loop.

- 303
Automatic Code Generation for Microcontrollers: Code Generation Workflow using STM32

This advanced tutorial continues the use of STM32 microcontrollers with PLECS Coder and STM32 Target Support Package. It builds on previous tutorials: “Introduction to PLECS STM32 Code Generation” and “Trigger Configuration using PLECS STM32 TSP.” The tutorial uses the STM32 NUCLEO-G474RE board, and optionally the PLECS RT Box 1 and the RT Box LaunchPad-Nucleo Interface Board. An RT Box is not necessary for offline simulations but requires the RT Box Target Support Library. The first exercise demonstrates the PLECS code generation workflow using a buck converter with a closed-loop controller, with the same model applicable for both offline and real-time simulations.

- 304