Logo von Simulink Run Real Time Application

Simulink Run Real Time Application

OrganisationBeliebt
matlab
simulink-run-real-time-application

Build, deploy, run, monitor, tune, and stop Simulink Real-Time applications. Use when the user wants to build a Simulink Real-Time model, load/start/stop an `.mldatx` on a target, set stop time or start options, drive root inports/playback/parameter stimulation, inspect installed or running apps, tune parameters with `getparam`/`setparam`, read ad hoc signal values with `getsignal`, manage parameter sets, control recording, or choose between file logging, live streaming, and file-log import. Covers `slbuild`, `install`, `load`, `start`, `stop`, `setStopTime`, `tg.Stimulation`, `startRecording`/`stopRecording`, `tg.FileLog.import`, `slrealtime.exportRun`, `getparam`/`setparam`, `getsignal`, and installed app management for Speedgoat targets and Simulink Real-Time Linux devices.

Add to TypingMind

Übersicht

Herausgebermatlab
Repositorysimulink-agentic-toolkit
Skill-Namesimulink-run-real-time-application
Sterne
1.2K
Forks
112
Mitgelieferte Dateien
8
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 8

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von matlab auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Simulink Run Real Time Application in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/real-time-simulation-and-testing/simulink-run-real-time-application
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/real-time-simulation-and-testing/simulink-run-real-time-application .claude/skills/simulink-run-real-time-application
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Simulink Run Real Time Application in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Simulink Run Real Time Application automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Simulink Run Real Time Application nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Running Simulink Real-Time Applications

Own the run lifecycle for Simulink Real-Time — build the model, install/load the application on the target computer, start and stop it, set its stop time, drive root inports and Playback blocks via tg.Stimulation — plus the first-pass runtime workflows around parameter tuning, parameter sets, recording, file logs, and live streaming.

Release compatibility: Designed and validated for MATLAB R2026a and later. Not recommended for earlier releases: APIs, system target files, and workflows differ.

When to Use

  • Building a model with slbuild; installing or loading an .mldatx (install, load)
  • Starting (start, with or without options), stopping (stop), or setting stop time (setStopTime)
  • Reading run state (isLoaded, isRunning)
  • Driving root inports, Playback blocks, or parameter schedules via tg.Stimulation, including reloading data from a timeseries, Dataset, parquet file, or struct
  • Reading or writing tunable parameters (getparam, setparam) or one-time signal values (getsignal) on a loaded or running application
  • Saving, loading, importing, exporting, or selecting parameter sets
  • Recording, importing file logs, exporting SDI runs, or choosing between file logging and live streaming
  • Inspecting or removing installed applications (getInstalledApplications, removeApplication, removeAllApplications)

When NOT to Use

If the task crosses one of these lines, STOP and load the named skill first before writing any code, then come back.

  • Model configuration — system target file, fixed-step solver, Simulink Real-Time options → simulink-configure-real-time-model. Never patch model configuration here.
  • Target definitions and target ops — IP, credentials, RTOS update, connect(tg) troubleshooting, status(tg), reboot(tg), setStartupApp → simulink-configure-real-time-target.
  • Signal capture — slrealtime.Instrument, addForFileLog, addForSDI, addForMATLAB → simulink-instrument-real-time-application.
  • Model structure edits — adding File Log blocks, logging badges, root inports, Playback blocks, or tunable variables to make signals loggable, streamable, or tunable → the Simulink model-editing workflow or simulink-configure-real-time-model.

Prerequisites

  • MATLAB R2026a or newer
  • Simulink Real-Time installed (ver lists "Simulink Real-Time")
  • A relevant support package installed for the target hardware:
    • Speedgoat hardware → Speedgoat Add-On
    • Linux x86-64 devices → Embedded Coder Support Package for Real-Time Linux (requires Embedded Coder)
  • The Simulink model is configured for Simulink Real-Time (see simulink-configure-real-time-model)
  • A target computer is configured and reachable on the network (see simulink-configure-real-time-target)

Workflow

