Message Diagnostics

Data points are provided as standard for messages between Event 0 and 4 CTRL Managers, 4 User Interfaces, 4 drivers, 1 DIST Manager, 1 Data Manager, 1 Redu Manager and 2 Events (0, 128) (see Data point type _Statistics_Connections). Additional DPs must be created for extra drivers or UIs.

Enabling diagnostics

  1. Start WinCC OA. Statistics are gathered for a default period of 30 seconds and then stopped.
  2. Create additional DPs if necessary.
  3. Define the statistics period in the relevant DP (for example, _Stat_event_0_to_ctrl_1) as an original value in the element SecToRefresh in the data point _Stat_Connections_Refresh.
  4. In a new DP the value is initially 0, meaning that message statistics are disabled.
  5. If you change the original value, then the change in length does not apply until the next statistics period. The current period is not affected.

Disabling diagnostics

  1. Set SecsToRefresh to 0 in order to disable the message statistics for this data point. This always overrides a config entry.
  2. Set the entry MessageDiagSec to 0 in order to disable all statistics.

    This also includes the ConfigRefresh and the start-up phase.

    The message diagnostics can also be displayed in the log viewer with the command line option -dbg 30 (for example, for the Event Manager).

 Manager [3,0] connected for ALL dp-elements
 -- Msg overview elapsed secs since last report: 30,166
 snd total: 46 rcv total: 1116
 snd since last: 46 rcv since last: 1116
 -- Msg details
 man S/R msg -
 -----------------------------------
 [_Stat_event_0_to_event_0]
 Snd: DP_MSG_CONNECT 8
 Snd: DP_MESSAGE_VC 1
 Snd: DP_MSG_ANSWER 6
 Rcv: DP_MSG_CONNECT 8
 Rcv: DP_MESSAGE_VC 1
 Rcv: DP_MSG_ANSWER 6
 [_Stat_event_0_to_data_0]
 Snd: SYS_MSG 1
 Snd: SYS_MSG_NAMESERVER 25
 Snd: DP_MSG_HOTLINK 2
 Rcv: SYS_MSG 1040
 Rcv: SYS_MSG_NAMESERVER 25
 Rcv: DP_MSG_CONNECT 1
 Rcv: DP_MESSAGE_VC 4
 Rcv: DP_MSG_IDENTIFICATION 1
 Rcv: DP_MSG_TYPECONTAINER 1
 [_Stat_event_0_to_ui_1]
 Snd: DP_MSG_ANSWER 3
 Rcv: DP_MSG_CONNECT 28
 Rcv: DP_MSG_SIMPLE_REQUEST 1
  • If two managers are communicating with each other over a TCP/IP link, the number of messages sent and received over a given period are stored in a data point of type _Statistics_Connections.
  • When a manager starts running (establishes connection), it looks in the data type _Statistics_Connections for data points such as _Stat_event_0_to_data_0 or _Stat_event_0_to_ui_i. Some of these data points are created as internal data points, while for other managers you must first create the data points.
  • The data point in which is written the TCP/IP connection information is named according to the following convention:

_Stat_<ManagerType>_<ManagerNo>_to_<ManagerType>_<ManagerNo>

  • The first manager writes the statistics to the data point.

Example

_Stat_event_0_to_ctrl_1

This is the data point in which is written the data on the connection from the event to the manager WCCOActrl -num 1. The statistics are written by the Event Manager.

MessageDiagSec

If a DP does not exist, diagnostics can only be re-enabled by changing this entry in the config and restarting the manager concerned.

[general]
 MessageDiagSec = 35

For an event, this period is set to 0. Statistics are gathered by default at start-up and then diagnostics are disabled after the 30 second period. You can track the connections and messages of the event manager in the "ev_connections" panel (see Panels).

After starting-up WinCC OA, only the values of the data points are used in the statistics.

MessageDiagSec operates as a general on/off switch for messages and configs.

The following applies:

  • MessageDiagSec = 0, statistics are disabled; if the Configsrefresh DP does not equal 0 then statistics are not computed either, or during WinCC OA start-up.
  • MessageDiagSec > 0, statistics are enabled; this only applies to messages during WinCC OA start-up however. Afterwards, the value of the data point is used.

