Difference between revisions of "Single-Board-Heater-System/C2/Accessing-SBHS-through-Scilab-on-Windows/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 33: Line 33:
 
|-
 
|-
 
| 00:44
 
| 00:44
| Before proceeding with this tutorial, you should watch-  '''Introduction to Xcos'''  '''Connecting SBHS to computer'''
+
| Before proceeding with this tutorial, you should watch-  '''Introduction to Xcos''', '''Connecting SBHS to computer'''.
  
 
|-
 
|-
 
| 00:52
 
| 00:52
| The relevant tutorials for these, are available in this series, on the '''spoken tutorial''' website.
+
| The relevant tutorials for these are available in this series, on the '''spoken tutorial''' website.
  
 
|-
 
|-
 
| 00:59
 
| 00:59
| To begin, we have to download the '''Scilab Step Test''' code So, let us open a web browser.
+
| To begin, we have to download the '''Scilab Step Test code'''. So, let us open a web browser.
  
 
|-
 
|-
 
| 01:06
 
| 01:06
| In the address bar, type, '''os-hardware.in'''.  Click on the project '''SBHS '''and then on the '''Downloads''' link.
+
| In the address bar, type: '''os-hardware.in'''.  Click on the project '''SBHS '''and then on the '''Downloads''' link.
  
 
|-
 
|-
Line 69: Line 69:
 
|-
 
|-
 
| 01:47
 
| 01:47
| Make sure the '''SBHS''' is connected to your computer and it is powered ON.
+
| Make sure the '''SBHS''' is connected to your computer and it is powered '''ON'''.
  
 
|-
 
|-
 
| 01:53
 
| 01:53
| First, we will check the communication port number assigned to the '''SBHS.'''
+
| First, we will check the '''communication port''' number assigned to the SBHS.
  
 
|-
 
|-
Line 81: Line 81:
 
|-
 
|-
 
| 02:05
 
| 02:05
|A window will open up, in this window, click on  '''Device Manager'''.  
+
|A '''window''' will open up. In this window, click on  '''Device Manager'''.  
  
 
|-
 
|-
Line 101: Line 101:
 
|-
 
|-
 
| 02:38
 
| 02:38
| Here it is. Double-click on this option to open it.
+
| Here it is! Double-click on this option to open it.
  
 
|-
 
|-
 
| 02:42
 
| 02:42
| If you have connected '''RS232''' cable, then look for '''communications Port COM1 '''elpoose look for '''USB Serial Port'''.  
+
| If you have connected '''RS232''' cable, then look for '''communications Port COM1 '''. Else, look for '''USB Serial Port'''.  
  
 
|-
 
|-
 
| 02:52
 
| 02:52
| For '''RS232''' connection, the port number mostly remains '''COM1'''.  
+
| For RS232 connection, the '''port''' number mostly remains '''COM1'''.  
  
 
|-
 
|-
Line 121: Line 121:
 
|-
 
|-
 
| 03:09
 
| 03:09
| Now Sometimes the '''COM''' port number you get after connecting a '''USB''' cable, is a two-digit number.
+
| Now, sometimes the '''COM''' port number you get after connecting a '''USB''' cable is a two-digit number.
  
 
|-
 
|-
 
| 03:17
 
| 03:17
| The '''serial tool box''' which connects your board and computer, can handle only single-digit port number.
+
| The '''serial tool box''' which connects your board and computer can handle only single-digit port number.
  
 
|-
 
|-
 
| 03:24
 
| 03:24
| Hence, it is necessary to change your '''COM''' port number.
+
| Hence, it is necessary to change your '''COM port number'''.
  
 
|-
 
|-
Line 149: Line 149:
 
|-
 
|-
 
| 03:46
 
| 03:46
| '''Windows''' may show you that all ports are currently in use but, in reality, this is only the old status.
+
| '''Windows''' may show you that all ports are currently in use but in reality, this is only the old status.
  
 
|-
 
|-
Line 169: Line 169:
 
|-
 
|-
 
| 04:14
 
| 04:14
| Now, let us learn how to configure '''Scilab,''' to perform a '''Step Test''' experiment  using '''SBHS'''.
+
| Now, let us learn how to configure Scilab, to perform a '''Step Test''' experiment  using '''SBHS'''.
  
 
|-
 
