Skip to content

v0.54.0

Choose a tag to compare

@ThorstenBrach ThorstenBrach released this 09 Nov 22:06
· 44 commits to main since this release

[0.54.0] – 2026-11-09

The built-in knowledge in this version is TcAgent_Knowledge 1.1.0 (unchanged).

Added

  • Inline-Logic-View (Ctrl+Alt+B) - the condition under the cursor (IF, ELSIF, WHILE, UNTIL, a boolean
    assignment, also in a CASE branch) as a logic diagram: lamps with names and declaration comments, gates with
    right-angled lines, NOT as a dot; online everything fulfilled turns green and the top line says what is missing; scroll
    bars, branches fold by a click (⊟ folds all fulfilled ones). Members of a library base and enum values as array index
    are resolved.
  • Inline-Scope (Alt+click, Ctrl+Alt+T) - the history of variables in a popup: BOOL as steps, numbers as lines, enums with names;
    time axis 5 s to 10 min with mouse-wheel zoom, frozen it moves through the last 10 minutes; cursor with values,
    min/max, CSV; TcAgent.exe watch reads every 20 ms (only reads).
  • Conditions as logic (tc_condition, TcAgent.exe condition) - the sub-conditions of an IF, when it is true (prime
    implicants), rewrites that mean exactly the same (De Morgan inward/outward, simplify, write out in full, = TRUE
    uniform or removed), each proven over every combination; never a rewrite that changes the meaning, no simplifying with
    calls, no rewriting with AND_THEN/OR_ELSE. Online: each variable resolved through the declarations to its ADS path
    (inherited also from a library base, THIS^/SUPER^, reference, pointer checked for 0, array index read first, GVL; not
    read and said why: interface members, properties without monitoring, method locals, VAR_TEMP, calls), the value of every
    sub-condition, the result and what is missing for TRUE; the instances of a POU are found. The IDE window follows.
  • Formatter: brackets, lines and columns for conditions - 14 cond.* rules (one sub-condition per line, brackets
    around sub-conditions and groups, tight or spaced group brackets, NOT inside or in front, room for NOT, AND/OR at the end
    or the start, next lines under the bracket or indented, inner groups indented or flat, closing brackets, comparisons and
    comments in columns, IF( or IF (, also boolean assignments) and the profile conditions-aligned. Brackets are only
    added, never removed; the safety net checks the expression trees. Tested on 66,618 sections with several combinations.
    docs/FORMATTER.md
  • TcAgent settings window: Tools > TcAgent settings ... (also ⋯ in the TcAgent Chat and the Knowledge window) - every
    setting of TcAgent in plain words on pages (general and mode, target systems, gates and confirmations, knowledge and
    levels, advanced), with its value, where it comes from (default, saved, set from outside) and the details; Save writes
    settings.json and the running servers read it again at once; export and import. Built from one schema
    (TcAgent.exe settings [--set KEY=VALUE] [--export|--import]); a test checks that every variable the code reads is in
    it and in the User Guide (9 were missing there).
  • Release target systems, also for a time: Target systems in the settings window or TcAgent.exe targets add <netId> [--access read] [--until 1h|today|<date>] - write (and read) or read only, for good or until a time; a release that ran
    out stops at once. The user mode runtimes of this PC (their own AMS Net ID) are found and offered; "From routes ..." takes over targets from the ADS routes of the TwinCAT router (read only by default). Only a person
    releases (no agent tool), every change goes to the audit log, a refused call says why. Reading stays free for every
    target. targets.json applies to all projects on the PC, in addition to TCAGENT_ALLOW_TARGETS.
  • Formatter fixes found by the condition rules: a bit access (dwStatus.4) is read as one operand by the expression
    check of the safety net.
  • Reload settings without a restart: ⟳ Reload (F5) in the TcAgent settings window (or TcAgent.exe reload) - every running TcAgent
    reads settings.json, targets and mode, modules.json and the plugins again, the agent gets the new tool list, the chat says what changed.
  • ST formatter: Ctrl+Alt+F (or Tools > Format ST code (TcAgent)) formats the PLC object in the editor - indentation,
    case of keywords, spacing, aligned declarations, blank lines, long calls with one parameter per line, and brackets around
    AND groups inside OR so the order is visible. Declaration and implementation, also unsaved; Ctrl+Z takes it back.
    A safety net keeps the meaning (the same tokens, the same expression trees, a second run gives the same text); a part
    it cannot read stays unchanged. Every rule is configurable in formatting.json on the knowledge levels, with locks;
    // tcagent-format: off ... on and the pragma form keep sections as they are. TcAgent.exe format --stdin|--file|--show-rules.
    docs/FORMATTER.md
  • Formatter settings with a preview: Tools > Formatter settings (TcAgent) ... - every rule in plain words with its value and
    level, search, start from a profile, details of the selected rule; a change shows at once what it does (before | after,
    example or the open object, changed lines marked, in the font and syntax colors of the TwinCAT editor, light or dark); Save writes the changed rules into formatting.json
    of a level (TcAgent.exe format --save), locked rules stay locked. Wish a rule or feature ... opens a GitHub issue with
    the example of the preview. formatting.json is part of the knowledge backups.
  • Formatter layout rules: layout.blocks (one statement per line, block bodies on their own lines), layout.then (THEN/DO/OF
    at the end of the condition or on their own line), wrap.conditions + wrap.operator (long conditions and boolean
    assignments: one term per line at the weakest AND/OR), align.assignments, align.named-args, blank.around-blocks;
    profile structured. Checked on 66,618 parts of real code with several rule sets: no change of meaning, every result stable.
  • Formatter settings in German or English (by the answer language of the chat, English for every other language), values in
    plain words ("keep as written" instead of preserve); Format ST code speaks the same language.
  • Export and import of the formatter rules in the settings window (a formatting.json with every rule) and TcAgent.exe format --export.
  • Formatter rule comment.decl-position: the comment of a declaration above it or at the end of its line; the safety net checks that every comment is still there.
  • Formatter rules for CASE: comment.case-labels: enum writes a comment above each label that has none - the comment
    of the enum value from the DUTs of the project, otherwise its name; blank.case-branches puts a blank line between the
    branches, after the label line, or both.
  • Formatter rule layout.short-if: IF … THEN with one statement and END_IF on one line when it stays within the set
    number of characters; layout.long-if: expand gives a one-line IF that is longer than that its own lines.
  • Formatter rule space.tabs: a tab inside a line becomes spaces up to the next tab stop of indent.tab-width, so the
    text keeps its column (default); tabs in comments and strings stay.
  • Formatter rule indent.underscore: a name that starts with _ one column further left (in declarations or everywhere),
    so its letters line up with the other names.
  • An example for every formatter rule: the code as written and the result for each value, made by the formatter itself
    (TcAgent.exe format --examples) - in docs/FORMATTER_EXAMPLES.md (a test keeps it current)
    and in the details of a rule in the settings window.

Fixed

  • Selected rows in the dark theme (TcUnit Tests, Knowledge window, settings windows) were hard to read; they now take the
    colors of the VS theme.
  • The prompt list (/ in the chat) opened too low the first time; it has its full height at once.