SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
CUSTOMIZING X
In this tutorial, we show how to
Moreover, we use the "Xcos toolbox skeleton" for
in Xcos scheme (already developed in other tutorials)
Level
This work is licensed under a Creative Commons Attribution
www.openeering.com
XCOS WITH NEW BLOCKS AND PALETTE
In this tutorial, we show how to create and customize Xcos blocks and palettes.
e use the "Xcos toolbox skeleton" for a better result. The LHY model
(already developed in other tutorials) is used as a starting point
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
powered by
ALETTES
customize Xcos blocks and palettes.
he LHY model
is used as a starting point.
Customizing Xcos block/palette www.openeering.com page 2/13
Step 1: Purpose of this tutorial
The aim of this tutorial is to show how to create and customize Xcos
blocks adding new elements to the Xcos palettes.
Here, as a reference scheme we use the LHY model already developed
in Xcos. The scheme is available in another tutorial at the Openeering
web site.
Moreover, we also introduce the reader to the “Xcos toolbox skeleton”
that is a useful toolbox for the customization of Xcos blocks.
The creation of new blocks are useful to:
• Simplify the diagram;
• Reuse of same block (also in other schemes).
Step 2: Roadmap
The following topics are covered in this tutorial:
• What is Scilab ATOMS;
• How to install “Xcos toolbox skeleton”;
• How to create a new Xcos block;
• How to create a new Xcos palette.
Descriptions Steps
ATOMS 3
Xcos toolbox skeleton 4-5
LHY model 6
Custom Xcos blocks 7-12
Custom Xcos palette 13-16
Customizing Xcos block/palette
Step 3: What is Scilab ATOMS
Scilab Atoms is a packaging system of Scilab external modules.
this tool it is trivial to install/un-install prebuilt Scilab modules.
Atoms packages are available by clicking on the menu icon
from the menu "Applications/Module manager
network proxy is installed this must be configured in Scilab using the
command "atomsSetConfig" (see help).
On the right, the ATOMS window is reported. A green icon
the installed toolboxes.
Step 4: How to install “Xcos toolbox skeleton”
The “Xcos toolbox skeleton” is available in the ATOMS under the Xcos
menu.
Select the toolbox and then click on the “Install” button.
As for any other ATOMS toolbox, it is necessary to restart Scilab
new installation.
www.openeering.com
of Scilab external modules. Using
install prebuilt Scilab modules.
clicking on the menu icon or
Module manager - ATOMS". If a
network proxy is installed this must be configured in Scilab using the
green icon denotes all
toolbox skeleton”
” is available in the ATOMS under the Xcos
” button.
restart Scilab after a
page 3/13
Customizing Xcos block/palette www.openeering.com page 4/13
Step 5: Loading “Xcos toolbox skeleton”
Once Scilab has started the new module is loaded. This is visible in the
Scilab console where information on all loaded modules is displayed.
The model used in this tutorial is reported on the right. The Xcos scheme
corresponds to the LHY model. Some theory about the model and the
Xcos scheme can be downloaded from the tutorial on LHY model in Xcos
(part I).
Step 6: The LHY scheme
The model used in this tutorial is reported on the right. The Xcos scheme
correspond to the known LHY model. Some theory about the model and
the Xcos scheme can be download from the tutorial on LHY model in
Xcos.
Customizing Xcos block/palette www.openeering.com page 5/13
Step 7: How to create a custom Xcos block
To create a custom subsystem the following steps are required:
• Select the desired blocks:
- Left-click where you want to start your selection;
- Hold down your left mouse button and drag the mouse
until you have highlighted all the interested area;
or
- Left-click of the mouse over the element you want;
- Ctrl + Left-click on elements and links you want to select;
• Right-click on one of the selected elements and then select
“Region to superblock” or from the menu “edit” select “Region to
superblock” and new block appears.
Note: From the LHY model in Xcos scheme we have selected all blocks
and links that represent the system. All the other blocks that are used for
the graphical output are not selected because they are not considered as
part of the model.
(The selection of the LHY model)
(The LHY model as a new Xcos block)
Customizing Xcos block/palette
Step 8: Port and Subsystem blocks
The main blocks involved in the creation of subsystems are:
• Regular Input Port: This port represents an explicit input port and
should be used only inside a Xcos Super Block;
• Regular Output Port: This port represents an explicit output port
and should be used only inside a Xcos Super Block.
These blocks are available in the “Port & Subsystem
Note: Ports numbers should be in increasing order starting from 1.
Step 9: Xcos superblock
On the right, a simple subsystem with two inputs and two outputs is
presented. The bottom figure shows the resulting Xcos block
www.openeering.com
The main blocks involved in the creation of subsystems are:
This port represents an explicit input port and
should be used only inside a Xcos Super Block;
represents an explicit output port
and should be used only inside a Xcos Super Block.
Port & Subsystem” palette.
Ports numbers should be in increasing order starting from 1.
(Regular Input Port)
(Regular Output Port)
On the right, a simple subsystem with two inputs and two outputs is
presented. The bottom figure shows the resulting Xcos block appearance.
page 6/13
(Regular Input Port)
ar Output Port)
Customizing Xcos block/palette www.openeering.com page 7/13
Step 10: Customize a Xcos block
Using the “Xcos toolbox skeleton” it is possible to personalize each
block in an easy way:
• Select the desired element;
• Right-click and then select "Format -> Edit" and it appears a
dialog where it is possible to change some aspect parameters.
At the end press "Ok" button.
Add the text "LHY Model" and change colors in the previous dialog.
Customizing Xcos block/palette www.openeering.com page 8/13
Step 11: Xcos block input mask
The LHY model depends on the following (eleven) constants:
["tau"; "s"; "smax"; "q"; "a"; "b"; "g"; "delta";
"L0"; "H0"; "Y0"]
It is possible to create an input mask making the element as general as
possible allowing the reuse of the model in other applications/schemes.
An input mask can be created as follows:
• Right-click on the element and then select "Superblock mask
-> Create";
• Insert all the eleven variables in the "variable setting" tab
selecting them one by one from the list (see figure);
• Change the default values in the "Default values" tab.
Customizing Xcos block/palette www.openeering.com page 9/13
Step 12: The input mask
The input mask for our LHY model is reported on the right and can be
activated by double-clicking on the element.
Step 13: Create a new Xcos palette
Now, we want to make the LHY model block available as new element for
other diagrams adding it to the Xcos palette.
The first step is to create a new empty Xcos file and save the new
element. Here, the adopted name is "LHY_Xcos_Lib.xcos".
Customizing Xcos block/palette
Step 14: Create a new palette folder
Step 1 (Create a new palette folder):
• Right-click on "Palettes" of the Xcos "Palettes browser
dialog and then "Create";
• Left-click again on "Palettes".
As a result, a new folder named "Category" is created as the last row on
the "Palettes" selector.
Step 2 (Rename the default palette folder):
• Rename the new folder into as "LHY" for our purpose.
As a result, an icon appears on the left of the "Palettes
to put our library model.
www.openeering.com
Palettes browser"
is created as the last row on
for our purpose.
Palettes" selector where
page 10/13
Customizing Xcos block/palette www.openeering.com page 11/13
Step 15: Insert blocks in the palette browser
Step 3 (Load the file into the "Palettes" selector):
• From the menu "Palettes" select "Open" and then open the file
"LHY_Xcos_Lib.xcos";
• Double-click on the "Palettes" selector
Step 4 (Move the file into the folder "LHY"):
• Select the file, and drag it into the folder "LHY".
Customizing Xcos block/palette www.openeering.com page 12/13
Step 16: Finalize the palette
Step 5 (Rename the input file in the "LHY" palette):
• Click on "Palettes" and then click on "LHY” and modify on the
right the name of the library as "LHY_Xcos".
All these steps create a permanent new palette in your Xcos. In fact, if you
close and re-open Scilab you may notice that this new palette is still there.
Step 17: Exercise #1
Use the new library to create a new scheme with the comparison of two
different LHY models where the second has the parameter 0.2.
Note: Remember to set the simulation to 50.
Customizing Xcos block/palette www.openeering.com page 13/13
Step 18: Concluding remarks and References
In this tutorial we have shown how to create and customize blocks and
palettes in Xcos.
On the right-hand column you may find a list of references for further
studies.
1. Scilab Web Page: Available: www.scilab.org.
2. Openeering: www.openeering.com.
Step 19: Software content
To report a bug or suggest some improvement please contact Openeering
team at the web site www.openeering.com.
Thank you for your attention,
Manolo Venturin
------------------------------
LHY BLOCK MODEL IN SCILAB/XCOS
------------------------------
--------------
Main directory
--------------
ex1.xcos : Solution of the exercise
LHY_Tutorial_Xcos.xcos : LHY Xcos scheme
LHY_Tutorial_Xcos_Mask.xcos : LHY Block with input mask
LHY_Tutorial_Xcos_Sub.xcos : LHY Block with subsystem
LHY_Xcos_Lib.xcos : LHY Block library
Xcos_Subsystem_Example.xcos : Example two input / two output
license.txt : The license file

