Configuring Properties

<< Click to Display Table of Contents >>

 

Configuring Properties

The configuration parameters for communicating with a device are available on the Properties Window of this Driver. In addition to this Properties Window, these settings can also be defined at run time in Elipse E3, Elipse Power, or Elipse Water applications by starting the Driver in Offline mode, that is, by selecting the Start driver OFFLINE option on the Setup tab. The S7CommPlus tab, shown on the next figure, contains the configuration options for this Driver.

S7CommPlus tab

S7CommPlus tab

The available option on this tab are described on the next table.

Available options on the S7CommPlus tab

Option

Offline String

Data Type

Description

User name

S7CommPlus.Username

String

User of a CPU, for CPUs with user management (newer firmware). Leave this option empty (default) to authenticate only with the password of the protection level

Password

S7CommPlus.Password

String

Password for the protection level of a CPU or a user. Leave this option empty (default) if a CPU grants full access. If a CPU requires a password and no password is configured, this Driver connects but readings and writings may be rejected

Trusted certificate fingerprints

S7CommPlus.CertificateFingerprints

String

SHA-256 fingerprints of the TLS certificates from CPUs accepted by this Driver, separated by semicolons, one for each CPU, such as the CPUs from backup IP addresses. Each fingerprint has 64 hexadecimal digits, with or without the separators colon, dash, or spaces. Leave this option empty (default) so that this Driver connects without checking a certificate. If this option contains a value, a connection is closed if a CPU presents another certificate. If a value is invalid, this Driver does not connect. For more information, please check section Verifying a Certificate

Use subscriptions

S7CommPlus.UseSubscriptions

Boolean

Experimental. When this option is enabled, changes to Tags in advise are sent by a CPU (subscriptions) instead of being read recurrently. The default value of this option is False. For more information, please check section Subscriptions

 

Ethernet Settings

On the Setup tab, select the Ethernet item in the Physical Layer option. On the Ethernet tab, configure the IP address of a CPU in the Main IP option and TCP/IP port 102 in the Port option. The Timeout option on the Setup tab is the time to wait for each response from a CPU. In the TLS handshake and when reading the structure of a program, this Driver waits at least 10 seconds and, in the other steps to open a connection, at least 5 (five) seconds. An S7-1200 CPU takes about 2 (two) seconds to respond to a TLS handshake, therefore opening a connection takes about 3 (three) seconds. The Use SSL option on the Ethernet tab must remain disabled, because this protocol's encryption is performed by this Driver.

 

Loss of a Connection

While the first connection to a CPU is opened, the Tags in advise wait for their first value without a bad quality. If that connection is lost, if opening it fails (such as if a CPU refuses to connect or a response exceeds the time from the Timeout option), or if a CPU cannot be reached within the time defined in the Timeout option (at least 10 seconds), the Tags in advise receive a bad quality at each scan time until a connection is restored. This also applies to the Tags in subscriptions, which are recreated in the next connection. After a failed opening, this Driver waits before opening the connection again 5 (five) seconds after the first failure, twice as long after each new failure in a row, up to 30 seconds. This waiting time returns to 5 (five) seconds after a successful opening.

 

Verifying a Certificate

A CPU identifies itself with a TLS (Transport Layer Security) certificate. Without that verification, communication is encrypted, but a device in the network could pose as that CPU. To verify a certificate, execute the next procedures:

1.Leave the Trusted certificate fingerprints option empty and connect to a CPU.

2.In the log of this Driver, search for a message "WARNING: PLC TLS certificate not verified (SHA-256 fingerprint AB:CD:...)".

3.Copy the fingerprint to the Trusted certificate fingerprints option. In the next connections, the log of this Driver must show the message "PLC TLS certificate verified".

 

If the certificate of a CPU is replaced, such as if a new certificate is generated in TIA Portal, this Driver refuses to connect and logs the new fingerprint, which must then be added to the Trusted certificate fingerprints option.

 

Recurring Readings

Without subscriptions, Tags in advise are read periodically, according to the scan time of each one. The Tags to read are grouped into a single request, up to the limit of variables per request reported by a CPU. The next details must be observed:

•Members of the same structure (Struct or PLC data type) with the same scan time, such as DB_Line.Motors[2].Speed and DB_Line.Motors[2].Running, are read in the same request. This also applies to the direct members of a data block, such as DB_Motor.Speed and DB_Motor.Current

•Members are grouped by the Item property of a Tag. Different elements of an array of structures, such as Motors[2] and Motors[3], form different groups

•When the members enter in advise one at a time, such as when a Screen is opened, a reading can occur before all members are in advise. From the next reading on, the members are read together. A member that cannot be read, that is, a nonexistent variable or an unsupported data type, is not grouped with the other members

•If the members of a structure with the same scan time exceed the limit of variables per request of a CPU, these members are read in more than one request

•Some devices, such as PLCSIM Advanced, close a connection when the response of a reading does not fit into one frame. If a connection drops during a reading in that situation, and the CPU was still responding before dropping, this Driver splits the next readings so that each response fits into one frame, until this Driver is stopped

 

Subscriptions

With the Use subscriptions option enabled, this Driver creates one subscription for each scan time of the Tags in advise, with a minimum of 100 ms, and a CPU sends the values that changed. The next details must be observed:

•While a subscription is created or recreated, such as when Tags enter or leave advise, the Tags of this subscription are read periodically, therefore there is no interruption in the readings

•A Tag that enters advise is read periodically until a subscription is recreated. In these readings, the members of the same structure that are already in that subscription are read in the same request. For more information, please check section Recurring Readings. If one of these members receives a change from that subscription during a reading, or if a reading of this member fails, this member keeps the value from that subscription

•If a CPU refuses a subscription, its Tags are moved to the subscription with the smallest scan time, when it is faster. Otherwise, they are read periodically until the next connection

•Tags with unsupported data types are always read periodically, and their quality indicates that failure

•The values received in a subscription have as timestamp the date and time informed by a CPU when sending, converted to the computer's time zone. Therefore, they depend on the clock of a CPU is correct. The values read periodically, for example while a subscription is recreated, use the same time base, that is, the computer's date and time corrected by the difference between the clock of a CPU and the computer's clock, measured at each sending of that CPU. After a reconnection with a CPU, the last measured difference is still used until the next sending. Before the first sending of a CPU since communication started or since connecting to another CPU, or if a CPU does not inform the date and time, such as older firmwares, the timestamp is the date and time of the computer when a value is received

 

NOTE

Subscriptions are an experimental feature in this version. Keep the default value, that is, recurring readings, unless the subscriptions were tested with a CPU of an application.

Was this page useful?