In order to minimize the amount of data sent, only those data point sheets that have changed during the period are described.

Some of the WinCC OA messages are mapped onto the same categories.

Table : Message categories

Category Interval WinCC OA MSG
SYS_MSG 30 System messages for control
SYS_MSG_NAMESERVER 30 Initialization
DP_MSG_CONNECT 30 Corresponds to a dpConnect()/dpDisconnect()
DP_MSG_HOTLINK 30 Corresponds to a hotlink
DP_MESSAGE_VC 30 Corresponds to a dpSet(), dpSetTimed()
DP_MESSAGE_REQUEST 30 Request for response
DP_MESSAGE_ANSWER 30 Response to request
DP_MSG_IDENTIFICATION 30 For initialization
DP_MSG_TYPECONTAINER 30 For initialization
DP_MSG_MANIP_DP 30 Function for Dp (type) change, dpDescription(), dpAlias()
DP_MSG_MANIP_CNS When using the plantmodel editor messages are sent. The category DP_MSG_MANIP_CNSm contains these messages
DP_MSG_LOCK 30 Corresponds to a lock
DP_MSG_UNLOCK 30 Lock removed
DP_MSG_CMD_NEW_DEL_DP 30 Message about data point change to manager, dpCreate(), dpDelete()
DP_MSG_SIMPLE_REQUEST 30 Corresponds to dpGet()
DP_MSG_ASYNCH_REQUEST 30 dpGetAsynch()
DP_MSG_PERIOD_REQUEST 30 dpGetPeriod()
DP_MSG_ALERT_VC 30 alertSet()
DP_MSG_ALERT_HL 30 Hotlink for alerts
DP_MSG_ALERT_CONNECT 30 Corresponds to dpConnect() for alerts, alertConnect()
DP_MSG_ALERT_DISCONN 30 alertDisconnect()
DP_MSG_ALERT_TIME_REQUEST 30
DP_MSG_ALERT_PERIOD_REQU 30 alertGetPeriod()
DP_MSG_FILTER_REQ 30 dpQuery()
DP_MSG_FILTER_CONNECT 30 queryConnect()
DP_MSG_FILTER_DISCONNECT 30 queryDisconnect()

Data point types and data point

The data point type _Statistics_connections contains the elements recording how many messages have been sent (SndTotal) and received (RcvTotal) during the last period and how many messages have been sent in total. Data points are provided as standard for messages between Event 0 and 4 CTRL Managers, 4 User Interfaces, 4 drivers, 1 Dist Manager, 1 Data Manager, 1 Redu Manager and 2 Events (0, 128). Additional DPs must be created for extra drivers or UIs.

The data point type _Statistics_Refresh contains the data point _Stat_Connections_Refresh with the element SecsToRefresh.

The data point type _Statistics_Msg contains the possible message categories (see table above).

Description of the message protocol

A dpConnect() made in a panel at the user-interface (WCCOAui) with manager number 1.

The dpConnect() is called with the value "true" for the parameter "answer", meaning that the current _online.._value value is received after calling the dpConnect.

The entries are written to the WinCC OA process logfile after activating the debug-levels "-snd 2 -rcv 2".

In this case the output is written to the logfile WCCOAui1.log.

All other messages use the same standard.

++++ Message when calling dpConnect() ++++

WinCC OA message

WCCOAui(1) SENT:

---------------------------------------------------------------

[2007.06.16;15:18:50:217 (0.010) V350] DP_MSG_CONNECT Src: (SYS: 4 Ui -num 1 CONN: 1) Dst: (SYS: 4 Event -num 0 CONN: 1) Peer: (SYS: 4 Event -num 0 CONN: 1) originTime(2007.06.16;15:18:50:217 ) realTime:0 peerMsgId: 76 msgId: 78 origMsgId: 78 wantAnswer: 1 answerId: 0 connection id: 0 want values: 1

Item: 0 System4:Example1.value:_online.._value (Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value)

