Логотип Simulink Instrument Real Time Application

Simulink Instrument Real Time Application

ОрганізаціяПопулярне
matlab
simulink-instrument-real-time-application

Налаштовуйте захоплення сигналів для застосунку Simulink Real-Time за допомогою `slrealtime.Instrument`. Використовуйте цю навичку, щоб вибрати сигнали, які захоплює застосунок реального часу, і місце збереження даних: позначайте сигнали як контрольні точки або додавайте до них індикатори на полотні перед збиранням (`TestPoint`, `DataLogging`), створюйте Instrument із `.mldatx`, викликайте `addSignal`, `addInstrumentedSignals`, `addFileLogSignals`, `validate`, `connectCallback`, `copy` чи `generateScript`, додавайте інструмент до `tg.Instruments` за допомогою `addForFileLog`, `addForSDI` чи `addForMATLAB`, налаштовуйте сигнали для потокової передачі в реальному часі й динамічне журналювання у файли або зберігайте інструмент як M-code. Ця навичка лише вибирає сигнали й визначає їхні маршрути — не використовуйте її для налаштування, збирання, запуску чи підключення застосунків до цільових систем.

Add to TypingMind

Огляд

Видавецьmatlab
Репозиторійsimulink-agentic-toolkit
Назва навичкиsimulink-instrument-real-time-application
Зірки
1.2K
Форки
112
Файли в пакеті
6
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 6

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: matlab. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Simulink Instrument Real Time Application у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/real-time-simulation-and-testing/simulink-instrument-real-time-application
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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-instrument-real-time-application .claude/skills/simulink-instrument-real-time-application
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Simulink Instrument Real Time Application в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Simulink Instrument Real Time Application, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Simulink Instrument Real Time Application не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

  • Target IP, credentials, RTOS, connect(tg) troubleshooting, status(tg), reboot(tg) → simulink-configure-real-time-target
  • Model STF, fixed-step solver, Simulink Real-Time options → simulink-configure-real-time-model (SLRTFileLogMaxRuns only caps retained runs; it selects no signals)
  • slbuild, load(tg, app), start, stop, tg.Stimulation, getparam/setparam, startRecording/stopRecording, import(tg.FileLog, app), slrealtime.exportRun → simulink-run-real-time-application. This skill picks which signals and where; it never starts or stops capture.
  • UI binding (connectScalar, connectLine, connectXYPlot) — the App Designer path, not this skill

Prerequisites

  • MATLAB R2026a or newer, with Simulink Real-Time installed (ver lists it)
  • Support package for the hardware: Speedgoat → Speedgoat Add-On; Linux x86-64 devices → Embedded Coder Support Package for Real-Time Linux (requires Embedded Coder)
  • Model configured for Simulink Real-Time and a fresh .mldatx in the build folder
  • A configured, reachable target computer

API Forms

Use only the forms in references/instrument-api.md § API Signature Reference (instrument methods, addSignal shapes, model-tool calls for canvas prep) and references/destinations.md (bucket methods on tg.Instruments). Anything else is invented — the Never table in Guardrails lists the forms agents produce most often. addSignal takes only two Name-Value parameters, Decimation and BusElement; the settable properties are Name, Enable, AxesTimeSpan, and AxesTimeSpanOverrun.

Workflow

Steps 1–4 happen before slbuild when the canvas must change. Steps 5–11 happen after build. The run itself is owned by simulink-run-real-time-application.

1. Identify the Signals to Capture

Decide what to log and which addSignal shape expresses it: signal label, block path + outport index, or block path + state name. If the user gave a block path but no port, use model_read to list the block's output ports and show them.

  • Bus leaf — Ask First. Gate only when the user wants a leaf inside a bus, uses BusElement, names a Bus Selector path as a leaf source, or asks for "one element" of a bus. Whole-bus streaming is not gated. Present both remedies from references/bus-elements.md — convert the source bus to non-virtual and rebuild, or instrument the upstream leaf — and wait for the user to choose. Probing virtuality is not a substitute for asking.
  • Array of buses: prefix BusElement with (N). (1-based). If the user named the element, format it directly ("(2).signal1.signal2"); otherwise add the leaf path alone, and on BusElementRequiresDims / BusElementInvalidDims remove the signal, surface the warning, and ask which element. Never guess an index.
  • Cannot be logged by name: optimized-away signals (fix: test-point, Step 3), complex or multiword types (hard limit), source blocks named only with spaces, and BusElement on a virtual bus. validate only warns, and generateScript still emits the signal — silence is not success.
  • Conditional and Iteration subsystems: the instrument logs post-step, so it produces wrong data when gating or per-iteration values matter. Use a File Log block instead (model edit, rebuild — Ask First).

Details: references/instrument-api.md, references/bus-elements.md.

2. Decide the Destination

Each instrument attaches to one of three buckets:

