SlideShare a Scribd company logo
1 of 25
Download to read offline
1www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.Copyright © ESI Group, 2019. All rights reserved.
www.esi-group.com
Faster Time to Market using Scilab/XCOS/X2C for motor
control algorithm development
Christoph Baumgartner, Microchip Technology Inc.
Scilab Conference 2019
2www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Class Agenda
• Rapid Prototyping Overview
• Develop and simulate your application
• IDE integration (MPLAB X, MCC, Harmony3)
• Run and verify your model on your target platform
• Sensorless field oriented control demo
• Summary
3www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Rapid Prototyping
Commercial:
Matlab/Simulink +
Microchip Toolboxes
OPENSOURCE:
SCILAB/Xcos + X2C
4www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
the Goal.....
Simulate a physikal system .1
Generate code from the simulation .2
Verify simulation and real world .3
variable load
Dynamometer
algorithm
motor
5www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Rapid Prototyping - birds view
MPLAB XSCILAB / XCOS / X2C
X2C communicator
simulation
(PC)
realtime UART
verification
code generation
hardware
6www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Installation MCHP_X2C_V6.xx.yy
Select which modules you want to install:
• X2C
• X2C Demos
• X2C MCC Library
• X2Cscope (C-project UART debugging)
• X2Cscope MCC library
• X2Cscope demo projects
• X2Cscope library projects
• X2C Harmony 2
• MHC2 X2C integration
• Harmony 2 X2C demos
• X2C Harmony 3
• MHC3 X2C integration
• Harmony 3 X2C demos
• Activate X2C in Scilab
7www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Structure of X2C
Model INports
X2C housekeeping
X2C Blocks
Model OUTports
8www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
X2C Libraries
OPENSOURCE
9www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
MCHP MC library
We have developed a
MC libraries with
• 16bit fract
• 32bit fract
• 32bit float
The library is available for free.
dsPIC implementation uses
the original MCLib.
10www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Building Process
MPLAB X
or with batch file
right after code generation
11www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Realtime Tuning/Debugging
Interfaces:
UART
USB/CDC
Ethernet
CAN
12www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Documentation
Automatic documentation
using
MikTex
and
doxygen
13www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
 Generated code is human readable
 Instant online parameter update to target
 Simulation with “target code” in XCOS
 Automated documentation generation
 Virtual oscilloscope
 Comprehensive libraries
 Multiple fixed and floating point implementations
 Inbuilt parameter conversion
 Parameter upload (from target), incl. model
 MISRA conformity of blocks (X2C library only)
 Multirate model support
 ANY 16 and 32 bit device from Microchip is supported
 Fully integrated into MPLAB Harmony3 and MCC
 UART, USB-CDC,TCPIP, CAN support
 dsPIC specific MClibrary
