Deploying PLCnext Engineer Projects Without the IDE

Jason IP6 min read
Other ManufacturerPLC HardwareTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

PLCnext Engineer is only one delivery path to a PLCnext Control target. The runtime does not require the engineering tool to be attached at start-up: it loads whatever project directory the current symbolic link resolves to under /opt/plcnext/projects. That makes it possible to build once on an engineering PC, ship the resulting binary artifacts as ordinary files, and start execution on the controller with two shell commands.

This procedure covers three related engineering problems:

  • Deploying a complete compiled project to a controller from a build server, CI pipeline, or USB stick with no IDE installed.
  • Starting project execution on the target without a PLCnext Engineer download/connect session.
  • Placing a new project on a controller without destroying compiled artifacts (TIC files, GDS port configuration) that already exist in another project directory on that same controller.
Critical: The runtime restart shown below performs a cold start. All retain/NV data and the current process image are discarded, and outputs are re-initialised. Never run this on a machine in production or with an energised, unguarded actuator group.

How the Runtime Locates a Project

The relevant paths and their roles:

Path Location Role
C:\Users\Public\Documents\PLCnext Engineer\Binaries\PROJECT_xxx@binary\RES_xxx\Configuration\Projects\PCWE Windows engineering PC Compiler output for one resource of one project. PROJECT_xxx and RES_xxx are derived from your project and resource names.
/opt/plcnext/projects PLCnext Control target Container directory holding one or more project directories.
/opt/plcnext/projects/PCWE Target Default project directory name produced by PLCnext Engineer downloads.
/opt/plcnext/projects/current Target Symbolic link that selects which project directory the runtime loads at start-up.

Because the selection is a symlink, several project directories can coexist side by side. Switching applications is then a link update plus a restart, not a file overwrite.

Prerequisites

  1. PLCnext Engineer installed on a Windows PC, with the project opened and compiled at least once. Compilation, not download, is what populates the @binary tree. If the tree is missing or stale, recompile and confirm the timestamps.
  2. The firmware version on the target matches the firmware/version the project was compiled against. A project built for a different major firmware line may load but fault, or be rejected at start-up.
  3. SSH or serial console access to the controller with an account permitted to use sudo.
  4. A file transfer path to the target — SCP/SFTP, WinSCP, or a mounted SD card/USB medium.
  5. A written record of the existing current link target, so you can roll back. Capture it before touching anything:
    ls -l /opt/plcnext/projects

Procedure A - Replace the Default PCWE Project

Use this when the controller carries a single application and you simply want to overwrite it.

  1. Compile in PLCnext Engineer. Resolve every compiler error; a partially generated binary tree will not load.
  2. Open the binary path on the Windows PC:
    C:\Users\Public\Documents\PLCnext Engineer\Binaries\PROJECT_xxx@binary\RES_xxx\Configuration\Projects\PCWE
    If more than one PROJECT_xxx@binary folder exists, sort by modified date and match the project name fragment. Multiple RES_xxx folders mean multiple resources — pick the resource that maps to the controller you are deploying to.
  3. Copy the entire PCWE folder (the directory itself, not just its contents) to the target and replace /opt/plcnext/projects/PCWE. Preserve the internal directory structure exactly; the runtime resolves relative paths inside this tree.
  4. Restart the runtime on the target:
    sudo /etc/init.d/plcnext restart
    This is a cold start: the application restarts from initial values.
Transfer files in binary mode. FTP clients left in ASCII mode corrupt compiled artifacts, and the failure shows up only as a runtime load error at start-up.

Procedure B - Deploy Without Disturbing Existing TIC/GDS Artifacts

