miniHIL Dashboard

The standalone miniHIL gui (dashboard) may be used when your focus is test execution instead of test development. It may be used without access to the test sources as long as a preprogrammed miniHIL Board as well as the test model are available.

dashboard

Quickstart

  1. Plug USB-Mini cable to USB-1

  2. Start the dashboard

    1. In the miniHIL project, run .\gradlew runDashboard or (from version 5.3.0 onwards) use the runGUI.bat file provided in the HilSimGUI project. See Run from Project.

    2. Without miniHIL project, download and run the minihil-dashboard-ui.exe. See Standalone Dashboard

  3. Once the dashboard is started, it will automatically try to connect to the miniHil board. Otherwise, use the connection panel at the top.

Run from Project

You can open the Dashboard with task runDashboard, e.g. .\gradlew runDashboard in the miniHil root folder. Alternatively run the script HilSimGUI/runGUI.bat.

Use -PtraceDiagramLinkIde=[VSCODE|VSCODIUM|ECLIPSE] to select the Ide that will be used to open Links in CaGe TraceDiagrams, e.g. .\gradlew runDashboard "-PtraceDiagramLinkIde=VSCODE".

This will automatically open the system browser to show the dashboard. It is important to keep the process running in the background. See the hint in the console:

Keep this process running in the background
Open the dashboard in your web browser at http://localhost:3021/dashboard/

The process will automatically terminate when all connected browser tabs are closed.

Signals on miniHIL Dashboard

The miniHIL dashboard provides real-time visualization of test signals during test execution.

Signals can be sent from CaGe tests or Room Actors using DashboardGateway_signalUpdate() and visualized in the miniHIL Data Dashboard.

Note This feature is meant for continuous logging of values of one or more signals. For performance reasons signal updates timestamped and batched before they are transferred to the PC. Therefore new values might not appear immediately, but are only shown once the batch threshold (currently 5 values) is reached.

Sending Signals from CaGe

To send a signal from a CaGe test, use the following function:

DashboardGateway_signalUpdate(uint32_t id, float32 value, SignalType signalType);

Where:

  • id → Unique identifier for the signal (must match the ID in the dashboard configuration).

  • value → Floating point value to send.

  • signalType → Currently only continuous signals are supported by the renderer in the dashboard.

Supported signal types in code:

  • SignalType_CONTINUOUS

To use this function, include the following headers:

#include "dashboard/DashboardGateway.h"
#include "dashboard/protobuf/generated/signal.pb.h"

Example Step in CaGe

You can find an example of using DashboardGateway_signalUpdate() in a CaGe step here:

Example: Signal logging from within cage
Sequence test():
    for int i in range [0..10000]
        testSignal(``sinf(((float)i) * 0.1)``)
        wait 10 ms
    endfor
;

Step testSignal(real value):
    action
        ``DashboardGateway_signalUpdate(1, value, SignalType_CONTINUOUS);``
;

Running this step will produce a sinusoidal signal, which can be visualized on the dashboard:

Sinus output

Sending from Room Actors

In the ROOM model the signal logging is provided as a service which can be accessed using a SAP. The recommended way for signal tracing from within actors is to add a SAP using the PSignalLogger protocol (import dashboard.signal.PSignalLogger). This protocol exposes the updateValue(id: uint8, value: float32) operation.

We recommend you to create an Enumeration for the signal ids used in the system. This enumeration can be used from within ROOM and CaGe models alike.

Example: Enumeration to be used for signal ids
RoomModel SignalIds {
    Enumeration ESignalIds {
        MOTOR_POSITION = 0,
        MOTOR_SPEED = 1
    }
}
Example: Signal logging from ROOM actor
import dashboard.signal.PSignalLogger

ActorClass AActorWithSignalLogging {
    Interface {
    }
    Structure {
        usercode3 '''
            #include "SignalIds/ESignalIds.h"
        '''
        SAP signalLogger: PSignalLogger

        // Timer only used for example
        SAP timer: PTimer
    }
    Behavior {

        StateMachine {
            State active
            Transition init0: initial -> active {
                action '''timer.startTimer(500);'''
            }
            Transition tr0: active -> active {
                triggers {
                    <timeout: timer>
                }
                action '''
                    // get value from somewhere
                    float32 motorPosValue = 12.;
                    float32 motorSpeedValue = 1.75;

                    signalLogger.updateValue(ESignalIds_MOTOR_POSITION, motorPosValue);
                    signalLogger.updateValue(ESignalIds_MOTOR_SPEED, motorSpeedValue);
                '''
            }
        }
    }
}

Viewing Signals in Data View

To view signals in the miniHIL dashboard:

  1. Click the icon to open the Dashboard Data View:

    Open Data View
  2. Click the plus symbol (+) to add a new widget:

    Add widget options
  3. Configure the widget (e.g., Line Chart):

    Configure widget

In the "Data field id" field, enter the same signal ID as in your code.

Saving the Data View Configuration

To save your widget configuration:

Save configuration
Note This saves only the configuration – not the data values!

Performance Hint

The miniHIL batches signals and transmits 5 values at a time. If you only want to send one value, consider using the logger instead: miniHIL Logging Guide