StepPurposeAsks first?
1. Confirm preconditionsConnect to the target; verify the model's STF before the first buildNo
2. Build the modelslbuild produces the .mldatxIf a current artifact is in use
3. Inspect target stateRead what is loaded, running, and installedNo (read-only)
4. Install or loadPut the application on the targetSurface an already-loaded app
5. Set stop timeRuntime stop-time override, only when neededIf non-default
6. StartRun the loaded application, with optional name-value pairsIf non-default StopTime/LogLevel
7. Verify run stateRead run state back after every changeNo
8. Drive stimulationScheduled root-inport, Playback, or parameter dataNo
9. Reload stimulation dataReplace a stopped entry's sourceNo
10. Monitor, tune, and loggetparam/setparam, getsignal, parameter sets, recording, file logsFor hardware-affecting setparam, loadParamSet
11. StopEnd the run early or control file-log importIf AutoImportFileLog=false
12. Manage installed appsList or remove installed applicationsYes (remove)

Use only the documented forms in references/api-reference.md (every call this skill makes, the tg.Stimulation methods, and the parameter-stimulation setup step) and references/start-options.md (the start named parameters). Dot-form and function-form are equivalent (load(tg, app) = tg.load(app)). start takes the target only — the loaded application is what runs — and AutoImportFileLog on stop is name-value.

1. Confirm Preconditions

Connect to the target and confirm the model is configured for Simulink Real-Time before the first build. Below, tg is the target object and app the .mldatx application name.

matlab
model = "myModelName";
app   = model;

tg = slrealtime; % Default Target
connect(tg);
assert(isConnected(tg), "Failed to connect to %s", tg.TargetSettings.name);

The model must be resolvable on the MATLAB path before slbuild, but do not require bdIsLoaded(model) for every runtime operation. If the target computer is not configured, route to simulink-configure-real-time-target. Do not patch model or target settings here.

Preflight before the first slbuild — always verify the model is configured. A model's name or slrt_ prefix is not evidence of it.

matlab
% Model must target Simulink Real-Time. speedgoat.tlc | speedgoat_aarch64.tlc | slrtlinux_x64.tlc
load_system(model);
stf = get_param(model, "SystemTargetFile");
disp(stf);

If stf is not a Simulink Real-Time STF (e.g. grt.tlc, ert.tlc, or empty), STOP and load simulink-configure-real-time-model.

There is no host C compiler to check for — the Speedgoat Add-On ships the cross-compiler slbuild uses. A compiler or toolchain error from slbuild means model configuration or a missing support package. See references/guardrails.md.

2. Build the Model

Build the real-time application from the configured model.

matlab
slbuild(model);

Produces <model>.mldatx in the build folder, destroying any previous one. Ask first if a current artifact is in use on a running target computer.

On failure, classify before routing: model configuration, install/toolchain, path/environment, custom code/library, or unsupported block. See references/build-and-load-pipeline.md.

3. Inspect Target State

Before any destructive op, read what is on the target computer.

matlab
disp(isLoaded(tg, app));
disp(isRunning(tg, app));
disp(getInstalledApplications(tg));

If something is already running, surface that to the user before calling load or start — those calls will refuse to clobber a running app.

4. Install or Load the Application

load installs the .mldatx and loads it into the runtime. Use install for upload-only; 'force' re-uploads an artifact the target already has.

matlab
load(tg, app);
install(tg, app);
install(tg, app, 'force');

Constraints:

  • The app's SystemTargetFile must match the target's — load fails with a clear message. Surface it and route to simulink-configure-real-time-model.
  • If an app is running, load refuses to overwrite it; stop it first.
  • If an app is loaded but not running, load stops it first. Surface this before invoking.

See references/build-and-load-pipeline.md for the full sequencing.

5. Set Stop Time When Needed

Skip this when the model/start settings already cover the intended duration. Use these only for a runtime override.

matlab
setStopTime(tg, 30);                    % requires loaded; fires StopTimeChanged
start(tg, "StopTime", 30);              % per-run override

setStopTime validates nonnegative scalar and requires the app to be loaded.

6. Start the Application

Run the loaded application on the target computer.

matlab
start(tg);

start takes the target only — the loaded application is implied — plus 8 optional name-value pairs. See references/start-options.md for the full table.

Common forms:

matlab
start(tg, "StopTime", 30, "LogLevel", "debug");
start(tg, "StopTime", 30, "StartStimulation", "off");   % finite run, no auto-stimulation
start(tg, "FileLogMaxRuns", 5, "AutoImportFileLog", false);

start auto-connects if the target is not connected, but prefer an explicit connect(tg) so the user sees it happen.

Ask First before a non-default LogLevel or AutoImportFileLog=false — see Guardrails.

