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.
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
- PLCnext Engineer installed on a Windows PC, with the project opened and compiled at least once. Compilation, not download, is what populates the
@binarytree. If the tree is missing or stale, recompile and confirm the timestamps. - 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.
- SSH or serial console access to the controller with an account permitted to use
sudo. - A file transfer path to the target — SCP/SFTP, WinSCP, or a mounted SD card/USB medium.
- A written record of the existing
currentlink 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.
- Compile in PLCnext Engineer. Resolve every compiler error; a partially generated binary tree will not load.
-
Open the binary path on the Windows PC:
If more than oneC:\Users\Public\Documents\PLCnext Engineer\Binaries\PROJECT_xxx@binary\RES_xxx\Configuration\Projects\PCWEPROJECT_xxx@binaryfolder exists, sort by modified date and match the project name fragment. MultipleRES_xxxfolders mean multiple resources — pick the resource that maps to the controller you are deploying to. -
Copy the entire
PCWEfolder (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. -
Restart the runtime on the target:
This is a cold start: the application restarts from initial values.sudo /etc/init.d/plcnext restart
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:
- 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 existingPCWEdirectory. - Repoint the runtime selection link to the new directory:
Thecd /opt/plcnext/projects ln -sfn IOconf current-screates a symbolic link,-fforces replacement of the existing link, and-ntreats the existingcurrentlink as a file rather than following it into the directory. Omitting-nis the classic mistake: you end up with/opt/plcnext/projects/current/IOconfinstead of a replaced link. - Restart to load the newly selected project:
or, for a faster cycle without a full OS restart:rebootsudo /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
-
Confirm the link resolves where you expect:
A broken link (red in most shells, orls -l /opt/plcnext/projects readlink -f /opt/plcnext/projects/currentNo such file or directoryfromreadlink -f) means the runtime will start with no application. -
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 -lRand align owner/group/mode. - 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.
- 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.
- 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.