Details on the S7 driver

This chapter is intended for advanced WinCC OA users. It describes in detail the debug possibilities, error codes of the ACCON-AGLink and provides detailed information on the S7 driver.

Debug levels

In order to detect possible sources of error during the driver actions the command line options can be used for debugging. Use -helpdbg to view more information on all other options (see also Manager options).

Debug level Description
-dbg 2 Describes in detail what the driver does at the moment. It is recommended to set this option only when the driver load is low in order to not to influence the time behavior of the driver.
-dbg 10 Job number information of the S7 driver.
-dbg 11 Poll group building information.
-dbg 12 S7 connection information.
-dbg 25 Debug outputs of "low level" functions and of the data of internal data structures (e.g. in case of an error coming from ACCON-AGLink the detailed error number and constant name).
-dbg 26 Debug outputs of read/write data traffic at "single query" and "write" requests.
-dbg 27 Debug outputs of spontaneous data and alive checks.
-dbg conn Debug output of switching information and opStates for all connection when a PLC changes its state (only inside a 2x2 redundant system).

Transformations

A transformation converts hardware data into a WinCC OA format. The transformation type of a data point element can be queried or set with the aid of the integer constants. If you use dpGet() or dpSet() you have to use the attribute _address.._datatype. For detailed information on the integer constants, used for transformations with the S7 driver, see chapter _address in the appendix.

Error messages

ACCON-AGLink provides a lot of error codes if an operation fails. They can be used by the driver and passed to the WinCC OA log viewer. The following errors are the most important ones. The error text will be written to the WinCC OA log file (and to the Log Viewer), the ACCON-AGLink constant and the value will be written to the driver log file (and to the Log Viewer) if debug level "-dbg 25" is activated.

Constant in ACCON-AGLink Value Error text
AGL40_SUCCESS 0 No error.
AGL40_PENDING 1 Request is pending.
AGL40_PARAMETER_ERROR -1048575 Parameter range error.
AGL40_INVALID_DEV_NUMBER -1048574 Referred Device is not properly opened.
AGL40_DEVICE_OPEN -1048570 Device already in use; it cannot be opened.
AGL40_DEVICE_NOT_OPEN -1048569 Device is not open.
AGL40_INVALID_JOB -1048567 Invalid job number used.
AGL40_NO_QUEUE -720896 No space left in the order queue.
AGL40_NOT_CONNECTED -720894 PLC is not connected.
AGL40_CONNECTION_CLOSED -720893 Connection has been closed.
AGL40_TIMEOUT -720892 No data from PLC.
AGL40_PLC_MEMORY_ERROR -720890 The requested memory could not be allocated.
AGL40_WRONG_OP_STATE -720889 Wrong operating state of PLC.
AGL40_WRONG_ADDRESS -720888 Wrong address in PLC.
AG_LINK_ERROR -720877

If the wrong slot was specified for the cpu.

Under Linux this error message has another meaning:

AGL40_UNKNOWN_PLC_ERROR

if the driver cannot establish a connection to the PLC anymore.

AGL40_HARDWARE_ERROR -720876 PLC hardware error.
AGL40_PLC_NOT_FOUND -720868 PLC not found.

Following error message inside the LogViewer states that no PLC has been found while trying to establish a new connection:

WCCOAs7 (1), 2012.04.20 10:25:35.496, SYS, SEVERE, 13/s7, Allgemeiner AGLink-Fehler (0xfff5001c) für s7(1/1)
WCCOAs7 (1), 2012.04.20 10:25:35.496, SYS, SEVERE, 13/s7, Allgemeiner AGLink-Fehler (0xfff5001c) für s7(1/2)

Polling

The S7 driver may not start a read request for every single WinCC OA address for which the type is "input" and "polling". This would lead to a very bad performance. The PLC tags that should be polled are grouped by the driver according to the entry MaxGap in the config file and according to the poll groups they belong to.

ACCON-AGLink supports asynchronous read requests. This means a read job can be started and the driver does not have to wait for the result of this job. There will be a callback when it has been finished or it has failed.

As it makes sense to parallelize requests for the PLC, there will be one queue for write requests (they have to be sent to the PLC as soon as possible) and two queues for read requests. The connections for these queues will be automatically set up by the driver.

If the config entry UseConnections is activated, only one link is used for reading and writing. The latter case might be better for old S7-300 equipment, which are very limited in available connections.

Polling on Use

"Polling on Use" means that values are then polled from the peripherals only when the values are used, for example when a user interface has to display the values or when a Ctrl-Manager is connected to that value. "Polling on use" leads to a reduction of the communication load between PLC and driver. Refer to driver specific functions - poll on use for further information.