7. Verify Run State

Confirm the application is actually running before reporting success.

matlab
assert(isRunning(tg, app), "Application failed to start.");

Read state back after every change. For Stimulation runs, also check tg.Stimulation.getStatus("all").

8. Drive Stimulation When Needed

Stimulation is optional — use it for scheduled root-inport data, Playback block data, or time-varying parameter schedules. Not for a one-time parameter change; use setparam.

Every Stimulation method requires the target connected and the application loaded. For selector forms, reloadData shapes, accepted sources, and parameter-entry registration, see references/stimulation.md.

9. Reload Stimulation Data When Needed

Reload only to replace the scheduled source for an inport, Playback block, or parameter schedule. The affected entry must be stopped first. For parameters, reloadData is also the registration step that makes the parameter stimulable.

10. Monitor, Tune, and Log During Runs

Choose the data path by intent: getparam/setparam for one-off tunable reads and writes; getsignal for one-off signal reads; parameter sets for saving or selecting groups of values between runs; Stimulation for time-varying inputs or schedules; streaming for live host-side monitoring; File Log blocks or file-log instruments for high-rate or long-duration post-run data; startRecording/stopRecording for separate recording intervals and separate imported runs.

matlab
value = getparam(tg, "myModel/Gain", "Gain");
setparam(tg, "myModel/Gain", "Gain", 3.5);
signalValue = getsignal(tg, "myModel/OutBlock", 1);

saveParamSet(tg, "baseline");
loadParamSet(tg, "baseline");

startRecording(tg);
stopRecording(tg);
tg.FileLog.import(app);

See references/monitoring-tuning-logging.md for parameter sets, recording controls, and file-log import/export; references/signal-access-and-streaming.md for getsignal, model-reference paths, streaming overload, and decimation. Route instrument setup to simulink-instrument-real-time-application.

11. Stop the Application When Needed

Skip this when the application should run to its configured stop time. Call stop to stop early, end an indefinite run, or control file-log import.

matlab
stop(tg);                              % AutoImportFileLog defaults to true
stop(tg, AutoImportFileLog=false);     % skip file-log import

stop stops the application and unloads it — afterwards isLoaded(tg, app) is false, so a second run needs load(tg, app) before start(tg). It is safe to call when the app is not running. The runtime also deletes the target's currParamSet file. With AutoImportFileLog=false, logs stay on the target and FileLogMaxRuns=1 lets the next run overwrite them.

12. Manage Installed Applications

List what is installed on the target computer, and remove applications only on request.

matlab
apps = getInstalledApplications(tg);
disp(apps);

removeApplication(tg, "myApp");
removeAllApplications(tg);

Ask First — these are irreversible without a rebuild and re-install.

Constraints:

  • Cannot remove a running app — stop first.
  • Cannot remove the configured startup app without first calling clearStartupApp(tg). That belongs to simulink-configure-real-time-target.

Verification

matlab
disp(isConnected(tg));
disp(isLoaded(tg, app));
disp(isRunning(tg, app));
disp(getInstalledApplications(tg));
disp(tg.Stimulation.getStatus("all"));

After a full run cycle, expect: isConnected=true, isLoaded(tg, app)=true between load and stop, isRunning(tg, app)=true between start and stop, and both isRunning(tg, app)=false and isLoaded(tg, app)=false after stop — stop unloads the application, so a subsequent run needs a fresh load(tg, app) first.

Guardrails

references/guardrails.md carries the reasoning behind every rule below, plus the full table of invented forms with the correct replacement for each.

Always:

  • Read SystemTargetFile before slbuild — never infer configuration from the model name or an slrt_ prefix. Route to simulink-configure-real-time-model if it is not a Simulink Real-Time STF.
  • Verify isConnected(tg) before any install, load, start, stop, or Stimulation call.
  • Read isLoaded(tg, app) and isRunning(tg, app) before mutating run state.
  • Let load validate STF compatibility; surface its error message verbatim.
  • Stop the affected stimulation entry (Stimulation.stop(selector) or stop("all")) before reloadData — required even on a freshly loaded app.
  • Check a reloadData source against the app's recorded root-inport metadata before the call — mismatched datatypes or dimensions are rejected at best, misinterpreted at worst.
  • For parameter stimulation, call reloadData before start; that call is what registers the entry. Without it, start is a silent no-op. Use setparam for one-time tuning.
  • Use Time64[us] (duration) timestamps in parquet stimulation files.
  • Confirm parameters are tunable before promising getparam/setparam/parameter sets; route tunability fixes to simulink-configure-real-time-model.
  • Classify the data need (live monitoring, post-run integrity, deployed-app access, outside-MATLAB access) before choosing streaming, recording, file logging, or routing to simulink-instrument-real-time-application.

