# Simulink Instrument Real Time Application

Set up signal capture for a Simulink Real-Time application using `slrealtime.Instrument`.

- Repository: https://github.com/matlab/simulink-agentic-toolkit (1305 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-instrument-real-time-application -g -a claude-code -y`
Codex: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-instrument-real-time-application -g -a codex -y`
Cursor: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-instrument-real-time-application -g -a cursor -y`
Gemini CLI: `npx skills add matlab/simulink-agentic-toolkit --skill simulink-instrument-real-time-application -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add matlab/simulink-agentic-toolkit`

## Description

Set up signal capture for a Simulink Real-Time application using `slrealtime.Instrument`. Use when choosing which signals a real-time application captures and where the data goes, test-pointing or canvas-badging a signal before build (`TestPoint`, `DataLogging`), constructing an Instrument from an `.mldatx`, calling `addSignal`, `addInstrumentedSignals`, `addFileLogSignals`, `validate`, `connectCallback`, `copy`, or `generateScript`, attaching an instrument to `tg.Instruments` via `addForFileLog`, `addForSDI`, or `addForMATLAB`, setting up live-streaming signals, dynamic file-log workflows, or persisting an instrument as M-code. Selects and routes signals only, not for configuring, building, running, or connecting applications onto targets.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Instrumenting Simulink Real-Time Applications

Use this skill to **set up signal capture** for a Simulink Real-Time application via
`slrealtime.Instrument`, a runtime-configurable object that attaches to a target computer to
stream, visualize, or file-log data from a running application. Instruments are **dynamic**: they
are not stored in the SLX, and `generateScript(inst)` is the canonical persistence path.

> **Release compatibility:** designed and validated for MATLAB R2026a and later. The
> `addForFileLog`/`addForSDI`/`addForMATLAB` bucket API was introduced in R2026a. For earlier
> releases, use that release's documentation.

## When to Use

- Setting up signal capture for a Simulink Real-Time application via `slrealtime.Instrument`
- Test-pointing or badging signals **before build** so they survive code-gen and are picked up by
  `addInstrumentedSignals()`
- Adding signals by label, block path + port, block path + state name, or canvas badge
- Choosing a destination and attaching to the target (`addForFileLog`/`addForSDI`/`addForMATLAB`)
- Validating an instrument against an `.mldatx`, or configuring callback-driven MATLAB delivery
- Persisting an instrument as M-code, or detaching instruments from the target

## When NOT to Use

If the task crosses one of these lines, **load the named skill first**, then come back.

The rest: https://github.com/matlab/simulink-agentic-toolkit/blob/HEAD/skills-catalog/real-time-simulation-and-testing/simulink-instrument-real-time-application/SKILL.md
