Executing scilab code

Inside the StepTest folder, if on a windows system, double click on the file stepc.sce. This should automatically launch scilab and also open the stepc.sce in the scilab editor. It will also automatically change the scilabs working directory. On a linux system, launch scilab manually. Then change the scilab working directory to the folder StepTest. This can be done by clicking on File menu and then selecting change current directory. Next, execute the command getd ..common_files. Scilab command getd is used to load all functions defined in all .sci files inside a specified folder. Here we have some important function files inside the ..common_files directory. Executing this command will load all of the functions that the experiment needs. Open the file stepc.sce using the Open option inside File menu. The file is shown in Fig. 1.4

Figure 1.4: stepc.sce file
Image stepc

The experiment sampling time can be set inside the stepc.sce file. You may want to change it to a higher value if your network is slow. The default value of 1 second works fine in most cases. On the menu bar, click on Execute option and choose option file with echo. This will execute the scilab code. If the network is working fine, an xcos diagram will open automatically. If it doesnt open then see the scilab console for error messages. If you get a No network connection error message then try executing the scilab code again. The xcos diagram is for the step test experiment as shown in Fig. 1.5. You can set the value of the heat and fan. Keep the default values. On the menu bar of the xcos window, click on start button. This will execute the xcos diagram. If there is no error, you will get a graphic window with three plots. It will show the value of Heat in % Fan in % and ..temperature in degree celcius as shown in Fig. 1.6. After sufficient time of experimentation click on the stop button to stop the experiment. Go to the StepTest folder. Here you will find a logs folder. This folder will have another folder named after your username. It will have the log file for your experiment. Read the log file name as
YearMonthDate_hours_minutes_seconds.txt. This log file contains all the values of heat fan and temperature. It can be used for further analysis.

Figure 1.5: Xcos for step test
Image step-xcos

Figure 1.6: Output of Step Test
Image step-test-output

rokade 2017-04-23