Configuring Sinumerik 840D sl X130 for Static IP and S7 Access

David Krause11 min read
Industrial NetworkingSiemensTutorial / 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

The Sinumerik 840D sl NCU (Numerical Control Unit) exposes a small set of Ethernet interfaces whose default roles are not always obvious from the field manual. The most common confusion is between:

  • X120 – the company/plant network port (fixed IP, used for HMI, server, and external S7 traffic).
  • X130 – the factory/customer network port that defaults to DHCP client mode and is intended for MES/ERP uplinks.
  • X127 – the service/diagnostic port (192.168.215.1 fixed) used for PG/PC commissioning.

Plant engineers frequently need to read data from the integrated PLC Data Blocks of a 840D sl (a SIMATIC S7-300 compatible CPU) from a remote PC located on the factory network. The typical installed reference design is a SIMATIC S7-300 read over a CP 343-1 with a static IP. When the same pattern is ported to a 840D sl, the engineer must decide which Ethernet interface to use and how to reach the integrated PLC.

This article provides a field-proven procedure to:

  1. Convert the X130 port into a static-IP interface equivalent to X120.
  2. Open the firewall ports required for S7 communication (TCP/102), SSH (TCP/22), and VNC (TCP/5900).
  3. Route an external PC through X130 to the integrated PLC so the existing S7-300 read tool (LibNoDave, S7net, Snap7, or STEP 7) can address DBs as if the NCU were a standard S7-300 station.
Important: The integrated PLC in a 840D sl is a software PLC running on the NCU. It is logically equivalent to a SIMATIC S7-300 with a PROFINET/PROFIBUS-capable CP. Any S7 client (OPC server, SCADA, custom .NET/Java application) that can talk ISO-on-TCP to an S7-300 can be reused on a 840D sl once the network is properly configured.

