Configuring KepwareEX for S7-300 CPU 315-2 DP via CP 343-1

David Krause8 min read
S7-300SiemensTutorial / 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: Architecture and Communication Path

The CPU 315-2 DP (6ES7315-2AH14-0AB0 and related variants) does not expose a native industrial Ethernet interface for OPC traffic. The standard field architecture routes data through a CP 343-1 Advanced (6GK7343-1GX31-0XE0 or current 6GK7343-1GX30-0XE0) communications processor mounted on the S7-300 backplane. The CP exchanges data with the CPU through the backplane bus, which means it has transparent read/write access to all CPU registers: inputs (I), outputs (Q), markers (M), timers (T), counters (C), and data blocks (DBx).

Because the CP 343-1 Advanced sits on the backplane, the OPC link does not consume the CPU's MPI/DP port. The MPI cable between the CP and the CPU is therefore optional in this topology, and the production programming port on the X1 MPI/DP connector of the CPU remains free for STEP 7 engineering traffic.

The full data path is:

  1. KepwareEX Siemens TCP/IP Ethernet driver initiates an ISO-on-TCP (RFC 1006) connection to the CP 343-1 Advanced over Ethernet.
  2. The CP routes the S7 communication (Put/Get) frames over the backplane to the CPU 315-2 DP.
  3. Data block contents, peripheral I/O, and bit memory are exposed as OPC tags to client applications (HMI/SCADA, historians, MES).

Prerequisites: Hardware, Software, and Licensing

Component Specification Notes
CPU SIMATIC S7-300 CPU 315-2 DP (6ES7315-2AH14-0AB0) Firmware V2.x or higher recommended for S7 communication
CP CP 343-1 Advanced (6GK7343-1GX30-0XE0) 1 x RJ45 10/100 Mbps, supports S7 communication, ISO-on-TCP, TCP, UDP
Ethernet switch Managed or unmanaged 100 Mbps CP and OPC server PC on the same subnet
STEP 7 SIMATIC Manager V5.5 SPx or TIA Portal V14+ For CP and PC Station configuration
OPC server KepwareEX KEPServerEX V5.x or V6.x Siemens TCP/IP Ethernet driver licensed
Driver manual Siemens TCP/IP Ethernet Driver Manual (V5) Authoritative reference for driver parameters
The CP 343-1 Lean variant (6GK7343-1CX10-0XE0) does not support S7 communication and cannot be used with the KepwareEX Siemens TCP/IP Ethernet driver. Confirm you have the Advanced or 1EX30 (1 port) variant.

Network Topology and Physical Connections

The recommended topology is a flat Layer 2 Ethernet segment. Use shielded Cat 5e or higher cabling terminated to TIA-568A/B and ground the shield at the cabinet entry to comply with IEC 61131-2 industrial immunity requirements.

Suggested IP addressing for a development cell:

Device IP Address Subnet Mask Default Gateway
CP 343-1 Advanced 192.168.0.10 255.255.255.0 192.168.0.1
OPC server PC (KEPServerEX) 192.168.0.20 255.255.255.0 192.168.0.1
STEP 7 engineering station 192.168.0.30 255.255.255.0 192.168.0.1

Reserve these addresses in the router or DHCP scope to prevent address drift. A link-local or isolated subnet is preferred when bridging to the plant network.

CP 343-1 Advanced Network Configuration in STEP 7

  1. Open the SIMATIC Manager project containing the S7-300 station.
  2. Open HW Config and select the CP 343-1 Advanced from the catalog (SIMATIC 300 > CP 300 > Industrial Ethernet > CP 343-1 Advanced).
  3. Insert the CP in slot 4 of the rail. STEP 7 will prompt for the IP address; enter 192.168.0.10 with subnet 255.255.255.0.
  4. Double-click the CP to open Properties - Ethernet Interface.
  5. Select the Connections tab and ensure the CP has the connection type S7 Connection enabled. CP 343-1 Advanced supports both S7 (Put/Get) and open TCP/UDP sockets.
  6. Open NetPro to define the partner connection. Insert a new connection of type S7 connection and select the OPC partner (which will be defined on the PC Station side).
  7. For unsolicited/read-only polling with KepwareEX, configure the CP as the server (passive) and the PC Station as the client (active).