Description of the message elements: WCCOAui(1) SENT: The WinCC OA process which has sent a WinCC OA message (in this case Manager WCCOAui with manager number 1)
2007.06.16;15:18:50:217: The timestamp for when the message was sent
(0.010): The time elapsed in seconds.milliseconds since the last sent message
V350: The message version for identifying which message version is used
DP_MSG_CONNECT: The type of message. In this case this message is used because the ctrl function dpConnect() was used.
Src: (SYS: 4 Ui -num 1 CONN: 1) represents the origin of the message. In this case the dpConnect() is called from the user interface with the number 1, at the keyword SYS the number 4 is displayed since the test system has the number 4, and it was part of a distributed system.
CONN: 1 ===> information that the message was sent to the first server, in redundant system the information CONN: 1 is written when the message is sent to the first server, CONN: 2 is written if the message is sent to the second server if a single-server-system is used always the information CONN: 1 is given
Dst: (SYS: 4 Event -num 0 CONN: 1) ===> destination for the message, the message is sent from the user-interface to the event-manager.
Peer: (SYS: 4 Event -num 0 CONN: 1) indicates that the message is routed, the peer is the WinCC OA process that routed this message.
originTime(2007.06.16;15:18:50:217 ) is the timestamp for when the message was built at the user-interface.
realTime:0 indicates that this is currently not used.
peerMsgId: 76 counts the number of messages sent via this connection. This will be used for checking redundant connections.
msgId: 78 is the message-ID provided by the user-interface. The message-ID is used to process the answers to this connect-message.
origMsgId: 78 is the message-ID of the origin. In this case it is the same value as msgId since the message has been generated by the user-interface.
wantAnswer: 1 This key indicates that an answer to this message is expected.
answerId: 0 is not set since this is not an answer-message.
connection id: 0 indicates the message-ID of the dpConnect message, currently not used.
want values: 1 shows that an answer to this message is expected.
Item: 0 System4:Example1.value:_online.._value (Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value) The first item in the message. If more items are sent in one message, all items will be listed whereby the item-count starts at 0.
useServerTime: The time stamp of the message is not used but the current time of the event is being used. This guarantees that a valid time is always used and that invalid time does not lead to invalid bits.

NOTE: useServerTime is not used for dpSetTimed since the time of the client is being used.

System4:Example1.value:_online.._value The name of the dp-element given at the dpConnect()-function.
(Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value ) An internal data point identification
Type: 39 indicates that the data point Example1 was created for the data point-type with the ID 39.
Sys: 4 indicates that the data point is part of the system with the number 4.
Dp: 94 is the internal ID for the data point
El: 12 is the identification of the data point element
_online.._value: Information about what config and attribute is given at the dpConnect() ++++ answer message for the dpConnect() ++++
WinCC OA message

WCCOAui(1) RECEIVED:

---------------------------------------------------------------

[2007.06.16;15:18:50:227 (0.000) V350] DP_MSG_ANSWER Src: (SYS: 4 Event -num 0 CONN: 1) Dst: (SYS: 4 Ui -num 1 CONN: 1) Peer: (SYS: 4 Event -num 0 CONN: 1) originTime(2007.06.16;15:18:50:217 ) realTime:0 peerMsgId: 94 msgId: 1026 origMsgId: 1026 wantAnswer: 0 answerId: 78 answerOn: DP_MSG_CONNECT LAST_ANSWER

Group: 0 OK

Item: 1 (System4:Example1.value:_online.._value (Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value) Value: 4)

