Skip to content

S7 Device Service

The S7 Device Service provides a means of integrating Siemens S7 PLCs with Edge Xpert.

The Edge Xpert S7 Device Service can be used to communicate with devices that use the Siemens S7 protocol. For further information on the S7 protocol, refer to the Snap7 website.

Key Features

The S7 Device Service supports the following key features:

  • Singular Requests, including:

    • Data Block. Read/Write
    • Process Input Image. Read/Write
    • Process Output Image. Read/Write
    • Read Last Job Result. Read
    • Read PLC State. Read
    • Read Connection State. Read
    • Log Error Code. Write
  • Multiple Requests, including:

    • Data Block. Read/Write
    • Process Input Image. Read/Write
    • Process Output Image. Read/Write
  • Support for the following devices:

    • S7-300
    • S7-400
    • S7-1200
    • S7-1500

Supported Data Types

The S7 Device Service supports the following data types:

  • Boolean
  • String
  • UInt8, UInt16, UInt32, UInt64
  • Int8, Int16, Int32, Int64
  • Float32, Float64

S7 Device Profile

The device profile defines what resources are available on a particular device. The following attribute is required for all S7 device resources. It has five accepted values, which are listed in the table below. For further information on the accepted values, see Additional Attributes.

Attribute Accepted Values
Type
  • DB: Signifies the resource is for Data Block operations
  • IPU: Signifies the resource is for Output Process operations
  • IPI: Signifies the resource is for Input Process operations
  • PLC: Signifies the resource is for PLC operations
  • MISC: Signifies the resource is for Miscellaneous operations

Additional Attributes

There are additional attributes that are required for S7 device resources. However, these are dependent on the value chosen for Type. The table below describes the attributes that should be included for each accepted value of Type.

Accepted "Type" Value Additional Attribute Attribute Description
DB DB_number
  • Non-negative Int32
  • Data Block Index (0 - 0xFFFF)
Start
  • Non-negative Int32
  • Offset to start
Size
  • Non-negative Int32
  • Size to Read/Write in Bytes (only required for String data types)
IPU Start
  • Non-negative Int32
  • Offset to start
Size
  • Non-negative Int32
  • Size to Read/Write in Bytes (only required for String data types)
IPI Start
  • Non-negative Int32
  • Offset to start
Size
  • Non-negative Int32
  • Size to Read/Write in Bytes (only required for String data types)
PLC Operation
  • String
  • Only currently accepted value is "State"
MISC Operation
  • String
  • Accepted values:
    • Job_res: the last Job result
    • Err_text: error text for a given error code (logged to log file)
    • Conn_state: the connection state

Using the S7 Device Service

An example of setting up and using devices with the Edge Xpert S7 Device Service can be found at S7 Example.

Back to top