X2C Highligths
14www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Miktex
Software packages
X2C
Library blocks
(from LCM)
Scilab
XCOS
X2C
Communicator
Model code
X2C.c
X2C.h
Framework project
Peripheral driver
MPLAB X
MCC
Harmony2/3
doxygen
PDF documentation
15www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Workflow (existing project + compileandflash.bat)
1. Start MPLAB X + open project + MCC
2. Goto X2C MCC library [MPLAB X]
3. Open model [MPLAB X-X2C MCC lib]
4. Start the Communicator [XCOS]
5. Develop the model [XCOS]
6. Transform Model and push to
communicator [XCOS]
7. Generate C-code (automatically executes
the post process batch for compiling and
programming) [Communicator]
8. {Verify UART settings [Communicator]}
9. {Connect to hardware [Communicator]}
10. {Start Scope [Communicator]}
11. Modify block parameters [Communicator or
XCOS]
12. Restart at 5
4 6
1
2
3
7
9 10
16www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
DEMO
1. Click on X2C
2. Open the Scilab model
17www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
1st Demo (continued)
Execute initProject.sce
&
Simulate your model with
run.sce
Play with parameters
and
simulate again !!!
18www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
1st Demo (continued)
1st start the
communicator
2nd transfer the
model to the
communicator
19www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Automatic programing from X2CCommunicator
Make sure you have generated code with
MCC, this has updated the
„compileandflash.bat“ file with your compiler
and programmer settings.
Add the compileandflash.bat from the .X
project directory as a Post-Generate script in
the X2CCommunicator settings
The next time you generate model code it will
automatically compiled and programmed.
20www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
1st Demo (continued)
Parameters can also be
modified by clicking onto a
model block. Even changing
with the mousewheele is
possible.
21www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Code structure
main
init
communicate
mainTask()
Inports.x
handling
*Outports.y
handling
X2C_update();
interrupt:
execution rate:
X2C_sampletime
Model execution
Communication with
the scope.
22www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Class Summary
• Today we covered:
• Rapid Prototyping based on SCILAB/X2C
• Develop a model
• Simulate and generate code
• Verify the simulation results on the real
hardware
• POWERFULL INTEGRATION in
MICROCHIP IDE
23www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
don‘t forget:
WE spin motors!!!
24www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
LEGAL NOTICE
SOFTWARE:
You may use Microchip software exclusively with Microchip products. Further, use of Microchip software is subject to the copyright notices, disclaimers, and any license terms
accompanying such software, whether set forth at the install of each program or posted in a header or text file.
Notwithstanding the above, certain components of software offered by Microchip and 3rd parties may be covered by “open source” software licenses – which include licenses
that require that the distributor make the software available in source code format. To the extent required by such open source software licenses, the terms of such license will
govern.
NOTICE & DISCLAIMER:
These materials and accompanying information (including, for example, any software, and references to 3rd party companies and 3rd party websites) are for informational
purposes only and provided “AS IS.” Microchip assumes no responsibility for statements made by 3rd party companies, or materials or information that such 3rd parties may
provide.
MICROCHIP DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL,
PUNITIVE, INCIDENTAL, OR CONSEQUENTIAL LOSS, DAMAGE, COST, OR EXPENSE OF ANY KIND RELATED TO THESE MATERIALS OR ACCOMPANYING
INFORMATION PROVIDED TO YOU BY MICROCHIP OR OTHER THIRD PARTIES, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBLITY OF SUCH
DAMAGES OR THE DAMAGES ARE FORESEEABLE. PLEASE BE AWARE THAT IMPLEMENTATION OF INTELLECTUAL PROPERTY PRESENTED HERE MAY
REQUIRE A LICENSE FROM THIRD PARTIES.
TRADEMARKS:
The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BeaconThings, BitCloud, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR,
Heldo, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower,
PICSTART, PIC32 logo, Prochip Designer, QTouch, RightTouch, SAM-BA, SpyNIC, SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are
registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, CodeGuard, CryptoAuthentication,
CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip
Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient
Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI,
SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2017, Microchip Technology Incorporated, All Rights Reserved.
25www.esi-group.com
Copyright © ESI Group, 2019. All rights reserved.
Thank you

More Related Content

What's hot

Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...
Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...
Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...Obeo
 
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...Schneider Electric
 
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulationModelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation智哉 今西
 
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLES
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLESUPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLES
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLESiQHub
 
.Net Classes and Objects | UiPath Community
.Net Classes and Objects | UiPath Community.Net Classes and Objects | UiPath Community
.Net Classes and Objects | UiPath CommunityRohit Radhakrishnan
 
Automotive Software Basics
Automotive Software BasicsAutomotive Software Basics
Automotive Software BasicsMedhat HUSSAIN
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing MicroservicesAnil Allewar
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesObeo
 
Using Assertions in AMS Verification
Using Assertions in AMS VerificationUsing Assertions in AMS Verification
Using Assertions in AMS VerificationDVClub
 
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...Obeo
 
MISRA Safety Case Guidelines -
MISRA Safety Case Guidelines - MISRA Safety Case Guidelines -
MISRA Safety Case Guidelines - Automotive IQ
 
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...IRJET Journal
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaObeo
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Amazon Web Services
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey GordeychikCODE BLUE
 
ダイオードのスパイスモデルを作り方
ダイオードのスパイスモデルを作り方ダイオードのスパイスモデルを作り方
ダイオードのスパイスモデルを作り方Tsuyoshi Horigome
 
Automotive functional safety iso 26262 training bootcamp 2019
Automotive functional safety iso 26262 training bootcamp 2019Automotive functional safety iso 26262 training bootcamp 2019
Automotive functional safety iso 26262 training bootcamp 2019Tonex
 
Test-Driven Machine Learning
Test-Driven Machine LearningTest-Driven Machine Learning
Test-Driven Machine LearningC4Media
 

What's hot (20)

Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...
Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...
Capella Days 2021 | Introduction to CAPELLA/ARCADIA and NASA Systems Engineer...
 
