IMDHMIControls LibraryShop main store

Troubleshooting

Why a ctrlX CORE PLC stays STOP after boot

PLC programming Published 6 min read By IMDHMI controls team

Short answer

A ctrlX CORE application that is still STOP after a clean boot is not waiting on the fieldbus. Check the ctrlX CORE Scheduler first: in the reported case the schedBackground task had been deleted, and restoring it let the application start by itself. Read the EtherCAT master state and the PLC state as two separate faults, and never let the PLC program drive the EtherCAT startup.

On this page
  1. Read the two states in this order
  2. The scheduler entry the application needs
  3. Why the priority change and the RUN click mislead
  4. The drive that will not reach Operational is a second fault
  5. Restore the task and prove it with a cold boot
  6. Questions asked

When a ctrlX CORE PLC is still in STOP after a clean boot, the fieldbus is not what is holding it back. The EtherCAT master and the PLC runtime come up on separate paths, and a drive stuck in INIT does not stop the application from starting. In the reported case, on a ctrlX CORE X3, one deleted entry explained the whole symptom: the schedBackground task had been removed from the ctrlX CORE Scheduler, so the application had no task to run in and sat in STOP through every boot. Restoring that single entry let it start on its own again. Read the two states separately, check the scheduler first, and never make your PLC program the thing that starts the fieldbus.

Read the two states in this order #

Two pieces of status tell you where the boot broke: the application status on the PLC app and the state of the EtherCAT master. They belong to different runtimes, so read them one at a time and write both down before you change anything. The fieldbus state does not gate the runtime: the reported case held the application in STOP while the master was already Running, which shows the two come up independently. Map what you see to a location:

  • Application in STOP, master Running — the fieldbus side is healthy, so the fault is in the application start path. Go to the Scheduler configuration.
  • Application in STOP, one slave stuck in INIT — two faults, not one. Fix the application start path first: a STOP application cannot run the logic that would help the bus, so chasing the bus first builds a dependency on your own program.
  • Runs after a manual RUN click, never after a power cycle — the application and its tasks are loadable; the boot-time start path is what is broken.
  • Every device Operational except the drive — treat the drive as a separate, mostly physical problem.
  • Generate a system report and switch on additional traces before editing anything; the ctrlX documentation describes both, and the report is what turns a guess into evidence.

The scheduler entry the application needs #

The ctrlX CORE Scheduler holds the tasks, and each task holds one or more callables. In the web interface it lives under Settings, then Scheduler, on the Configuration tab, where tasks can be created, edited and deleted — which is exactly how schedBackground disappears by accident. With that task gone, the runtime has no task to execute its callables in, and the application reports STOP at every boot no matter what the bus does.

The documentation adds two placement rules worth checking while you are there: all PLC tasks have to run on CPU core 2, and the callable perist-nvram belongs in the schedBackground task, not in the ctrlXAutomation task. If you recreated a task by hand, or you are comparing this project against a known-good one, those are the two lines to compare first.

One trap while editing: the scheduler reports cycle time in microseconds, so an entry shown as 10000 is 10000 µs, which is 10000 ÷ 1000 = 10 ms, not 10 s. The page on how the ctrlX CORE scheduler reports cycle time in microseconds works through that unit in detail.

Why the priority change and the RUN click mislead #

In the reported case, changing the priority of a PLC task was followed by the master reaching Running after boot — and the application stayed STOP anyway. The two observations sit on different paths, so treat an improved bus state as coincidence until you can name the mechanism that connects it to application start. There is no documented priority value that repairs a deleted task; keep the values your application was commissioned with instead of copying a number from another project.

The manual RUN click misleads in the other direction. It proves the application loads and the tasks run once started, but it bypasses the boot-time start path entirely. Decision: an application that needs a person to leave STOP after every boot has a startup-configuration fault, regardless of what the bus is doing, and clicking RUN tells you nothing about that path. Only a power cycle with no intervention tests it.

The drive that will not reach Operational is a second fault #

