Engee documentation

Arduino Support Package

Target Hardware is a mode in which the Engee model runs on connected (target) hardware instead of the Engee mathematical core.

To work with Arduino-compatible boards in this mode, the EDM-Target-Arduino block is used, which adjusts the interaction with the equipment through four main parameters.:

  • Port is the COM port of the target device.

    Can take the value <auto> — in this mode, the port is automatically searched among the available COM ports. If a single port is found, it will be used, otherwise you must specify it explicitly.

  • Full name of the board is the name of the board, which serves as a unique identifier in the format VENDOR:ARCHITECTURE:BOARD_ID (for example, arduino:avr:mega).

    Can take the value <auto> — in this mode, the name of the card is determined automatically from the information about the COM ports. If a single port is found that is identified as an Arduino device, its full name will be used, otherwise it must be specified explicitly.

  • Path to ArduinoCLI — the full path to the executable file of the toolchain arduino-cli[.exe].

    Can take the value <auto> — the tulchain will be searched automatically among:

    • Paths added to the environment variable PATH;

    • The current directory of the client program;

    • In C:\Program Files\;

    • In C:\Program Files (x86)\.

      The listed paths are checked in descending order of search priority.

  • Model Directory is a directory for storing the source code of models relative to the Engee client program.Integration.

Before starting work, you must install arduino-cli is a toolchain for compiling and firmware of Arduino hardware. After installation, copy the full path to the executable file arduino-cli[.exe] and specify it in the corresponding parameter of the EDM-Target-Arduino block.

To work with Arduino-compatible clones, you may need to install an additional driver. For example, the Arduino Mega 2560 clone board for Windows requires a CH340 driver.

Preparation

  1. Install the subsystem Engee.Integrations:

    engee.package.install("Engee-Device-Manager")

    If the subsystem is Engee.Integration has already been installed, then just run it with the command:

    engee.package.start("Engee-Device-Manager")
  2. Launch the Engee client program.Integration on your computer to which the Arduino hardware is connected, and connect using the provided URL (for more information, see Hardware connection).

Configuring and launching the model

  1. Open the Engee model.

  2. Click on the target platform selection button and select Target Hardware:

    target hardware 1

  3. Add the EDM-Target-Arduino block from block libraries on the Engee canvas. If the block is missing from the library, update the basic *Engee support package.Integration by the * team engee.package.start:

    arduino model engee hardware

  4. Select the model execution mode:

    • Run the model on hardware target hardware 4 — interactive execution on the target platform with management and supervision from Engee.

    • Run in independent mode target hardware 3 — offline execution on the target platform without control from Engee.

  5. Click Run the model on hardware or Run in independent mode (for offline launch).

If the EDM-Target-Arduino block is not placed in the model, an error will be displayed at startup:

ErrorException("EDM-Target-Arduino block not found. To start model in Target Hardware mode, the model must include an EDM-Target-Arduino block.")

Execution modes

The behavior of Target Hardware modes is similar to the model execution modes on the KPM "RHYTHM" (for more information, see the article Model execution modes).

Mode "Run the model on hardware»

How to launch

click "Run the model on hardware target hardware 4»:

ritm interactive

How to manage the model

You can start/stop/set the simulation time and compile the model.

What happens

An interactive real-time application is generated and runs on the target hardware. You can track the execution of the model in Engee, in the window signal visualization graphs icon 1 and in data inspector data inspector icon.

What you can do in the mode

manage the model, change parameters on the fly, record signals and view them.

Mode "Run in independent mode»

How to launch

click "Run in independent mode» target hardware 3:

target hardware 5

How to manage the model

by means of a specific platform (web panel, utilities, etc.).

What happens

an autonomous real-time application is generated and launched on the target platform independently of Engee. The execution of the model is visible on the display/web panel/logs of the target platform.

What can be done in the mode

the model operates on the target platform outside of Engee.