Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.8 KB

File metadata and controls

25 lines (17 loc) · 1.8 KB

Snap7 Device configuration

This project provides a bridge to make SmartIOT.Connector able to use the Snap7 library by Davide Nardella (and in particular Sharp7) to connect to a Siemens PLC and to exchange data defined in its datablocks.

The supported connection string is as follows (square brackets for optional parameters):

snap7://Ip=<plc ip address>;Rack=<rack>;Slot=<slot>[;Type=<type>]

The values for Rack and Slot should be taken from the hardware configuration in Simatic Manager. Usually we have Rack=0;Slot=2 for S7300 PLCs and Rack=0;Slot=0 for S71500 PLCs. Please refer to the Snap7 library site for more on this.

The Type parameter must be one of the three:

  • PG: this kind of connection is used to connect as if SmartIOT.Connector is the Siemens PG
  • OP: this kind of connection is used to connect as if SmartIOT.Connector is an OP panel
  • BASIC: this is the general purpose connection type (and is the default)

You should choose the right connection type based on the connection resouce slots defined in Simatic Manager for your PLC. Most of the times, BASIC should work just fine.

The TagIds must currently be numbers or be preceded by DB: Currently just Datablocks are supported by this library.

The Snap7 library exchanges an important piece of data from the PLC that is the PDU size: by using this information, SmartIOT.Connector is able to maximize the performance of reads and writes, in particular by using the parameters if you enable them in the general device configuration section (see here)

"IsPartialReadsEnabled": true,
"IsWriteOptimizationEnabled": true,