IMDHMIControls LibraryShop main store

How-to

How to change an S7-300 IP address without breaking the machine

PLC programming Published 6 min read

Short answer

The IP address belongs to one Ethernet interface — the CPU's integrated PN port or a CP 343-1 in the rack — and changes in one place: that interface's hardware configuration, downloaded alone from the STEP 7 project the machine was built with. Record the old address, mask and router first, then update every partner that stored the old address. If the only need is access from another network, a one-to-one NAT leaves the controller untouched.

On this page
  1. Decide what the address change is for
  2. Find the interface that owns the address
  3. Match the engineering software and keep a baseline
  4. Choose the new address, mask and router
  5. Make the change in the hardware configuration
  6. Bring the partners with you
  7. Verify, and know your way back
  8. When one-to-one NAT is the better fix
  9. Questions asked

The address on an S7-300 belongs to one Ethernet interface — the CPU's integrated PN port or a CP 343-1 in the rack — and it changes in one place: that interface's entry in the hardware configuration, edited in the STEP 7 project the machine was built with and downloaded on its own. Record the old address, mask and router first, move your engineering PC onto the new subnet before the download, then re-point every HMI, SCADA node and partner CPU that stored the old address. If the real need is only access from another network, a one-to-one NAT solves it without touching the controller at all.

Decide what the address change is for #

Three different problems get called "we need to change the IP address," and only two of them involve a download to the PLC. Separate them before opening any software:

Requirement What you change What stays untouched
Two devices use one address A unique address on the owning interface, same mask and router The program and the partners
The press moves to a different subnet Address, mask and router in the hardware configuration, then every partner The program
Another network must reach the press A one-to-one NAT rule at the network boundary The controller, completely

Commit to one branch now: a conflict is one new number on the same network; a subnet move is the full procedure in this article with the partner updates included; access from elsewhere is NAT, and the project stays closed.

Find the interface that owns the address #

An IP address identifies one interface, not the rack. On an S7-300 the cable lands in one of two places: the integrated PN port of a CPU such as the 315F-2 PN/DP, or a communications processor like the CP 343-1, Lean variant included, mounted in the rack. Read the order number off the module the cable is plugged into and compare it with the station identity you see online. The interface you edit is that module's; editing any other object in the project changes an address nothing uses.

Match the engineering software and keep a baseline #

A classic S7-300 project lives in STEP 7 V5. TIA Portal edits a subset of classic S7-300 CPUs and CPs, and which ones depends on the exact order numbers in your rack, so use the environment and version the machine was built in. For the role each one plays, read what STEP 7 is in a PLC project and which one you need. Mixing environments has a known failure mode: a STEP 7 V5.5 warning after TIA Portal wrote an S7-300 that a V5.5 project still manages.

  1. Work on a copy of the project and archive the original unmodified.
  2. If the CPU or blocks are protected, obtain the authorized credentials from the machine builder; defeating the protection is not an option.
  3. Record the current address, subnet mask and router from online diagnostics, plus the rack arrangement and the CPU operating state.
  4. With no original project and no protection, upload the station and open Hardware Config of the uploaded station. An upload does not recover comments, symbolic names or the builder's structure, so treat it as a working baseline, not documentation.

One boundary holds for the whole job: an address change is not permission to open the control program — on an F-CPU such as the 315F-2 PN/DP, edit the interface address and nothing else.

Choose the new address, mask and router #

Take the address from the site network plan, not from a ping test: a silent address can belong to a device that is powered down, disconnected or filtered. The mask decides which destinations are local, and the router is the exit for everything else — a complete IP setup is more than address and mask, on a PLC interface as on any engineering device you configure on the plant network.\n

Worked example: press moving from 192.168.10.0 to 192.168.30.0 #

Today the interface runs 192.168.10.20 with mask 255.255.255.0 and router 192.168.10.1; the engineering PC sits at 192.168.10.100, an HMI and a SCADA server talk to the press, and a second CPU holds an S7 connection to it. The target plan is 192.168.30.20, mask 255.255.255.0, router 192.168.30.1.

Apply the mask to both endpoints:

  • 192.168.10.100 AND 255.255.255.0 = 192.168.10.0 — the PC's subnet
  • 192.168.30.20 AND 255.255.255.0 = 192.168.30.0 — the press's new subnet

192.168.10.0 and 192.168.30.0 are different networks, so the PC loses its direct path the moment the interface restarts. Decision: set the PC to 192.168.30.100 before the download. The SCADA server at 172.16.5.40 also fails the local test, since 172.16.5.0 does not equal 192.168.30.0; its traffic is routed, which means the interface's router field must read 192.168.30.1 or SCADA dies while the local HMI keeps working.