ISO-26262-Webinar.pptx
ISO-26262-Webinar.pptxISO-26262-Webinar.pptx
ISO-26262-Webinar.pptx
 
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...
Impact of IEC 61508 Standards on Intelligent Electrial Networks and Safety Im...
 
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulationModelica Tutorial with PowerSystems: A tutorial for Modelica simulation
Modelica Tutorial with PowerSystems: A tutorial for Modelica simulation
 
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLES
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLESUPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLES
UPCOMING REGULATIONS AND SAFETY STANDARDS FOR AUTONOMOUS VEHICLES
 
.Net Classes and Objects | UiPath Community
.Net Classes and Objects | UiPath Community.Net Classes and Objects | UiPath Community
.Net Classes and Objects | UiPath Community
 
Automotive Software Basics
Automotive Software BasicsAutomotive Software Basics
Automotive Software Basics
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 
From Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems ArchitecturesFrom Model-based to Model and Simulation-based Systems Architectures
From Model-based to Model and Simulation-based Systems Architectures
 
Using Assertions in AMS Verification
Using Assertions in AMS VerificationUsing Assertions in AMS Verification
Using Assertions in AMS Verification
 
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...
Capella Days 2021 | A STEP towards Model-based: Case Study covering Conceptua...
 
MISRA Safety Case Guidelines -
MISRA Safety Case Guidelines - MISRA Safety Case Guidelines -
MISRA Safety Case Guidelines -
 
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...
Implementation and Validation of K Line (ISO 9141) Protocol for Diagnostic Ap...
 
Simulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in CapellaSimulation with Python and MATLAB® in Capella
Simulation with Python and MATLAB® in Capella
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
 
Wszystko o Laravel Livewire
Wszystko o Laravel Livewire Wszystko o Laravel Livewire
Wszystko o Laravel Livewire
 
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
 
ダイオードのスパイスモデルを作り方
ダイオードのスパイスモデルを作り方ダイオードのスパイスモデルを作り方
ダイオードのスパイスモデルを作り方
 
Automotive functional safety iso 26262 training bootcamp 2019
Automotive functional safety iso 26262 training bootcamp 2019Automotive functional safety iso 26262 training bootcamp 2019
Automotive functional safety iso 26262 training bootcamp 2019
 
Test-Driven Machine Learning
Test-Driven Machine LearningTest-Driven Machine Learning
Test-Driven Machine Learning
 

Similar to Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm development

Microcontroladores: programación de microcontroladores PIC de 8 bits en C
Microcontroladores: programación de microcontroladores PIC de 8 bits en CMicrocontroladores: programación de microcontroladores PIC de 8 bits en C
Microcontroladores: programación de microcontroladores PIC de 8 bits en CSANTIAGO PABLO ALBERTO
 
How to build containerized architectures for deep learning - Data Festival 20...
How to build containerized architectures for deep learning - Data Festival 20...How to build containerized architectures for deep learning - Data Festival 20...
How to build containerized architectures for deep learning - Data Festival 20...Antje Barth
 
C18 manual
C18 manualC18 manual
C18 manualzan369
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cSuresh Murugesan
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfICS
 
(Ebook - Elettronica) Pic Microcontroller Project Book.pdf
(Ebook - Elettronica) Pic Microcontroller Project Book.pdf(Ebook - Elettronica) Pic Microcontroller Project Book.pdf
(Ebook - Elettronica) Pic Microcontroller Project Book.pdfHuynhCuong17
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systemsYasushi Hara
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systemsYasushi Hara
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systemsYasushi Hara
 
Setting licenses free vs. locking them down
Setting licenses free vs. locking them downSetting licenses free vs. locking them down
Setting licenses free vs. locking them downteam-WIBU
 
Global Azure Bootcamp 2019 - AIoT powered by Azure
Global Azure Bootcamp 2019 - AIoT powered by AzureGlobal Azure Bootcamp 2019 - AIoT powered by Azure
Global Azure Bootcamp 2019 - AIoT powered by AzureAndri Yadi
 
JavaOne 2016 - Faces Counter
JavaOne 2016 -  Faces CounterJavaOne 2016 -  Faces Counter
JavaOne 2016 - Faces CounterCoritel
 