Prerequisites

  • Physical access to the NCU and an Ethernet patch cable.
  • WinSCP or any SCP/SFTP client (PuTTY's PSFTP, FileZilla in SCP mode).
  • SSH credentials for the NCU (default user manufact on legacy systems; on NCU 7x with newer firmware, the user must be activated and password set via SINUMERIK Operate).
  • BASESYS.INI template from the Siemens commissioning documentation or extracted from an existing system under /user/system/etc/templates.
  • For the S7 client side: a working S7-300 read tool (CP 343-1 reachable on a known IP) that you intend to retarget to the 840D sl X130 address.
  • NCU fully powered off (not just NCK reset) – changes to BASESYS.INI only take effect on cold start.

Network Architecture and Addressing

Default Addressing on NCU 710/720/730

Interface Role Default Address Notes
X120 Plant / company network 192.168.214.1 / 24 Static, runs a DHCP server. Reachable by HMIs and TIA Portal.
X130 Customer / factory network DHCP client By default obtains address from a DHCP server on the customer LAN. Cannot be assigned a static IP via HMI in older firmware.
X127 Service / commissioning 192.168.215.1 / 24 Fixed; do not connect to plant network.

The limitation cited in the field – that X130 cannot be assigned a static IP – is true for the HMI-side network setup dialog in NCK firmware versions prior to 4.5. From NCK 4.5 SP2 onwards, the HMI menu Commissioning > Network > TCP/IP Diagnostics exposes a checkbox for static IP on X130. On older systems, or when the HMI dialog is locked, the only reliable route is the text-based BASESYS.INI file.

BASESYS.INI Layout and Required Parameters

The BASESYS.INI file is parsed by the Linux-based system software of the NCU at boot. It contains sections for internal networks, the HMI, the integrated PLC, and the external X130 port. The relevant section for this configuration is [External].

Minimal working configuration:

; BASESYS.INI – Sinumerik 840D sl
; /user/system/etc/basesys.ini

[Internal]
IP = 192.168.214.1

[External]
IP = 192.168.204.2
NetMask = 255.255.255.0
Gateway = 192.168.204.1
DHCPClient = 0

[Firewall]
FirewallOpenPorts = TCP/22 TCP/5900 TCP/102

Parameter Reference

Key Section Type Description
IP External IPv4 dotted quad Static IP assigned to X130. Must be inside the customer plant subnet and free of duplicates.
NetMask External dotted quad Subnet mask matching the customer LAN (commonly 255.255.255.0).
Gateway External IPv4 Default gateway of the customer LAN. Required if the S7 client is in a different VLAN.
DHCPClient External 0 or 1 Set to 0 to disable the DHCP client and force the static IP. Default is 1.
FirewallOpenPorts Firewall string Whitespace-separated list of TCP ports to whitelist. Add TCP/102 for ISO-on-TCP S7 access.
File-name case: The target file on the NCU must be named basesys.ini (lowercase) under /user/system/etc/. If you upload a file named BASESYS.INI, the boot script will silently ignore it and the X130 will revert to DHCP. Many engineers lose hours to this case-sensitivity issue.

Step-by-Step Configuration

Step 1 – Capture the Original Template

Connect a service PC to X127 using a direct patch cable. Set the service PC to 192.168.215.2 / 24. Open WinSCP and start a new SCP session:

  • Host: 192.168.215.1
  • User: manufact
  • Password: (system-specific, default SINUMERIK on legacy images)
  • Protocol: SCP

Download the existing /user/system/etc/basesys.ini and /user/system/etc/templates/basesys.ini.tpl to the local PC. The template is your reference for keys not documented in public manuals.

Step 2 – Edit the INI File

Open basesys.ini in a plain-text editor (Notepad++ on Windows, vim on Linux). Make the changes shown in the Minimal working configuration block above. The three critical edits are:

  1. Add the [External] section with a static IP, netmask, and gateway that match the customer LAN.
  2. Set DHCPClient = 0 to disable DHCP on X130.
  3. Extend FirewallOpenPorts to include TCP/102 (S7), TCP/22 (SSH), and TCP/5900 (VNC) – omit the last two if remote desktop is not required.
Do not touch the [Internal] block, the PLC section, or HMI address lines unless you fully understand the consequences – the HMI panel and the integrated PLC lose connection if the internal subnet is altered.

Step 3 – Upload the File via WinSCP

Using the same WinSCP session, navigate to /user/system/etc/ on the right pane. Drag the edited basesys.ini from the local PC to the NCU. The destination filename must be exactly basesys.ini.

On older firmware (pre-4.5) the transfer may appear to fail because the NCU overlay filesystem expects a .INI extension to commit. The accepted field procedure is:

  1. Upload as basesys.ini (lowercase).
  2. If the boot log reports "config not applied", re-upload as BASESYS.INI and reboot – on some NCU 710/720 images both case forms are accepted by the parser but only the lowercase file is propagated to the active configuration.

Step 4 – Full Power Cycle

Shut the machine down via the standard SINUMERIK Operate sequence, then open the main cabinet and turn off the 24 V DC supply to the NCU. Wait at least 30 seconds to allow the PLC's persistent variables to be flushed to flash, then restore power.

NCK reset is not sufficient. An MRES or NCK reset re-initializes the control kernel but does not re-read basesys.ini because the Linux userspace that owns the network stack is not restarted. A full cabinet power-down is mandatory.

Step 5 – Verify Network State

From the service PC on X127, open an SSH session (PuTTY, port 22) and execute:

ifconfig eth1
ip route show
cat /user/system/etc/basesys.ini | grep -A4 External

The X130 interface (eth1 on most NCU variants) must now show the static IP from the INI file and the default route through the configured gateway. From a PC on the customer LAN, ping the new X130 IP; the reply confirms L3 reachability.

Step 6 – Route the S7 Client to the Integrated PLC

The integrated PLC is reachable at the NCU's X120 subnet (default 192.168.214.1) from within the Linux userspace. From the customer LAN perspective, an S7 client connecting to 192.168.204.2:102 arrives at the NCU's external interface, traverses the internal Linux routing, and reaches the PLC at 192.168.214.1:102. No additional route table changes are required when the default gateway and netmask are correct.

Configure the S7 client (LibNoDave, S7net, Snap7, or STEP 7) as follows:

Parameter Value
Partner IP 192.168.204.2 (the X130 static IP)
Port 102 (ISO-on-TCP)
Rack 0
Slot 2 (integrated PLC of 840D sl)
Connection type PG/OP or OP connection (S7 function group)

For rack 0, slot 2 the S7 client can issue standard DB reads just as on a real S7-300. DB numbers 1–255 and 1000–3999 are typically defined by the machine builder; DB 9900–9999 are reserved by Siemens for system data.

Verification Checklist

  1. From a customer-LAN PC, ping 192.168.204.2 returns 0 % loss.
  2. telnet 192.168.204.2 102 opens a TCP session (blank screen with cursor) – confirms firewall is open.
  3. STEP 7 "Accessible Nodes" lists the NCU under the new IP with rack 0 / slot 2.
  4. The existing S7-300 read tool, retargeted to 192.168.204.2, reads the same DBs that were previously read from the S7-300 CP 343-1.
  5. Cyclic read throughput (≥ 100 ms scan) holds for at least 1 hour without connection drops – confirms firewall and TCP-keepalive are stable.

Troubleshooting Matrix

Symptom Probable Cause Corrective Action
X130 still shows 169.254.x.x after reboot File uploaded as BASESYS.INI (uppercase) on a parser that only accepts lowercase Rename to basesys.ini and power-cycle again
TCP/102 connection refused FirewallOpenPorts missing TCP/102 Add the port to BASESYS.INI and reboot
Ping works, S7 read times out Slot mismatch – 840D sl PLC is on slot 2, not slot 3 as on S7-300 Change S7 client slot to 2
Configuration lost after NCU software update BASESYS.INI is overwritten by the update image Re-upload after every CF card update; export via WinSCP and keep a backup
HMI panel shows "Connection to PLC failed" Internal IP block changed accidentally Restore [Internal] IP = 192.168.214.1
IP conflict on customer LAN Static IP already in use Pick another free address and update BASESYS.INI
WinSCP rejects the password SSH user not activated in newer NCK firmware On SINUMERIK Operate, enable service shell and set a password for the manufact user

Alternative: HMI-Based Configuration (NCK 4.5+)

On NCK software version 4.5 SP2 and later, the TCP/IP diagnostics screen is available without an INI edit. Path:

  1. Commissioning > Network > TCP/IP Diagnostics.
  2. Select the External (X130) interface.
  3. Disable DHCP and enter IP, subnet mask, and gateway.
  4. Open the Firewall tab and add TCP/102, TCP/22, and TCP/5900 as required.
  5. Press Apply & Restart. The HMI prompts for a full NCU restart.

The HMI method writes the same basesys.ini on the flash; it is functionally equivalent to manual editing. The CLI/INI route is still preferred for headless machines, retrofit projects, and reproducible factory acceptance tests because the file can be version-controlled.

Security Considerations

  • Opening TCP/22 (SSH) and TCP/5900 (VNC) to the customer network exposes the NCU to credential-stuffing attacks. Limit exposure by binding the S7 client to a dedicated VLAN or by using a stateful firewall in front of the X130 port.
  • Change the default manufact password before commissioning. Siemens NCK 4.7+ enforces a non-default password policy.
  • If the S7 client only requires read access, configure the S7 connection on the integrated PLC as a PUT/GET only connection (PG/OP, S7 function group "READ") so write operations are blocked at the PLC side.
  • Disable the FTP server on X130 unless explicitly required for CF card updates. The default BASESYS.INI template includes a [FtpServer] section – set Enabled = 0 when not in use.

Long-Term Maintenance Notes

  • Backup basesys.ini after every change. Siemens service reports indicate that >70 % of "lost network configuration" cases are due to a CF card replacement that did not preserve the user partition.
  • Document the static IP in the plant's IP-address-management (IPAM) tool before commissioning to prevent collisions.
  • Track the NCK software version in the asset record. A jump from 4.4 to 4.7 resets some defaults; verify the INI after any major version upgrade.
  • For redundant networks, NCU 730.2 and higher support X131 as a second external port. Configure both ports with separate [External] blocks named [External1] and [External2] in BASESYS.INI.

FAQ

Can the Sinumerik 840D sl integrated PLC be addressed as a standard S7-300 from the customer network?

Yes. The integrated PLC exposes the ISO-on-TCP S7 interface on TCP/102. Once X130 is configured with a static IP and the firewall port is opened, any S7-300-compatible client (LibNoDave, Snap7, S7net, STEP 7) can read and write Data Blocks using rack 0 and slot 2.

Why does my BASESYS.INI change have no effect after an NCK reset?

Because the INI file is consumed by the Linux userspace network stack, not by the NCK. A full power-down of the NCU (24 V DC off for at least 30 s) is required. An NCK reset or MRES re-initializes only the motion kernel and ignores the file.

Which file extension does the NCU accept – basesys.ini or BASESYS.INI?

The active parser accepts the lowercase basesys.ini on the production image. Some older NCU 710/720 images also accept BASESYS.INI but propagate only the lowercase version. Always upload as basesys.ini to /user/system/etc/ and verify with a reboot.

What ports must be opened in the X130 firewall to allow S7 communication?

TCP/102 for ISO-on-TCP S7 read/write. Add TCP/22 for SSH access (WinSCP, command line) and TCP/5900 for VNC remote desktop if those services are required. No UDP port is needed for plain S7 communication.

Is the X130 static IP still required on NCK 4.7 and newer?

No – from NCK 4.5 SP2 onwards the HMI menu Commissioning > Network > TCP/IP Diagnostics allows static IP configuration directly. However, the underlying basesys.ini is still the source of truth, so the CLI procedure described above remains valid and is preferred for reproducible commissioning.

Back to blog