[mod]

Settings for the Modbus driver

[mod] addUnicosMarker

Type
int
Default
-1
Range
-1..65535
Defines the reference number that is used by the driver to decide whether it is a Modbus or a UNICOS frame. The entry is deactivated by default.

[mod] aliveInterval

Type
unsigned
Default
10 [s]
Range
>= 0
Specifies an alive interval for the driver in seconds. The Value 0 means that no keep-alive messages are sent. A value > 0 means that the driver sends a read request to all connected PLCs every aliveInterval seconds.

[mod] aliveTimeoutMsg

Type
unsigned unsigned
Default
3 1
Specifies the function code and the reference number for the alive request.

[mod] autoGQ

Type
bool
Default
1
Range
0|1
Defines whether general queries shall be executed automatically. 0 = no automatic general query 1 = automatic general query when connection is established

[mod] idleCloseTimeout

Type
unsigned
Default
0 [s]
Range
>= 0
The driver closes the connection to the PLC if the connection is idle for the specified time (in seconds). This is done only for connections in master mode.

[mod] littleEndianRegister

Type
int
Default
-1
Range
-1|0|1

Defines the order of registers (16bit words) within 32bit or 64bit process data.

Possible values:

  • -1 - No preferred value is defined. (Default).
  • 0 - bigEndianRegister is preferred.
  • 1 - littleEndianRegister is preferred.

[mod] maxConnRetryNumber

Type
unsigned
Default
0
Range
>= 0
Specifies how many times the driver retries to establish a connection when sending a telegram, if the connection request fails.

[mod] maxGap

Type
uint
Default
16
Range
0..100
If the difference of two consecutive address reference numbers is lower or equal the value in maxGap, than these addresses are grouped together in one poll block. If not, then a second poll block is created. This entry provides the poll query optimization.

[mod] maxPendingRequests

Type
unsigned
Default
1
Range
1..8
The maximum number of outstanding requests without response. The entry can be used for sending more requests in advance in order to speed up the communication. If you set the value of the entry to higher than 1, you have to verify that the PLCs controlled by the driver are able to handle several requests.

[mod] maxQueueSize

Type
int
Default
256
Defines the size of the request queue for master mode. For example maxQueueSize = 1000

[mod] maxRequestRetryNumber

Type
unsigned
Default
0
Range
>= 0
Specifies the number of retries for a requests if a response is missing.

[mod] onlyActivePolls

Type
bool
Default
0
Range
0|1
Only the active driver polls in a redundant system

[mod] plc

Type
string
Obsolete since WinCC OA version 3.9. The datapoint name of PLC the driver cares for. An entry must exist for each PLC (e.g. plc = "_Mod_Plc_2"). The datapoints are created automatically by defining the parameters in the parameterization panel of the Modbus/TCP driver (see chapter Parameterization panel of the Modbus/TCP driver).

[mod] pollOptForBlob

Type
bool
Default
1
Range
0|1
Defines whether a poll query optimization is used for blobs (default = yes).

[mod] requestDelay

Type
uint
Default
0
Range
>= 0
Time in milliseconds, which must be between two requests. The value should not be set to high, because it reduces data throughput. This entry is only relevant if gateways are involved.

[mod] simUnicosEvents

Type
unsigned
Default
24
Range
1..24
The parameter specifies the number of items for a simulated Event Report.

[mod] simUnicosPlc

Type
bool
Default
0
Range
0|1
Determines if the master should send UNICOS frames for specific, normally unused function codes. If you specify the function code 120 in to a peripheral address, a data status frame containing arbitrary data is generated. If you specify the function code 121, an Event Report frame containing arbitrary data is generated.

Used only for TEST PURPOSES.
The function code is used to inform the driver to generate a UNICOS frame. The code is not sent outside.

[mod] statCheckInterval

Type
uint
Default
20 [s]
Range
5-100
Time interval where request statistic datapoint elements are written by the driver.

[mod] suspendTimeFactor

Type
int
Default
10
Range
1-100
If there are several RTU slaves behind a gateway and one or more of this slaves does not reply, the communication to the failing slaves is suspended for an interval of suspendTimeFactor*transactionTimeout to avoid big performance degradation of the communication to the remaining available slaves.

[mod] tcpConnectTimeout

Type
unsigned
Default
2000 [ms]
Range
>=1000
Connection timeout. When the connection is established, the driver waits until the connection is initialized and until an acknowledgement is received from the PLC. If the driver does not receive the acknowledgement within a timeout, the driver re-establishes the connection. The timeout is specified using the config entry tcpConnectTimeout in the Modbus section.

[mod] tcpReceiveBufferSize

Type
unsigned
Default
0
Range
>=300
With this entry the TCP receive buffer size can be adjusted. This is only needed in exceptional cases if an old Modbus device can not handle modern operating system TCP windows size setting. The default setting 0 means that operating system default for receive buffer is used. If a connection to an old device cannot be established, it might be that a low value of e.g. 512 makes a connection possible.

[mod] tcpServerPort

Type
unsigned
Default
0
Range
0..65535
The port number of the TCP server. The driver opens a server socket for Modbus clients. If the port is 0 the driver does not open a server socket and it is operating in client mode only.

[mod] unicosMarker

Type
int
Default
65535(0xFFFF)
Range
-1..65535
The driver decides with this reference number whether a Modbus or a UNICOS frame should be used. The entry is deactivated with -1. In order to deactivate UNICOS completely, set the entry to -1 (nothing may be set for addUnicosMarker!).