Internal data points of the S7 driver

For the S7 driver a data point is required for each peripheral connection. The internal data point type is _S7_Conn and the single data points are indicated with _<connection name>. The connection name has to be unique in the system (the internal data point is created when creating and configuring the connections - see also Configuration of the S7 driver). Furthermore, there are three data point types when working with the S7 driver - _S7_Config, _S7_Symbolics and _S7_AlarmParam.

_S7_Conn

The following table shows the elements of the data point type _S7_Conn

Data point element Type Description
DoGeneralQuery bool Specifies if a general query should be made on the device. Set the value to 1 to start a general query.
SetInvalidBit bool Specifies if the invalid bit should be set when data from the PLC are invalid.
UseTSPP Using the extension TSPP for receiving spontaneous data from the PLC (TRUE) or not (FALSE).
DoBrowseSymbols bool Specifies if the browsing of symbolic addresses should be used.
ProjectName string Specifies the project name (for browsing symbolic addresses).
ProgramName string Specifies the program name (for browsing symbolic addresses).
DrvNumber int Contains the driver number of the driver, which is responsible for the device. This DPE is set by the driver during startup. It can, for example, be used by control scripts to send commands to the according data point of type "_DriverCommon".
Active bool You can switch the device either to active (TRUE) or to inactive (FALSE). If you deactivate the device, the data point will, however, not be deleted and you can activate it anytime. See also active check box in the chapter Configuration of the S7 driver.
LastError int

Contains the last occurred error for each connection.

Positive error is caused by an internal S7 driver fault (the meaning of the specific error can be seen in the Log Viewer or in the catalog file s7.cat). Negative error is caused by an ACCON-AGLink library fault (the meaning of the specific error can be seen in the table on page Details on the S7 driver).

DevNr unsigned Number of the configured device (see also Configuration of the S7 driver).
ConnState int Status information for the device. There are four states: Not connected (0), Connected (1), General query (2), Not active (3).
State.Diagnostic.Communication.FreeConnections int Free HMI connections.
State.Diagnostic.Communication.TotalConnections int Total connection load
State.Diagnostic.Communication.MaxConnectionLoad int Maximum connection load
State.Diagnostic.ProgramExec.LastCycle time Last cycle time
State.Diagnostic.ProgramExec.MaxCycle time Max. cycle time
State.Diagnostic.ProgramExec.MinCycle time Min. cycle time
State.Diagnostic.ProgramExec.MaxCycleConfig time Configured max. cycle time
State.Diagnostic.ProgramExec.MinCycleConfig time Configured min. cycle time
State.Diagnostic.ProgramExec.SystemVersion string The HW config and program checksum for comparing if changes to the PLC were made.
State.SentTelegrams unsigned Number of sent telegrams. This information you will find in the Info panel.
State.RcvTelegrams unsigned Number of received telegrams. This information you will find in the Info panel.
State.RejTelegrams unsigned Number of rejected telegrams. This information you will find in the Info panel.
ReduConn.DevNr unsigned The data of the redundant connection is saved here. See also DPE "DrvNr".
ReduConn.ConnState int The data of the redundant connection is saved here. See also DPE "ConnState".
ReduConn.Active bool The data of the redundant connection is saved here. See also DPE "Active".
ReduConn.LastError int The data of the redundant connection is saved here. See also DPE "LastError".
ReduCP.DevNr unsigned The data of the redundant device is saved here. See also DPE "DevNr".
ReduCP.ConnState int The data of the redundant device is saved here. See also DPE "ConnState".
ReduCP.Active bool The data of the redundant device is saved here. See also DPE "Active".
ReduCP.LastError int The data of the redundant device is saved here. See also DPE "LastError".
ReduCP.ReduConn.DevNr unsigned The data of the redundant connection of the redundant device is saved here. See also DPE "DevNr".
ReduCP.ReduConn.ConnState int The data of the redundant connection of the redundant device is saved here. See also DPE "ConnState".
ReduCP.ReduConn.Active bool The data of the redundant connection of the redundant device is saved here. See also DPE "Active".
ReduCP.ReduConn.LastError int The data of the redundant connection of the redundant device is saved here. See also DPE "LastError".
ReduControl.CP.SpsTag string Address in the PLC, which causes a switching of the device (while the value is 1, the driver does not switch to the other PLC; if the value changes to 0, the driver switches to the redundant PLC).
ReduControl.CP.CmdMode int

Properties of the command direction in case of an existing redundant device:

0 ... Command to active device

1 ... Command to both devices

ReduControl.CP.Switch int

Setting for the device switching:

0 ... Automatic

1 ... Device 1 (fix)

2 ... Device 2 (fix)

ReduControl.Conn.SpsTag string Address in the PLC, which causes a switching of the connection.
ReduControl.Conn.CmdMode int

Properties of the command direction in case of an existing redundant connection:

0 ... Command via active connection

1 ... Command via both connections

ReduControl.Conn.Switch int

Setting for the connection switching:

0 ... Automatic

1 ... Connection 1 (fix)

2 ... Connection 2 (fix)

ActiveConn int

This DPE is for displaying the active connection for the driver:

0 ... First device nominal connection

1 ... First device redundant connection

256 ... Redundant device nominal connection

257 ... Redundant device redundant connection

opState int

Operating state of the PLC (0 STOP, 1 STARTING, 2 RUN, 3 UNDEFINED). The driver reads the state only when you set the config file entry "ReadOpState " to "Y" (see Possible config entries of the S7 driver).

Redundant PLC

When using redundant PLCs (H-System), different states will be sent by the driver:

0 UNKNOWN

