Applies To:
  • CitectSCADA 5.42, 5.42A, 5.50, 5.50A
  • CitectHMI 5.42, 5.42A, 5.50, 5.50A

Summary:
The current latest S7 driver V2.05.07.001B1 does not use the optimal data transfer settings supported by the Siemens S7 PLCs hardware. A new alpha driver V2.05.09.003RA allows for larger data transfer length and hence offers increased throughput.

What can I do to increase the performance of the S7 driver to maximise data throughput, and hence possibly reduce response time and page display time in Citect?

 

Solution:
The Siemens S7-API (via the S7 functions) has a maximum data transfer length based on the negotiated PDU size between the PLCs and the active partner (eg Citect S7NT driver). The size of PDU depends on the type of network card used to communicate to the Siemens S7 PLCs. Generally, if you are using "Softnet", the maximum PDU size supported by the Siemens S7 API is 240 bytes. When using "Hardnet" via the Siemens CP1613 card, the PDU size supported is bigger than the equivalent value for Softnet.

The current documentation for the Siemens Softnet S7-API states that PDU sizes of 240, 480 and 960 bytes are supported. It also states the maximum data length supported is calculated as follows:

max data length READ = negotiated PDU size - 18

max data length WRITE = negotiated PDU size - 28

with PDU size dependent on the hardware used - eg. S7-300 vs S7-400 and whether Profibus-DP, TCP/IP or RFC1006 is used as the transport medium.

For an S7-300 PLC using the CP343-1 module and a standard NIC card, the supported PDU size is 240 bytes giving a maximum data length of 222 bytes or 1776 bits for READ operations. For WRITE operations, the maximum allowed data length is 212 bytes or 1696 bits for a PDU size of 240 bytes.

For READ operations, earlier versions of the S7 driver use a default maximum value of 512 bits (hard-coded) to generate READ requests to the Siemens S7 API.

The chosen value used by the S7 driver is not optimal to maximise through-put to and from the S7 PLCs.

New S7 driver V2.05.09.003RA

======================

The S7 driver V2.05.09.003RA has been enhanced with increased READ requests size increased from 512 to 1776 bits (assumming the lowest PDU size supported by the S7-API of 240 bytes). The driver has to limit the maximum READ request size to 1776 bits due to the limit of the buffer space used for data transfer between the driver and the Citect IOServer (buffer is limited to 255 bytes).

In addition, the current profdir.dbf file settings for the S7NT driver (in the Citect\bin folder ) uses default BIT_BLOCK and MAX_LENGTH settings of 512. This is to ensure compatability with existing projects which may use older S7 PLC firmware.

If you need "more speed" from the S7 driver, the BIT_BLOCK and MAX_LENGTH can be increased to 1776. This wil result in bigger requests sent to the Siemens S7 API, thus increasing throughput in Citect.

With increased block request size, there is an increased chance that the driver will return errors 0x2008 (Illegal Real value) to Citect. This usually happens if reading a REAL in a block containing other data types such as INTs. If this is the case, driver V2.05.07.001B1 introduced a new parameter to suppress the check for valid IEEE float format for REAL numbers.

[S7NT.port_name.Unit_name]
EnableFloatCheck = [1|0]

where port_name is the name of the Citec port in Citect,

unit_name is the name of the iodevice.

Be default, EnableFloatCheck =1 is used and the driver will check for valid IEEE float format for data returned from the PLC. Set EnableFloatCheck =0 will suppress the check for valid IEEE float format for REAL data type.

 

Keywords:
 

Attachments