Communication between the Siemens PLC S7-1200/1500 (from firmware 4.0) and the S7 TCP driver from Movicon

Configuration Siemens S7-1200 PLC (firmware from 4.0)

Programming of the S7-1200 PLC is done with the software "Totally Integrated Automation Portal (TIA Portal) 13".
Note: In the software installation procedure, it is installed also an instance of MS SQL (WINCCPLUS).
Using the Siemens S7-1200 PLC configuration software, when a new DB is created, IN THE CREATION WINDOW OF THE db, it is necessary to uncheck "Optimized block access." This will then allow the absolute address of the individual members of the DB.
After adding a DB (e.g., DB1) without the "Optimized block access," the "Offset" column will be displayed in the DB editor whose value will represent the absolute address of each individual member. This address will be the one to be used in the Movicon driver to point to the DB members (e.g., DB1.DBB0).

If the "Optimized block access" option is not removed at the time of creation of the DB, the DB members will result only of type symbolic and accessible only by name and therefore not recognizable by Movicon's TCP driver.
In addition, to allow access to the PLC by the Movicon driver it is necessary to set the option "Permit access with PUT/GET communication from remote partner (PLC, HMI, OPC, ...) within the the PLC properties.

Movicon's S7 TCP Driver Configuration

When configuring Movicon's S7 TCP driver, care must be taken in setting values for Device ID, Rack and Slot. In the settings general settings of the driver the values of the remote TSAP set up in the PLC. By default the value should be 16 (10 hex):

In the station settings of the driver should be entered the values of the local TSAP set in the PLC. By default, the value should be 1 (1 hex):

Note: TIA Portal version 11.0 SP2 allows you to export DataBlock tags in text format with the command 'copy to text'.

For data in the remaining areas (ex: M) the procedure is different. In PLC variable exploration, the appropriate icon should be selected to export the data to XLSX format files. Under evaluation is the possibility of importing tags into the S7TCP driver, currently not supported.

TIA PORTAL 16

For TIA Portal 16, follow the instructions in the Link to Set up\Verify an S7 Link and the TSAP:

https://support.industry.siemens.com/cs/document/109486139/how-you-configure-a-connection-in-the-tia-portal-?dti=0&lc=en-US

Links of the type TCP, ISO-on-TCP, UDP, ISO or S7 link. are configured in STEP 7 (TIA Portal) in the network view.
In STEP 7 (TIA Portal), the S7 links must be configured in the network view. In the other links, it depends on the interface used locally:

The following instructions show how to configure a link in the network view.

  1. In the "Devices & Networks" editor; open the view of the network.
  2. Click on "Links". Select a link, e.g., TCP link.
  3. With the right mouse button click on the CPU and in the menu context menu of the CPU select the command "Add new link".
  4. In the dialog box "Create New Link" new links are configured.
    Select the link type, e.g., TCP link. In the left part of the dialog box, select the partner of link, e.g. "Not specified". In the right side of the dialog box select the local interface, through which you are to communicate. Click the "Apply" button; and close the dialog box.
  5. In the table area of the network view, switch to the tab "Links", where all links are displayed. configured. A link is displayed on a red background, e.g., if the partner's IP address is not configured.
  6. Complete the link configuration. Mark the link. The inspection window displays the properties of the link. Record here the IP address of the partner and the port or of TSAP.
  7. With an S7 link, the TSAP is configured in Address details. This is required for a one-sided S7 link with PUT/ GET. Set the link resource of the partner to 03 and the rack/slot to the partner's CPU. Even if a CP is inserted in the partner, the CPU is always addressed with the rack/slot.
  8. In CPU S7-1500 and CPU S7-1200 activate with a link S7 the function "Permit access with PUT/GET communication from remote partner (PLC, HMI, OPC, ...)". Activate the function in the CPU properties in "Protection > Connection mechanisms".
  9. Load the configuration into the controller.

Recommendation for S7-1500

With the S7-1500, it is possible to configure the link in static mode in the network view or establish a link dynamically with the TCON, TSEND_C or TRCV_C instruction.