Read S7-1500 Datablock In Excel

SUMMARY

Explore below an example of reading data from a S7-1500 PLC directly in Microsoft Excel using S7 Excel Connect.


EXAMPLE

In TIA Portal, open the project belonging to the PLC. Make sure “Permit access with PUT/GET communication from remote partner” is enabled, see ‘Permit PUT/GET access’.

Open the ‘Device Configuration’ to determine the PLC’s connection parameters.

Siemens TIA Portal showing S7-1500 connection parameters

In this example we will read data from a datablock. When reading from a datablock, make sure the ‘Optimized block access’ is disabled, see ‘Disable optimized block access’.

Now open the datablock you want to read data from, in our example we will read data from DB1. In this datablock, the ‘Data Type’ and the ‘Offset’ column is important as we need this addresses to get the right data in Excel.

Siemens TIA Portal Datablock view opened with offset column highlighted

Open Microsoft Excel and open the ‘S7 Excel Connect’ ribbon.

S7 Excel Connect in Microsoft Excel with Opened Ribbon

As we want to read data from a datablock, open the datablock taskpane by clicking “Data Block Value” in the ribbon. Fill in the right parameters.

  • PLC-Type: S7-1500
  • IP-address: 192.168.1.42 (as seen in the TIA Portal project)
  • Rack: 0
  • Slot: 1
  • DBNo.: 1 (we want to read from datablock 1 in our example)
  • Datatype: DINT (in the TIA Portal opened datablock 1, the type at address 2 is a DINT)
  • Startaddress: 2 (as we use the address in the DB here)

Select your desired output cell in Excel and click “OK”.

S7 Excel Connect Reading Multiple Datablock values from a Siemens S7-1500 PLC