Contenu connexe

Tendances

Finite element method
Finite element methodFinite element method
Finite element methodMANISH RANJAN
 
Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowBob Binder
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABRavikiran A
 
Лекция 1. Анализ эффективности алгоритмов
Лекция 1. Анализ эффективности алгоритмовЛекция 1. Анализ эффективности алгоритмов
Лекция 1. Анализ эффективности алгоритмовMikhail Kurnosov
 
Using Capella on a Brazilian Nanosat Project
Using Capella on a Brazilian Nanosat ProjectUsing Capella on a Brazilian Nanosat Project
Using Capella on a Brazilian Nanosat ProjectObeo
 
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...Ajay Kumar
 
Coupled mechanical thermal model a6 04
Coupled mechanical thermal model a6 04Coupled mechanical thermal model a6 04
Coupled mechanical thermal model a6 04venugopalan srinivasan
 
Aifcraft pitch
Aifcraft pitchAifcraft pitch
Aifcraft pitchmbilal2792
 
Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Yauheni Akhotnikau
 
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_control
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_controlModeling and Control Robot Arm using Gazebo, MoveIt!, ros_control
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_controlByeongKyu Ahn
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge RepresentationHarmony Kwawu
 
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOK
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOKME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOK
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOKASHOK KUMAR RAJENDRAN
 