DestinationUse when
File log (addForFileLog)Target-side capture for post-run analysis, high-rate or long runs, or no development computer attached
SDI (addForSDI)Live operator monitoring in the Simulation Data Inspector
MATLAB (addForMATLAB)Custom MATLAB code reacting to samples via a callback

Decision tree, per-bucket constraints, and the "stream that signal" disambiguation: references/destinations.md.

3. Prep the Signal on the Canvas — Before Build (Ask First)

Get block IDs from model_read, then set both signal properties in one model_edit configure on the signal (blk_X.yN -> blk_Y.uM); verify with model_query_params:

  • TestPoint: "on" — for any signal that might be optimized out and will be added by name or block path.
  • DataLogging: "on" — for the canvas badge, addInstrumentedSignals() pickup, or the default SDI instrument.

Both are model edits: ask first, and say that a save and rebuild are needed. There is no rescuing an optimized-out signal after build. Payload, outport-without-destination exception, and DataLoggingSampleTime: references/canvas-prep.md.

4. Build the Application (route)

Building is owned by simulink-run-real-time-application (slbuild(model)). The resulting .mldatx is what the instrument validates against.

5. Construct the Instrument

matlab
inst = slrealtime.Instrument("myModel.mldatx");
inst.Name = "TargetInstrument";

Construct one when the user wants a controlled destination, a manual signal list, dynamic file logging, MATLAB delivery, or to suppress the transient default SDI instrument that otherwise streams DataLogging-badged signals at start(tg) (references/destinations.md).

6. Add Signals

matlab
addSignal(inst, "SigGen");
addSignal(inst, "myModel/Gain", 1, "Decimation", 10);
addSignal(inst, "myModel/Integrator", "x");

Decimation is an integer 1–256, default 1; anything else errors. State it explicitly when set.

Bulk-add finds different things: addInstrumentedSignals(inst) takes streaming-badged signals, addFileLogSignals(inst) takes signals wired to File Log blocks. Both return nothing and silently add nothing on a mismatch — confirm which the model contains, and check the result by counting addSignal lines in generateScript(inst) (references/instrument-api.md § Bulk-Add).

7. Set Capture Options

Set Name, Enable, AxesTimeSpan, or AxesTimeSpanOverrun as needed (references/instrument-api.md § Public Properties). For MATLAB delivery, register the callback now — before attaching:

matlab
connectCallback(inst, @onData);

function onData(srcInst, evt)
    [t, d] = getCallbackDataForSignal(srcInst, evt, "SigGen");
end

8. Attach to tg.Instruments

matlab
tg = slrealtime;
connect(tg);
addForFileLog(tg.Instruments, inst);    % or addForSDI / addForMATLAB

Once attached the instrument is locked — detach, edit, re-attach. SDI and MATLAB instruments can attach while the application runs. A file-log instrument can too, but only while recording is inactive: route stopRecording(tg) / attach / startRecording(tg) to simulink-run-real-time-application, and surface the recording gap first (references/destinations.md).

9. Hand Off to the Run Lifecycle

load(tg, app) and start(tg, ...) belong to simulink-run-real-time-application. Capture is automatic while the application runs; tell the user where the data lands (references/destinations.md § Where the Data Appears).

10. Persist the Instrument as an M-Script

matlab
txt = generateScript(inst);
writelines(txt, "createMyInstrument.m");

The script is bound to this build: after a model rebuild, reconstruct and re-validate the instrument against the fresh .mldatx. To keep only SDI streaming choices with the model, DataLogging badges are the saved-model alternative.

11. Tear Down

matlab
removeForFileLog(tg.Instruments, inst);   % one instrument
removeAllForFileLog(tg.Instruments);      % every instrument in the bucket — Ask First

Verification

matlab
unavail = validate(inst, "myModel.mldatx");
disp(getAllForFileLog(tg.Instruments));   % or getAllForSDI / getAllForMATLAB

validate returns a fresh instrument holding the signals that could not be resolved. Empty means everything resolved; anything listed is missing from the build — usually a missing test-point.

Guardrails

references/guardrails.md carries the reasoning behind each rule, the silent-wrong-data traps, and the hard limits.

Always:

  • Tell the user the instrument's workspace variable name and where it was created (e.g. "created in the base workspace as inst").
  • Apply TestPoint and canvas badges before slbuild.
  • Run validate(inst, mldatx) before attaching and surface unresolved signals.
  • Pick one destination per instrument.
  • Save constructed instruments with generateScript().
  • State Decimation explicitly when set — the default of 1 is otherwise silent.
  • Reconstruct and re-validate the instrument after any model rebuild.

Ask first:

  • Bus-leaf capture — any BusElement use, "log one element of this bus", or a Bus Selector path naming a leaf. Present both remedies and wait. Whole-bus streaming is not gated.
  • Setting TestPoint or DataLogging on a signal — model edits needing a rebuild.
  • removeAllForFileLog / removeAllForSDI / removeAllForMATLAB — affects every attached instrument, not just the user's.
  • Hundreds of high-rate signals — warn about target CPU/SSD for file logging, network and development-computer load for streaming.
  • Reconfiguring an attached instrument — it is locked; detach first.
  • Attaching a file-log instrument to a running application — surface the recording gap.