1 CPU STOP (Updating)

2 CPU STOP (Full reset)

3 CPU STOP (Initializing)

4 CPU STOP (Both PLCs are running)

5 CPU START (Cold start)

6 CPU START (Warm start)

7 CPU START (Resuming)

8 RUN SOLO (Only one PLC is running)

9 RUN REDU (Both PLCs are running)

10 CPU HALT

11 CONNECTING

12 UPDATING

13 DEFECT

14 SELFTEST

15 NO POWER

Time.Value time The current time of the PLC. The driver reads the time only when you set the config entry ReadPLCTime to "Y" (see Possible config entries of the S7 driver).
Time.SyncTime time Sets the time in the PLC to the value of this element. If you set the value 0, the driver uses the current time.
AlarmActive bool

TRUE = alarming is active

FALSE = alarming is inactive

S7Stations dyn_string Listing of the stations (CSV-coded incl. appropriate device number of the first CP) for which an _S7_AlarmParam-DP is created.

_S7_Config

The following table shows the elements of the data point type _S7_Config. There is only one instance of this data point type with the name "_S7_Config". It is used to store the definitions made with the configuration panel (see also Configuration of the S7 driver). In the _S7_Config datapoint the configuration of all configured PLCs is saved. For the DPE ConnectionType there are three different values: 0 means ”PG connection”, 1 means ”OP connection”, 2 means ”Other connection”, 3 means ”TSPP S7 connection” (this value is automatically used when the check box Use TSPP is activated).

Data point element Type Description
DoConfigAcconAGLink bool Obsolete.
IPAddress dyn_string The IP address (or the host name) of the CPU.
Rack dyn_uint The rack number of the CPU unit of the PLC. This has to be considered for different PLC assembles, e.g. S7-300 and S7-400.
Slot dyn_uint The slot number of the CPU unit of the PLC. This must be considered for different PLC assembles, e.g. S7-300 and S7-400.
Timeout dyn_uint Timeout for the connection.
ConnectionType dyn_uint Specifies the connection type (PG, OP, Other, TSPP, MPI).
TSPPExtras dyn_string Contains the additional TSPP connection parameters.
ProtocolExtras dyn_string Contains additional MPI/S7 connection parameters.
AvailableS7AlarmClasses dyn_string Available S7 alert classes.
AvailableS7ACPrios dyn_int Available priorities of the S7 alert classes.
S7AlarmClass dyn_string S7 alert classes (optionally incl. priority for a more detailed segmentation)
AlarmClass dyn_string Mapped WinCC OA alert class.
Connections.All dyn_string

Each entry of this element contains a <connection> <driver number> pair. E.g.: PLC 1 2

This element is only read by the driver at startup.

Connections.Add string This element is for adding a new connection during runtime of the driver. The syntax of an entry is the same as above (<connection> <driver number>).

_S7_Symbolics

The following table shows the elements of the data point type _S7_Symbolics. This data point type is used for storing the information received from browsing the symbolic addresses of a project.

Data point element Type Description
S7Address dyn_string Addresses in the S7 address format, for example, DB1.DBW100.
SymbolicAddress dyn_string Symbolic address, for example, "Water_level".
SymbolicFormat dyn_int

Contains the information about the data type of the address. Following types are possible:

#define AGLSYM_FORMAT_BOOL 1

#define AGLSYM_FORMAT_BYTE 2

#define AGLSYM_FORMAT_CHAR 3

#define AGLSYM_FORMAT_WORD 4

#define AGLSYM_FORMAT_INT 5

#define AGLSYM_FORMAT_DWORD 6

#define AGLSYM_FORMAT_DINT 7

#define AGLSYM_FORMAT_REAL 8

#define AGLSYM_FORMAT_DATE 9

#define AGLSYM_FORMAT_TIMEOFDAY 10

#define AGLSYM_FORMAT_TIME 11

#define AGLSYM_FORMAT_S5TIME 12

#define AGLSYM_FORMAT_COUNTER 28

#define AGLSYM_FORMAT_TIMER 29.

ScreenRefresh bool For internal use.

_S7_AlarmParam

The following table shows the elements of the data point type _S7_AlarmParam. This data point type stores the information according S7 alarms (unique for each S7 project and S7 program). A data point name of this type is composed of the connection name, the S7 project name and the station name, e.g. "_S7300_TestProject_SIMATIC300".

Data point element Data Type Description
EventId dyn_int Alert number (unique ID of the alert).
Signalnr dyn_int Signal number (sub-ID for alarm_8).
MsgName dyn_string Alert identifier (SPS variable with trigger function)
MsgType dyn_int Alert type (enum for alarm, alarm_8, etc.)
DBName dyn_int Name of the data block which triggered the alert.
FBName dyn_int Function block of the DB.
Text dyn_langString Alert text.
Info dyn_langString Info text.
AddText dyn_langString Additional texts (max. 9 additional texts per alert; CSV-coded in a string).
MsgClass dyn_int Alert class.
Priority dyn_int Priority (from 0 to 16).
AckGroup dyn_int Acknowledge group (from 1 to 16).
AckOpt dyn_int Defines whether an acknowledgment takes place or not (acknowledgement option).
Protocol dyn_int Defines whether an alert is recorded.
DispGroup dyn_int Display class. Filter possibility in the GUI.
SCANOperand dyn_string Symbol-related alarm operand.
SCANInterval dyn_int SCAN interval in milliseconds.
SCANAddValue dyn_string string addresses of the SCAN additional values (CSV-coded).
S7Symbol dyn_string Symbolic name.
S7Name dyn_string DB or FB identifier