IMDHMIControls LibraryShop main store

Troubleshooting

Fix CODESYS PROFINET IP-change error on an S7-1200 link

Industrial networks Published 6 min read

Short answer

The station shows in the scan because DCP discovery answers, but the connection fails because the CODESYS runtime refuses the IP address the controller assigns. Enable the IP-address update for the bound Ethernet interface in the runtime's .cfg configuration and restart the runtime; the error names the fix itself. If you would rather not enable it, set matching fixed addresses on both sides.

On this page
  1. What the network scan proves
  2. Why the runtime refuses the write
  3. Enable the update in the runtime configuration
  4. The fixed-address alternative
  5. Checks after the error clears
  6. Working the case: a Raspberry Pi CODESYS device behind an S7-1200
  7. What this error is not
  8. Questions asked

The error names its own correction. Your S7-1200, as the PROFINET IO controller, tries to write the configured IP address to the CODESYS runtime on the Raspberry Pi, the runtime refuses the write, and the diagnosis says so verbatim: "IP-Change not enabled on specified interface! Enable update of IP-address in *.cfg -file". Seeing the station in the TIA Portal scan proves only that discovery works. Enable the IP-address update for the interface the PROFINET device is bound to, restart the runtime so it reads the file, then verify the device name and the GSDML I/O layout. Activation has nothing to do with this message.

What the network scan proves #

PROFINET's Discovery and Configuration Protocol (DCP) does two separate jobs: it identifies stations for the scan, and it writes the device name and IP address during connection setup. A station can answer the identify request while refusing the address write, which is exactly your situation: the Raspberry Pi appears when TIA Portal scans, then the connection collapses when the controller configures it.

The two red triangles - on the device object (CODESYS_profinet_device in your project) and on its I/O definition - are both downstream of that one refusal. Treat them as one fault until the log says otherwise.

If the station did not appear in the scan at all, you would be chasing a different fault; start with a Raspberry Pi PROFINET device that is not reachable in TIA Portal instead.

Why the runtime refuses the write #

The runtime that hosts the PROFINET device blocks address changes on the bound interface until its configuration allows them. Your GSDML file, generated in CODESYS and imported into TIA Portal, describes the device to the controller - its identity, slots and data lengths. It grants the runtime no permission at all, so re-importing it will never clear this specific line.

For the mechanism in depth, read why CODESYS PROFINET reports the IP-Change not enabled condition before you change settings.

Enable the update in the runtime configuration #

  1. Restarting the runtime and changing its network settings interrupts control and communication, so put the connected equipment into its site-approved maintenance state first.
  2. Confirm which Ethernet adapter the PROFINET device is bound to. It must be the cabled port towards the S7-1200 network; a device bound to another adapter answers scans from the wrong interface.
  3. Open the active .cfg file that the running service reads at startup, not a leftover copy on the card. The option that permits IP-address updates for the selected interface, with its exact spelling, is in the runtime configuration documentation for the CODESYS PROFINET device - the same reference you configured the device from.
  4. Enable the update for that interface, leave the unrelated settings untouched, and restart the runtime with its documented procedure. A saved file proves nothing; the service must read it again.
  5. Retry the connection from TIA Portal and read the runtime log. The quoted diagnosis must not reappear.

The fixed-address alternative #

For this controller-and-device pairing the CODESYS side does not acquire its address from the controller, so the alternative is compatible settings on both ends: give the device a fixed address in the runtime configuration and enter the identical address for it in the TIA Portal hardware configuration. The controller then finds the address already correct and never issues the DCP write the runtime refuses. Use this route when the .cfg edit is not permitted on that machine; otherwise the enabled update is the direct fix.

Checks after the error clears #

  • The runtime log no longer shows the quoted line during connection establishment.
  • The device name assigned to the station matches the name in the TIA Portal device configuration character for character; the name is case-sensitive.
  • Online diagnostics show the intended address and no duplicate on the network.
  • The slot order and the input and output lengths in TIA Portal match the deployed CODESYS application. If you changed modules, regenerate the GSDML, delete the old device description and re-import, then compile and download.
  • Keep identity and module checks separate: correct addressing reaches the station, while a module mismatch still blocks usable process data.

If the diagnostics move on to a controller-side complaint, work the PROFINET connect errors between a controller and an S7-1200 next.

Working the case: a Raspberry Pi CODESYS device behind an S7-1200 #

