|
Model Generation |
Top Previous Next |
|
The objective of this tutorial is to create a real-time model of the following Scicos® model. Please refer to modeling guidelines before creating models.
1. In Scilab®/Scicos® you create such a model by dragging and dropping the blocks into the Scicos® diagram. Please refer to the online tutorial where the creation of the Scicos® model above is explained in detail. For more information about building a Scilab®/Scicos® model please refer to the Scilab online help.
2. Once the model is finished its required to verify that it is working in Scicos®. Save the model and choose the 'Run' option in the 'Simulation' pop down menu of the Scicos® window. The model above should have a solution like this:
3. If the Scicos® model works without any error messages, the real-time model can be created by clicking with the right mouse button on the 'Super Block'. Choose CodeScale_RT and click again with the left mouse button on the 'Super Block'. The following window will ask to set the properties for the real-time model.
The model name can be changed and the path to store the model can be entered. If you use some sample time clocks in your Scicos® model ensure that the model sample time is equal to or less than the smallest sample time of your clocks. Finally you can choose a solver for the calculation of your ordinary differential equations in your model. Therefore choose between the integer numbers of 1, 2 or 4 1 stands for Euler’s Method. 2 will solve the problem with Heun’s Method and 3 will call the Forth Order Runge – Kutta Formula.
After setting the properties click the 'Ok' button. The Scilab command window will confirm you the successful creation of the real-time model. If the model is not created successfully an error message will be displayed.
The output of a build process will be shown in the 'Console'. Open the 'Console' as shown below or hit the 'F12'-key.
Please press 'start'-button to start the tutorial and 'continue'-button to continue
|