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
- Start WinCC OA. Statistics are gathered for a default period of 30 seconds and then stopped.
- Create additional DPs if necessary.
- 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.
- In a new DP the value is initially 0, meaning that message statistics are disabled.
- 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
- Set SecsToRefresh to 0 in order to disable the message statistics for this data point. This always overrides a config entry.
-
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
- 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.
- 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.