|-
 
| 04:23
 
| 04:23
| Open the '''Scilab local codes '''folder that we saved on the '''Desktop'''.
+
| Open the '''Scilab local codes '''folder that we saved on the Desktop.
  
 
|-
 
|-
Line 181: Line 181:
 
|-
 
|-
 
| 04:31
 
| 04:31
| Locate and double-click on the file '''ser underscore init dot sce'''
+
| Locate and double-click on the file '''ser underscore init dot sce'''.
  
 
|-
 
|-
 
| 04:37
 
| 04:37
|This will launch '''Scilab''' automatically and will also open the file in '''Scilab''' editor.
+
|This will launch Scilab automatically and will also open the file in '''Scilab editor'''.
  
 
|-
 
|-
Line 197: Line 197:
 
|-
 
|-
 
| 04:57
 
| 04:57
| Switch to the '''scilab '''workspace and execute the following commands.
+
| Switch to the '''scilab workspace''' and execute the following commands.
  
 
|-
 
|-
 
| 05:03
 
| 05:03
| Type '''get d space dot dot slash common underscore files '''and press '''Enter.''' key
+
| Type: '''get d space dot dot slash common underscore files '''and press '''Enter''' key.
  
 
|-
 
|-
 
| 05:10
 
| 05:10
| Then type '''exec space dot dot slash common underscore files  slash loader dot sce''' and press '''Enter.'''
+
| Then type: '''exec space dot dot slash common underscore files  slash loader dot sce''' and press '''Enter.'''
  
 
|-
 
|-
Line 213: Line 213:
 
|-
 
|-
 
| 05:26
 
| 05:26
| Switch to the '''scilab '''editor.
+
| Switch to the Scilab editor.
  
 
|-
 
|-
Line 233: Line 233:
 
|-
 
|-
 
| 05:55
 
| 05:55
| Do not make any other changes to the content of this file  
+
| Do not make any other changes to the content of this file.
  
 
|-
 
|-
 
| 05:59
 
| 05:59
|Now, save the file.
+
|Now, '''save''' the file.
  
 
|-
 
|-
Line 245: Line 245:
 
|-
 
|-
 
| 06:06
 
| 06:06
| On the '''Scilab''' '''workspace '''you will get a message '''COM Port Opened'''
+
| On the '''Scilab workspace '''you will get a message "COM Port Opened".
  
 
|-
 
|-
Line 261: Line 261:
 
|-
 
|-
 
| 06:23
 
| 06:23
| In case a '''TCL/TK''' related error is displayed,Reconnect the '''USB''' cable connected to the '''SBHS''' and execute this file again.
+
| In case a '''TCL/TK''' related error is displayed, reconnect the '''USB''' cable connected to the '''SBHS''' and execute this file again.
  
 
|-
 
|-
Line 273: Line 273:
 
|-
 
|-
 
| 06:42
 
| 06:42
| In the '''Scilab '''workspace, execute the following commands  
+
| In the '''Scilab workspace''', execute the following commands.
  
 
|-
 
|-
 
| 06:46
 
| 06:46
|Type '''exec space step underscore test dot sci''' and press '''Enter.'''
+
|Type: '''exec space step underscore test dot sci''' and press '''Enter.'''
  
 
|-
 
|-
 
| 06:54
 
| 06:54
| Then type '''xcos space step underscore test dot xcos''' and press '''Enter.'''
+
| Then type: '''xcos space step underscore test dot xcos''' and press '''Enter.'''
  
 
|-
 
|-
Line 289: Line 289:
 
|-
 
|-
 
| 07:09
 
| 07:09
| You can change the block parameters by double-clicking on the '''blocks'''.
+
| You can change the '''block parameters''' by double-clicking on the '''blocks'''.
  
 
|-
 
|-
Line 297: Line 297:
 
|-
 
|-
 
| 07:18
 
| 07:18
| In the '''menubar''' of the '''Xcos''' window, Click on the '''Simulation''' option, now select the '''Start''' option.
+
| In the menubar of the '''Xcos''' window, click on the '''Simulation''' option, now select the '''Start''' option.
  
 
|-
 
|-
 
| 07:27
 
