PLC
Documentation

Version Latest

CODESYS online actions

Log in with or without download, make an online change, start, stop, reset and log out of a CODESYS application through the CODESYS scripting engine, each action confirmed and logged.

State: modelled. Built in the engineering host (tested on Linux against a CODESYS engine stand-in) and in the Editor (tested on Linux through the real client and services against a model of the engineering host's CODESYS requests). Nothing has run against CODESYS or a controller. Bench controllers only.

Commands

Command Palette, category Neural Inverse PLC. No key runs any of them.

CommandWhat changes
CODESYS Login and Download...When the application on the controller differs from the project, it is downloaded, replaced and stopped; outputs may change. Other applications on the controller are not deleted
CODESYS Login without Download...Asks to leave the application on the controller as it is. How CODESYS treats this when the application differs is still to be confirmed on a real CODESYS, and values read then are marked as not up to date
CODESYS Online Change...Changes the code of the running application without stopping it. Nothing is sent when CODESYS says an online change is not possible or that cannot be read
Start CODESYS ApplicationThe application's tasks run
Stop CODESYS ApplicationThe application's tasks stop
CODESYS Reset Warm...Resets the application, keeping retain variables
CODESYS Reset Cold...Resets the application, keeping only persistent variables
CODESYS Reset Origin...Erases the application and all its variables from the controller
CODESYS LogoutLogs out; the application keeps running

Run an action

  1. Run the command and pick the CODESYS project file (.project) and the application. The engineering host reads the project's devices and applications with the gateway and the device address their communication settings name, offline, in the project's resident CODESYS session. The pick shows each application with its device, address and gateway.
  2. A device without an address cannot be acted on: set it in CODESYS (Communication Settings of the device).
  3. Read the confirmation. It names the device and the application; the address and the gateway; the online state the Editor knows (logged in or not, application state, operation state, and whether the controller runs the project's application), or that it is not known and why; the project file with its modification stamp; what changes; and that the action is logged with the operating system's user name.
  4. Confirm with the action's own button, or cancel.

After you confirm, the Editor checks again that the project file, the CODESYS session and the online state are what the dialog showed, and refuses (sending nothing) when one changed or more than two minutes passed. The engineering host reads the gateway and address again and sends nothing when they changed. It never uses the online change option that falls back to a full download, never deletes other applications and never changes a gateway or address.

Read the outcome

The notification names the action and the controller (PLC_Line3 (0301.1003 via <gateway>)):

OutcomeWhen
SucceededThe state CODESYS read back moved from the state shown to the one the action leads to
Sent, its effect not observedIt did not: for example the first action of a window, whose state before was not known, or an online change, which keeps the application running
Did not runA failure that says nothing was sent: a start of a running application, a stop of a stopped one, not logged in, online change not possible, an unreachable device, a changed address
Not known whether the controller changedEvery failure after the command was sent. The online state is then no longer known

The online state the Editor knows holds only in the session that read it and for the project file as it was. When the session ends or the file changes (opening it again in CODESYS ends the online session), it is no longer known.

After a login, values can be watched and written: see Watch values and Write values.

Not verified

  • Everything against CODESYS and a controller, including what the Keep and Force options do when the application on the controller differs, whether a reset leaves the application in stop, and how a device with user management asks for credentials in a session without a user interface.

Last reviewed 17 October 2026View as Markdown

CODESYS online actions · Docs · Neural Inverse