Notes and restrictions

Amount of the poll addresses

In order to take full advantage of "Polling on Use", the amount of the permanent poll addresses should be much smaller than the amount of the addresses using "poll on use". A ratio of smaller than 1:10 is recommended. Since the Simatic driver optimizes the polling queries (The polling queries are organized in so-called poll group blocks for which the MaxGap parameter controls the amount of empty bytes between polled values, so that the related block is not interrupted), the total polling blocks are either active or inactive. As long as one address is required, the entire block is queried. In case that the poll group blocks are getting too big, and / or the ratio between cyclic polled addresses and addresses using "Polling on Use" is bigger that 1:10, "Polling on Use" does not show significant performance benefits.

Note: Please also note that the value for [s7] MaxGap should not be too large as large values result in less optimal blocks.

Large poll blocks

To achieve an optimal configuration for using "Polling on Use", the config entry maxPollBlockSize can be used to limit the size of poll block groups. This will prevent that too many addresses will be used inside of one block which would cause a high number of read requests for the larger blocks even though only few values of the group are needed.

Supported CPUs for S7 symbolic addresses

Following list contains all processors that are supported for using the S7 symbolic addresses with the WinCC OA version 3.18 S7 driver.

Name Device Type
CPU 312 V3.3 6ES7 312-1AE14-0AB0
CPU 314 V3.3 6ES7 314-1AG14-0AB0
CPU 315-2 DP V3.3 6ES7 315-2AH14-0AB0
CPU 315F-2 DP V3.3 6ES7 315-6FF04-0AB0
IM151-7 CPU V3.3 6ES7 151-7AA21-0AB0
IM151-7 F-CPU V3.3 6ES7 151-7FA21-0AB0
CPU 312C Firmware V3.3 6ES7 312-5BF04-0AB0
CPU 313C Firmware V3.3 6ES7 313-5BG04-0AB0
CPU 313C-2 DP Firmware V3.3 6ES7 313-6CG04-0AB0
CPU 313C-2 PtP Firmware V3.3 6ES7 313-6BG04-0AB0
CPU 314C-2 DP Firmware V3.3 6ES7 314-6CH04-0AB0
CPU 314C-2 PN/DP Firmware V3.3 6ES7 314-6EH04-0AB0
CPU 314C-2 PtP Firmware V3.3 6ES7 314-6BH04-0AB0
CPU 315-2 PN/DP Firmware V3.2 6ES7 315-2EH14-0AB0
CPU 315F-2 PN/DP Firmware V3.2 6ES7 315-2FJ14-0AB0
CPU 317-2 DPFirmware V3.3 6ES7 317-2AK14-0AB0
CPU 317-2 PN/DP Firmware V3.2 6ES7 317-2EK14-0AB0
CPU 317F-2 DP Firmware V3.3 6ES7 317-6FF04-0AB0
CPU 317F-2 PN/DP Firmware V3.2 6ES7 317-2FK14-0AB0
CPU 319-3 PN/DPFirmware V3.2 6ES7 318-3EL01-0AB0
CPU 319F-3 PN/DP Firmware V3.2 6ES7 318-3FL01-0AB0
CPU 315T-2 DP Firmware V2.3/3.1 6ES7 315-6TG10-0AB0
CPU 315T-2 DP Firmware V2.4/3.2 6ES7 315-6TG10-0AB0
CPU 315T-2 DP Firmware V2.6/4.1.1 6ES7 315-6TG10-0AB0
CPU 315T-2 DP Firmware V2.6/4.1.1 6ES7 315-6TH13-0AB0
CPU 317T-2 DP Firmware V2.1/3.0.1 6ES7 317-6TJ10-0AB0
CPU 317T-2 DP Firmware V2.3/3.1 6ES7 317-6TJ10-0AB0
CPU 317T-2 DP Firmware V2.4/3.2 6ES7 317-6TJ10-0AB0
CPU 317T-2 DP Firmware V2.6/4.1.1 6ES7 317-6TJ10-0AB0
CPU 317T-2 DP Firmware V2.6/4.1.1 6ES7 317-6TK13-0AB0
C7 CPU 613 6ES7 613-1CA00-0AE3
C7 CPU 613 Firmware V2.0 6ES7 613-1CA01-0AE3
C7 CPU 613 Firmware V2.0 6ES7 613-1CA02-0AE3
C7 CPU 613 Firmware V2.6 6ES7 613-1CA02-0AE3
C7 CPU 621 6ES7 621-1AD00-0AE3
C7 CPU 621 6ES7 621-1AD01-0AE3
C7 CPU 621 Firmware V1.1 6ES7 621-1AD02-0AE3
C7 CPU 621 Firmware V1.2 6ES7 621-1AD02-0AE3
C7 CPU 621 6ES7 621-6BD00-0AE3
C7 CPU 621 6ES7 621-6BD01-0AE3
C7 CPU 621 Firmware V1.1 6ES7 621-6BD02-0AE3
C7 CPU 621 Firmware V1.2 6ES7 621-6BD02-0AE3
C7 CPU 623 6ES7 623-1AE00-0AE3
C7 CPU 623 6ES7 623-1AE01-0AE3
C7 CPU 623 6ES7 623-1CE00-0AE3
C7 CPU 623/A 6ES7 623-1CE01-0AE3
C7 CPU 623/P 6ES7 623-1DE01-0AE3
C7 CPU 624 6ES7 624-1AE00-0AE3
C7 CPU 624 6ES7 624-1AE01-0AE3
C7 CPU 624/P 6ES7 624-1DE01-0AE3
C7 CPU 626 6ES7 626-1AG00-0AE3
C7 CPU 626 6ES7 626-1AG01-0AE3
C7 CPU 626 6ES7 626-1AG02-0AE3
C7 CPU 626 6ES7 626-1CG00-0AE3
C7 CPU 626/A 6ES7 626-1CG01-0AE3
C7 CPU 626/A 6ES7 626-1CG02-0AE3
C7 CPU 626-DP 6ES7 626-2AG00-0AE3
C7 CPU 626-DP 6ES7 626-2AG01-0AE3
C7 CPU 626-DP 6ES7 626-2AG02-0AE3
C7 CPU 626-DP 6ES7 626-1DG02-0AE3
C7 CPU 626-DP 6ES7 626-1DG03-0AE3
C7 CPU 626-DP Firmware V1.0 6ES7 626-1DG04-0AE3
C7 CPU 626-DP Firmware V1.2 6ES7 626-1DG04-0AE3
C7 CPU 626/P DP 6ES7 626-2DG02-0AE3
C7 CPU 626/P DP 6ES7 626-2DG03-0AE3
C7 CPU 626/P DP Firmware V1.0 6ES7 626-2DG04-0AE3
C7 CPU 626/P DP Firmware V1.2 6ES7 626-2DG04-0AE3
C7 CPU 633 6ES7 633-1AF00-0AE3
C7 CPU 633/A 6ES7 633-1CF00-0AE3
C7 CPU 633/P 6ES7 633-1DF00-0AE3
C7 CPU 633/P 6ES7 633-1DF01-0AE3
C7 CPU 633/P Firmware V1.0 6ES7 633-1DF02-0AE3
C7 CPU 633/P Firmware V1.2 6ES7 633-1DF02-0AE3
C7 CPU 633-DP 6ES7 633-2AF00-0AE3
C7 CPU 633-DP 6ES7 633-2BF00-0AE3
C7 CPU 633-DP 6ES7 633-2BF01-0AE3
C7 CPU 633-DP Firmware V1.0 6ES7 633-2BF02-0AE3
C7 CPU 633-DP Firmware V1.2 6ES7 633-2BF02-0AE3
C7 CPU 634 6ES7 634-1AF00-0AE3
C7 CPU 634/A 6ES7 634-1CF00-0AE3
C7 CPU 634/P 6ES7 634-1DF00-0AE3
C7 CPU 634/P 6ES7 634-1DF01-0AE3
C7 CPU 634/P Firmware V1.0 6ES7 634-1DF02-0AE3
C7 CPU 634/P Firmware V1.2 6ES7 634-1DF02-0AE3
C7 CPU 634-DP 6ES7 634-2AF00-0AE3
C7 CPU 634-DP 6ES7 634-2BF00-0AE3
C7 CPU 634-DP 6ES7 634-2BF01-0AE3
C7 CPU 634-DP Firmware V1.0 6ES7 634-2BF02-0AE3
C7 CPU 634-DP Firmware V1.2 6ES7 634-2BF02-0AE3
C7 CPU 635 OP 6ES7 635-2EC00-0AE3
C7 CPU 635 Key Firmware V2.0 6ES7 635-2EC01-0AE3
C7 CPU 635 Key Firmware V2.0 6ES7 635-2EC02-0AE3
C7 CPU 635 Key Firmware V2.6 6ES7 635-2EC02-0AE3
C7 CPU 635 TB 6ES7 635-2EB00-0AE3
C7 CPU 635 Touch Firmware V2.0 6ES7 635-2EB01-0AE3
C7 CPU 635 Touch Firmware V2.0 6ES7 635-2EB02-0AE3
C7 CPU 635 Touch Firmware V2.6 6ES7 635-2EB02-0AE3
C7 CPU 636 Key Firmware V2.0 6ES7 636-2EC00-0AE3
C7 CPU 636 Key Firmware V2.6 6ES7 636-2EC00-0AE3
C7 CPU 636 Touch Firmware V2.0 6ES7 636-2EB00-0AE3
C7 CPU 636 Touch Firmware V2.6 6ES7 636-2EB00-0AE3
IM151-7 CPU Firmware V1.0 6ES7 151-7AA00-0AB0
IM151-7 CPU Firmware V2.0 6ES7 151-7AA10-0AB0
IM151-7 CPU Firmware V2.1 6ES7 151-7AA10-0AB0
IM151-7 CPU Firmware V2.1 6ES7 151-7AA11-0AB0
IM151-7 CPU Firmware V2.1 6ES7 151-7AA13-0AB0
IM151-7 CPU Firmware V2.6 6ES7 151-7AA20-0AB0
IM151-7 CPU FO Firmware V1.0 6ES7 151-7AB00-0AB0
IM151-7 F-CPU Firmware V2.0 6ES7 151-7FA00-0AB0
IM151-7 F-CPU Firmware V2.1 6ES7 151-7FA01-0AB0
IM151-7 F-CPU Firmware V2.6 6ES7 151-7FA20-0AB0
IM151-8 PN/DP CPU Firmware V2.7 6ES7 151-8AB00-0AB0
IM151-8 PN/DP CPU Firmware V3.2 6ES7 151-8AB01-0AB0
IM151-8F PN/DP CPU Firmware V2.7 6ES7 151-8FB00-0AB0
IM151-8F PN/DP CPU Firmware V3.2 6ES7 151-8FB01-0AB0
CPU 412-3 H Firmware V4.5 6ES7 412-3HJ14-0AB0
CPU 414-4 H Firmware V2.1 6ES7 414-4HJ00-0AB0
CPU 414-4 H Firmware V3.0 6ES7 414-4HJ00-0AB0
CPU 414-4 H Firmware V3.1 6ES7 414-4HJ00-0AB0
CPU 414-4 H Firmware V4.0 6ES7 414-4HJ04-0AB0
CPU 414-4 H Firmware V4.5 6ES7 414-4HM14-0AB0
CPU 417-4 H Firmware V1.1 6ES7 417-4HL00-0AB0
CPU 417-4 H Firmware V2.0 6ES7 417-4HL00-0AB0
CPU 417-4 H Firmware V2.1 6ES7 417-4HL00-0AB0
CPU 417-4 H Firmware V2.1 6ES7 417-4HL01-0AB0
CPU 417-4 H Firmware V3.0 6ES7 417-4HL01-0AB0
CPU 417-4 H Firmware V3.1 6ES7 417-4HL01-0AB0
CPU 417-4 H Firmware V4.0 6ES7 417-4HL04-0AB0
CPU 417-4 H Firmware V4.5 6ES7 417-4HT14-0AB0
CPU 412-2 PCI Firmware V1.1 6ES7 612-2QH00-0AB4
CPU 412-2 PCI Firmware V3.0 6ES7 612-2QH00-0AB4
CPU 412-2 PCI Firmware V3.1 6ES7 612-2QH00-0AB4
CPU 412-2 PCI Firmware V3.4 6ES7 612-2QH00-0AB4
CPU 412-2 PCI Firmware V4.0 6ES7 612-2QH10-0AB4
CPU 416-2 PCI Firmware V1.1 6ES7 616-2QL00-0AB4
CPU 416-2 PCI Firmware V3.0 6ES7 616-2QL00-0AB4
CPU 416-2 PCI Firmware V3.1 6ES7 616-2QL00-0AB4
CPU 416-2 PCI Firmware V3.4 6ES7 616-2QL00-0AB4
CPU 416-2 PCI Firmware V4.0 6ES7 616-2QL10-0AB4
WinLC RTX EC Firmware V1.0 6ES7 677-1DD00-0BA0
WinLC RTX EC Firmware V1.1 6ES7 677-1DD00-0BA0
WinLC RTX EC Firmware V1.2 6ES7 677-1DD10-0BA0
WinLC RTX F EC Firmware V1.1 6ES7 677-1FD00-0BB0
WinLC RTX F EC Firmware V1.2 6ES7 677-1FD10-0FB0
WinLC V3.0 6ES7 611-1PY00-0YB7
WinLC V4.0 6ES7 611-4PY00-0YB7
WinLC V4.1 6ES7 611-4PY00-0YB7
WinLC PN V1.1 6ES7 611-1PY10-0YB7
WinLC RTX V3.0 6ES7 611-1SB00-0YB7
WinLC RTX V3.1 6ES7 611-1SB00-0YB7
WinLC RTX V4.0 6ES7 611-4SB00-0YB7
WinLC RTX V4.1 6ES7 611-4SB00-0YB7
WinLC RTX V4.2 6ES7 611-4SB00-0YB7
WinLC RTX V4.3 6ES7 611-4SB00-0YB7
WinLC RTX V4.4 6ES7 611-4SB00-0YB7
WinLC RTX V4.5 6ES7 611-4SB00-0YB7
WinLC RTX V4.6 6ES7 611-4SB00-0YB7
WinLC RTX F V4.5 6ES7 611-4FB00-0YB7
WinLC RTX F V4.6 6ES7 611-4FB00-0YB7
WinLC T V4.2/V3.2 6ES7 675-3AG30-0PA
840D sl NCU710.1 -
840D sl NCU720.1 -
840D sl NCU730.1 -
840D sl NCU730.2 PN -
840Di sl -
8x0D PLC317-2AJ10 -
8x0D PLC314C-2 DP -
8x0D PLC315-2AF03 -
8x0D PLC315-2AF01 -
840D PLC315-2AF00 -
8x0D PLC314 -
840Di PLC317-2AJ10 -
840Di PLC315-2AF03 -
840Di PLC315-2AF03 -
CPU 319-3 PN/DP Firmware V3.2 6ES7 318-3EL01-0AB0
CPU 319F-3 PN/DP Firmware V3.2 6ES7 318-3FL01-0AB0
CPU 412-1 Firmware V5.3 6ES7 412-1XJ05-0AB0
CPU 412-2 DP Firmware V5.3 6ES7 412-2XJ05-0AB0
CPU 412-2 PN Firmware V6.0 6ES7 412-2EK06-0AB0
CPU 414-3 DP Firmware V5.3 6ES7 414-3XM05-0AB0
CPU 414-3 PN/DP Firmware V6.0 6ES7 414-3EM06-0AB0
CPU 414F-3 PN/DP Firmware V6.0 6ES7 414-3FM06-0AB0
CPU 416-2 DP Firmware V5.3 6ES7 416-2XN05-0AB0
CPU 416-3 DP Firmware V5.3 6ES7 416-3XR05-0AB0
CPU 416-3 PN/DP Firmware V6.0 6ES7 416-3ES06-0AB0
CPU 416F-2 Firmware V5.3 6ES7 416-2FN05-0AB0
CPU 416F-3 PN/DP Firmware V6.0 6ES7 416-3FS06-0AB0
CPU 315-2PN/DP Firmware V3.1 6ES7 315-2EH14-0AB0
CPU 315F-2PN/DP Firmware V3.1 6ES7 315-2FJ14-0AB0
CPU 317-2PN/DP Firmware V3.1 6ES7 317-2EK14-0AB0
CPU 317F-2PN/DP Firmware V3.1 6ES7 317-2FK14-0AB0
CPU 312 Firmware V3.0 6ES7 312-1AE14-0AB0
CPU 314 Firmware V3.0 6ES7 314-1AG14-0AB0
CPU 315-2 DP Firmware V3.0 6ES7 315-2AH14-0AB0
CPU 315F-2 DP Firmware V3.0 6ES7 315-6FF04-0AB0
CPU 417-4 Firmware V5.3 6ES7 417-4XT05-0AB0
CPU 319-3 PN/DP Firmware V2.8 6ES7 318-3EL00-0AB0
CPU 319F-3 PN/DP Firmware V2.8 6ES7 318-3FL00-0AB0
CPU 412-1 Firmware V5.2 6ES7 412-1XJ05-0AB0
CPU 412-2 DP Firmware V5.2 6ES7 412-2XJ05-0AB0
CPU 414-2 DP Firmware V5.2 6ES7 414-2XK05-0AB0
CPU 414-3 DP Firmware V5.2 6ES7 414-3XM05-0AB0
CPU 414-3 PN/DP Firmware V5.3 6ES7 414-3EM05-0AB0
CPU 416-2 DP Firmware V5.2 6ES7 416-2XN05-0AB0
CPU 416-3 DP Firmware V5.2 6ES7 416-3XR05-0AB0
CPU 416-3 PN/DP Firmware V5.3 6ES7 416-3ER05-0AB0
CPU 416F-2 Firmware V5.2 6ES7 416-2FN05-0AB0
CPU 416F-3 PN/DP Firmware V5.3 6ES7 416-3FR05-0AB0
CPU 417-4 Firmware V5.2 6ES7 417-4XT05-0AB0