| 07:27
| After we have executed the '''Xcos''' file successfully, a plot window with three graphs will be displayed.
+
| After we have executed the '''Xcos''' file successfully, a '''plot window''' with three graphs will be displayed.
  
 
|-
 
|-
Line 317: Line 317:
 
|-
 
|-
 
| 07:49
 
| 07:49
| There are some things to be noted let me switch to the slides.
+
| There are some things to be noted. Let me switch to the slides.
  
 
|-
 
|-
Line 329: Line 329:
 
|-
 
|-
 
| 08:08
 
| 08:08
| If this is not the case, then it means that '''Scilab''' is not communicating with '''SBHS'''.
+
| If this is not the case then it means that '''Scilab''' is not communicating with '''SBHS'''.
  
 
|-
 
|-
Line 337: Line 337:
 
|-
 
|-
 
| 08:19
 
| 08:19
|You will find these '''LEDs '''next to the '''USB''' connector on the '''SBHS, '''as shown in this image
+
|You will find these LEDs next to the '''USB''' connector on the '''SBHS, '''as shown in this image
  
 
|-
 
|-
 
| 08:26
 
| 08:26
| Now this is a real experiment and will take some time to produce results.
+
| Now, this is a real experiment and will take some time to produce results.
  
 
|-
 
|-
Line 361: Line 361:
 
|-
 
|-
 
| 08:53
 
| 08:53
| Let me show you this file switch to the '''step test''' folder.
+
| Let me show you this file. Switch to the '''step test''' folder.
  
 
|-
 
|-
 
| 08:58
 
| 08:58
| The steps after launching of '''scilab''' till opening '''xcos''' can be executed using '''start.sce''' file.
+
| The steps after launching of '''scilab''', till opening '''xcos''' can be executed using '''start.sce''' file.
  
 
|-
 
|-
Line 381: Line 381:
 
|-
 
|-
 
| 09:26
 
| 09:26
| Now to stop the experiment, click on the '''Stop''' option available in the menu bar of the '''Xcos''' window.
+
| Now, to stop the experiment, click on the '''Stop''' option available in the menu bar of the '''Xcos''' window.
  
 
|-
 
|-
Line 393: Line 393:
 
|-
 
|-
 
| 09:44
 
| 09:44
| A '''reset''' push button is provided on the '''SBHS,''' as shown in the picture.
+
| A '''Reset''' push button is provided on the '''SBHS,''' as shown in the picture.
  
 
|-
 
|-
Line 409: Line 409:
 
|-
 
|-
 
| 10:05
 
| 10:05
| The '''data file''' for this experiment is saved in the '''Step test''' folder.
+
| The data file for this experiment is saved in the '''Step test''' folder.
  
 
|-
 
|-
Line 417: Line 417:
 
|-
 
|-
 
| 10:13
 
| 10:13
|The name of the '''data file''' is in the format of a time stamp.
+
|The name of the data file is in the format of a '''time stamp'''.
  
 
|-
 
|-
 
| 10:17
 
| 10:17
|Read the '''data file''' name as Year Month Date Hours Minutes Seconds dot txt.
+
|Read the data file name as '''Year Month Date Hours Minutes Seconds dot txt'''.
  
 
|-
 
|-
Line 437: Line 437:
 
|-
 
|-
 
| 10:40
 
| 10:40
| Now, let us summarise  
+
| Now, let us summarise.
  
 
|-
 
|-
 
| 10:42
 
| 10:42
|In this tutorial, we learnt to Set up serial communication between the '''Scilab''' and '''SBHS'''  
+
|In this tutorial, we learnt to set up '''serial communication''' between the '''Scilab''' and '''SBHS'''.
 
|-
 
|-
 
| 10:48
 
| 10:48
Line 448: Line 448:
 
|-
 
|-
 
| 10:52
 
| 10:52
| The video available at the following link summarises the Spoken Tutorial project, please download and watch it.
+
| The video available at the following link summarises the '''Spoken Tutorial''' project. Please download and watch it.
  
 
|-
 
|-
 
| 10:58
 
| 10:58
| The Spoken Tutorial Project Team conducts workshops and gives certificates to those who pass online tests.
+
| The Spoken Tutorial project team conducts workshops and gives certificates to those who pass online tests.
  
 
|-
 