Ww1.microchip.com downloads en_device_doc_39662b
Ww1.microchip.com downloads en_device_doc_39662bWw1.microchip.com downloads en_device_doc_39662b
Ww1.microchip.com downloads en_device_doc_39662bOai Vu Quoc
 
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...Scilab
 
The Fundamentals of Internet of Everything Connectivity
The Fundamentals of Internet of Everything ConnectivityThe Fundamentals of Internet of Everything Connectivity
The Fundamentals of Internet of Everything ConnectivityQualcomm Developer Network
 
Hitech picc manual
Hitech picc manualHitech picc manual
Hitech picc manualsilvestrot
 
Cloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryCloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryBob Sokol
 

Similar to Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm development (20)

Microcontroladores: programación de microcontroladores PIC de 8 bits en C
Microcontroladores: programación de microcontroladores PIC de 8 bits en CMicrocontroladores: programación de microcontroladores PIC de 8 bits en C
Microcontroladores: programación de microcontroladores PIC de 8 bits en C
 
How to build containerized architectures for deep learning - Data Festival 20...
How to build containerized architectures for deep learning - Data Festival 20...How to build containerized architectures for deep learning - Data Festival 20...
How to build containerized architectures for deep learning - Data Festival 20...
 
C18 manual
C18 manualC18 manual
C18 manual
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_c
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
 
(Ebook - Elettronica) Pic Microcontroller Project Book.pdf
(Ebook - Elettronica) Pic Microcontroller Project Book.pdf(Ebook - Elettronica) Pic Microcontroller Project Book.pdf
(Ebook - Elettronica) Pic Microcontroller Project Book.pdf
 
Mplab user guide_51519c
Mplab user guide_51519cMplab user guide_51519c
Mplab user guide_51519c
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systems
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systems
 
Open computer systems
Open computer systemsOpen computer systems
Open computer systems
 
Setting licenses free vs. locking them down
Setting licenses free vs. locking them downSetting licenses free vs. locking them down
Setting licenses free vs. locking them down
 
adc evaluation
 adc evaluation  adc evaluation
adc evaluation
 
Global Azure Bootcamp 2019 - AIoT powered by Azure
Global Azure Bootcamp 2019 - AIoT powered by AzureGlobal Azure Bootcamp 2019 - AIoT powered by Azure
Global Azure Bootcamp 2019 - AIoT powered by Azure
 
JavaOne 2016 - Faces Counter
JavaOne 2016 -  Faces CounterJavaOne 2016 -  Faces Counter
JavaOne 2016 - Faces Counter
 
Resume_Pratik
Resume_PratikResume_Pratik
Resume_Pratik
 
Ww1.microchip.com downloads en_device_doc_39662b
Ww1.microchip.com downloads en_device_doc_39662bWw1.microchip.com downloads en_device_doc_39662b
Ww1.microchip.com downloads en_device_doc_39662b
 
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
A Real-Time Interface for Xcos – an illustrative demonstration using a batter...
 
The Fundamentals of Internet of Everything Connectivity
The Fundamentals of Internet of Everything ConnectivityThe Fundamentals of Internet of Everything Connectivity
The Fundamentals of Internet of Everything Connectivity
 
Hitech picc manual
Hitech picc manualHitech picc manual
Hitech picc manual
 
Cloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryCloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud Foundry
 

More from Scilab

Statistical Analysis for Robust Design
Statistical Analysis for Robust DesignStatistical Analysis for Robust Design
Statistical Analysis for Robust DesignScilab
 
Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimizationScilab
 
Asteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 KeynoteAsteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 KeynoteScilab
 
Scilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...Scilab
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabScilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop Scilab
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018Scilab
 
Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018Scilab
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Scilab
 
University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018Scilab
 
DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018Scilab
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Scilab
 
Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018Scilab
 
CNES @ Scilab Conference 2018
CNES @ Scilab Conference 2018CNES @ Scilab Conference 2018
CNES @ Scilab Conference 2018Scilab
 
Scilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteScilab
 

More from Scilab (20)

Statistical Analysis for Robust Design
Statistical Analysis for Robust DesignStatistical Analysis for Robust Design
Statistical Analysis for Robust Design
 
Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimization
 
Asteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 KeynoteAsteroidlanding - Scilab conference 2019 Keynote
Asteroidlanding - Scilab conference 2019 Keynote
 
Scilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modellingScilab and Xcos for Very Low Earth Orbits satellites modelling
Scilab and Xcos for Very Low Earth Orbits satellites modelling
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in Scilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018
 
Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018Qualcomm @ Scilab Conference 2018
Qualcomm @ Scilab Conference 2018
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018
 
