Configuring S7-1200 GET/PUT Communication with Sinumerik 828D

David Krause13 min read
S7-1200SiemensTechnical 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

1. Integration Overview

The Sinumerik 828D CNC integrates a SIMATIC S7-300-compatible PLC subsystem on the NCU (Numerical Control Unit). This built-in PLC exposes a standard S7 communication endpoint that any external S7-1200 controller can reach using the standard SIMATIC GET and PUT instructions defined in the S7-1200 system manual. The integration allows a separate S7-1200 station to read flags, data blocks, and inputs from the 828D-PLC, and to write back program numbers, mode changes, and user data without any additional gateway hardware beyond an industrial Ethernet switch.

The communication path uses ISO-on-TCP (RFC 1006) as transport and the S7 communication protocol on top. The S7-1200 acts as the S7 client; the 828D-PLC acts as the S7 server. Up to 16 S7 connections can be configured on a single 828D-PLC, of which connection resources 01..03 are reserved for HMI, 04..08 for PG/OP, and 09..16 for general S7 communication. An S7-1200 PUT/GET pair normally consumes one or two of these connection resources.

2. Prerequisites

Before commissioning, confirm that the following hardware, firmware, and software components are available and that they meet the minimum version requirements.

Component Requirement Notes
S7-1200 CPU Firmware V4.0 or later (V4.2+ recommended) GET/PUT is part of the standard instruction set from V4.0 onward
Sinumerik 828D NCU with integrated PLC 317 (firmware ≥ SW 4.5 SP2) SW 4.7 or later recommended for full MD 51041 support
TIA Portal V15.1 or later (V16/V17 for 828D V4.8+ GSD support) Match to the S7-1200 firmware
Sinumerik Toolbox / PLC Basic Plus Installed in TIA Portal for project templates Used for HMI Pro RT/TC projects, not strictly required for the S7 connection
Industrial Ethernet switch Managed switch recommended Both stations and the 828D X130 port share a single subnet
Network cabling Cat 5e or better, M12 D-coded or RJ45 828D uses RJ45 on X130
Important: Sinumerik 808D does not expose a standard S7 server endpoint in the same way as the 828D. PUT/GET works for simple data exchange only after the 808D PLC is configured in the user program; PN/PN coupler support is not available for the 808D.

3. Network Topology

The 828D-PLC communicates on the customer network via the X130 port on the NCU. The default IP address of the X130 port is 192.168.214.1 with subnet mask 255.255.255.0. The S7-1200 must be assigned an IP address from the same subnet, and the subnet must not collide with the service network X120 (192.168.200.x) that connects the 828D to the MCP and handheld terminal.

Node Interface Default IP Recommended IP Subnet
828D-PLC (NCU X130) PROFINET / S7 comm. 192.168.214.1 192.168.214.1 255.255.255.0
S7-1200 (CPU PROFINET port) PROFINET / S7 comm. 0.0.0.0 192.168.214.10 255.255.255.0
PG / Engineering station Service / project load DHCP or static 192.168.214.100 255.255.255.0

Place a single industrial Ethernet switch between the S7-1200, the PG, and the X130 port of the 828D. Direct crossover cabling works for point-to-point commissioning but is not recommended in production.

4. Step-by-Step: Configuring the S7 Connection in TIA Portal

4.1 Add the S7-1200 CPU and 828D as "Unspecified" S7 Partner

  1. In the TIA Portal project tree, open Devices & Networks and add the S7-1200 CPU (e.g., CPU 1214C DC/DC/DC, 6ES7214-1AG40-0XB0).
  2. Right-click Devices & Networks > Add new device > PLC & HMI > SIMATIC S7-300 > CPU 317 placeholder, or use Add unspecified S7-PLC. The 828D-PLC appears in the network as an Unknown S7 partner; TIA Portal cannot import its GSDML because the 828D-PLC is internal to the NCU and has no PROFINET device descriptor.
  3. Open the Devices & Networks editor and switch to Network view. Connect the S7-1200 PROFINET interface to the same subnet as the 828D's X130 port.

