<
From version < 4.1 >
edited by aas2
on 2017/04/11 23:38
To version < 5.1 >
edited by aas2
on 2017/04/11 23:43
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,7 +2,6 @@
2 2  
3 3  1. create an SVG image
4 4  1. create a mapping file for this SVG
5 -1. open the mapping file in KEV
6 6  1. create a street light controller in SCCharts
7 7  1. simulation the controller, including visualization
8 8  
... ... @@ -26,7 +26,7 @@
26 26  
27 27  Finally, save the result as **Inkscape-SVG** or **Normal-SVG** and name it **Lights.svg**.
28 28  
29 -== 2 Mapping animations to SVG elements ==
28 +== 2. Mapping animations to SVG elements ==
30 30  
31 31  In the following a mapping of animations, domains and variables to elements in the SVG is created. Therefore one has to create a new mapping file in KIELER using **File > New > Other > Mapping Model.** Name the file** Lights.mapping** and select **SVG File** as **Model Object**.
32 32  
... ... @@ -80,6 +80,26 @@
80 80  
81 81  This will map the input values from 0 to 2 linearly to the angles from 0 to 90.
82 82  
82 +== 3. Creating a Light Controller with SCChart ==
83 +
84 +Create an empty SCChart and fill it with the following content:
85 +
86 +{{code language="java" title="Traffic light controller"}}
87 +scchart TrafficLight {
88 +
89 + output int showLight;
90 +
91 + initial state init
92 + --> init with / showLight += 1; showLight = showLight % 3;
93 +}
94 +{{/code}}
95 +
96 +This model will set showLight successively to 0, 1 and 2.
97 +
98 +== 4. Starting the simulation ==
99 +
100 +\\
101 +
83 83  == Problem Solving ==
84 84  
85 85  Ensure that the KEV Data Observer is added to the list in the Execution Manager (When opening an SCChart, this list might be lost.).
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -25952337
1 +25952341
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/25952337/Simulation Visualization Tutorial
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/25952341/Simulation Visualization Tutorial