Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes

SciLab, Xcos, X2C Simulation and Code Generation Tools


Open-Source Modeling, Simulation, Code Generation and Real-Time Debug Tools

Rapidly prototype your real-time system using the open source SciLab, XcosX2C modeling tools and Microchip’s MPLAB® X Integrated Development Environment (IDE). This tool chain will enable you to model your real-time system, simulate and seamlessly generate source code for the dsPIC® Digital Signal Controllers (DSCs), PIC24, PIC32 and SAM Microcontrollers (MCUs) that can be readily imported into the MPLAB X IDE. The plug-in installer on this page will help you to use  the SciLab, Xcos and X2C modeling tool set with  the MPLAB® X IDE to rapidly model and design your system. Also provided in the installation is X2C Scope, a free real-time monitoring, debugging and waveform visualization tool.

Features

  • Free downloads (GPL licenses)
  • Flexible development environment
  • Model based design for real-time control applications
  • Real-time debugging with virtual oscilloscope
  • Works with dsPIC® DSCs, PIC24, PIC32 and SAM MCUs
  • Tightly integrated with MPLAB® X IDE and Microchip Code Configurator (MCC) for 16-bit and Harmony software framework for 32-bit
  • SciLab Calculation Engine & Xcos
    - Calculation engine for data analysis, algorithm development and modeling
    - Gaphical editor (Xcos) for model-based development 
    - Simulate in discreet and continuous time domain

  

  • X2C Libraries & Communicator
    - Free libraries for Xcos: basic, general, math and control
    - Optional Motor Control and State Control libraries available for purchase
    - Custom block generator available 
    - Blocks can be implemented in fixed (16/32-bit) or floating point (32/64-bit) data
    - Generates C-code from the graphical model
    - Establishes a connection to the target board via serial, CAN or Ethernet interface
    - batch file support: a single button click generates code / compiles and programs the uC

  • X2C Scope
    - Provides a virtual 8-channel oscilloscope for real-time monitoring and debugging of parameters
    - Block input and output signals, global variables and memory addresses can be monitored
    - No recompiling is required to change the monitored signals, all changes can be made at runtime
    - All oscilloscope functions are available, including various sampling and trigger mode
    - To ease interpretation of physical signals, monitored signals can be converted into physical quantities by setting the channel’s gain and offset

Comparison with motorBench® Development Suite

 SciLab Xcos X2C Simulation and Code Generation Tools  motorBench® Development Suite
 Simulation  Yes  No
 Automated Motor Parameter Identification  No  Yes
 Code Generation  Yes  Yes
 Code Performance  Requires manual optimization; Higher CPU load, program, and data memory due to debug interface overhead  Generates optimized control code using Microchip’s Motor Control Application Framework (MCAF)

Devices Supported

X2Cv6 demo-models and library support all Microchip’s 16- and 32-bit devices, including dsPIC33 DSCs, PIC24, PIC32 and SAM MCUs.

Hardware:

The SciLab/Xcos/X2C solution works with any hardware, allowing you to adapt the framework project using the included set of peripheral drivers.

The demo can be easily adapted to any development board featuring the supported MCUs and DSCs from Microchip. The demo project for the following development boards are readily available:

  • dsPIC33CK Curiosity Development Board (DM330030)
  • PIC32MM Curiosity Development Board (DM320101)
  • MCLV-2 Low Voltage Motor Control Development Board (DM330021-2)
  • MCHV-2/MCHV-3 High-Voltage Motor Control Development Board (DM330023-2, DM330023-3)
  • PIC32MZ Starter Kit and MEB II (DM320209 , DM320005-5)
  • X2C+ Development Board by Chipcadds (View)
    - PIC33EP256MC502
    - PIC32MX170F256B
  • PIC32-EMZ64 by Olimex (View)
    - PIC32MZ2048EFH064

Microchip Demos

LED Blink Demos:

  • Demo for the dsPIC33EP DSC on X2C+ Development Board
  • Demo for the dsPIC33EP DSC on MCLV-2 Motor Control Low-Voltage Board (DM330021-2) or MCHV-2/MCHV-3 Motor Control High-Voltage Board (DM330023-2, DM330023-3)
  • Demo for the dsPIC33CK DSC on dsPIC33CK Curiosity Development Board (DM330030)
  • Demo for the PIC32MM MCU on PIC32MM Curiosity Development Board (DM320101)
  • Demo for the SAME70 MCU on MCLV-2 Motor Control Low-Voltage Board (DM330021-2) or MCHV-2/MCHV-3 Motor Control High-Voltage Board (DM330023-2, DM330023-3)

Motor Demos:

  • FOC Algorithm with PMSM motor model for the dsPIC33EP DSC on MCLV-2 or MCHV-2/-3 motor control board
  • FOC Algorithm with PMSM motor model for the dsPIC33CK DSC on MCLV-2 or MCHV-2/-3 motor control board
  • FOC Dynamometer with PMSM motor model for the dsPIC33EP DSC on MCLV-2 or MCHV-2/-3 motor control board
  • FOC Algorithm with PMSM motor model for the PIC32MK MCU on MCLV-2 or MCHV-2/-3 motor control board
  • FOC Algorithm with PMSM motor model for the SAME70 MCU on MCLV-2 or MCHV-2/-3 motor control board


Getting Started

Requirements:

Video Tutorial:

  1. Introduction (View)
  2. SciLab-X2C Overview (View)
  3. Installation (View)
  4. How to uninstall an X2C version from SciLab (View):
  5. How to open Project and Simulate a system (View):
    Get familiar with the different environments used and simulate your first demo project.
  6. Generate code and run code on a hardware development board (View):
    Generate code using the SciLab/Xcos/X2C tool chain and use the MPLAB X IDE to program the code onto a development board
  7. Simplify programming using a Batch file (View):
    Execute the batch-file that is generated by using the MPLAB® Code Configurator (MCC) in X2C Communicator to simplify programing. It is only required when generating code using the X2C Communicator. As a post generation step, the batch-file automatically handles the compilation and programming.
  8. X2C Scope and features (View):
    Get familiar with the X2C Communicator Scope features. Select the right signals you want to monitor. Set the trigger to get nice and steady pictures. Modify parameters during run-time to tune your algorithm.

Downloads

MCHP X2Cv6 6.10.01 Installer: This is a complete X2C distribution for Microchip’s digital signal controllers and microcontrollers. All demos included only serve as proof of concept and are not fully tested.

Downloads

Description
Download
KB Size
Updated as of
MCHP_X2C_V6.10.01
90120
4/8/2020