4.2 Define the S7 Connection

  1. Select the S7-1200 CPU in the network view. In the inspector window, choose Properties > S7 communication > S7 connections and click Add new S7 connection.
  2. Set Partner = Unknown, Interface = PROFINET interface, and enter the partner IP address: 192.168.214.1.
  3. Open Address details on the S7-1200 side:
    • Local TSAP: enter any free TSAP, e.g. 10.01 (rack 0, slot 1) for the S7-1200.
    • Partner TSAP: enter 03.02 (connection resource 03, slot 2). Connection resource 03 is the first free S7 server connection on the 828D-PLC after the reserved HMI and PG/OP resources; slot 2 corresponds to the integrated PLC 317 of the 828D-PLC.
  4. Confirm with OK and compile the project.
Connection resource 03: The 828D-PLC exposes up to 16 S7 server connections. Resources 01..03 are typically reserved for HMI (Operator Panel), 04..08 for PG/OP, and 09..16 for general S7 communication. Using connection resource 03 is acceptable when the HMI uses the OP/TP connection type but the 828D internal HMI only consumes resources 01 and 02.

4.3 Rack/Slot Assignment Reference

Station Rack Slot Meaning
S7-1200 CPU 0 1 Always 0/1 for S7-1200
828D-PLC 0 2 Integrated PLC 317 of the 828D NCU
808D-PLC 0 2 Integrated PLC of the 808D (limited)

5. Programming GET and PUT in the S7-1200

The S7-1200 instruction set contains GET and PUT as standard SIMATIC instructions. The full instruction description is in the S7-1200 system manual: GET and PUT (Read and write from a remote CPU).

5.1 GET Instruction (Read from 828D-PLC)

Use GET to read data from a remote S7 CPU. The remote CPU can be in either RUN or STOP mode. STEP 7 automatically creates an instance DB when the instruction is inserted.

Block signature in LAD/FBD:

  +-----------+
  |   GET     |
  |           |  REQ    := M0.0    (one-shot trigger)
  |           |  ID     := W#16#1  (connection ID from S7 connection table)
  |           |  ADDR_1 := P#M100.0 BYTE 1  (remote source area, e.g. 828D M100.0)
  |           |  RD_1   := P#DB20.DBX0.0 BYTE 1 (local destination buffer)
  |           |  NOP    :=           (not used in this example)
  +-----------+

Sample parameters:

  • REQ: boolean, edge-triggered; one execution reads one data record.
  • ID: W#16#1 must match the connection ID generated by TIA Portal when the S7 connection was created.
  • ADDR_1..ADDR_4: up to four remote address areas per call, e.g. P#M100.0 BYTE 1 for one byte of 828D-PLC flags, or P#DB1700.DBX1000.0 BYTE 4 for the program-list data.
  • RD_1..RD_4: local S7-1200 area (DB, M, I, Q) that receives the data.
  • DONE, ERROR, STATUS: status outputs.

5.2 PUT Instruction (Write to 828D-PLC)

  +-----------+
  |   PUT     |
  |           |  REQ    := M0.1
  |           |  ID     := W#16#1
  |           |  ADDR_1 := P#DB1700.DBX1000.0 BYTE 2 (program number to 828D)
  |           |  SD_1   := P#DB21.DBX10.0 BYTE 2  (local source: desired program number)
  +-----------+

5.3 Connection Status Word Mapping

Output Type Meaning
VALID Bool New data available after successful read
DONE Bool One-shot done; reset by the next REQ or by NDR
ERROR Bool Error occurred during execution
STATUS Word Hex status / error code (see Section 9)
RD_1..RD_4 Pointer Local destination area (GET) or source area (PUT)

6. 828D-Side Configuration

6.1 Machine Data MD 51041 – ENABLE_PROGRAM_LIST

To allow the S7-1200 to change the running program on the 828D, the program list must be enabled. The relevant machine data is:

MD Name Default Field Use
MD 51041 ENABLE_PROGRAM_LIST 0 Set to 1 to activate the program list in DB1700

Procedure to enable:

  1. Place the 828D in commissioning mode (NCK switch or password if protected).
  2. Open Start-up > Machine Data on the HMI.
  3. Search for MD 51041 and change the value from 0 to 1.
  4. Press OK and reset NCK.
  5. Save the data: Save data > NCK reset (po) > Save to CF card or the equivalent in the active user interface.

6.2 Accessing DB1700

DB1700 is the predefined interface data block that mirrors the program list. The structure is fixed by the Sinumerik PLC basic program; engineers must not extend DB1700 with custom variables.