Make the change in the hardware configuration #

  1. With the press stopped in an approved maintenance state, open the project copy and its Hardware Config.
  2. Select the owning interface and change only the address fields: the address, and where the plan says so, the mask and router.
  3. Save and compile; clear reported errors before going further.
  4. Review what the download will transfer. Module or parameter differences beyond your three fields mean the baseline does not match the machine — stop, because the download would carry those differences with it.
  5. Download the hardware configuration alone, not the program blocks, and confirm the target station identity in the prompts.
  6. In TIA Portal, select the target device by its MAC address and load the hardware configuration; the address is then saved retentively.
  7. If the device answers on no address at all, PRONETA or PST on a local PC can set a temporary address and router information so you can connect and load the permanent configuration.

Bring the partners with you #

Changing the controller-side address updates nothing stored elsewhere, so plan these edits before the stop:

  1. List every device holding the old address: the HMI, the SCADA server, the peer CPU, and any spare engineering laptop still configured for the old subnet.
  2. Point the HMI and SCADA driver nodes at 192.168.30.20.
  3. For the S7 connection defined in the peer's project, right-click the connection, choose Properties → Partner → Address details, enter the new IP, then compile (rebuild all) and download to that partner.
  4. If the SCADA station then reaches some PLCs and not others, its own adapter, route or node list is the suspect — the same class of fault as a SCADA PC station that reaches only one S7-1500.
  5. Run one machine cycle and watch the alarm list before calling the job done.

Verify, and know your way back #

  1. Go online at 192.168.30.20 and confirm diagnostics show the interface there.
  2. Confirm each partner: live HMI values, flowing SCADA data, the peer connection up.
  3. Archive the updated project beside the recorded old values in the machine documentation.
  4. The way back is the baseline: reload the saved hardware configuration with 192.168.10.20 and the partners' old entries — the same download, minutes of work, which is why the baseline exists.

When one-to-one NAT is the better fix #

One-to-one NAT maps a single internal address to a single external address at the network boundary. The press keeps 192.168.10.20, its mask and its router; devices on the far network connect to the external address, and the boundary translates. Nothing is downloaded, no partner is re-pointed, and the machine runs exactly the configuration its builder delivered.

Check the traffic before committing: sessions that rely on local discovery, carry addresses inside their application data, or need Layer 2 adjacency on the wire need attention; a plain TCP client session to one address does not.

The decision: access from another network is the requirement and the press stays on its subnet — use the NAT. The press physically moves subnets, or two devices fight over one address — change the interface, not the network.

Questions asked

Can I change the S7-300 address without the original STEP 7 project?

Yes, when the CPU is not protected: upload the station, open Hardware Config of the uploaded station, change the address on the owning interface, and perform the hardware download. Remember that an upload does not recover comments, symbolic names or the builder's project structure, so archive the uploaded station as a baseline and keep asking for the original files.

Why did I lose the PLC immediately after the download?

Your engineering PC is still on the old subnet. With mask 255.255.255.0, a PC at 192.168.10.100 and a PLC at 192.168.30.20 land on different subnets, so no direct path exists. Set the adapter into the new subnet, 192.168.30.100 in the worked example, or route to it, then go online again.

Is a failed ping enough to prove an address is free?

No. The owner may be powered down, disconnected, or configured not to answer. Reserve the address through the site network records before you load it into the interface; a duplicate discovered after the download costs a second stop of the press.

When is one-to-one NAT the better answer?

When the press keeps its subnet and the only requirement is access from a different network: one internal address is mapped to one external address at the boundary and nothing is downloaded to the PLC. Check traffic first that relies on local discovery or carries addresses inside its application data.

Do the HMI and SCADA update themselves after the change?

No. Everything that stored the old address keeps using it until you edit that device: driver nodes on the HMI and SCADA stations, and the partner entry of every S7 connection, which lives under the connection's Partner address details and needs a rebuild-all compile plus a download to the partner.

Keep reading

  • Troubleshooting

    Fix STEP 7 V5.5 warning after TIA Portal wrote an S7-300

    Download the hardware configuration and blocks from a freshly created SIMATIC Manager project and the warning clears; a CPU 313C-2DP recovered exactly this way. Formatting the MMC with the mode switch (MRES held roughly 9 s until the STOP LED stays lit) does not clear the TIA-written state, so use it only when you also want the card empty.

    PLC programming

  • How-to

    How to get the right Micro/WIN version for an S7-200 CPU 224

    STEP 7 V5.4 cannot program an S7-200 CPU 224. The tool for that CPU is STEP 7-Micro/WIN, whose final service packs are V4.0 SP8 and SP9, downloadable from Siemens Industry Online Support entry 58523240 alongside the S7-200 System Manual.

    PLC programming

  • Explainer

    What STEP 7 is in a PLC project, and which one you need

    STEP 7 is the engineering software you use to program, configure, diagnose and download to SIMATIC PLCs — a workstation tool, not a part of the PLC itself. SIMATIC Manager, also called STEP 7 Classic, configures S7-300 and S7-400 CPUs; STEP 7 inside TIA Portal configures S7-1200 and S7-1500. Read the CPU family from the module label or the existing project, open the matching environment, and confirm the project's hardware configuration matches the installed CPU before you edit or download.

    PLC programming