CP 1616 PROFINET SDK: PC-Based IO Controller Development Guide

David Krause11 min read
Industrial NetworkingSiemensTechnical Reference
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 Siemens CP 1616 is a PCI-form-factor communications processor designed to connect a Windows-based PC station to PROFINET IO networks at full real-time performance. The card is built around the ERTEC 400 (Enhanced Real-Time Ethernet Controller) ASIC and integrates a 4-port real-time switch, allowing it to operate as a PROFINET IO Controller, IO Device, or as part of an IO routing topology. When paired with the CP 1616 SDK (also referred to as the PROFINET IO Development Kit or DK-16xx), engineers can build custom PC applications that read and write PROFINET process data without using a SIMATIC PLC as the controller.

This reference covers hardware specifications, SDK architecture, the Controller-versus-Device capability question, IO routing with the CP 1604/CP 1616/CP 1616 onboard/CP 1626 family, and the practical path for a C/C++ or .NET developer to build a PC-side PROFINET IO Controller application that exchanges cyclic and acyclic data with PROFINET IO Devices and S7 controllers.

CP 1616 Hardware Specifications

Parameter Specification
Article number (typical) 6GK1 161-6AA00
Form factor PCI card, 32-bit
PCI bus 33/66 MHz, 3.3 V / 5 V universal
ASIC ERTEC 400
Protocol PROFINET IO (RT and IRT)
Switch 4-port real-time switch (RJ45)
Operating modes PROFINET IO Controller, PROFINET IO Device
Supported OS (legacy) Windows XP/7/Server with SIMATIC NET PC software
Configuration tool SIMATIC STEP 7 / TIA Portal with NCM PC / SIMATIC NET
SDK package DK-16xx PN IO Development Kit (controller or device variants)

The card is documented in the Siemens manual "CP 1604 / CP 1616" (entry ID 62607620). The CP 1616 onboard variant is the same chipset integrated on a SIMATIC PC motherboard and behaves identically from the SDK and configuration perspective.

PROFINET IO Architecture: Controller vs Device

Before writing any code, decide which side of the PROFINET IO relationship the PC will occupy. The CP 1616 is one of the few PC cards that supports both roles, but the SDK packages are role-specific.

PROFINET IO Controller (PC as master)

The PC runs the PROFINET IO Controller stack. It owns the AR (Application Relationship) to every configured IO Device, opens the CR (Communication Relationship), and runs the cyclic data exchange. Typical use case: a Windows service collecting process data from distributed IO Devices (ET200S, ET200SP, frequency drives with PROFINET, etc.) and exposing it to a higher-level MES, SCADA, or analytics layer.

PROFINET IO Device (PC as slave)

The PC presents itself as one PROFINET IO Device to a single external Controller (typically an S7-1500, S7-1200, or another CP 1616 in Controller mode). Only one Controller is allowed per IO Device on PROFINET. Typical use case: a Windows HMI/visualization box or a custom sensor node that exposes a defined set of slots/subslots to the S7 CPU.

Restriction: A single PROFINET IO Device can only be owned by one Controller. If the goal is to collect data from multiple S7 PLCs simultaneously, the PC must run as an IO Controller, or you must use S7 communication (S7-Protocol / OPC UA server) instead of PROFINET IO Device.

SDK Components and Development Environment

The PROFINET IO SDK for CP 1616 (shipped as the DK-16xx development kit) provides the libraries, header files, configuration tools, and sample projects required to write a user-mode PROFINET IO application. The components include:

  • PN IO controller library (libpnio.so / PNIOdll.dll) - the C API used to start/stop the stack, register the IO Device list, and handle cyclic record read/write callbacks.
  • PN IO device library - the corresponding API for IO Device mode (separate package).
  • IODD importer and GSDML parser - generates C structures matching the slot/subslot layout of each configured IO Device.
  • SIMATIC NET configuration import - the SDK consumes the XML produced by STEP 7 / TIA Portal / NCM PC to learn the device list, slot mapping, and exchange intervals.
  • Diagnostic and tracing tools - the same tools used internally by the SIMATIC NET IO Controller service, including the PROFINET IO trace viewer.

The SDK is delivered as a Windows DLL plus a Linux variant for the ERTEC 400 evaluation environment. The supported compiler toolchains are Microsoft Visual C++ (Windows) and GCC (Linux). For .NET integration, P/Invoke wrappers around the C API are the standard approach.

