Single-Board-Heater-System/C2/Accessing-SBHS-through-Scilab-on-Windows/English
Title of script: Accessing SBHS through Scilab on windows
Author: Rupak Rokade
Keywords: Scilab, SBHS, video tutorial
| |
|
|---|---|
| Show Slide | Welcome to this Spoken tutorial on “Accessing SBHS through Scilab on Captial W on the slideWindows”.
|
| Show Slide | In this spoken tutorial, Add to the slidewe will learn:
|
| Show Slide | Add exactly to the slide...For this tutorial, I am using
|
| Show Slide
|
You may download Scilab from:
www.scilab.org
|
| Show Slide | Before proceeding with this tutorial, you should watch-
The relevant tutorials for these, are available in this series, on the spoken tutorial website |
| Show os-hardware.in | To beign, we have to download the Scilab Step Test code.
|
| click on Single Board Heater System link >> Downloads link | Click on the project SBHS and then on the Downloads link. |
| Select SBHS Local Code >> Save on Desktop | Download the file available under the section SBHS Local Code
and save this file on the Desktop. |
| Switch to Desktop >> Point to the zip file | Notice that the downloaded file will be in zip format. |
| Right-click >> choose Extract here.
Point to scilab codes local |
Right-click on the file and choose Extract here.
|
| We are now ready to begin our experiment. | |
| Make sure the SBHS is connected to your computer and it is powered ON. | |
| Right click on My Computer >> Properties | First, we will check the communication port number assigned to the SBHS.
|
| Click on Device Manager | A window will open up.
|
| Point to the list displayed >> point to ports (COM & LPT) option. | The device manager will show you a list of hardware devices on your computer.
|
| Double click on the Ports(COM & LPT) option | Now, double-click on this option to open it. |
| Show the options under Ports(COM & LPT) | If you have connected RS232 cable, then look for communications Port COM1.
|
| Click on the identified COM port number | In my case it is COMx.
|
| Double-click on the COM port | Let me show you the procedure to change the COM port number.
|
| Click on the Port Settings tab | Click on the Port Settings tab. |
| Click on Advanced. | Then click on Advanced. |
| In COM port number dropdown >> choose any single-digit number. | In the COM port number dropdown menu, choose the port number to any other single-digit number.
|
| Click on OK | Click on OK to apply these settings. |
| Click on OK | Click on OK to close the Properties window. |
| Click on the close option on the Device Manager | Close the Device Manager and the remaining windows.
|
| Now, let us learn how to configure Scilab, to perform a Step Test using SBHS. | |
| Switch to the Desktop >> Open Step test folder | Open the Scilab local codes folder that we saved on the Desktop.
|
| Double-click ser underscore init.sce | Locate and double-click on the file ser underscore init.sce
|
| Click on File >> Open a file >>
Choose ser underscore init.sce >> click on Open. |
If it doesn't open the file, click on File menu then on Open a file.
|
| Switch to scilab >>
Type getd space ../common_files/
|
Switch to the scilab workspace and execute the following commands.
|
| Point to message | You can see that it gives a message that it has loaded the serial port toolbox. |
| Switch to scilab >> locate variable port2 | Switch to the scilab editor.
|
| Change the port number | Change the port number to the one you identified a few minutes back. |
| Point accordingly | Make sure its in single quotes |
| Save the file | Do not make any other changes to the content of the file.
|
| Click on Execute | On the menu bar, click on the Execute button to execute this file. |
| Point to the message | On the Scilab workspace you will get a message COM Port Opened
|
| Show Slide | In case a TCL/TK related error is displayed, reconnect the USB cable connected to the SBHS and execute this file again.
|
| In Scilab >>
Type exec space step_test.sci >> Type
|
In the Scilab workspace, execute the following commands -
|
| This will launch the xcos interface made for step test experiment. | |
| Double click on the Heater Input block | You can change the block parameters by double-clicking on the blocks.
|
| click on the simulation tab | In the menubar of the Xcos window, click on the Simulation tab. |
| Click on the Start option | Now select the Start option |
| Point at the first plot | After we have executed the Xcos file successfully, a plot window with three graphs will be displayed.
|
| Point at the second plot | The second graph is of Fan in percentage |
| Point at the third plot | The third graph is of Temperature in degree Celsius |
| Show Slide | There are some things to be noted
|
| Show Slide | Please note that the values shown in the graph should be the same as displayed on the SBHS display.
|
| Show Slide | You can also check if the communication LEDs are flashing periodically.
|
| This is a real experiment and will take some time to produce results.
| |
| Point at the plots | After running the experiment for sufficient time, the final graphs will be as shown here.
|
| <PAUSE> | |
| Switch to the step test folder. | Most of the process that we went through, can be completed by just executing one file.
|
| Show slides | Let me switch to slides
|
| Click on the Stop option | To stop the experiment, click on Stop option available in the menu bar of the Xcos window.
|
| Show the Slide | A reset push button is provided on the SBHS, as shown in the picture.
|
| Go to the Step test folder and point to the file | The data file for this experiment is saved in Step test folder.
|
| Click and open the file. | Let me open and show you the content of the data file
|
| Show slide | Let us summarise.
|
| Show slide | The video available at the following link summarises the Spoken Tutorial project.
|
| Show slide | The Spoken Tutorial Project Team conducts workshops and gives certificates to those who pass online tests.
|
| Show slide | Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
|