DB1700 Offset Type Meaning
DBB 1000..1001 INT (16 bits) Program number to be selected from the program list (write from S7-1200)
DBB 1002 BYTE Selection command (bit 0 = 1 starts the program)
DBB 1004..1005 INT Active program number (read by S7-1200 for verification)
DBB 1008 BYTE Status word: 0x00=idle, 0x01=running, 0x02=stopped

To select a program from the S7-1200, write the program number to DB1700.DBX1000.0 as a 16-bit INT and pulse the start bit DB1700.DBX1002.0 for one PLC cycle.

7. Program-Selection Example

Goal: the S7-1200 selects program /MPF/100.MPF on the 828D, which corresponds to the program list entry index 100 (decimal). The actual mapping from list index to file name is defined in the program list of the 828D; engineers configure the list in Program Manager > NC Select.

PUT call from the S7-1200 (in SCL):

// S7-1200 SCL – request program change on 828D
"dbCtrl".progNumber := 100;        // INT, destination area in DB1700
"dbCtrl".startBit   := TRUE;       // pulse
PUT_DB.REQ          := TRUE;
PUT_DB.ID           := 1;          // connection ID from TIA Portal
PUT_DB.ADDR_1       := P#DB1700.DBX1000.0 BYTE 2;
PUT_DB.SD_1         := P#"dbCtrl".progNumber BYTE 2;

// After one cycle, clear the start bit
IF PUT_DB.DONE OR PUT_DB.ERROR THEN
  "dbCtrl".startBit := FALSE;
  PUT_DB.REQ        := FALSE;
END_IF;

GET call from the S7-1200 to read the active program back for verification:

GET_DB.REQ    := cycleTrigger;
GET_DB.ID     := 1;
GET_DB.ADDR_1 := P#DB1700.DBX1004.0 BYTE 4;  // active number + status
GET_DB.RD_1   := P#"dbStatus".activeNumber BYTE 4;
IF GET_DB.NDR THEN
  // Update local status to HMI / SCADA
END_IF;

8. 828D vs 808D Compatibility Matrix

Feature Sinumerik 828D Sinumerik 808D
S7-1200 PUT/GET communication Supported Supported for simple data exchange
PN/PN coupler (S7-1500 ↔ 828D/808D) Supported via X130 Not supported
MD 51041 ENABLE_PROGRAM_LIST Available Limited / not in all SW versions
DB1700 program list interface Yes Yes, but check SW version
Default IP of X130 192.168.214.1 192.168.214.1
Connection resources for S7 comm. Up to 16 (incl. OP / PG) Reduced; verify per project
Field note: The 808D hardware is positioned for price-sensitive applications and does not include the PN/PN coupler interface that the 828D exposes for proxying PROFINET networks. If the project requires 808D, plan to use direct PUT/GET over Ethernet rather than a PN/PN coupler.

9. PN/PN Coupler Alternative (828D Only)

For projects that already use a PN/PN coupler (e.g., 6ES7158-3AD10-0XA0) to bridge two PROFINET networks, the 828D-PLC can be exposed on the coupler side and made visible to a S7-1500 (or S7-1200) on the other side. A reference example is published on Siemens Industry Online Support:

The example originally targets an S7-300, but the GSD-based integration works the same for an S7-1200. The 808D does not expose a PROFINET device role required by the PN/PN coupler, so the alternative is direct PUT/GET only.

10. Diagnostics and Common Error Codes

The STATUS output of GET and PUT returns a 16-bit word. The most relevant codes for an 828D integration are:

STATUS (hex) Meaning Action
0x0000 No error, no job in progress —
0x0001 Job completed successfully (DONE) Read result valid
0x0070 Connection established First call after startup
0x0081 Connection aborted by partner (828D-PLC STOP) Bring 828D-PLC to RUN
0x00A1 Connection resource on the 828D not available Use a different connection resource (e.g. 04)
0x00B1 Requested data length exceeds S7 limit Reduce byte count per call (max 160 bytes per area)
0x00C1 Resource temporarily unavailable on the S7-1200 Retrigger REQ after cycle
0x00D1 Partner refused the connection (TSAP mismatch) Verify partner TSAP 03.02
0x80C3 Connection aborted (link down) Check cabling, switch, NCU X130

For 828D-side diagnostics, the PLC diagnostic buffer in the HMI (under Diagnostics > PLC) reports connection establishment, with a partner TSAP that must match the S7-1200 configuration.

11. Troubleshooting Matrix