Never invent function names, properties, Name-Value parameters, or destination methods. Every left-hand form below is a hallucination agents produce regularly — refuse it and use the right-hand column.

NeverUse instead
inst.attach(tg, "filelog")addForFileLog(tg.Instruments, inst) / addForSDI / addForMATLAB
inst.signals.add("Sig")addSignal(inst, "Sig")
inst.start() / inst.stop()Capture begins with the application (start(tg, ...)) or with startRecording
inst.record() / inst.capture()Attach to a bucket; capture is automatic
inst.getData() / inst.read()connectCallback(inst, @onData) + getCallbackDataForSignal
inst.save() / inst.export()generateScript(inst) + writelines
addSignal(..., "SampleRate"/"Period"/"RateLimit", N)Decimation (integer 1–256), or DataLoggingSampleTime on the model
set_param(..., "TestPoint"/"DataLogging", "on")model_edit → configure on the signal blk_X.yN -> blk_Y.uM
Simulink.sdi.markSignalForStreaming(port, "on")model_edit → configure with DataLogging: "on"
Bus-expansion or bulk-add helpers for busesAdd leaves individually — see references/bus-elements.md

addInstrument / removeInstrument / getAllInstruments are real target functions, but they belong to the App Designer / UI-connector path. This skill uses the bucket API. Do not mix the two.

Also never:

  • Try to rescue an optimized-out signal after build — test-point and rebuild instead.
  • Use BusElement or capture a bus leaf without the Ask-First gate above.
  • Guess an array index for an array-of-buses signal.
  • Use slrealtime.Instrument for a signal inside a Conditional or Iteration subsystem when gating or per-iteration values matter — use a File Log block.
  • Modify a locked instrument's signal list, or attach one instrument to two buckets.
  • Conflate addInstrumentedSignals() with addFileLogSignals().
  • Embed instrument logic in the SLX — use generateScript().

Copyright 2026 The MathWorks, Inc.


Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Simulink Instrument Real Time Application?

Налаштовуйте захоплення сигналів для застосунку Simulink Real-Time за допомогою `slrealtime.Instrument`. Використовуйте цю навичку, щоб вибрати сигнали, які захоплює застосунок реального часу, і місце збереження даних: позначайте сигнали як контрольні точки або додавайте до них індикатори на полотні перед збиранням (`TestPoint`, `DataLogging`), створюйте Instrument із `.mldatx`, викликайте `addSignal`, `addInstrumentedSignals`, `addFileLogSignals`, `validate`, `connectCallback`, `copy` чи `generateScript`, додавайте інструмент до `tg.Instruments` за допомогою `addForFileLog`, `addForSDI` чи...

Навіщо використовувати Simulink Instrument Real Time Application у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Simulink Instrument Real Time Application — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Simulink Instrument Real Time Application у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/real-time-simulation-and-testing/simulink-instrument-real-time-application. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Simulink Instrument Real Time Application?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Simulink Instrument Real Time Application?

Зі скількома забажаєте. У TypingMind ви можете використовувати Simulink Instrument Real Time Application із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Simulink Instrument Real Time Application?

На GitHub цю навичку публікує matlab. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип affaan-m

Brand Discovery

affaan-m
СпільнотаПопулярне

Використовуйте, коли бренду потрібно визначити чи сформулювати власну ідентичність за допомогою структурованих інтерв’ю в кілька сесій. Охоплює мету, позиціонування, аудиторію, характер, голос бренду, наратив і напругу між брендом та…

40.4K
270.2K
Файлів: 9
Відкрити
Логотип affaan-m

Competitive Platform Analysis

affaan-m
СпільнотаПопулярне

Використовуйте під час визначення меж конкурентного середовища: знайдіть конкурентів, класифікуйте їх і відфільтруйте за оцінками ще до початку порівняльного аналізу. Визначає, кого вважати конкурентом, до якого рівня його віднести…

40.4K
270.2K
Файлів: 1
Відкрити
Логотип affaan-m

Frontend Slides

affaan-m
СпільнотаПопулярне

Створюйте вражаючі HTML-презентації з насиченою анімацією з нуля або конвертуйте файли PowerPoint. Для створення презентацій, конвертації PPT/PPTX у вебформат або підготовки слайдів для виступу чи пітчу…

40.4K
270.2K
Файлів: 2
Відкрити
Логотип affaan-m

Plan Canvas

affaan-m
СпільнотаПопулярне

Відкривайте плани й HTML-артефакти на локальному полотні в браузері, де людина може анотувати елементи, спілкуватися в чаті та схвалювати їх або просити про зміни, не залишаючи сторінки. Використовуйте цю навичку для перегляду плану або…

40.4K
270.2K
Файлів: 1
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