Description of the message elements
WCCOAui(1) RECEIVED: Indicates the WinCC OA process that received a WinCC OA message.
2007.06.16;15:18:50:227 is the timestamp for when the message was received.
(0.000) is the time elapsed in seconds.milliseconds since the last received message.
V350 identifies what message version is used.
DP_MSG_ANSWER indicates the type of message. In this case the dpConnect() expected an answer. The first answer is sent by the event manager using this message-type.
Src: (SYS: 4 Event -num 0 CONN: 1) represents the origin of the answer message.
Dst: (SYS: 4 Ui -num 1 CONN: 1) indicates the destination for the DP_MSG_ANSWER message.
Peer: (SYS: 4 Event -num 0 CONN: 1) indicates if the message was routed. The peer is the WinCC OA process that routed this message.
originTime(2007.06.16;15:18:50:217 ) is the timestamp for when the message was sent by the origin-source. In this case, the event manager sent this message.
realTime:0 indicates that this is currently not used.
realTime:0 indicates that this is currently not used.
peerMsgId: 94 counts the number of messages sent via this connection. This will be used for checking redundant connections
msgId: 1026 is the message ID provided by the event manager.
origMsgId: 1026 is the origin message ID. In this case it is the same value like msgId because the message is generated by the event manager
wantAnswer: 0 identifies if an answer is needed for this message.
answerId: 78 indicates that this is the answer for the message with the ID 78 (see msgId at DP_MSG_CONNECT-message)
answerOn: DP_MSG_CONNECT indicates that this DP_MSG_ANSWER is the answer message for a DP_MSG_CONNECT
LAST_ANSWER indicates that this is the last answer for one requested. Implemented for future purposes, currently not used.
Group: 0 OK indicates the number of groups sent within this message, a message can contain several groups
Item: 1 indicates the number of items sent within this message, a group can contain several items
(System4:Example1.value:_online.._value) is the name of the dp element which was sent within this message
(Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value) is the internal data point identification
Value: 4 indicates the value for the listed data point element. In this case, it is the online value. ++++ hotlink-message for when the online-value has changed ++++
WinCC OA message

WCCOAui(1) RECEIVED:

---------------------------------------------------------------

[2007.06.16;15:19:20:130 (29.903) V350] DP_MSG_HOTLINK Src: (SYS: 4 Event -num 0 CONN: 1) Dst: (SYS: 4 Ui -num 1 CONN: 1) Peer: (SYS: 4 Event -num 0 CONN: 1) originTime(2007.06.16;15:19:20:110 ) realTime:0 peerMsgId: 95 msgId: 1164 origMsgId: 1164 wantAnswer: 0 answerId: 0

Group: 0

connectOn: 0 refresh: 0 OK

Src: (SYS: 4 Ui -num 2 CONN: 1) User: 0 Time: 2007.06.16;15:19:20:110

Item: 0 (System4:Example1.value:_online.._value (Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value) Value: 12)

Description of the message parts
WCCOAui(1) RECEIVED: identifies the WinCC OA process that has received a WinCC OA message.
2007.06.16;15:19:20:130 is the time stamp for when message was received.
29.903 is the time elapsed in seconds.milliseconds since last received message.
V350 is the message version to identify which message version was used.
DP_MSG_HOTLINK represents the type of message. When a dpConnect() is made, the value changes are sent with these hotlink messages.
Src: (SYS: 4 Event -num 0 CONN: 1) represents the origin source of the answer message.
Dst: (SYS: 4 Ui -num 1 CONN: 1) represents the destination for the hotlink message.
Peer: (SYS: 4 Event -num 0 CONN: 1) indicates if the message is routed. The peer is the WinCC OA process that routed this message.
originTime(2007.06.16;15:19:20:110 ) is the time stamp for when the message was sent by the origin source. In this case the event manager sent this message.
realTime:0 indicates that this is currently not used.
peerMsgId: 95 counts the number of messages sent via this connection. This will be used for checking redundant connections.
msgId: 1164 is the message ID provided by the event manager.
origMsgId: 1164 is the origin-message-ID. In this case it is the same value as msgId because the message was generated by the event manager.
wantAnswer: 0 identifies if an answer is needed for this message.
answerId: 0 represents the message ID of the message that will be answered with this message, currently not used.
Group: 0 shows the number of groups sent within this message. A message can contain several groups.
connectOn: 0 represents the ID of the queryConnect that will be answered with this group of this message.
refresh: 0 OK : The value is 1 if this message is the answer of a connection refresh.
Src: (SYS: 4 Ui -num 2 CONN: 1) indicates the WinCC OA process that has set the value. In this case, the value change was made by a user interface with number 2. User: 0 represents the user which has set the data point element. Every user in a WinCC OA system has a unique user ID.
Time: 2007.06.16;15:19:20:110 is the time stamp for when the value was set at the user interface with number 2.
Item: 0 represents the number of items sent with this hotlink message. A group can contain several items.
System4:Example1.value:_online.._value is the name of the dp element that was sent in this message.
Type: 39 Sys: 4 Dp: 94 El: 12 : _online.._value is an internal data point identification.
Value: 12 is the value for the listed data point element In this case it is the online value.