Inputs, each with its source:

  • Roles: the S7-1200 is the IO controller, the CODESYS runtime on the Raspberry Pi is the IO device - your project.
  • The diagnosis line, verbatim from your runtime log: "IP-Change not enabled on specified interface! Enable update of IP-address in *.cfg -file".
  • The GSDML generated in CODESYS and imported into TIA Portal - your project.
  • The IP-update option and the interface binding - the runtime configuration documentation for the CODESYS PROFINET device.
  • Addresses, illustrative, standing in for the ones you read from online diagnostics: controller 192.168.0.1, device 192.168.0.10, subnet mask 255.255.255.0.

Rule in words: two stations exchange PROFINET frames only when each address, ANDed with the subnet mask, yields the same network number - and the controller must be allowed to write the device address, or find it already correct.

Arithmetic, octet by octet:

  • Controller: 192.168.0.1 AND 255.255.255.0 = 192.168.0.0, because 192 AND 255 = 192, 168 AND 255 = 168, 0 AND 0 = 0, 1 AND 0 = 0.
  • Device: 192.168.0.10 AND 255.255.255.0 = 192.168.0.0; it differs only in the last octet, and 10 AND 0 = 0.
  • Both results are 192.168.0.0: one subnet, no routing needed.
  • A device at 192.168.1.10 instead masks to 192.168.1.0, a different network.

Result and decision: with the update enabled, the runtime restarted and the device name matched, the connection attempt logs no refusal and cyclic data starts; the masked pair confirms these addresses need no correction. If the two masked results are not identical, stop - no PROFINET configuration will carry data until one address or the mask changes. If they match and the line still appears, the active file or the bound interface is wrong; fix that before touching the GSDML.

What this error is not #

Activation is not the problem. A missing or expired PROFINET license on the runtime stops the device from starting and shows its own license status; this message comes from a device that started fine. Read the license status only if the device itself fails to load, and use the vendor's licensing route, since nothing in this fault is fixed by reinstalling or working around it.

The red triangles are not two faults, and the GSDML is not the cure for this line. Re-importing the description addresses the module mismatch that surfaces after the address problem is gone.

Questions asked

Does 'IP-Change not enabled' mean my CODESYS PROFINET license is missing?

No. The message is a configuration refusal from the runtime, not a license diagnostic. A licensing problem shows up earlier: the PROFINET device does not start, or an explicit license status appears in the runtime. Check the license view only if the device fails to load at all; this error is fixed in the .cfg file either way.

Why does TIA Portal still list the device after this error?

The scan and the connection use different DCP services. The scan sends an identify request, which the station answers even while it refuses address writes, so the entry stays visible. Reading the listed station's name and address tells you which interface answered, which helps when you suspect the device is bound to the wrong adapter.

The error is gone but the red triangles remain. What is left?

The remaining marker is usually the I/O definition, not addressing. Compare the slot order and the input and output lengths in TIA Portal against the deployed CODESYS application, regenerate the GSDML if you changed modules, delete the old device description and re-import the new one, then compile and download again.

Can this be solved without editing the .cfg file?

Yes, by removing the need for an address write. Give the CODESYS device a fixed address in the runtime and enter the identical address for it in the TIA Portal hardware configuration; the controller then finds the address already correct and never attempts the DCP write that the runtime refuses.

Do I have to restart the CODESYS runtime after changing the file?

Yes. The running service reads its configuration at startup, so a saved file changes nothing until the documented restart runs. After it comes back, reconnect, then read the startup log before trusting the new setting: the quoted error line either reappears or it does not.

Keep reading

  • Troubleshooting

    Fix a Raspberry Pi PROFINET device not reachable in TIA Portal

    Discovery in TIA Portal's name-assignment dialog proves only that the Pi's link is visible. Reachability arrives when the CODESYS runtime lets the S7-1200 write the adapter address: set Adapter.0.EnableSetIpAndMask=1 under [SysSocket] in /etc/CODESYSControl_User.cfg, restart the runtime, and retry name assignment on a current runtime.

    Industrial networks

  • Troubleshooting

    Fix PROFINET device ID read errors in CODESYS scans

    A device that answers DCP discovery can still fail the later RPC-based identity read, so the scan reports it cannot read the ID number. Capture one failed scan with the controller diagnostic log and let the trace pick the fix: adapter binding, a filter on the path, a rule for the returning process, or a runtime mismatch.

    Industrial networks

  • Troubleshooting

    Fix the CODESYS duplicate controller IP error in ctrlX PROFINET

    The message means the controller side has no valid unique address: the Ethernet node is unbound (IP 0.0.0.0) and the drive never received its project address. Give the ctrlX CORE adapter a static, non-overlapping address, bind it at the Ethernet node with Browse, then select the scanned drive and press Auto-IP.

    Industrial networks