Repository navigation
Releases
v0.25.0
Added
- The hover of a GVL or program variable declared
AT %I*orAT %Q*tells what it is linked to, without opening XAE's
Mapping:Device 1 (EtherCAT) › Term 1 (EK1100) › Term 2 (EL1008) › Channel 1 › Input, read from the
<Mappings>of the.tsprojas XAE last saved it. A struct or an array lists the links of its members and
elements (.bReady,[1]). A variable linked to nothing says so, and one that the last build did not have yet
says to build and save the project in XAE first. A project without<Mappings>(a library, I/O not committed)
shows nothing.samples/Demonow has I/O, added in XAE bysamples/Add-DemoIo.ps1. - The same for a variable
AT %I*/AT %Q*of a function block: one line per instance, by its path
(MAIN.fbSensorLeft.bSignal), with what it is linked to ornot linked. The instances are those of the last
build in XAE, in programs, GVLs, struct members and array elements, and of function blocks that extend it. - An information (
unlinked-io) at the declaration of a variableAT %I*/AT %Q*that the TwinCAT project
links to no I/O, not even in part, or, of a function block, in some of its instances. Not told in a project
without links.twincatExplorer.diagnostics.rulescan make it a warning or an error, or turn it off; the
attributeexplorer.disableturns it off in one GVL or POU. - Renaming what I/O links go through asks first, listing the links: a variable
AT %I*/AT %Q*, a struct,
array or function block instance that holds one, a member of such a struct, or the GVL or program itself.
The.tsprojnames the linked variable by its old name, so after the next build in XAE the link finds no such
variable and has to be made again there. - A warning (
stale-io-link) in the Problems panel, at the variable of each link of a.tsprojthat the code no
longer declares, as it is now (saved or not): a variable, struct member or instance renamed or deleted since
XAE saved the project.twincatExplorer.diagnostics.rulescan change its level or turn it off.
Fixed
- In the TwinCAT tree, a folder holding changes since HEAD now has the git color and a dot, like the Explorer,
also while it is collapsed. A folder of a PLC project, the PLC project and the TwinCAT project take the strongest
change of the files in their directories: a conflict, a deletion (red, which the Explorer leaves out), a
modification, an addition. A folder inside a POU or interface (Methods,States) takes that of the methods,
properties and actions in it, a deleted one counting in the folder it had in HEAD. Moving an object to another
folder alone is no change. The tooltip of the dot counts the changes
(#135, reported by
show2723).
Install the attached file with code --install-extension explorer-for-twincat-0.25.0.vsix, or from the Marketplace.
v0.24.0
Added
- Copy Path and Copy Relative Path in the TwinCAT tree's context menu, beside Copy Name, on the nodes a file holds:
the TwinCAT and PLC projects, POUs, DUTs, GVLs and interfaces, and the methods, properties and actions, which
copy their POU's.TcPOU. As in VS Code's Explorer, the relative path is that of the workspace folder, in the
separatorexplorer.copyRelativePathSeparatorsets. Then Copy Qualified Name, on the nodes of an object: its
name with its PLC project,Machine:FB_Valve.OpenorMachine:FB_Conveyor.Speed.Get, as the MCP server's tools
take it. Open XML moves below them. (#125, reported by
simongaoai-coder) - Copy File Path, Copy Relative File Path and Copy Qualified Name in the context menu of an object's editor tab, and
in the Command Palette while one is active. VS Code's own Copy Path and Copy Relative Path copy the tab's name
there (FB_Valve.Open). (#125) - An error at the name after
IMPLEMENTSwhen a function block lacks methods or properties of that interface (or
of the interfaces it extends), as XAE's compiler reports it:FB_Valve does not implement method Close of I_Valve. Those of a function block it extends count; aFUNCTION_BLOCK ABSTRACTis not checked, nor one that
extends a function block not found. The interfaces of the function blocks it extends are checked too (an
ABSTRACTbase leaves them to it), with an error at the name afterEXTENDS:FB_Valve does not implement method Close of I_Valve (through FB_ValveBase). Its quick fix runsImplement Interfaces.... Implement Interfaces...also adds what the interfaces of the function blocks it extends need.- Each Structured Text problem has a code, its kind (
unknown-member,unknown-type,syntax...), shown in the
Problems panel, in the split editor and in the MCP server's answers. twincatExplorer.diagnostics.rules: the level of each kind of problem,error,warningoroff
({ "unknown-member": "warning" }). The MCP server reads it from.vscode/settings.jsontoo.{attribute 'explorer.disable' := 'unknown-member, unknown-type'}in the declaration of a POU, method,
property, action, DUT or GVL turns those kinds of problems off there (a POU's in its members too); without a
value, all of them.- The MCP server's
referencestells how each place uses the name:declaration,write,readwrite
(passed to aVAR_IN_OUT),address(ADR,BITADR,REF=),call,readortype, with the member or
index a variable is used through (write .eStateforstStatus.eState := ...), and a count per kind. Its new
accessfilter answers who writes a variable:access: ["write", "readwrite", "address"]. TwinCAT: Show References by Access(context menu of the panes, of notebook cells and of the TwinCAT tree):
the places of a name in the References view, grouped by how each uses it (Write,Read and write (VAR_IN_OUT),Address taken,Call,Read,Declaration,Type) and by object, each with its line and the
member or index a variable is used through. Find All References cannot tell writes from reads.TwinCAT: Show Call Hierarchy(context menu of the panes, of notebook cells and of the TwinCAT tree): what calls a
function, program, function block, method or action, up to the task that calls a program, and what it calls, in
the References view, level by level. A method's callers include those through the interface or base method it
implements or overrides (via I_Valve.Open). The MCP server's newcallsgives the same, to a depth of 5.
Changed
- The highlights of a symbol in a pane tell written from read as the analysis does: also a variable passed to a
VAR_IN_OUTis written.
Fixed
TwinCAT: Search...(Ctrl+Shift+Alt+F) in the split editor searches the text selected there, as in a text
editor; it started with the last search text. A line selected whole searches that line, without its
indentation and line break, in both.- The MCP server's
build, and its tools that add or delete objects, with a 32-bit TwinCAT XAE Shell
(TcXaeShell.DTE.15.0) on 64-bit Windows: they stopped withTwinCAT XAE gave no running document table, as
the XAE bridge ran as a 64-bit process, which XAE's COM proxies are not registered for. A 32-bit XAE is now driven
by a 32-bit bridge, compiled beside the other on first use. (#124,
reported by simongaoai-coder)
Install the attached file with code --install-extension explorer-for-twincat-0.24.0.vsix, or from the Marketplace.
v0.23.0
Added
- The MCP server's
build: TwinCAT XAE's Build PLC project, as XAE's Build menu runs it, with whether it
succeeded and the compiler's errors and warnings. It compiles what the PLC project uses, unlikecheckwith
compiler: true(XAE's Check all objects), which also compiles unused objects and so can report errors that a
build never shows. XAE saves its unsaved files before a build, so a build is refused while XAE has any, unless
the user agrees (saveUserEdits: true). (#116,
reported by simongaoai-coder)
Changed
- The TwinCAT views have a place of their own: the TwinCAT icon in the Activity Bar opens the Solution tree
(until now the TwinCAT view of the Explorer, below Outline and Timeline) with the History view below it
(until now in the Source Control sidebar). The TwinCAT Search results are in the Panel, beside Problems and
Output, as XAE's Find Results. TwinCAT Changes and TwinCAT Commits stay in the Source Control sidebar.
Any of them can be dragged back where it was (or right-click its title,Reset Location). - The Solution view's title bar has
Add(POU, DUT, GVL, interface, folder, existing items, library),
Go to Object...andSearch...;Refresh, andReveal Active EditorwhiletwincatExplorer.autoRevealis on,
are in its...menu. - TwinCAT Changes has a
Commitbutton in its title bar, for the objects staged there. - The context menu of the tree is ordered by use: open, add, go to implementation and type hierarchy, history and
comparisons, search, expand, rename/move/delete, copy name and Open XML last.Expand AllandCollapse Allare
on projects,References, folders, and POUs and interfaces with members (a function block with its methods,
properties and their folders). Open XMLmoved to the...menu of the split editor's title bar.- The TwinCAT view container opens by itself the first time a workspace shows TwinCAT projects.
- The breadcrumbs of the split editor and of object notebooks show the object's place in the TwinCAT tree
(Machine › Plc › POUs › FB_Valve › Close) instead of the folders of its file from the root of the disk. - A walkthrough, Get Started with Explorer for TwinCAT (
Help: Welcome), shows where the tree, Go to Object,
Search and the per-object git views are. - The TwinCAT Search view's message names what was searched:
5 results for "fbValve" (Match Case) in 1 file. Go to Object...shows the tree's icons and kinds (FB,PRG,ENUM,STRUCT,Method,GVL...).TwinCAT: Refreshis nowTwinCAT: Reload Projects,Reveal in TwinCAT ExplorerisReveal in TwinCAT Solution, andHide Notebook Toolbars (XAE-like Layout)isHide or Show Notebook Toolbars (XAE-like Layout)..., as it asks which.Open Changes as TwinCAT Notebookis nowCompare with HEAD (Notebook), andCompare with Git Ref as TwinCAT Notebook...isCompare with Branch or Commit (Notebook)....checkwithcompiler: truesays that it ran XAE's Check all objects, and with an object checks only that
object's PLC project.
Fixed
- Screen readers read the TwinCAT projects, PLC projects, POUs, DUTs, GVLs and tasks of the tree by their label
(FB_Valve (FB)), not by the path of their file, and folders without a trailing space. - Screen readers read the files and objects of TwinCAT Changes, TwinCAT Commits and History by their label,
description and status (FB_Valve (FB), FillerPlc · POUs/Devices, Modified), not by the path of the file. - MCP server: with TwinCAT XAE open,
add_objectmakes an alias, andadd_member(andadd_object) a property
of an interface. XAE refused both ("Base class not specified" for the alias), then failed on the interface
property's accessor. - Code excluded from the build (Exclude from build in XAE, on a folder or an object) shows no problems, as XAE
does not compile it. Before, an unknown name there was an error, in the editors and in the MCP toolcheck. Built
code that uses a name declared there gets an error now ('FB_Old' is excluded from the build), where it had none.
The TwinCAT tree marks such folders and objectsexcluded from build, andchecknames the objects it leaves
unchecked (#116, reported by
simongaoai-coder).
Thanks to @simongaoai-coder for reporting #116, and for the unused FB and excluded-folder case that showed where Check all objects and a build differ.
Install the attached file with code --install-extension explorer-for-twincat-0.23.0.vsix, or from the Marketplace.
v0.22.0
Added
- TwinCAT Search:
TwinCAT: Search...(Ctrl+Shift+Alt+F) finds a text in the Structured Text of the objects as
the split editor shows it, never in their XML, unsaved edits included, and lists the matches in the TwinCAT
Search view of the Explorer as you type, per object and section; a click opens the split editor at the match.
Find in Folder...andFind in Project...on the TwinCAT tree search one folder (a folder inside a POU too) or
project. Match Case, Match Whole Word, regular expressions (RE2's syntax, in linear time, so that no pattern can
hang VS Code) and Skip Comments are buttons of the input box (Alt+C, Alt+W, Alt+R) and in the view's...menu. - The MCP server's
search_text: a text or regular expression in the code, in all PLC projects or in one project
or folder. Expand AllandCollapse Allin the context menu of a TwinCAT tree node that has children: they expand or
collapse the node and every branch below it, all the way down (a project, a folder, a POU with its methods).
Install the attached file with code --install-extension explorer-for-twincat-0.22.0.vsix, or from the Marketplace.
v0.21.0
Added
- The diffs of the split editor (
Show Changes vs HEAD, the TwinCAT Changes and History views) and of the
commit diff panel show side by side, the base on the left, as VS Code's own diff editor does: they follow
its settingdiffEditor.renderSideBySide, and are inline while a pane is too narrow
(diffEditor.useInlineViewWhenSpaceIsLimited).Diff Viewin the editor's...menu picksInlineor
Side by Side, for VS Code's diff editor too. - The bar between the split editor's two panes has
^andvarrows, as in TwinCAT XAE:^gives the whole
editor to the Implementation,vto the Declaration, and the other arrow brings the bar back where it was.
Changed
- The bar between the split editor's two panes stands out from the code: a band with a border on each side and
grip dots in its middle, instead of a thin line that was hard to see in dark themes.
Install the attached file with code --install-extension explorer-for-twincat-0.21.0.vsix, or from the Marketplace.
Browser extension 0.5.1
Fixed
- GitLab, New merge request: on its Overview and Commits tabs, the Files / TwinCAT tabs floated at the
bottom left, over GitLab's sidebar, and jumped from there into the file tree and back as the tabs were switched.
Without the host's file tree, they float only while the page shows files: on a new merge request, they show on its
Changes tab, above the file tree.
Install
The extension is in no store: Chrome or Edge loads it unpacked.
- Unzip the attached file where it can stay: it holds one folder,
explorer-for-twincat-browser. - Open
chrome://extensionsoredge://extensions, turn on Developer mode, click Load unpacked and pick
that folder. - On a self-managed GitLab, open a merge request and turn the extension on for the site from its toolbar
button (in Edge, under the Extensions button).
To update, replace that folder with the new zip's and click the extension's Reload on the same page. The
extension keeps its ID, so the sites turned on stay on.
In Firefox (140 or later), install it from
addons.mozilla.org: Firefox updates it
once Mozilla has published the version.
Browser extension 0.5.0
Added
- GitLab, New merge request: the Changes tab of a merge request being created (after a push, before Create
merge request) has the TwinCAT view toggles and the TwinCAT tab too: what the source branch would change in
the target branch, as objects. No comments there, as there is no merge request yet. - The object being read stays in sight: as the page scrolls through a TwinCAT view, the header of the object
(method, property, action...) whose code is on the screen sticks below the file's header, with the header of its
section (Declaration, Implementation) below it, until the next object comes up.
Install
The extension is in no store: Chrome or Edge loads it unpacked.
- Unzip the attached file where it can stay: it holds one folder,
explorer-for-twincat-browser. - Open
chrome://extensionsoredge://extensions, turn on Developer mode, click Load unpacked and pick
that folder. - On a self-managed GitLab, open a merge request and turn the extension on for the site from its toolbar
button (in Edge, under the Extensions button).
To update, replace that folder with the new zip's and click the extension's Reload on the same page. The
extension keeps its ID, so the sites turned on stay on.
In Firefox (140 or later), install it from
addons.mozilla.org: Firefox updates it
once Mozilla has published the version.
v0.20.1
Fixed
- The split editor's line blame no longer moves the cursor away from the end of the line: at the end of a line
with the annotation of its commit, the cursor was drawn past the gap before the annotation, as if a few
characters after the line's last one. - The parameter names shown before the arguments of a call are no longer cut short (
fMaximumV…) when a line
has several: Structured Text files have no limit on their total length by default
(editor.inlayHints.maximumLength, 43 characters of a line in VS Code), in the text editor and the split
editor. A limit set in the settings still applies.
Install the attached file with code --install-extension explorer-for-twincat-0.20.1.vsix, or from the Marketplace.
v0.20.0
Added
- The language features know the installed libraries a PLC project references by name, without a stub: the
POUs, DUTs, GVLs and interfaces, with their methods, properties, actions and comments, that the
browsercacheXAE writes next to a library names, read from the system library repositories and the
folders oftwincatExplorer.libraryRepositories. They are no longer reported as unknown (Unknown type 'FB_ComponentBase'for the SPT Libraries,
#91), and have a hover and completion. Without their
declarations, members and arguments of theirs are not checked, and a POU extending one of their function
blocks gets no report of an unknown identifier. A stub still declares what it has; the browsercache adds the
rest. The MCP server's check knows them too. - The language features read the declarations of an installed source library (
.library) a PLC project
references from its file, as a stub would declare them: its POUs, DUTs, GVLs and interfaces, with their
methods, properties, actions and comments, such as the SPT Libraries. Hovers, signature help and completion
have them; inherited variables, enumeration values and qualified GVLs are found, through the function blocks of
another library too, and an unknown identifier is reported again in a POU extending one of them. Compiled
libraries hold no declaration text: they stay known by name.
Fixed
- Add Library finds the libraries of a folder of
twincatExplorer.libraryRepositoriesthat holds its
repository in a subfolder, such as a clone of the SPT Libraries (itsLibrary Repositoryfolder), and warns
about a folder of the setting without libraries, which went unnoticed next to the system repository's
libraries (#91). - Add Library writes the default namespace of a library its repository's
cachelacks, such as those of a
cloned repository XAE never indexed here, from theprojectinfoof its folder, instead of its title, which
can be no identifier (SPT Base TypesforSPT_BaseTypes).
Thanks to @EricControls for reporting #91, and for the settings, folder tree and screenshots that showed where it went wrong.
Install the attached file with code --install-extension explorer-for-twincat-0.20.0.vsix, or from the Marketplace.
v0.19.0
Added
- The licenses of the remote TwinCAT systems this machine has ADS routes to, such as an XAR in a container
or a virtual machine, with settingtwincatExplorer.remoteLicensesturned on (off by default): read over
ADS every 5 minutes, they are in the status bar, its warnings andTwinCAT: Show Licensesnext to this
machine's, and the status bar names the runtime or system whose license ends first. TwinCAT: Renew Trial License in TwinCAT XAEalso renews the trial license of a remote system: it asks
for the runtime of this machine, a system of this machine's ADS routes, or an AMS Net ID typed in, targets
the project at it, and tells the new license's end once it is written there.Open Solution in TwinCAT XAE, on the right-click menu of a TwinCAT project in the tree and as
TwinCAT: Open Solution in TwinCAT XAE, on Windows: brings the TwinCAT XAE that has the project open to the
front, or starts XAE on the workspace's solution that has the project (a list when several have it), in
front and left open as yours. XAE is never closed, and nothing is saved in it.
Changed
TwinCAT: Renew Trial License in TwinCAT XAEleaves the TwinCAT XAE it started open afterwards, for you to
close, instead of closing it without saving. A target it switched for the license is set back, as in an XAE
you had open.
Fixed
- The README's license folders read
TwinCAT.1instead ofTwinCAT\3.1.
Install the attached file with code --install-extension explorer-for-twincat-0.19.0.vsix, or from the Marketplace.