University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018University of Applied Science Esslingen @ Scilab Conference 2018
University of Applied Science Esslingen @ Scilab Conference 2018
 
DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018
 
Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018Arcelormittal @ Scilab Conference 2018
Arcelormittal @ Scilab Conference 2018
 
CNES @ Scilab Conference 2018
CNES @ Scilab Conference 2018CNES @ Scilab Conference 2018
CNES @ Scilab Conference 2018
 
Scilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the Community
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and Palette
 

Recently uploaded

Machine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfMachine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfadeyimikaipaye
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical trainingGladiatorsKasper
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...IJAEMSJORNAL
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackinghadarpinhas1
 
1- Practice occupational health and safety procedures.pptx
1- Practice occupational health and safety procedures.pptx1- Practice occupational health and safety procedures.pptx
1- Practice occupational health and safety procedures.pptxMel Paras
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...KrishnaveniKrishnara1
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
ADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studyADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studydhruvamdhruvil123
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organizationchnrketan
 

Recently uploaded (20)

ASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductosASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductos
 
Machine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdfMachine Learning 5G Federated Learning.pdf
Machine Learning 5G Federated Learning.pdf
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
 
1- Practice occupational health and safety procedures.pptx
1- Practice occupational health and safety procedures.pptx1- Practice occupational health and safety procedures.pptx
1- Practice occupational health and safety procedures.pptx
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
ADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain studyADM100 Running Book for sap basis domain study
ADM100 Running Book for sap basis domain study
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Versatile Engineering Construction Firms
Versatile Engineering Construction FirmsVersatile Engineering Construction Firms
Versatile Engineering Construction Firms
 