With the startup path settled, look at the drive. In the reported case every device came up Operational except the EFC drive, which stayed in INIT, and it could be advanced through the EtherCAT states — INIT, Pre-Operational, Safe-Operational, Operational — by hand. That manual walk proves the link and the device can reach Operational; what failed is the automatic transition. Read the error the EtherCAT master reports for that slave and keep it: that message, not the overall bus state, is the evidence for this fault.

Check the physical layer next, especially the drive's power-cable shielding and grounding, because EMC disturbance on power wiring shows up as communication trouble. Treat a clean master state with suspicion too: a broken cable does not always raise the error flag you expect, which is what the case of a CODESYS EtherCAT master keeping its error flag false on a pulled cable documents.

One design rule falls out of the whole case: never use application logic as the recovery mechanism for fieldbus startup. A program that advances slave phases after the tasks start needs the tasks running first, so a loop like that leaves you doing manual RUN clicks forever. If the device that refuses Operational is a drive, the walkthrough for putting an EFC5610 drive on EtherCAT with a ctrlX CORE covers the project side of this pairing.

Restore the task and prove it with a cold boot #

The fix in the reported case was one edit. Compare the task list against a backup project, recreate schedBackground if it is missing, return perist-nvram to it, and apply the configuration. Then prove the result:

  • Power the controller off and on. No RUN click, no manual phase changes.
  • Watch the application status leave STOP on its own. If it does, the startup path is fixed. If it does not, stop editing and compare the captured system report against a working controller instead.
  • Only then check the bus: master Running, and the drive reaching Operational without a manual step.

One caution before you run this test: whatever outputs the application drives will be live again from the next boot, so make sure nobody is relying on the machine staying stopped.

Decision for each case. STOP with a healthy master is a scheduler and startup-configuration fault — check schedBackground first. STOP with a slave stuck in INIT is two faults — restore the application start path, then chase that slave's error at the physical layer. A drive that steps to Operational by hand but never after boot is an automatic-transition fault — read that slave's error and its power wiring, and never route the recovery through the PLC program.

Questions asked

Can the ctrlX CORE Scheduler be configured without the web interface?

Yes. The scheduler is configured mainly through its own web interface, and the ctrlX OS Data Layer can also be used to customize the configuration. Whichever path you use, export or write down the full task list first, so an accidental deletion is a one-line restore instead of a long comparison against another project.

Why did a virtual ctrlX CORE shut down by itself during testing?

A virtual ctrlX CORE device has a license-free runtime limit of 4 hours; at the end of that time it shuts down automatically and can be started again. That is licensing behavior of the virtual device, not the fault described here, which leaves the application in STOP while the controller itself keeps running.

What should you capture before changing the scheduler or the EtherCAT project?

After a cold boot, record the application status, the EtherCAT master state, which devices reached Operational and which stayed in INIT, and the exact error the master reports for the failing device. Then generate a system report with additional traces switched on, as the ctrlX documentation describes, so the evidence shows the boot path and not the state after your edits.

Keep reading

  • Explainer

    Why a TwinCAT PLC keeps running after its trial license expires

    A TwinCAT PLC already in Run mode keeps executing when its trial license expires; the expiry is enforced at the next start of the runtime. After a reboot, a power failure, a runtime restart or a software update, the runtime stays in Config mode and refuses Run mode until a new trial or a permanent license is generated, and a single expired trial option can block even a fully licensed system.

    PLC programming

  • Troubleshooting

    Why ADS PollValues stops after a PLC program download

    PollValues in TwinCAT.Ads.Reactive v4.4.0 holds one ADS symbol handle for the life of the observable, and a PLC program download invalidates that handle, so polling keeps throwing errors even when the link is healthy. Route failed reads through the error-handler overload so the stream survives, and rebuild the observable on the SymbolVersionChanged event.

    PLC programming

  • Explainer

    CODESYS IO-Link SL target support limits on ctrlX CORE

    No, CODESYS IO-Link SL (article no. 2303000008) is a single-device target license, and the ctrlX CORE does not currently provide it, so its scan-to-project, configurator and IODD.xml workflow cannot run on that controller. Add the IO-Link master over EtherCAT or PROFINET, read and write parameters acyclically, and manage the rest outside the project.

    PLC programming