Explore below an example of reading data from a S7-1200 PLC directly in Microsoft Excel using S7 Excel Connect.
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.
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.
Open Microsoft Excel and open the ‘S7 Excel Connect’ ribbon.
As we want to read data from a datablock, open the datablock taskpane by clicking “Datablock” in the “Read” section in the ribbon. Fill in the right parameters.
- PLC-Type: S7-1200
- 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”.