Difference between revisions of "Scilab/C4/User-defined-variables-in-Xcos/English"
(Created page with "'''Title of script: User-defined variables in Xcos''' '''Author:Rupak Rokade and Anandajith TS''' {| class= "wikitable" ! '''Visual Cue''' ! '''Narration''' |- | Show Slide:...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
'''Learning Objectives''' | '''Learning Objectives''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
In this tutorial, we will learn how to: | In this tutorial, we will learn how to: | ||
Line 28: | Line 32: | ||
'''System Requirements''' | '''System Requirements''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
To record this tutorial, I am using | To record this tutorial, I am using | ||
Line 57: | Line 67: | ||
'''Variables''' | '''Variables''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
There are two ways to define '''variables''' in '''Xcos''': | There are two ways to define '''variables''' in '''Xcos''': | ||
Line 69: | Line 83: | ||
|- | |- | ||
| | | | ||
− | Show slide | + | Show slide: |
+ | |||
+ | '''Simulation - Blocks used''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
− | |||
| | | | ||
For this we used the below blocks | For this we used the below blocks | ||
Line 81: | Line 101: | ||
|- | |- | ||
| Show '''Scilab workspace window''' | | Show '''Scilab workspace window''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
Open '''Scilab.''' | Open '''Scilab.''' | ||
Line 96: | Line 124: | ||
'''Sources palette>>RAMP block''' | '''Sources palette>>RAMP block''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
To create the '''simulation''' we will have to import the necessary '''blocks.''' | To create the '''simulation''' we will have to import the necessary '''blocks.''' | ||
Line 105: | Line 139: | ||
|- | |- | ||
| '''Sinks palette>>CSCOPE block''' | | '''Sinks palette>>CSCOPE block''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
<ul> | <ul> | ||
Line 113: | Line 151: | ||
|- | |- | ||
| '''Event handling>>Clock_c block''' | | '''Event handling>>Clock_c block''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
<ul> | <ul> | ||
Line 119: | Line 161: | ||
|- | |- | ||
| Show '''Xcos window''' | | Show '''Xcos window''' | ||
+ | |||
+ | |||
+ | |||
+ | |||
| | | | ||
Next we will interconnect all the '''blocks.''' | Next we will interconnect all the '''blocks.''' | ||
Line 287: | Line 333: | ||
'''Acknowledgement''' | '''Acknowledgement''' | ||
− | | Spoken Tutorial and FOSSEE projects are funded by MoE, Government of India. | + | | '''Spoken Tutorial''' and '''FOSSEE''' projects are funded by '''MoE, Government of India'''. |
|- | |- | ||
| | | | ||
Line 294: | Line 340: | ||
'''Thank you''' | '''Thank you''' | ||
| | | | ||
− | This is Iswariya Sasikumar | + | This is '''Iswariya Sasikumar''', a FOSSEE intern 2021, IIT Bombay signing off. |
Thanks for joining. | Thanks for joining. | ||
|} | |} |
Latest revision as of 18:21, 30 August 2021
Title of script: User-defined variables in Xcos
Author:Rupak Rokade and Anandajith TS
Visual Cue | Narration |
---|---|
Show Slide: Title Slide |
Hello and welcome to the Spoken Tutorial on “ User-defined Variables in Xcos” |
Show Slide: Learning Objectives
|
In this tutorial, we will learn how to:
|
Show Slide: System Requirements
|
To record this tutorial, I am using
The process demonstrated in this tutorial is identical in Linux OS also |
Show Slide: Prerequisite |
Before practising this tutorial, a learner should have :
If not, then go through the Scilab spoken tutorials on this website. |
Show Slide: Variables
|
There are two ways to define variables in Xcos:
|
First we will create a simple simulation. | |
Show slide: Simulation - Blocks used
|
For this we used the below blocks
|
Show Scilab workspace window
|
Open Scilab. Type in ‘xcos’ in the Scilab console and press enter. Two windows will open :
|
Show Xcos window Sources palette>>RAMP block
|
To create the simulation we will have to import the necessary blocks.
|
Sinks palette>>CSCOPE block
|
|
Event handling>>Clock_c block
|
|
Show Xcos window
|
Next we will interconnect all the blocks.
|
Show Xcos window |
|
Show Scilab workspace window |
Our first way to define a variable is using the Scilab console. For this, go to the Scilab console . Type ‘a=1’ and press enter |
Show Xcos window |
Now come back to the Untitled-Xcos window .
|
To start the simulation, go to the toolbar of the Untitled-Xcos window. Then click on the Start button that is of the shape of the play button. | |
We will see a warning message saying that there is no continuous time state. This can be ignored in this example. So click on OK. | |
Show graphic window | Now, we can see that the slope of the output RAMP signal changes to a in the graphic window. |
Next we will see how to define variables using the context menu in the Xcos toolbar. | |
Show workspace window |
First we will have to clear the previous value of a. For this :
|
Show Xcos window and context menu a=1 |
|
Show Xcos window |
Now we execute the simulation again:
|
Show Slide : Advantages of Context menu |
|
Show Slide: Summary |
This brings us to the end of this tutorial. Let us summarise. In this tutorial, we have learnt to:
|
Show slide ; Assignment |
As an assignment, please do the following
|
Show Slide: About Spoken Tutorial Project |
The video at the following link summarises the Spoken Tutorial project. Please download and watch it. |
Show Slide: Spoken Tutorial Workshops |
The Spoken Tutorial Project Team conducts workshops and gives certificates. For more details, please write to us |
Show Slide: Answers for THIS Spoken Tutorial |
Please post your timed queries in this forum. |
Show Slide: FOSSEE Forum | Please post your general and technical queries on Scilab in this forum. |
Show Slide: Textbook Companion project |
The FOSSEE team coordinates the Textbook Companion project. We give Certificates and Honorarium to the contributors. For more details, please visit this site.. |
Show Slide: Lab Migration |
The FOSSEE team coordinates the Lab Migration project. For more details, please visit this site. |
Show Slide: Acknowledgement |
Spoken Tutorial and FOSSEE projects are funded by MoE, Government of India. |
Show Slide : Thank you |
This is Iswariya Sasikumar, a FOSSEE intern 2021, IIT Bombay signing off. Thanks for joining. |