|-
Line 460: Line 460:
 
|-
 
|-
 
| 11:08
 
| 11:08
| Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.
+
| Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.
  
 
|-
 
|-
 
| 11:13
 
| 11:13
|More information on this Mission is available at the link shown here.
+
|More information on this mission is available at the link shown here.
  
 
|-
 
|-
 
| 11:17
 
| 11:17
|Thanks for joining; this is Rupak Rokade from IIT Bombay signing off.
+
|Thanks for joining. This is Rupak Rokade from '''IIT Bombay''', signing off.
  
 
|}
 
|}

Revision as of 21:01, 15 December 2016

Time
Narration
00:01 Welcome to this Spoken tutorial on “Accessing SBHS through Scilab on Windows”.
00:07 SBHS stands for Single Board Heater System.
00:10 In this spoken tutorial, we will learn: * to set up serial communication between Scilab and SBHS
00:17 * to perform a Step Test experiment.
00:20 For this tutorial, I am using Windows-7 Operating System and Scilab 5.3.3.
00:28 You may download Scilab from www.scilab.org.
00:34 To install Scilab, watch the "Scilab" spoken tutorial series on:

http://spoken-tutorial.org

00:44 Before proceeding with this tutorial, you should watch- Introduction to Xcos, Connecting SBHS to computer.
00:52 The relevant tutorials for these are available in this series, on the spoken tutorial website.
00:59 To begin, we have to download the Scilab Step Test code. So, let us open a web browser.
01:06 In the address bar, type: os-hardware.in. Click on the project SBHS and then on the Downloads link.
01:19 Download the file available under the section SBHS Local Code and save this file on the Desktop.
01:29 Notice that the downloaded file will be in zip format.
01:34 Right-click on the file and choose Extract here.
01:38 A folder named scilab codes local will be created.
01:43 We are now ready to begin our experiment.
01:47 Make sure the SBHS is connected to your computer and it is powered ON.
01:53 First, we will check the communication port number assigned to the SBHS.
01:58 To do this, right click on My Computer and then click on Properties.
02:05 A window will open up. In this window, click on Device Manager.
02:11 Please note that the look and feel of Windows 7 is completely different from other Windows versions.
02:19 You may also need to vary the steps that I demonstrate here to suit your Windows version.
02:28 The device manager will show you a list of hardware devices on your computer.
02:33 Locate the ports (COM & LPT) option.
02:38 Here it is! Double-click on this option to open it.
02:42 If you have connected RS232 cable, then look for communications Port COM1 . Else, look for USB Serial Port.
02:52 For RS232 connection, the port number mostly remains COM1.
02:59 For a USB connection, it may change to some other number.
03:03 Note down the appropriate COM number and in my case it is COM14.
03:09 Now, sometimes the COM port number you get after connecting a USB cable is a two-digit number.
03:17 The serial tool box which connects your board and computer can handle only single-digit port number.
03:24 Hence, it is necessary to change your COM port number.
03:28 Let me show you the procedure to change the COM port number.
03:31 Double-click on that particular COM port.
03:34 Click on the Port Settings tab and then click on Advanced.
03:40 In the COM port number dropdown menu, choose the port number to any other single-digit number.
03:46 Windows may show you that all ports are currently in use but in reality, this is only the old status.
03:55 Hence, you can forcibly use a particular COM port number, if there is no other USB device connected.
04:03 Click on OK to apply these settings.
04:07 Click on OK to close the Properties window.
04:11 Close the Device Manager and the remaining windows.
04:14 Now, let us learn how to configure Scilab, to perform a Step Test experiment using SBHS.
04:23 Open the Scilab local codes folder that we saved on the Desktop.
04:28 Open the folder Step test.
04:31 Locate and double-click on the file ser underscore init dot sce.
04:37 This will launch Scilab automatically and will also open the file in Scilab editor.
04:43 If it doesn't open the file, click on File menu, then on Open a file.
04:50 Choose the file ser underscore init and click on Open.
04:57 Switch to the scilab workspace and execute the following commands.
05:03 Type: get d space dot dot slash common underscore files and press Enter key.
05:10 Then type: exec space dot dot slash common underscore files slash loader dot sce and press Enter.
05:21 You can see that it gives a message that it has loaded the serial port toolbox.
05:26 Switch to the Scilab editor.
05:28 In the ser underscore init dot sce file, locate the line which asks for value of variable port2.
05:36 Value of port2 variable needs to be replaced with the identified COM port number.
05:44 Change the port number to the one you identified or which you have set just a few minutes back.
05:52 Make sure this is in single quotes.
05:55 Do not make any other changes to the content of this file.
05:59 Now, save the file.
06:01 On the menu bar, click on the Execute button to execute this file.
06:06 On the Scilab workspace you will get a message "COM Port Opened".
06:12 However, it is also possible that you get an error message.
06:16 Let me explain using slides, how do you handle a typical error.
06:21 Let me switch to slides.
06:23 In case a TCL/TK related error is displayed, reconnect the USB cable connected to the SBHS and execute this file again.
06:33 Check once if the COM port number has changed.
06:37 If it still doesn't work, restart Scilab and repeat the process.
06:42 In the Scilab workspace, execute the following commands.
06:46 Type: exec space step underscore test dot sci and press Enter.
06:54 Then type: xcos space step underscore test dot xcos and press Enter.
07:03 This will launch the xcos interface made for step test experiment.
07:09 You can change the block parameters by double-clicking on the blocks.
07:13 It is recommended that you keep the parameters unchanged for the first time.
07:18 In the menubar of the Xcos window, click on the Simulation option, now select the Start option.
07:27 After we have executed the Xcos file successfully, a plot window with three graphs will be displayed.
07:35 The first graph is of Heater in percentage.
07:40 The second graph is of Fan in percentage.
07:44 The third graph is of Temperature in degree Celsius.
07:49 There are some things to be noted. Let me switch to the slides.
07:54 The Fan, Heater and Temperature are displayed on the SBHS display as shown in the image.
08:01 Please note that the values shown in the graph should be the same as displayed on the SBHS display.
08:08 If this is not the case then it means that Scilab is not communicating with SBHS.
08:14 You can also check if the communication LEDs are flashing periodically.
08:19 You will find these LEDs next to the USB connector on the SBHS, as shown in this image
08:26 Now, this is a real experiment and will take some time to produce results.
08:30 I will now pause the recording for some time.
08:35 After running the experiment for sufficient time, the final graphs will be as shown here.
08:41 We can see that the temperature has responded to the step change in the heat value.
08:47 Now Most of the process that we went through, can be completed by just executing one file.
08:53 Let me show you this file. Switch to the step test folder.
08:58 The steps after launching of scilab, till opening xcos can be executed using start.sce file.
09:07 Let me switch to slides.
09:10 Usage of start dot sce file is recommended only after you get a firm understanding of the process.
09:17 This file assumes that the port number provided in the ser underscore init dot sce file is correct.
09:26 Now, to stop the experiment, click on the Stop option available in the menu bar of the Xcos window.
09:35 After completing the experiment, let us reset the SBHS.
09:40 Let me switch to the slides again to illustrate this.
09:44 A Reset push button is provided on the SBHS, as shown in the picture.
09:49 To reset, press the Reset button for 1 or 2 seconds and then release it.
09:55 The reset operation makes Heat 0% and Fan 100%.
10:00 However 0 is displayed for both on the LCD.
10:05 The data file for this experiment is saved in the Step test folder.
10:10 Let me show you this file.
10:13 The name of the data file is in the format of a time stamp.
10:17 Read the data file name as Year Month Date Hours Minutes Seconds dot txt.
10:27 Let me open and show you the content of the data file.
10:31 It has values of heat, fan and temperature for every sample.
10:36 Hence, this file can be used for analysis purpose.
10:40 Now, let us summarise.
10:42 In this tutorial, we learnt to set up serial communication between the Scilab and SBHS.
10:48 Perform a Step Test experiment.
10:52 The video available at the following link summarises the Spoken Tutorial project. Please download and watch it.
10:58 The Spoken Tutorial project team conducts workshops and gives certificates to those who pass online tests.
11:04 For more details, write to us.
11:08 Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.
11:13 More information on this mission is available at the link shown here.
11:17 Thanks for joining. This is Rupak Rokade from IIT Bombay, signing off.

Contributors and Content Editors

Nancyvarkey, PoojaMoolya, Sandhya.np14