In the CPU's Protection tab, the Allow access via PUT/GET communication from remote partner option must be enabled. Without this flag, the S7 read services from KepwareEX are rejected by the CPU security layer.

PC Station Configuration in STEP 7

The OPC server PC is represented in STEP 7 as a PC Station with the KEPwareEX driver mapped to a software PLC slot. This is required even when the driver itself does not participate in STEP 7 routing - the configuration establishes the S7 connection endpoint referenced by NetPro.

  1. From the KepwareEX help: Step Two - Configuring the Server and PC Station, in the project tree, expand the PC Station that represents the OPC server.
  2. Insert a KEPwareEX application in slot 1 of the PC Station.
  3. Insert the IE General (CP 1613 / Softnet) module in slot 2 and assign it IP 192.168.0.20.
  4. Open NetPro on the PC Station and create an S7 connection to the S7-300 station's CP 343-1 Advanced. The local endpoint is the IE General, the partner is the CP at 192.168.0.10.
  5. Compile and download the PC Station configuration so the S7 connection becomes available to the OPC server.

KepwareEX Channel Configuration

  1. Launch the KEPServerEX Configuration tool and click Add Channel.
  2. Select the Siemens TCP/IP Ethernet driver. Per the Siemens TCP/IP Ethernet Driver Manual, the channel represents a logical grouping of devices that share a single network adapter.
  3. Set channel name, leave the default network adapter selection, and choose Optimized for best latency when the SCADA polling is the dominant traffic. Choose Optimized for high throughput when large bulk reads dominate.
  4. Confirm the port number: KepwareEX defaults to ISO-on-TCP port 102, which is the standard S7 communication port used by the CP 343-1.

Device Configuration in KepwareEX

  1. Right-click the channel and select Add Device. Choose the S7-300 device model or use the generic S7-300/400/1200/1500 model supported by the TCP/IP driver.
  2. Enter the Device ID as the CP 343-1 IP: 192.168.0.10. For a redundant CP, use a comma-separated primary/failover pair.
  3. Set the CPU Slot to 2 for the 315-2 DP, matching the slot number configured in HW Config.
  4. Set Connection Timeout to 4000 ms and Request Timeout to 1000 ms for the first commissioning run; tighten after stability is proven.
  5. Save the configuration. The driver opens an ISO-on-TCP connection to port 102 of 192.168.0.10 and negotiates the S7 communication context with the CP.

Tag Address Mapping for S7-300 Data Blocks

The KepwareEX Siemens TCP/IP driver uses symbolic or absolute addresses. The most reliable configuration for a CPU 315-2 DP project is absolute addressing because the CPU's symbol table is not always loaded on the OPC server.

CPU Object KepwareEX Address Syntax Example Data Type
Input bit I0.x I0.0 Boolean
Output bit Q0.x Q0.7 Boolean
Flag bit Mx.y M10.3 Boolean
DB bit DB<n>.DBX<byte>.<bit> DB10.DBX2.0 Boolean
DB byte DB<n>.DBB<byte> DB10.DBB4 Byte
DB word DB<n>.DBW<byte> DB10.DBW6 Word (UInt16)
DB dword DB<n>.DBD<byte> DB10.DBD8 DWord (UInt32)
DB real DB<n>.DBD<byte> with FLOAT type DB20.DBD0 as Float Float
Byte addressing inside a DB is byte offset, not word offset. DBW6 is bytes 6 and 7. Mismatched offsets are the most common commissioning defect.