priority interrupt computer organization
priority interrupt computer organizationpriority interrupt computer organization
priority interrupt computer organization
 

Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm development

  • 1. 1www.esi-group.com Copyright © ESI Group, 2019. All rights reserved.Copyright © ESI Group, 2019. All rights reserved. www.esi-group.com Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm development Christoph Baumgartner, Microchip Technology Inc. Scilab Conference 2019
  • 2. 2www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Class Agenda • Rapid Prototyping Overview • Develop and simulate your application • IDE integration (MPLAB X, MCC, Harmony3) • Run and verify your model on your target platform • Sensorless field oriented control demo • Summary
  • 3. 3www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Rapid Prototyping Commercial: Matlab/Simulink + Microchip Toolboxes OPENSOURCE: SCILAB/Xcos + X2C
  • 4. 4www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. the Goal..... Simulate a physikal system .1 Generate code from the simulation .2 Verify simulation and real world .3 variable load Dynamometer algorithm motor
  • 5. 5www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Rapid Prototyping - birds view MPLAB XSCILAB / XCOS / X2C X2C communicator simulation (PC) realtime UART verification code generation hardware
  • 6. 6www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Installation MCHP_X2C_V6.xx.yy Select which modules you want to install: • X2C • X2C Demos • X2C MCC Library • X2Cscope (C-project UART debugging) • X2Cscope MCC library • X2Cscope demo projects • X2Cscope library projects • X2C Harmony 2 • MHC2 X2C integration • Harmony 2 X2C demos • X2C Harmony 3 • MHC3 X2C integration • Harmony 3 X2C demos • Activate X2C in Scilab
  • 7. 7www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Structure of X2C Model INports X2C housekeeping X2C Blocks Model OUTports
  • 8. 8www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. X2C Libraries OPENSOURCE
  • 9. 9www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. MCHP MC library We have developed a MC libraries with • 16bit fract • 32bit fract • 32bit float The library is available for free. dsPIC implementation uses the original MCLib.
  • 10. 10www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Building Process MPLAB X or with batch file right after code generation
  • 11. 11www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Realtime Tuning/Debugging Interfaces: UART USB/CDC Ethernet CAN
  • 12. 12www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Documentation Automatic documentation using MikTex and doxygen
  • 13. 13www.esi-group.com Copyright © ESI Group, 2019. All rights reserved.  Generated code is human readable  Instant online parameter update to target  Simulation with “target code” in XCOS  Automated documentation generation  Virtual oscilloscope  Comprehensive libraries  Multiple fixed and floating point implementations  Inbuilt parameter conversion  Parameter upload (from target), incl. model  MISRA conformity of blocks (X2C library only)  Multirate model support  ANY 16 and 32 bit device from Microchip is supported  Fully integrated into MPLAB Harmony3 and MCC  UART, USB-CDC,TCPIP, CAN support  dsPIC specific MClibrary X2C Highligths
  • 14. 14www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Miktex Software packages X2C Library blocks (from LCM) Scilab XCOS X2C Communicator Model code X2C.c X2C.h Framework project Peripheral driver MPLAB X MCC Harmony2/3 doxygen PDF documentation
  • 15. 15www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Workflow (existing project + compileandflash.bat) 1. Start MPLAB X + open project + MCC 2. Goto X2C MCC library [MPLAB X] 3. Open model [MPLAB X-X2C MCC lib] 4. Start the Communicator [XCOS] 5. Develop the model [XCOS] 6. Transform Model and push to communicator [XCOS] 7. Generate C-code (automatically executes the post process batch for compiling and programming) [Communicator] 8. {Verify UART settings [Communicator]} 9. {Connect to hardware [Communicator]} 10. {Start Scope [Communicator]} 11. Modify block parameters [Communicator or XCOS] 12. Restart at 5 4 6 1 2 3 7 9 10
  • 16. 16www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. DEMO 1. Click on X2C 2. Open the Scilab model
  • 17. 17www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. 1st Demo (continued) Execute initProject.sce & Simulate your model with run.sce Play with parameters and simulate again !!!
  • 18. 18www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. 1st Demo (continued) 1st start the communicator 2nd transfer the model to the communicator
  • 19. 19www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Automatic programing from X2CCommunicator Make sure you have generated code with MCC, this has updated the „compileandflash.bat“ file with your compiler and programmer settings. Add the compileandflash.bat from the .X project directory as a Post-Generate script in the X2CCommunicator settings The next time you generate model code it will automatically compiled and programmed.
  • 20. 20www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. 1st Demo (continued) Parameters can also be modified by clicking onto a model block. Even changing with the mousewheele is possible.
  • 21. 21www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Code structure main init communicate mainTask() Inports.x handling *Outports.y handling X2C_update(); interrupt: execution rate: X2C_sampletime Model execution Communication with the scope.
  • 22. 22www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Class Summary • Today we covered: • Rapid Prototyping based on SCILAB/X2C • Develop a model • Simulate and generate code • Verify the simulation results on the real hardware • POWERFULL INTEGRATION in MICROCHIP IDE
  • 23. 23www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. don‘t forget: WE spin motors!!!
  • 24. 24www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. LEGAL NOTICE SOFTWARE: You may use Microchip software exclusively with Microchip products. Further, use of Microchip software is subject to the copyright notices, disclaimers, and any license terms accompanying such software, whether set forth at the install of each program or posted in a header or text file. Notwithstanding the above, certain components of software offered by Microchip and 3rd parties may be covered by “open source” software licenses – which include licenses that require that the distributor make the software available in source code format. To the extent required by such open source software licenses, the terms of such license will govern. NOTICE & DISCLAIMER: These materials and accompanying information (including, for example, any software, and references to 3rd party companies and 3rd party websites) are for informational purposes only and provided “AS IS.” Microchip assumes no responsibility for statements made by 3rd party companies, or materials or information that such 3rd parties may provide. MICROCHIP DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY DIRECT OR INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR CONSEQUENTIAL LOSS, DAMAGE, COST, OR EXPENSE OF ANY KIND RELATED TO THESE MATERIALS OR ACCOMPANYING INFORMATION PROVIDED TO YOU BY MICROCHIP OR OTHER THIRD PARTIES, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBLITY OF SUCH DAMAGES OR THE DAMAGES ARE FORESEEABLE. PLEASE BE AWARE THAT IMPLEMENTATION OF INTELLECTUAL PROPERTY PRESENTED HERE MAY REQUIRE A LICENSE FROM THIRD PARTIES. TRADEMARKS: The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BeaconThings, BitCloud, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, RightTouch, SAM-BA, SpyNIC, SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are registered trademarks of Microchip Technology Incorporated in the U.S.A. Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, CodeGuard, CryptoAuthentication, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies. © 2017, Microchip Technology Incorporated, All Rights Reserved.
  • 25. 25www.esi-group.com Copyright © ESI Group, 2019. All rights reserved. Thank you