E4coder Inst Gui AN 1 PDF
E4coder Inst Gui AN 1 PDF
E4coder
Tenet Technetronics is official Training Partners for
SCILAB.
M.Mohamed Ibrahim
Tenet Technetronics
23-DEC-16
Tenet Technetronics 1
Application Notes
Contents
Chapter 1:
Introduction
....2
Features
..3
Chapter 2:
Steps involved E4Coder installation on Scilab
...4
Chapter 3:
E4Coder GUI .....9
Feature
.....9
...9
Tenet Technetronics 2
Application Notes
Chapter 1:
Introduction
E4Coder is a set of tools that can be used to simulate Control Algorithms and to
generate code for Embedded Microcontrollers running with or without a Real Time
Operating System.
E4Coder tools include:
SMCube
Features:
1. Simulate continuous and discrete time designs.
2. Edit, simulate and generate code for hierarchical Finite State Machines (FSM)
with parallel states support.
3. Simulate and generate C/C++ code easily from ScicosLab diagrams/XCOS
diagrams for any embedded platform.
4. Generate compact and readable multithread code for embedded models with
multiple rates.
5. Optimized usage of RAM and Flash.
6. Easy retargeting to new MCUs or customized hardware.
7. Generate standalone library code for small microcontrollers without an RTOS.
8. Generate a complete Real-Time project for OSEK/VDX based kernels, using RTOS
Erika Enterprise or other RTOS.
9. Customize the generated code with custom data types and variable names.
10. Create custom blocks to integrate existing legacy applications, functions, and
data in your ScicosLab project.
Tenet Technetronics | Varsity
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: [email protected]
Tenet Technetronics 3
Application Notes
11. Edit and simulate customized embedded panels.
Windows OS
Tenet Technetronics 4
Application Notes
Chapter 2:
E4Coder installation on Scilab:
Step 1: We need Administrator Privileges to install E4Coder. To gain Administrator
Privileges, we need to right-click on the Scilab program icon, and select Run as
Administrator.
Step 2: Open the ATOMS -Module Manager and Update the list of available packages.
Step 3: Select the Finite State Machines (FSM) Section under the list of categories (see
Figure 2). Then select the E4Coder Plugin as shown in Figure 3 and also E4Coder toolbox
available on online ATOMS repository.
Tenet Technetronics 5
Application Notes
Tenet Technetronics 6
Application Notes
Step 4: Before starting the installation, we need a License file (license .xml) and this file is
to be received from Evidence.
E4coder licensing types,
1. Demo license
2. Node locked license
3. Dongle license
Purchase the required license, after that press choose button to select the license file.
Then you have to press the Load button. Finally, License manager will check license
validity and will show the result (Figure 5)
Tenet Technetronics 7
Application Notes
Tenet Technetronics 8
Application Notes
Step 6: Finally, E4Coder prints a nice banner, which indicates the E4Coder has been
installed correctly.
Tenet Technetronics 9
Application Notes
Chapter 3:
E4CoderGUI
E4CoderGUI is a tool useful for fast prototyping, designing and simulating graphical user
interfaces.
Feature:
1. Integration of E4CoderGUI user interface inside a ScicosLab / XCos diagram,
using a customized E4CoderGUI block.
2. Integration of the simulation engines of ScicosLab / XCos with E4CoderGUI for
starting, running, stopping a simulation.
3. Simulation of a ScicosLab / XCos diagram including one or more user interface
blocks.
4. Code generation of a diagram inside a Qt Panel, to be integrated with the code
generated for Linux and Windows.
5. Visual design of Graphical User Interfaces (GUIs), with undo support.
6. XML file format.
7. Configuration of multiple input and output data with different types.
8. Visualization of the GUI in a window during simulation.
9. Export of GUIs screenshots in PNG format.
Tenet Technetronics 10
Application Notes
Step 3: Look for the E4CoderGUI block, under E4Coder - GUI creator.
Tenet Technetronics 11
Application Notes
Tenet Technetronics 12
Application Notes
Now, we design a simple GUI using Button & Text label widgets.
Step 7: Select Input ports on contents panel and then click on the Add button on the
toolbar and select Integer (see Figure 13a). Type the Name of the Input port in the
Properties Editor (see Figure 13b).
Figure 13(a)
Figure 13(b)
Step 8: Select the Output Ports section on the contents panel. Click on the Add button
on the toolbar and select Boolean (see Figure14 a). Type the Name of the output port
in the Properties Editor (see 14b).
Figure 14(a)
Figure 14(b)
Step 9: Select Text label element from the Element palette and then drag the element
to drop in working area (see Figure 15a, 15b)
Step 10: Edit name property (e.g. TEXT) and set input port property to INPUT port as in
Figure 15(b)
Tenet Technetronics | Varsity
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: [email protected]
Tenet Technetronics 13
Application Notes
Figure 15(a)
Figure 15 (b)
Tenet Technetronics | Varsity
#9/3, Shree Lakshmi Complex, 2nd Floor, Opp. To Vivekananda Park, Girinagar, Bangalore - 560085.
Ph. No: 080-26722726., Website: www.tenettech.com, Email: [email protected]
Tenet Technetronics 14
Application Notes
Step 11: Select Button element from the Element palette and then drag the element to
drop in working area (see Figure 16a, 16b).
Step 12: Edit name property (e.g. Button) and set output port property to OUTPUT port
and text property to Hold as in Figure 16(b).
Figure 16(a)
Tenet Technetronics 15
Application Notes
Figure 16(b)
Step 13: Save and close the E4CoderGUI window.After the E4Coder-GUI creator block
look as in Figure 17.
Tenet Technetronics 16
Application Notes
Figure 17:The E4CoderGUI creator block displays the GUI file name(DEMO.xml) and
the input and output ports names
Step 14: Now, connect the suitable XCOS blocks from palette browser. In this project
we need clock, delay, counter, convert and IFTHL_F blocks.
Tenet Technetronics 17
Application Notes
Select the DOLLAR_m block from Discrete time system category. To change
the block into Mirror image as in Figure 18. And set the block parameters.
Tenet Technetronics 18
Application Notes
Select, Event Handling IFTHEL_f and change this block into Mirror image.
Select the Counter block from source palette and set block parameters
Add two CONVERT Block from the Integer Palette and set the block parameters.
Tenet Technetronics 19
Application Notes
Tenet Technetronics 20
Application Notes
Step 16: Select the Setup from Simulate menu and set the properties as in Figure 22.
icon.
Tenet Technetronics 21
Application Notes
Step 18: Make connection changes to see IFTHEL_f block 2nd port is connected in this
diagram, output will be displayed like as in Figure 25
icon.
Tenet Technetronics 22
Application Notes
For more information please visit: www.tenettech.com
For technical query please send an e-mail: [email protected]