PLC
Documentation

Version Latest

Activate and download to TwinCAT

Activate a configuration, log in and download, start, stop, log out and generate the boot project on a TwinCAT controller through the engineering host, each action confirmed and logged.

State: modelled. Built in the Editor and tested on Linux through the real client and services against a model of the engineering host that checks every confirmation as the protocol requires. Nothing has run against TwinCAT, the engineering host on Windows or a controller. Use these commands on a bench controller only, never on a machine or a plant network.

Commands

Command Palette (Neural Inverse PLC), the TwinCAT Projects view's title menu (under "..."), or the context menu of a project row (all six) or a PLC project row (all but Activate Configuration). No key runs any of them.

CommandWhat changes
Activate Configuration...Activates the TwinCAT project on the target and restarts TwinCAT; the PLC program is replaced and the outputs may change
Login and Download...Logs in and downloads; the PLC program is replaced and the outputs may change
Start PLCThe PLC runtime starts
Stop PLCThe PLC stops executing
LogoutLogs out
Generate Boot Project...Sets autostart in the project and generates the boot project

While an action runs, the status bar shows PLC Controller Action.

Run an action

  1. Run the command. Pick the TwinCAT project, the stored TwinCAT target (added with Connect to TwinCAT Target, see Connect to controllers) and, for the PLC actions, the PLC project. The PLC project whose AMS port is the target's is offered first. Each is asked only when there is more than one and the command was not started from a row.
  2. Read the confirmation. It names:
    • the target (host, AMS Net ID, AMS port);
    • the controller's state read over ADS just now (device, version, ADS state, device state) when the Editor is connected to that target, or that it was not read and why;
    • the project with the number of its files and a fingerprint of their contents, and the PLC project with the AMS port of its runtime;
    • for an activation, the controller the project file names as its target and, when it is another, "This project targets X; activating retargets it to Y.";
    • that the action runs in the TwinCAT session that builds the project;
    • what changes, and that the action is logged with the operating system's user name.
  3. Confirm with the action's own button, or cancel. Cancelling sends nothing.
  4. Read the outcome in the notification (below) and in the PLC log.

Login, start, stop and logout act on the PLC runtime at the AMS port the PLC project names (AmsPort in the .tsproj). They are refused, with nothing sent, when the PLC project names none or another port than the target's: add a target with that port. A start of a runtime that already runs, and a stop of one that is stopped, are refused before anything is sent. No second TwinCAT starts: the actions run in the project's resident engine session, the one Build Project uses.

Read the outcome

The notification names the action and the target, with one of four outcomes:

OutcomeMeaning
SucceededA read of the controller showed the change: the runtime moved to run after a start, to stop after a stop; TwinCAT was seen not running and then running after an activation
Sent, its effect not observedThe request went through but nothing shows its effect: a login to a runtime that already ran, a logout, the boot project (its autostart is read back from the project, not from the controller). The result never says "confirmed" then
Did not runOnly when the failure says nothing was sent: refused, stale, not installed, or an error before the first call that can change the controller
Not known whether the controller changedEvery failure from the first call that can change the controller on, a timeout, a crash, a cancellation after sending. Check the controller before trying again

A late answer after a timeout or cancellation is shown when it comes. See Approvals and audit for what the confirmation binds and what the PLC log records.

Login without download

Only Login and Download is offered: the Automation Interface, as researched, cannot forbid the download. A TwinCAT User Mode Runtime started outside the Editor may be reachable as an ADS target; this has not been tried. Other TwinCAT online functions are on What's next.

Not verified

  • Every action against TwinCAT XAE and a controller.
  • Whether a login to a runtime that held no program reports run or stop, and whether TwinCAT's restart after an activation can be seen; an activation whose restart is not seen is reported as not known.
  • Timing of activation and download on real projects.

Last reviewed 17 October 2026View as Markdown

Activate and download to TwinCAT · Docs · Neural Inverse