Symptom Likely Cause Corrective Action
STATUS = 0x80C3, no data exchanged Subnet mismatch between S7-1200 and X130 Verify both stations in 192.168.214.0/24; ping 828D from S7-1200 PROFINET port
STATUS = 0x00D1 on first call Partner TSAP wrong Use partner TSAP 03.02 (connection resource 03, slot 2)
STATUS = 0x00A1, intermittent Connection resource in use by HMI or PG Switch to 04.02 or 05.02; check active connections in Diagnostics > PLC
Program does not change after PUT MD 51041 = 0 Set MD 51041 = 1 and reset NCK
GET returns 0 even though MD 51041 is enabled DB1700 not generated in the active project Recompile 828D PLC project; ensure DB1700 is in the active PLC basic program
Works with S7-1500, fails with S7-1200 S7-1200 firmware < V4.0 Update CPU firmware to V4.2 or later
808D: coupler not connecting PN/PN coupler is not supported on 808D Remove the coupler; use direct PUT/GET

12. Verification Procedure

  1. From the PG, ping the 828D's X130 IP address (default 192.168.214.1) to confirm layer 3 reachability.
  2. Download the S7-1200 project and place the CPU in RUN.
  3. Trigger a single GET to read one byte from 828D M100.0. Confirm STATUS = 0x0001 and the destination DB has the expected value.
  4. Trigger a PUT to write a program number into DB1700.DBX1000.0 and pulse the start bit. Watch the 828D HMI; the program list should change to the new program index within ~500 ms.
  5. Read DB1700.DBX1004.0 (active program number) and confirm it matches the number just written.
  6. Open Diagnostics > PLC > Connection list on the 828D HMI and verify the partner TSAP equals the S7-1200 local TSAP (e.g. 10.01).
  7. Run a 24-hour soak test: poll GET every 100 ms, log any non-zero STATUS, and verify no connection drops appear in the S7-1200 diagnostic buffer.

13. Field-Proven Best Practices

  • Use a single S7 connection with multiple ADDR_x/RD_x pairs per call before opening additional connections, to keep the 828D connection-resource count low.
  • Trigger PUT/GET with a one-shot edge, not with a level-controlled variable; otherwise the instruction retries every scan and may block other communication.
  • Always cross-check the 828D-PLC operating state before issuing program change commands; some 828D software versions require the NCK to be in a specific state (e.g., reset or ready) to accept a new program index.
  • For 808D projects, verify with the 808D programming manual whether the user PLC includes DB1700 by default; older builds require a manual instantiation.
  • Document the partner TSAP on a label inside the control cabinet so maintenance engineers can match the S7 connection on the HMI without re-engineering.

Which rack and slot does the 828D-PLC use for the S7 connection?

The integrated PLC 317 of the 828D NCU uses rack 0 and slot 2. On the S7-1200, set the partner TSAP to 03.02 (connection resource 03, slot 2) for the first free S7 server connection after the HMI and PG/OP reservations.

Can I change the running NC program from the S7-1200?

Yes. Enable MD 51041 (ENABLE_PROGRAM_LIST) on the 828D, then write the program index to DB1700.DBX1000.0 as a 16-bit INT and pulse the start bit DB1700.DBX1002.0 for one PLC cycle. Read DB1700.DBX1004.0 to confirm the new program is active.

Does the 808D support a PN/PN coupler?

No. The 808D does not expose a PROFINET device role suitable for a PN/PN coupler. Use direct PUT/GET S7 communication over Ethernet instead, and confirm DB1700 and MD 51041 are present in the active 808D software version.

Why does my GET call return STATUS 0x00D1?

The partner refused the connection, usually because the partner TSAP is wrong. Verify the S7 connection in TIA Portal uses partner TSAP 03.02 and that the S7-1200 is in the 192.168.214.0/24 subnet of the 828D X130 port.

What is the maximum data size per GET or PUT call?

The S7-1200 GET/PUT supports up to 160 bytes per area and up to four areas per call, for a maximum of 160 bytes per address parameter and 4 × 160 bytes per instruction invocation. For larger transfers, split the request into multiple calls or use a single S7 connection with repeated jobs.

Which S7-1200 firmware is required?

GET and PUT are standard instructions in the S7-1200 from firmware V4.0 onward. Siemens recommends V4.2 or later for production use to benefit from improved connection diagnostics and to match current TIA Portal versions.

Back to blog