Prerequisites for Development

  1. Hardware: CP 1616 (or CP 1604 / CP 1616 onboard / CP 1626) installed in a PC station, with at least one free RJ45 port connected to the PROFINET line.
  2. Driver layer: SIMATIC NET PC software installed and licensed (the IO Controller or IO Device license is keyed to the CP serial number).
  3. Configuration: The PC station created in STEP 7 V5.x or TIA Portal with the CP 1616 added as a PROFINET interface, and the target IO Devices imported from GSDML files and assigned to the CP.
  4. SDK: DK-16xx PN IO Development Kit (Controller or Device edition matching the role chosen in step 3).
  5. Toolchain: Visual Studio 2010/2013/2015/2019 (32-bit target recommended) for C/C++ development.
  6. Network: All devices on the same IP subnet, device names assigned (PROFINET uses device-name-based identification, not just IP) via the Topology Editor or PST (Primary Setup Tool).

Step-by-Step: Building a CP 1616 IO Controller Application

  1. Create the PC station in TIA Portal. Add a PC station, drag a CP 1616 onto the PCI slot, and assign a PROFINET interface with a fixed IP (e.g., 192.168.0.10) and a station name (e.g., "PC-CTRL-01"). The PROFINET device name is mandatory for AR establishment.
  2. Add IO Devices. Import the GSDML of each field device, drop them on the PROFINET subnet, assign each a unique name and IP, and assign them to the CP 1616 as the IO Controller.
  3. Configure slots and modules. Pull the input/output modules into the slot rack of each IO Device. The IO Controller SDK will later expose the I/O as typed structures based on this configuration.
  4. Compile the PC station and export the configuration XML (TIA Portal: PC station > Export). The SDK loader reads this XML to discover devices, modules, and the send clock.
  5. Initialize the SDK in code. Call PNIO_Init() with the path to the configuration XML, then PNIO_Start() to bring the ARs online. Typical initialization sequence:
    #include "pnio_api.h"
    PNIO_UINT32 result;
    PNIO_CP_ID cpId = PNIO_CP_ID_CP1616;
    result = PNIO_Init("C:\\proj\\pc_station.xml", cpId, PNIO_ROLE_CONTROLLER);
    if (result != PNIO_OK) { /* handle init error */ }
    result = PNIO_Start(0); /* controller index 0 */
  6. Register input/output buffers. For each IO Device, map the configured modules to a process image structure. The SDK generates header files from the GSDML that match the byte layout you configured in TIA Portal.
  7. Run the cyclic exchange. Use either callback registration (PNIO_RegisterDataReadyCallback) or polling (PNIO_ExchangeIO) at a rate synchronized to the configured send clock (typically 1 ms for RT, 250 µs for IRT).
  8. Handle acyclic records. Use PNIO_ReadRecord / PNIO_WriteRecord for parameterization and diagnostics (index 0x8000 series, 0xAFF0 diagnostics, etc.).
  9. Shut down cleanly. On service stop, call PNIO_Stop followed by PNIO_Shutdown to bring the ARs down without leaving Devices in alarm state.

IO Routing with CP 1604 / 1616 / 1626 and CP 1616 onboard

IO routing lets a PC station exchange process data between two PROFINET IO systems - for example, between a higher-level PROFINET subnet (Controller A) and a lower-level subnet (Controller B), with the CP card acting as both an IO Device to Controller A and an IO Controller to the lower-level IO Devices. This is the mechanism to use when a Windows application must bridge data from field devices into a SIMATIC S7-300 / S7-400 / S7-1500 CPU on a different subnet without routing through the CPU's PN interface.

Slot PROFINET role Connection to
CP 1616 port 1 IO Device Higher-level S7 Controller (subnet A)
CP 1616 port 2..4 IO Controller (subordinate) Lower-level IO Devices (subnet B)

The configuration is set up under Devices & Networks > PROFINET IO > Special PROFINET Configurations > IO Routing in TIA Portal V20. Both the S7 controller side and the PC station side must declare the CP 1616 accordingly; the SDK exposes the routing data through the same process image but with separate slots per subnet.

Integration with S7 PLCs

There are three common ways to bring PLC data into a Windows application. The right choice depends on direction, latency budget, and licensing.

Mechanism Direction Hardware Latency Access scope
PROFINET IO Controller (CP 1616) PC master, PLC/IO slaves CP 1616 1 ms RT / 250 µs IRT Configured IO only
PROFINET IO Device (CP 1616) PC slave, single S7 master CP 1616 1 ms RT Configured slots only, 1 master
S7 Protocol (S7-Comm / OPC UA server) Bidirectional with S7 CPU Standard Ethernet (no special card) 10–100 ms typical Full S7 memory (DBs, Merkers, I/O)

