Siemens S7+ Connection Properties

host (string, required)

Defines the IP address or DNS hostname of the target PLC.

Example: "192.168.20.60"

port (integer, required)

Defines the TCP port of the PLC communication interface. Siemens S7 devices typically listen on port 102.

Default: 102

Example: 102

Additional restrictions:

  • Minimum: 1

  • Maximum: 65535

rack (integer, required)

Defines the hardware rack index that is used in Siemens SIMATIC addressing.

Default: 0

Example: 0

slot (integer, required)

Defines the slot index of the CPU module inside the hardware rack that is used in Siemens SIMATIC addressing.

Default: 1

Example: 1

DevNr (integer)

Defines the identifier that is used to distinguish multiple PLC connections. Each connection inside a service commissioning file must use a unique number between 0 and 255.

Default: 0

Examples: 0, 1, 2

Additional restrictions:

  • Maximum: 255

ConnType (string, enum)

Selects the addressing mode. TCPIP uses absolute byte and bit addresses. TCPIPTIA loads TIA symbols and enables symbolic addressing (TIA Portal).

This element must be one of the following enum values:

  • TCPIP

  • TCPIPTIA

Default: "TCPIPTIA"

Examples: "TCPIP", "TCPIPTIA"

isOptimized (boolean)

Enables request bundling to reduce the number of individual read/write requests. This affects communication behavior only, not TIA datablock optimization in the PLC.

Default: false

Examples: true, false

connectionTimeout (integer)

Defines the maximum time (in milliseconds) that Connectware waits during initial connection and symbol loading. Large TIA Portal projects may require more than 30000 ms (default). Increase this value if the connection fails before all symbols are loaded.

Default: 30000

Examples: 30000, 60000

Additional restrictions:

  • Minimum: 1000

operationTimeout (integer)

Defines the time limit (in milliseconds) for each read or write operation. Lower values report failures more quickly. Higher values are recommended for large arrays or networks with higher latency.

Default: 5000

Examples: 5000, 10000

Additional restrictions:

  • Minimum: -1

healthCheckInterval (integer)

Defines the interval (in milliseconds) between periodic health check probes. Set to 0 to disable health monitoring. Longer intervals reduce PLC load, shorter intervals detect outages more quickly.

Default: 10000

Examples: 10000, 30000, 60000, 0

healthCheckTimeout (integer)

Defines the timeout (in milliseconds) for each health check operation. This value should remain lower than operationTimeout so that broken connections are detected early.

Default: 10000

Examples: 10000, 5000

Additional restrictions:

  • Minimum: 100

healthCheckFailureThreshold (integer)

Defines the number of consecutive failed health checks before Connectware disconnects and starts a reconnect cycle.

Default: 3

Examples: 3, 5

Additional restrictions:

  • Minimum: 1

preOperationConnValidation (boolean)

Verifies PLC responsiveness before each operation. This improves reliability but adds an additional round trip. Only use for critical data paths.

Default: false

Examples: false, true

useSymbolCacheFile (boolean)

Enables caching of TIA symbol information to a file so that subsequent connections start faster (S7+/TIA only).

Default: false

Examples: true, false

symbolCacheFilePath (string)

Specifies a custom path for the symbol cache file. This setting is only applied when useSymbolCacheFile is set to true. If left empty, the default path /var/tmp/plc_{host}_{port}_dev{deviceNr}.agl is used.

Default: ""

Examples: "/var/tmp/plc_192.168.10.60_102_dev0.agl", ""

connectionStrategy (object)

Controls how long Connectware waits between repeated connection attempts when the PLC is unreachable. Delays grow according to an exponential backoff pattern until the maximum delay is reached.

Properties of the connectionStrategy object:

initialDelay (integer)

Delay of the first connection retry (in milliseconds). Later retries increase this delay using the incrementFactor.

Default: 5000

Examples: 5000, 3000, 1000

Additional restrictions:

  • Minimum: 1000

maxDelay (integer)

Upper bound for retry delay (in milliseconds). Once this value is reached, all further retries wait this long between attempts.

Default: 30000

Examples: 30000, 60000

Additional restrictions:

  • Minimum: 5000

incrementFactor (integer)

Multiplier that increases the retry delay after each failed attempt until it reaches maxDelay. For example, with initialDelay 1000 and incrementFactor 2 the delays are 1000, 2000, 4000, 5000.

Default: 2

Examples: 2, 3

Additional restrictions:

  • Minimum: 2

Last updated

Was this helpful?