# Device settings

Some technology-specific fields are essential for the agent when setting up a Siemens S7 device (a.k.a., thing) in the IoTHub.

# Thing

A thing is a digital representation of a physical device (commonly termed "digital-twin").

# Configuration

The configuration defines connection-related settings for communicating with the device. Here, essential technology-specific fields to set are:

  • endpoint: The endpoint defines the devices address and listening port number. This information is used by the agent for establishing a connection with the device.
  • rack: This field defines the rack number of the mounted rail.
  • slot: This field defines the slot number of the mounted modules.

# Attributes

The attributes define settings that do not directly affect the connection between agent-device but are still relevant for communication. Here, essential technology-specific fields are:

  • sampling_interval: The sampling interval defines a "best-effort" cyclic rate that the agent uses to sample data from the device. "Best-effort" in this context means that the agent does its best to sample data at the given time frame.

# Properties

Properties represent all items that the agent should monitor; this means reading or writing data from or into them, respectively.

# Predefined

For Siemens S7 devices, there are some predefined technology-specific properties:

  • last_poll: This property informs about the results of the latest polling attempt. For instance, the actual sampling rate in which the retrieving of the values was executed.

# Attributes

Each property contains the following technology-specific fields:

  • addressing: This field specifies the direct addressing of the resource that you want to monitor (read, write, or both). The mentioned addressing varies depending on the model of your Siemens S7 device. However, some general and commonly used addressing are:
Resource Addressing
Data Block DB1.DBB0, DB5.DBX2.0, DBW6, DBD8
Input I0.1, IW4, IB4, ID4
Outputs Q1.0, QB124, QW124, QD124
Markers M11.0, MB10, MW10, MD10
Timers T34
Counters C23
Local L0.0, LB1, LW2 LD4

TIP

For a more detailed overview of the addressing available in your device, we recommend you to check out its user manual.

# Actions

Actions are interaction affordances that allow to invoke specific functions on the device or retrieve information from it. Here, essential technology-specific actions are:

  • connect: Use this action for connecting and subscribing to the Siemens S7 device.
  • disconnect: Use this action for disconnecting and unsubscribing from the Siemens S7 device.
Last Updated: 1/14/2022, 12:53:58 PM