External monitoring
Part of the GOcontroll toolbox is an opensource implementation of the XCP protocol. This means that each build comes with a generated .a2l file. This file contains signal and parameter descriptors matching the model created in Simulink. With a dashboard tool like HANtune the .a2l file can be loaded and a realtime dashboard can be created. In this example we will show how to read the battery supply voltage to the controller and visualize the signal in the dashboard.
Expose your signal in your Simulink model
For this example we use the model that was created during former steps in this knowledge base. We assume that your model can be build and uploaded to the controller.
To expose signals in Simulink, it is important to provide a meaningful, unique name to a signal you want to expose. In our case we want to expose the battery voltage so we choose the name BatteryVoltage
- Click the signal that needs to be exposed.
- Open the options of the line by hovering over the three dots
- Select Add to Code Mapping
Your signal is now added to the code mapping. Next step is to set the signal as Exported Global so Simulink know that it needs to be added tot the .a2l file.
- Open Code Mappings
- Select the tab signals
- Search for your added signal en selected Exported Global under…
At this point, Simulink is able to build your project again and include the signal into the .a2l file.
Setup a dashboard with HANtune
- Download HANtune from Openmbd.
- Install HANtune
- Open HANtune

- Click on File
- Create a New Project

- Right click on ASAP2 file
- Add ASAP2 file
- Navigate to your Simulink project folder and locate .a2l (In our case GOcontroll.a2l)
- When the file is opened in HANtune double click (or right click and Load File) to load the file into the environment.
- On the left, select the vertical tab ASAP2 elements
- Locate signal BatteryVoltage in the left column.
- Drag and drop batteryVoltage to the canvas and select MultiEditor in the pop-up window.
- Your HANtune project should look like something below.
When you press F5, HANtune opens a connect window. Select Ethernet (in case of wired ethernet or Wi-Fi). You can verify the IP address under Settings. The IP address is adopted from the .a2l file which got the IP from the Simulink Model settings.
When Connect and Request is clicked, the connection is established and you are able to read the live battery supply voltage to the controller.
When a connection fails, verify if theĀ go-simulink service is running. Also check if the IP address in HANtune aligns with the IP address from the controller.