If the application needs to read arbitrary memory areas (DBs, inputs, outputs, timers, counters) from several S7 CPUs, the PROFINET IO Device role cannot be used - PROFINET IO Device exposes only the slots the Controller is configured to consume. In that case, the correct approach is the S7 protocol via the SIMATIC NET OPC server or a third-party S7 library (libnodave, Snap7). The CP 1616 is not required for S7 communication; a standard NIC is sufficient.

Verification and Commissioning

  1. Topology check: In TIA Portal Online & Diagnostics, verify the CP 1616 reports a green link on every connected port, and that all configured IO Devices appear in the device list with state Connected.
  2. AR status: Confirm Application Relationship state = Established for every device; if any AR is in Not Established, check device name spelling (PROFINET is case-sensitive), IP, and that the device has been assigned via PST or Topology Editor.
  3. Cyclic data sanity: Force a known value on a digital output module, then read it back via the SDK process image - the value should appear within one send clock of writing.
  4. Watchdog timer: If the application pauses for longer than the configured watchdog (default 3 missed cycles), the IO Controller issues a PROFINET IO watchdog timeout and drops the AR. Implement a high-priority cyclic thread and a watchdog heartbeat in PNIO_ExchangeIO.
  5. Diagnostic buffer: Use the SIMATIC NET diagnostic trace to capture record 0x8000 (channel diagnostics), 0x8001 (multiple), and 0xAFF0 (extended diagnostics) for any device that fails to come up.

Troubleshooting Matrix

Symptom Likely cause Action
AR stays "Not Established" on one device PROFINET device name mismatch Re-assign name with PST; check capitalization
All devices show "Not Connected" SIMATIC NET service not running or CP not licensed Check "SIMATIC NET Configuration Console" and license key
Cyclic data is correct but acyclic read returns 0xDE80 Record index / API not supported by module Verify record number against GSDML record list
Watchdog timeout under load PC thread starvation Raise process priority, disable power management on CPU
Intermittent IRT jitter Non-real-time OS / virtualization layer Move to bare metal, or drop to RT class
IO Device role can't see second PLC IO Device can only be owned by one Controller Switch to IO Controller role, or use S7 protocol

Field Notes and Cautions

  • The CP 1616 reaches end-of-life in the Siemens catalog. For new designs, evaluate the CP 1626 (PCIe, ERTEC 200P/400) and the current DK PN IO packages. The SDK API is largely forward-compatible.
  • For pure PC-to-S7 memory access (Level 2 decision-making in the original scenario), the S7 protocol is almost always the lower-cost and lower-effort path versus deploying a CP 1616 with the IO Device role restricted to one master.
  • PROFINET device names are case-sensitive and must be assigned to the device flash, not the IP. Use the Primary Setup Tool or TIA Topology Editor.
  • The ERTEC 400 supports both RT and IRT; IRT requires the controller and all devices in the IRT domain to be configured with synchronized send clocks and a topology-aware scheduler.
  • License keys for the PROFINET IO Controller service are tied to the CP serial number. Moving the card to another PC requires re-licensing.

FAQ

Can I use a CP 1616 to read arbitrary memory from a Siemens S7 PLC?

Not via PROFINET IO. The CP 1616 in IO Device role only exposes the slots the Controller is configured to consume, and only one Controller can own that Device. To read DBs, Merkers, and I/O from one or more S7 CPUs, use the S7 protocol (SIMATIC NET OPC UA server, libnodave, or Snap7) over a standard NIC - no special card required.

What is included in the CP 1616 SDK (DK-16xx)?

The DK-16xx PN IO Development Kit contains the PNIO C API libraries (controller or device variant), the GSDML/IODD importer that generates C structures for configured slots, the configuration loader that consumes the TIA Portal or STEP 7 export XML, and sample projects plus diagnostic tracing tools.

Can the CP 1616 act as both an IO Controller and an IO Device at the same time?

Yes. In an IO Routing configuration, one set of ports of the CP 1616 functions as an IO Device to a higher-level S7 Controller, while the other ports act as an IO Controller to subordinate IO Devices. This is configured under Special PROFINET Configurations > IO Routing in TIA Portal V20.

What is the difference between CP 1616 and CP 1616 onboard?

CP 1616 onboard is the same ERTEC 400-based PROFINET interface integrated directly on a SIMATIC PC motherboard. From the SDK and configuration standpoint it behaves identically to a plug-in CP 1616, and the same DK-16xx API and SIMATIC NET configuration apply.

What is the minimum send clock the CP 1616 supports?

For PROFINET RT the CP 1616 supports send clocks down to 1 ms. For IRT (isochronous real-time), send clocks down to 250 µs are supported when the controller and all IRT devices in the domain are configured with a synchronized topology scheduler in TIA Portal.

Back to blog