Chapter 1 introduction to engineering economy
Chapter 1 introduction to engineering economy Chapter 1 introduction to engineering economy
Chapter 1 introduction to engineering economy Fhatiha Atika
 

Tendances (20)

Energy methods for damped systems
Energy methods for damped systemsEnergy methods for damped systems
Energy methods for damped systems
 
Finite element method
Finite element methodFinite element method
Finite element method
 
Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, How
 
Multi degree of freedom systems
Multi degree of freedom systemsMulti degree of freedom systems
Multi degree of freedom systems
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Лекция 1. Анализ эффективности алгоритмов
Лекция 1. Анализ эффективности алгоритмовЛекция 1. Анализ эффективности алгоритмов
Лекция 1. Анализ эффективности алгоритмов
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Galerkin method
Galerkin methodGalerkin method
Galerkin method
 
Using Capella on a Brazilian Nanosat Project
Using Capella on a Brazilian Nanosat ProjectUsing Capella on a Brazilian Nanosat Project
Using Capella on a Brazilian Nanosat Project
 
Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2
 
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...
ADVANCED OPTIMIZATION TECHNIQUES META-HEURISTIC ALGORITHMS FOR ENGINEERING AP...
 
Coupled mechanical thermal model a6 04
Coupled mechanical thermal model a6 04Coupled mechanical thermal model a6 04
Coupled mechanical thermal model a6 04
 
Aifcraft pitch
Aifcraft pitchAifcraft pitch
Aifcraft pitch
 
Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)Actor Model and C++: what, why and how? (March 2020 Edition)
Actor Model and C++: what, why and how? (March 2020 Edition)
 
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_control
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_controlModeling and Control Robot Arm using Gazebo, MoveIt!, ros_control
Modeling and Control Robot Arm using Gazebo, MoveIt!, ros_control
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge Representation
 
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOK
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOKME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOK
ME6603 - FINITE ELEMENT ANALYSIS FORMULA BOOK
 
Introduction to-matlab
Introduction to-matlabIntroduction to-matlab
Introduction to-matlab
 
Chapter 1 introduction to engineering economy
Chapter 1 introduction to engineering economy Chapter 1 introduction to engineering economy
Chapter 1 introduction to engineering economy
 