Ask first:

  • slbuild when a current .mldatx is loaded or running — the rebuild invalidates it.
  • start with non-default StopTime or LogLevel — surface the value and intent.
  • stop(tg, AutoImportFileLog=false) — logs stay on the target and the next run can overwrite them.
  • removeApplication / removeAllApplications — irreversible without rebuild + re-install.
  • setparam that changes plant/controller behavior on hardware — surface block path, parameter, value.
  • loadParamSet / setDefaultParamSet — one call can change many tunable values.

Never:

  • Invent function names, named parameters, or selector forms absent from references/api-reference.md and the other reference files. If a form is not shown, do not use it. The forms agents invent most often — refuse each and use the right-hand column:

    InventedUse instead
    tg.run(app) / tg.execute(app) / tg.deploy(app)load(tg, app) then start(tg)
    start(tg, app, ...)start(tg, ...) — the loaded app is implied
    load(tg, app, "SkipInstall", true)load(tg, app) — load has no name-value pairs
    tg.unload() / tg.kill()stop(tg)
    pause(tg) / tg.pause() / tg.suspend()tg.Stimulation.pause(selector), or stop the app — the target has no pause
    stop(tg, app) / stop(tg, "myApp")stop(tg)
    stop(tg, false) (shown in the published doc)stop(tg, AutoImportFileLog=false) — the runtime rejects the positional form
    "Duration" / "Timeout" / "MaxRuntime" on start"StopTime" — only the 8 documented parameters exist
    tg.getApps() / tg.listInstalled()getInstalledApplications(tg)
    tg.Stimulation.startAll()tg.Stimulation.start("all")
    Stimulation.swapData/loadData/replaceDataStimulation.reloadData(selector, source)
    Stimulation.reset/clear/restoreload(tg, app) again — defaults live in the .mldatx

The remaining Never rules — the run-state ordering traps, the Stimulation sequencing traps, the inlined-literal trap, the recording-continuity claim, and editing build artifacts or model settings from here — are listed with the failure mode behind each in references/guardrails.md. Read that file before any lifecycle, Stimulation, or logging call.

Task Routing

TaskReference
Every API form this skill uses, tg.Stimulation methodsreferences/api-reference.md
tg.start named parameters and defaultsreferences/start-options.md
tg.Stimulation argument forms, stimulation types, reloadDatareferences/stimulation.md
slbuild → install → load → start lifecycle, STF checkreferences/build-and-load-pipeline.md
getparam, setparam, parameter sets, recording, file logsreferences/monitoring-tuning-logging.md
getsignal, model-reference signal paths, streaming overload, decimationreferences/signal-access-and-streaming.md
Instrument-specific signal capture workflowssimulink-instrument-real-time-application
Model setup (STF, solver, polling mode)simulink-configure-real-time-model
Target object, IP, credentials, RTOS, reboot, startup appsimulink-configure-real-time-target

Copyright 2026 The MathWorks, Inc.


Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Simulink Run Real Time Application?

Build, deploy, run, monitor, tune, and stop Simulink Real-Time applications. Use when the user wants to build a Simulink Real-Time model, load/start/stop an `.mldatx` on a target, set stop time or start options, drive root inports/playback/parameter stimulation, inspect installed or running apps, tune parameters with `getparam`/`setparam`, read ad hoc signal values with `getsignal`, manage parameter sets, control recording, or choose between file logging, live streaming, and file-log import. Covers `slbuild`, `install`, `load`, `start`, `stop`, `setStopTime`, `tg.Stimulation`, `startRecordi...

Warum Simulink Run Real Time Application in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Simulink Run Real Time Application besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Simulink Run Real Time Application in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/real-time-simulation-and-testing/simulink-run-real-time-application ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Simulink Run Real Time Application nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Simulink Run Real Time Application verwenden?

So viele Sie möchten. In TypingMind können Sie Simulink Run Real Time Application mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Simulink Run Real Time Application kostenlos?

Der Skill wird von matlab auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