This article discusses how to build communication between two S7-1500 PLCs using the PUT/GET method via S7 Connection in TIA Portal, covering how to draw the connection line in Network View, open security permissions on the CPU, and prepare the Data Block.
PUT/GET is one-way communication: the client PLC executes the PUT instruction to write and the GET instruction to read the data of the other PLC, while the server PLC does not need a communication program and only needs to allow access. On the S7-1500, two things most often cause communication to fail: the Permit access with PUT/GET communication from remote partner box must be checked, and the accessed Data Block must be non-optimized because PUT/GET uses absolute addressing.
The system built consists of two virtual S7-1500 CPUs in one project and is simulated with PLCSIM Advanced V5.0, namely PLC_1 as the client and PLC_2 as the server. PLC_1 writes five integer values to the PLC_2 Data Block using PUT, then reads five integer values from the same Data Block using GET. Successful communication is proven by comparing the values in both CPUs via the Watch table.
Prerequisites
- The reader already knows how to add devices and set the CPU IP address in TIA Portal.
- The reader already knows how to run a virtual CPU with PLCSIM Advanced.
- The reader already understands how to create a Data Block and a Watch table.
PUT and GET Communication Concept
For communication to work, four components must match. The first is the S7 Connection, which is the logical path between the two CPUs created in Network View. Each connection has a Local ID (for example, W#16#100) that is used as the ID parameter on the PUT and GET instructions. The second is the PUT and GET instructions in the client program, which trigger a data transfer every time the REQ input receives a rising edge signal.
The third is the data address. The server side is written through the ADDR_1 parameter in pointer format, for example P#DB10.DBX0.0 BYTE 10, while local data on the client side is written through SD_1 (for PUT) and RD_1 (for GET). The fourth is the access permission on the server CPU, namely the PUT/GET security setting and the non-optimized Data Block attribute.
PUT/GET permission opens read and write access to the CPU memory without authentication. Therefore, enable it only on CPUs that really need to be accessed, and consider more secure methods such as OPC UA or Open User Communication in production systems.
PLCSIM Configuration
Step 1: Running Two Virtual CPU Instances
- Open PLCSIM Advanced and select PLCSIM Virtual Eth. Adapter under Online Access.
- Create the first instance with Instance name: PLC_1, set the IP to 192.168.0.1, subnet mask 255.255.255.0, then click Start.
- Create the second instance with Instance name: PLC_2, set the IP to 192.168.0.2, subnet mask 255.255.255.0, then click Start.
- For the PLC type, select the CPU type that matches the hardware in the project, or use Unspecified CPU 1500.
- Make sure both instances have the status RUN.

Siemens PLC S7-1500 PUT and GET Configuration Tutorial
Step 1: Adding Two CPUs and Setting Up the Network
- Create a new project, then add two S7-1500 CPUs (for example CPU 1516-3 PN/DP) named PLC_1 and PLC_2.
- Open Network view, then drag a line from the PROFINET port of PLC_1 to the PROFINET port of PLC_2 so that both are on one subnet PN/IE_1.
- Set the IP address of PLC_1 to 192.168.0.1 and PLC_2 to 192.168.0.2 under Properties > General > PROFINET interface > Ethernet addresses. This IP must be the same as the instance IP in PLCSIM Advanced.
- In the properties of both CPUs, enable simulation: right-click the project > Properties > Protection tab, then check Support simulation during block compilation.

Step 2: Opening PUT/GET Permission on the Server
- Click PLC_2 (the CPU to be accessed), then open Properties in the Inspector window.
- Select General > Protection & Security > Connection mechanisms.
- Check Permit access with PUT/GET communication from remote partner.
- In the Access level section, use Full access (no protection) for this exercise. A higher access restriction can reject access from the partner.
- If PLC_2 will also read or write data to PLC_1 in another implementation, make the same settings on PLC_1.
- Note: this setting only takes effect after the Hardware configuration of PLC_2 is downloaded to the CPU. If missed, the PUT/GET instructions will produce an error.

Step 3: Creating a Non-Optimized Data Block
- On PLC_2, add a Global Data Block named DB_Server with number 10.
- Right-click DB_Server > Properties > Attributes tab, then uncheck Optimized block access. Click OK.
- Fill DB_Server with two variables:
Variables in DB_Server: From_PLC1 of type Array[0..4] of Int with offset 0.0 as the area written by PLC_1 (PUT), and To_PLC1 of type Array[0..4] of Int with offset 10.0 as the area read by PLC_1 (GET).

- On PLC_1, add a Global Data Block named DB_Client with number 1, also non-optimized, with the variables:
Variables in DB_Client: Send of type Array[0..4] of Int with offset 0.0 as the data sent to PLC_2, and Recv of type Array[0..4] of Int with offset 10.0 as the data received from PLC_2.
- Compile the Data Block. The Offset column will appear after optimized is turned off, and each array occupies 10 bytes (5 Int x 2 bytes).
- Function: PUT/GET uses absolute addresses such as DB10.DBX0.0. On a DB that is still optimized, the offsets are not fixed, so access will be rejected or produce an error.
Step 4: Drawing the S7 Connection in Network View
- Open Network view and click the Connections tab at the top of the window.
- In the list next to it, select the connection type: S7 connection.
- Click the CPU icon PLC_1, then drag a line to the CPU icon PLC_2 and release. A connection line will appear between the two. The drag direction from PLC_1 makes it the side that initiates the connection (client).

- In the Inspector window, click that connection and open Properties > General. Note the Local ID (for example 100, which means W#16#100), because this value is used in the ID parameter of the PUT and GET instructions.

- Open Special connection properties and make sure Active connection establishment is checked on the Local end point (PLC_1). The One-way option on the S7-1500 may appear grayed out and cannot be checked. This is normal and does not need to be changed, because PUT/GET communication still works without that option.
- Compile both CPUs. In the Connections table tab at the bottom, the connection status must appear without errors.

Step 5: Creating the PUT and GET Program in PLC_1
- Create PLC tags in PLC_1: Trigger_Put, Trigger_Get (Bool), as well as Put_Done, Put_Error, Get_Done, Get_Error (Bool), Put_Status, Get_Status (Word).

- In OB1 of PLC_1, open Instructions > Communication > S7 communication, then drag the PUT and GET instructions into the network. TIA Portal will create an instance Data Block for each. Accept the Single instance option.
- Fill in the parameters of both instructions as follows:
PUT parameters: REQ = Trigger_Put, ID = W#16#100 (according to the Local ID), ADDR_1 = P#DB10.DBX0.0 BYTE 10 (PLC_2 side), SD_1 = P#DB1.DBX0.0 BYTE 10 (PLC_1 side), DONE = Put_Done, ERROR = Put_Error, STATUS = Put_Status.
GET parameters: REQ = Trigger_Get, ID = W#16#100 (according to the Local ID), ADDR_1 = P#DB10.DBX10.0 BYTE 10 (PLC_2 side), RD_1 = P#DB1.DBX10.0 BYTE 10 (PLC_1 side), NDR = Get_Done, ERROR = Get_Error, STATUS = Get_Status.
- Function: REQ works on a rising edge; DONE or NDR is TRUE when the transfer succeeds, and ERROR, together with STATUS, indicates the failure along with its code. The data length in the pointer (BYTE 10) must be the same as the array size on both sides.

Step 6: Download to the Virtual CPU
- Click PLC_2, then Download to device. Select PG/PC interface: PLCSIM Virtual Eth. Adapter, click Start search, and select the device with IP 192.168.0.2. Perform the download (hardware and software), then Start all.
- Repeat for PLC_1 with IP 192.168.0.1.
- Make sure both CPUs have the status RUN, then click Go online on both.

Siemens PLC Program Testing
Step 1: Preparing the Watch Table
- Create a Watch table in PLC_1 containing DB_Client.Send[0..4], DB_Client.Recv[0..4], Trigger_Put, Trigger_Get, Put_Done, Put_Error, Put_Status, Get_Done, Get_Error, Get_Status.
- Create a Watch table in PLC_2 containing DB_Server.From_PLC1[0..4] and DB_Server.To_PLC1[0..4].
- Click Monitor all on both Watch tables.

Step 2: Testing PUT (PLC_1 Writes to PLC_2)
- In the PLC_1 Watch table, fill DB_Client.Send[0..4] with the values 100, 200, 300, 400, 500 using Modify now.
- Change Trigger_Put to TRUE, then return it to FALSE so that a rising edge is formed.
- Expected result: Put_Done is TRUE and Put_Error is FALSE. In the PLC_2 Watch table, the From_PLC1[0..4] values change to 100, 200, 300, 400, 500.

Step 3: Testing GET (PLC_1 Reads from PLC_2)
- In the PLC_2 Watch table, fill DB_Server.To_PLC1[0..4] with the values 11, 22, 33, 44, 55.
- In the PLC_1 Watch table, change Trigger_Get to TRUE, then FALSE.
- Expected result: Get_Done is TRUE and the DB_Client.Recv[0..4] values become 11, 22, 33, 44, 55.