Lecture 10,11 Basics of FEM
Lecture 10,11   Basics of FEMLecture 10,11   Basics of FEM
Lecture 10,11 Basics of FEM
 

Similaire à Customize Xcos blocks and palettes

Similaire à Customize Xcos blocks and palettes (20)

Xcos for very beginners
Xcos for very beginnersXcos for very beginners
Xcos for very beginners
 
Mentor manual
Mentor manualMentor manual
Mentor manual
 
Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2Modeling an ODE: 3 different approaches - Part 2
Modeling an ODE: 3 different approaches - Part 2
 
First steps with Scilab
First steps with ScilabFirst steps with Scilab
First steps with Scilab
 
CSS in Mobile Apps
CSS in Mobile AppsCSS in Mobile Apps
CSS in Mobile Apps
 
LAB 1.docx
LAB 1.docxLAB 1.docx
LAB 1.docx
 
Lab 6 dsp_builder
Lab 6 dsp_builderLab 6 dsp_builder
Lab 6 dsp_builder
 
Tutorial rubedo cms, content layouts
Tutorial rubedo cms, content layoutsTutorial rubedo cms, content layouts
Tutorial rubedo cms, content layouts
 
Practical work 6
Practical work 6Practical work 6
Practical work 6
 
Tutorials v10
Tutorials v10Tutorials v10
Tutorials v10
 
Simulink
SimulinkSimulink
Simulink
 
mblock_extension_guide.pdf
mblock_extension_guide.pdfmblock_extension_guide.pdf
mblock_extension_guide.pdf
 
Ecad final
Ecad finalEcad final
Ecad final
 
Automation in Hypermesh
Automation in HypermeshAutomation in Hypermesh
Automation in Hypermesh
 
Archi user guide
Archi user guideArchi user guide
Archi user guide
 
outgoing again
outgoing againoutgoing again
outgoing again
 
Xilinx verilog tutorial
Xilinx verilog tutorialXilinx verilog tutorial
Xilinx verilog tutorial
 
scaffold method odoo 16
scaffold method odoo 16scaffold method odoo 16
scaffold method odoo 16
 
Manual de macros en calc
Manual de macros en calcManual de macros en calc
Manual de macros en calc
 
Advexcellp
AdvexcellpAdvexcellp
Advexcellp
 

Plus de 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
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Scilab
 
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
 
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
 
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosAircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosScilab
 
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
 

Plus de 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
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
 
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...
 
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...
 
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCosAircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
Aircraft Simulation Model and Flight Control Laws Design Using Scilab and XCos
 
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
 

Dernier

Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptbibisarnayak0
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Cooling Tower SERD pH drop issue (11 April 2024) .pptx
Cooling Tower SERD pH drop issue (11 April 2024) .pptxCooling Tower SERD pH drop issue (11 April 2024) .pptx
Cooling Tower SERD pH drop issue (11 April 2024) .pptxmamansuratman0253
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMchpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMNanaAgyeman13
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxachiever3003
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectssuserb6619e
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 

Dernier (20)

Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Autonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.pptAutonomous emergency braking system (aeb) ppt.ppt
Autonomous emergency braking system (aeb) ppt.ppt
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Cooling Tower SERD pH drop issue (11 April 2024) .pptx
Cooling Tower SERD pH drop issue (11 April 2024) .pptxCooling Tower SERD pH drop issue (11 April 2024) .pptx
Cooling Tower SERD pH drop issue (11 April 2024) .pptx
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMMchpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
chpater16.pptxMMMMMMMMMMMMMMMMMMMMMMMMMMM
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptx
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in projectDM Pillar Training Manual.ppt will be useful in deploying TPM in project
DM Pillar Training Manual.ppt will be useful in deploying TPM in project
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 

