Skip to content

rouben94/twincat

v0.1.0MPL-2.0

TwinCAT 3 agent and skills: edits, builds and fixes PLC code in a running TwinCAT XAE Shell through the CodeTwin MCP server, using Beckhoff InfoSys as the primary reference.

infosys-search

Query the Beckhoff Information System (InfoSys) live for TwinCAT, PLC library, motion, I/O and compiler-message documentation. Use before answering any TwinCAT question from memory.

twincat-compiler-errors

Diagnose and fix TwinCAT 3 PLC compiler errors and warnings (Cxxxx codes) after plc_build - triage order, frequent codes and their usual causes, and how to look up any code on Beckhoff InfoSys. Use whenever plc_build or plc_get_errors reports problems.

twincat-data-types

TwinCAT 3 data types and memory - elementary types and sizes, STRING/WSTRING, TIME/LTIME, arrays, structs, enums, unions, aliases, pointers and references, alignment (pack_mode), stack vs. instance memory, persistent data. Use when declaring types or reasoning about memory.

twincat-motion

PLC motion control with TwinCAT NC PTP and the Tc2_MC2 library (PLCopen) - AXIS_REF, MC_Power, MC_Reset, MC_Home, MC_Move*, MC_Halt vs. MC_Stop, Execute/Busy/Done/Error handshake, buffer modes, axis state machines and safety boundaries. Use when writing or changing code that moves axes.

twincat-naming

Naming conventions for TwinCAT 3 PLC code - prefixes for POUs, DUTs and GVLs, prefix-free variable and instance names, casing and common abbreviations. Use when naming or reviewing names in Structured Text.

twincat-oop

Object-oriented programming in TwinCAT 3 - function blocks with methods and properties, interfaces, inheritance, access modifiers, FB_init, references, and practical design patterns for machine code. Use when designing or changing FB structure.

twincat-st-syntax

IEC 61131-3 Structured Text as implemented in TwinCAT 3 - declarations, statements, operators, literals, calls, pragmas and the cyclic execution model. Use when writing or reviewing ST code.

twincat-tcunit

Write and maintain TcUnit unit tests for TwinCAT 3 PLC code - test suite structure, TEST/TEST_FINISHED, typed asserts, multi-cycle tests, test program setup, and what the agent can and cannot do (build yes, run no). Use when adding or fixing PLC unit tests.

twincat-visu

TwinCAT 3 PLC visualizations (TcVIS, also served as web visu) - reading and changing visualization elements through CodeTwin, the TcVIS XML structure, element property IDs for position, text, variables and visibility, and safe editing rules. Use when reading, explaining, creating or changing a PLC visualization.