Verification and Diagnostics

  1. Open the KEPServerEX Quick Client and add a representative tag such as DB10.DBW0.
  2. Verify that tag quality changes from Bad to Good within one scan cycle after the driver connects.
  3. In Server Events (View > Server Events), confirm the connection message Device 192.168.0.10 connected successfully appears.
  4. From the OPC server PC, run telnet 192.168.0.10 102. A successful TCP connect confirms the ISO-on-TCP port is reachable; close the session with Ctrl+] then quit.
  5. From STEP 7, open Online > Accessible Nodes over the PC Station's IE General and verify the S7-300 station appears with the partner IP 192.168.0.10. This proves the S7 connection configured in NetPro is live.
  6. Force a value from the Quick Client into a DB tag and observe the change in the STEP 7 VAT table or in the CPU's online monitor to confirm bidirectional flow.

Alternative: Accon-NetLink-PRO Compact Adapter

For sites where the CP 343-1 Advanced is unavailable or where the backplane slot is occupied, an external MPI/Ethernet adapter is a field-proven alternative. The Accon-NetLink-PRO Compact from DELTALOGIC bridges the S7-300/400 MPI/DP port to Ethernet and presents an ISO-on-TCP endpoint to the KEPServerEX driver. The driver connection string is the adapter's IP; the S7 routing is performed by the adapter firmware. Operators report 100% functional read/write coverage for flag, DBX, DBW, and DBD areas, including symbolic access to instance DBs.

Use the Accon-NetLink-PRO Compact when:

  • The CP 343-1 Advanced slot is in use by a higher-level SCADA connection.
  • The PLC is in a remote cabinet with no available backplane slot.
  • The MPI port of the CPU 315-2 DP is the only available physical connection.

Troubleshooting Matrix

Symptom Probable Cause Corrective Action
Tag quality Bad, device shows Disconnected TCP port 102 blocked or wrong IP Verify telnet <CP IP> 102; confirm IP in KepwareEX device matches CP
Tags read zero but quality is Good CPU protection: PUT/GET disabled Enable Allow access via PUT/GET communication from remote partner in CPU Properties > Protection
Connection established, then drops every 30 s Wrong CPU slot in KepwareEX device Set CPU Slot to the slot number of the 315-2 DP in HW Config (default 2)
Communication OK, DB values return garbage Byte/word offset mismatch Re-check DBW/DBD offsets against the STEP 7 DB definition; remember DBD is byte address, not dword index
NetPro download fails on PC Station OPC server service running, port locked Stop KEPServerEX service before PC Station download
Performance below 50 tags/s Default request size too small Increase Maximum Tags per Request in device settings and enable Use Block Reads for contiguous DB areas

FAQ

Can the KepwareEX Siemens TCP/IP Ethernet driver connect directly to the MPI port of the CPU 315-2 DP?

No. The TCP/IP Ethernet driver speaks ISO-on-TCP (RFC 1006) on port 102. For a direct MPI link, use the dedicated Siemens S7 MPI driver with an MPI/PC adapter such as the Accon-NetLink-PRO Compact.

Do I need to configure an S7 connection in NetPro for the KepwareEX driver to work?

Yes. The PC Station must contain an S7 connection in NetPro that points to the CP 343-1 Advanced, even when the driver uses its own ISO-on-TCP stack. This connection provides the S7 routing context the CP uses to authorise read/write services.

What is the correct CPU slot number for the 315-2 DP in KepwareEX?

Slot 2. This is the position of the CPU on the S7-300 rail in HW Config. Mismatched slot values are the most common cause of intermittent disconnects after a successful initial connect.

Can I use the CP 343-1 Lean instead of the Advanced for KepwareEX connectivity?

No. The CP 343-1 Lean (6GK7343-1CX10-0XE0) does not support S7 communication services. Use the CP 343-1 Advanced (6GK7343-1GX30-0XE0) or CP 343-1 (6GK7343-1EX30-0XE0) which support S7 server functions.

What port and protocol does the KepwareEX Siemens TCP/IP driver use against the CP 343-1?

ISO-on-TCP (RFC 1006) on TCP port 102. This is the same transport used by STEP 7 and WinCC, so the CP firewall and connection table treat the driver as a standard S7 client.

Back to blog