Customize Xcos blocks and palettes

  • 1. CUSTOMIZING X In this tutorial, we show how to Moreover, we use the "Xcos toolbox skeleton" for in Xcos scheme (already developed in other tutorials) Level This work is licensed under a Creative Commons Attribution www.openeering.com XCOS WITH NEW BLOCKS AND PALETTE In this tutorial, we show how to create and customize Xcos blocks and palettes. e use the "Xcos toolbox skeleton" for a better result. The LHY model (already developed in other tutorials) is used as a starting point This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. powered by ALETTES customize Xcos blocks and palettes. he LHY model is used as a starting point.
  • 2. Customizing Xcos block/palette www.openeering.com page 2/13 Step 1: Purpose of this tutorial The aim of this tutorial is to show how to create and customize Xcos blocks adding new elements to the Xcos palettes. Here, as a reference scheme we use the LHY model already developed in Xcos. The scheme is available in another tutorial at the Openeering web site. Moreover, we also introduce the reader to the “Xcos toolbox skeleton” that is a useful toolbox for the customization of Xcos blocks. The creation of new blocks are useful to: • Simplify the diagram; • Reuse of same block (also in other schemes). Step 2: Roadmap The following topics are covered in this tutorial: • What is Scilab ATOMS; • How to install “Xcos toolbox skeleton”; • How to create a new Xcos block; • How to create a new Xcos palette. Descriptions Steps ATOMS 3 Xcos toolbox skeleton 4-5 LHY model 6 Custom Xcos blocks 7-12 Custom Xcos palette 13-16
  • 3. Customizing Xcos block/palette Step 3: What is Scilab ATOMS Scilab Atoms is a packaging system of Scilab external modules. this tool it is trivial to install/un-install prebuilt Scilab modules. Atoms packages are available by clicking on the menu icon from the menu "Applications/Module manager network proxy is installed this must be configured in Scilab using the command "atomsSetConfig" (see help). On the right, the ATOMS window is reported. A green icon the installed toolboxes. Step 4: How to install “Xcos toolbox skeleton” The “Xcos toolbox skeleton” is available in the ATOMS under the Xcos menu. Select the toolbox and then click on the “Install” button. As for any other ATOMS toolbox, it is necessary to restart Scilab new installation. www.openeering.com of Scilab external modules. Using install prebuilt Scilab modules. clicking on the menu icon or Module manager - ATOMS". If a network proxy is installed this must be configured in Scilab using the green icon denotes all toolbox skeleton” ” is available in the ATOMS under the Xcos ” button. restart Scilab after a page 3/13
  • 4. Customizing Xcos block/palette www.openeering.com page 4/13 Step 5: Loading “Xcos toolbox skeleton” Once Scilab has started the new module is loaded. This is visible in the Scilab console where information on all loaded modules is displayed. The model used in this tutorial is reported on the right. The Xcos scheme corresponds to the LHY model. Some theory about the model and the Xcos scheme can be downloaded from the tutorial on LHY model in Xcos (part I). Step 6: The LHY scheme The model used in this tutorial is reported on the right. The Xcos scheme correspond to the known LHY model. Some theory about the model and the Xcos scheme can be download from the tutorial on LHY model in Xcos.
  • 5. Customizing Xcos block/palette www.openeering.com page 5/13 Step 7: How to create a custom Xcos block To create a custom subsystem the following steps are required: • Select the desired blocks: - Left-click where you want to start your selection; - Hold down your left mouse button and drag the mouse until you have highlighted all the interested area; or - Left-click of the mouse over the element you want; - Ctrl + Left-click on elements and links you want to select; • Right-click on one of the selected elements and then select “Region to superblock” or from the menu “edit” select “Region to superblock” and new block appears. Note: From the LHY model in Xcos scheme we have selected all blocks and links that represent the system. All the other blocks that are used for the graphical output are not selected because they are not considered as part of the model. (The selection of the LHY model) (The LHY model as a new Xcos block)
  • 6. Customizing Xcos block/palette Step 8: Port and Subsystem blocks The main blocks involved in the creation of subsystems are: • Regular Input Port: This port represents an explicit input port and should be used only inside a Xcos Super Block; • Regular Output Port: This port represents an explicit output port and should be used only inside a Xcos Super Block. These blocks are available in the “Port & Subsystem Note: Ports numbers should be in increasing order starting from 1. Step 9: Xcos superblock On the right, a simple subsystem with two inputs and two outputs is presented. The bottom figure shows the resulting Xcos block www.openeering.com The main blocks involved in the creation of subsystems are: This port represents an explicit input port and should be used only inside a Xcos Super Block; represents an explicit output port and should be used only inside a Xcos Super Block. Port & Subsystem” palette. Ports numbers should be in increasing order starting from 1. (Regular Input Port) (Regular Output Port) On the right, a simple subsystem with two inputs and two outputs is presented. The bottom figure shows the resulting Xcos block appearance. page 6/13 (Regular Input Port) ar Output Port)
  • 7. Customizing Xcos block/palette www.openeering.com page 7/13 Step 10: Customize a Xcos block Using the “Xcos toolbox skeleton” it is possible to personalize each block in an easy way: • Select the desired element; • Right-click and then select "Format -> Edit" and it appears a dialog where it is possible to change some aspect parameters. At the end press "Ok" button. Add the text "LHY Model" and change colors in the previous dialog.
  • 8. Customizing Xcos block/palette www.openeering.com page 8/13 Step 11: Xcos block input mask The LHY model depends on the following (eleven) constants: ["tau"; "s"; "smax"; "q"; "a"; "b"; "g"; "delta"; "L0"; "H0"; "Y0"] It is possible to create an input mask making the element as general as possible allowing the reuse of the model in other applications/schemes. An input mask can be created as follows: • Right-click on the element and then select "Superblock mask -> Create"; • Insert all the eleven variables in the "variable setting" tab selecting them one by one from the list (see figure); • Change the default values in the "Default values" tab.
  • 9. Customizing Xcos block/palette www.openeering.com page 9/13 Step 12: The input mask The input mask for our LHY model is reported on the right and can be activated by double-clicking on the element. Step 13: Create a new Xcos palette Now, we want to make the LHY model block available as new element for other diagrams adding it to the Xcos palette. The first step is to create a new empty Xcos file and save the new element. Here, the adopted name is "LHY_Xcos_Lib.xcos".
  • 10. Customizing Xcos block/palette Step 14: Create a new palette folder Step 1 (Create a new palette folder): • Right-click on "Palettes" of the Xcos "Palettes browser dialog and then "Create"; • Left-click again on "Palettes". As a result, a new folder named "Category" is created as the last row on the "Palettes" selector. Step 2 (Rename the default palette folder): • Rename the new folder into as "LHY" for our purpose. As a result, an icon appears on the left of the "Palettes to put our library model. www.openeering.com Palettes browser" is created as the last row on for our purpose. Palettes" selector where page 10/13
  • 11. Customizing Xcos block/palette www.openeering.com page 11/13 Step 15: Insert blocks in the palette browser Step 3 (Load the file into the "Palettes" selector): • From the menu "Palettes" select "Open" and then open the file "LHY_Xcos_Lib.xcos"; • Double-click on the "Palettes" selector Step 4 (Move the file into the folder "LHY"): • Select the file, and drag it into the folder "LHY".
  • 12. Customizing Xcos block/palette www.openeering.com page 12/13 Step 16: Finalize the palette Step 5 (Rename the input file in the "LHY" palette): • Click on "Palettes" and then click on "LHY” and modify on the right the name of the library as "LHY_Xcos". All these steps create a permanent new palette in your Xcos. In fact, if you close and re-open Scilab you may notice that this new palette is still there. Step 17: Exercise #1 Use the new library to create a new scheme with the comparison of two different LHY models where the second has the parameter 0.2. Note: Remember to set the simulation to 50.
  • 13. Customizing Xcos block/palette www.openeering.com page 13/13 Step 18: Concluding remarks and References In this tutorial we have shown how to create and customize blocks and palettes in Xcos. On the right-hand column you may find a list of references for further studies. 1. Scilab Web Page: Available: www.scilab.org. 2. Openeering: www.openeering.com. Step 19: Software content To report a bug or suggest some improvement please contact Openeering team at the web site www.openeering.com. Thank you for your attention, Manolo Venturin ------------------------------ LHY BLOCK MODEL IN SCILAB/XCOS ------------------------------ -------------- Main directory -------------- ex1.xcos : Solution of the exercise LHY_Tutorial_Xcos.xcos : LHY Xcos scheme LHY_Tutorial_Xcos_Mask.xcos : LHY Block with input mask LHY_Tutorial_Xcos_Sub.xcos : LHY Block with subsystem LHY_Xcos_Lib.xcos : LHY Block library Xcos_Subsystem_Example.xcos : Example two input / two output license.txt : The license file