Overwriting /opt/plcnext/projects/PCWE replaces everything inside it — including the compiled IEC 61131 code artifacts (TIC) and the GDS port/data configuration belonging to the previous application. If you must keep the previous project intact and switchable, deploy side by side instead:

  1. Rename the copied binary folder to a unique, meaningful name before or after transfer, for example IOconf, and place it at /opt/plcnext/projects/IOconf. Do not overwrite the existing PCWE directory.
  2. Repoint the runtime selection link to the new directory:
    cd /opt/plcnext/projects
    ln -sfn IOconf current
    The -s creates a symbolic link, -f forces replacement of the existing link, and -n treats the existing current link as a file rather than following it into the directory. Omitting -n is the classic mistake: you end up with /opt/plcnext/projects/current/IOconf instead of a replaced link.
  3. Restart to load the newly selected project:
    reboot
    or, for a faster cycle without a full OS restart:
    sudo /etc/init.d/plcnext restart

Rollback is symmetric and takes seconds — repoint the link at the previous directory and restart:

cd /opt/plcnext/projects
ln -sfn PCWE current
sudo /etc/init.d/plcnext restart

Keep each released application in its own dated or version-tagged directory (PCWE_v1_4, PCWE_v1_5) and treat current as the only mutable object. This gives you an on-target A/B deployment scheme with no IDE involved.

Verification

  1. Confirm the link resolves where you expect:
    ls -l /opt/plcnext/projects
    readlink -f /opt/plcnext/projects/current
    A broken link (red in most shells, or No such file or directory from readlink -f) means the runtime will start with no application.
  2. Check ownership and permissions of the transferred tree. Files copied as root from a USB medium can end up unreadable by the runtime process. Compare against the untouched original project directory with ls -lR and align owner/group/mode.
  3. Watch the runtime come up. After the restart command, verify the process is running and the controller status indicators reach the RUN state expected for your hardware. If the application does not start, inspect the PLCnext log output on the target for load-time errors before recompiling anything.
  4. Prove the application is the one you shipped. Write a build-ID constant or version string into a global variable in the project and read it back — via HMI, OPC UA, or a diagnostic variable — after start-up. Directory names alone do not prove which binary the runtime loaded.
  5. Re-verify I/O. A cold start re-initialises outputs. Confirm the physical I/O configuration in the deployed project matches the installed modules and their positions before releasing the machine.

Engineering Notes and Pitfalls

Symptom Likely cause Action
Runtime restarts but no application executes current points at a missing or empty directory readlink -f the link; recreate with ln -sfn
Old application still runs after copy current still points at the previous project directory Repoint the link, then restart
Load error after transfer Partial copy, ASCII-mode FTP, or missing subdirectory Re-transfer the whole PCWE tree in binary mode
Retain data lost after deployment Expected — the restart is a cold start Plan a data-restore step or re-teach machine parameters
Wrong resource deployed on a multi-resource project Copied the wrong RES_xxx folder Map resource names to controllers before copying

For automated delivery, the whole flow reduces to: build on the engineering PC, archive the PCWE directory as a versioned artifact, scp it into a new directory on the target, update the symlink, restart. No engineering tool is required on the machine that performs the deployment.

FAQ

Where does PLCnext Engineer put the compiled project files on the PC?

Under C:\Users\Public\Documents\PLCnext Engineer\Binaries\PROJECT_xxx@binary\RES_xxx\Configuration\Projects\PCWE, where PROJECT_xxx is the project and RES_xxx the resource. The folder is populated by a compile, not by a download.

Which directory on the PLCnext controller receives the project?

Copy the whole PCWE folder into /opt/plcnext/projects. The runtime loads whichever project directory the /opt/plcnext/projects/current symbolic link resolves to.

How do I start project execution without connecting PLCnext Engineer?

Restart the runtime on the target with sudo /etc/init.d/plcnext restart, or issue reboot. Both reload the project referenced by the current link.

How do I switch to a different project directory without deleting the existing one?

Place the new project in its own directory, then run cd /opt/plcnext/projects followed by ln -sfn <projectdir> current and restart. The -n flag is required so the existing link is replaced rather than followed.

Does restarting the PLCnext runtime keep retained data?

No. The restart executes a cold start, so the application begins from initial values and outputs are re-initialised. Perform it only on a de-energised or safely isolated machine.

Back to blog