A LogObject that supports storing Events as LogRecords extends the behaviour of a LogObject by providing the capability to collect all Events that the parent Object receives that have a ConditionClassId or SubConditionClassId of LogEntryConditionClass.
For example, since Events / Conditions / Alarms instance can be defined by PLC programs and exposed in a Server, the LogObject can collect Diagnostics or other trace information from PLC user program, not just from Server code.
The LogObject can utilize some of the Event reporting hierarchy concepts defined in OPC 10000-3 and OPC 10000-5. Figure 5 illustrates a Server that includes an Event hierarchy. In the example, LogObjectArea2 would include all Events that would be available from the Area2 Object that have a ConditionClassId or ConditionSubClassId of LogEntryConditionClass. In addition the LogObject could store additional fields from Events in the AdditionalData NameValue pairs. What fields are be stored would be vendor / Server specific, but specifications that define LogObject instances may also define additional fields from defined Events that shall be stored in a LogRecord.
Figure 5 – LogObject Event usage illustration
This specification extends the standard EventType ( see OPC 10000-3, OPC 10000-5 and OPC 10000-9 EventTypes). Figure 6 – BaseLogEventType Figure 6 illustrates the event fields that are mapped to the LogRecordStructure. Any Object that has a Reference to one of these EventTypes shall generate LogRecords in the LogObject related to the defined BaseLogEventType.
Additional EventTypes can be defined as needed for specific log information. If desired, subtypes of ConditionType or any of the AlarmTypes might also be used. The only requirement for an Event to be recorded in the LogObject is for the Event to have a ConditionClassId or SubConditionClassId of LogEntryConditionClass. The following fields from BaseEventType are mapped to the LogRecord:
- Time – The time associated with this event.
- EventType – as defined in BaseEventType in OPC 10000-5
- SourceNode – identifies the Node that the Event originated from, as defined in BaseEventType in OPC 10000-5. For LogObject Events, this node is the node that the LogRecord is related to.
- SourceName - provides a description of the source of the Event, this might be a browse path to a variable under the SourceNode, if the LogRecord is related to the variable, or it might be as defined in BaseEventType in OPC 10000-5.
- Message – shall describe the issue that is being represented in the LogRecord.
- Severity – in the Event system is defined as a number between 1 and 1000 inclusive. Typically, the full range of numbers is mapped to sub ranges. See 5.3 for a description of LogRecord use of this field.
This EventType can be used by an application to generate Events that provide log information.
Its representation in the AddressSpace is formally defined in Table 17.
Table 17 – BaseLogEventType definition
Attribute |
Value |
||||
BrowseName |
0:BaseLogEventType |
||||
IsAbstract |
True |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the 0:BaseEventType defined in OPC 10000-5. |
|||||
0:HasProperty |
Variable |
ErrorCode |
0:StatusCode |
0:PropertyType |
O |
0:HasProperty |
Variable |
ErrorCodeNode |
0:NodeId |
0:PropertyType |
O |
0:HasProperty |
Variable |
ConditionClassId |
0:NodeId |
0:PropertyType |
M |
0:HasProperty |
Variable |
ConditionClassName |
0:LocalizedText |
0:PropertyType |
M |
ConformanceUnits |
|||||
LogObject BaseEvent |
Events of this type can be generated by Servers that support LogObjects. The Event may be generated for propagation of this Event to a n external LogObject.
ErrorCode see the definition of ErrorCode in LogRecord Structure (5.4).
ErrorCodeNode see the definition of ErrorCodeNode in LogRecord Structure (5.4).
The ConditionClassId and ConditionClassName in BaseEventType are made mandatory in this EventType.
The ConditionClassId shall be set to LogEntryConditionClassType.
This Event is generated when the storage in an LogObjectType instance overflows.
Table 18 – LogOverflowEventType definition
Attribute |
Value |
||||
BrowseName |
0:LogOverflowEventType |
||||
IsAbstract |
True |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the 0:BaseEventType defined in OPC 10000-5. |
|||||
|
|
|
|
|
|
ConformanceUnits |
|||||
LogObject Overflow |
Events of this class are generated by Servers that support LogObjects. This Event indicates that the LogObject storage was exceeded before the MaxStorageDuration was reached.
The SourceNode Property for Events of this type shall be assigned to the NodeId of the LogObject. The SourceName for Events of this type shall be “LogObject/Overflow”.
The LogEntryConditionClassType is a ConditionClassType used to classify Events that are to be collected in a LogObject. The LogEntryConditionClassType is formally defined in Table 19.
Table 19 – LogEntryConditionClassType definition
Attribute |
Value |
|||||
BrowseName |
LogEntryConditionClassType |
|||||
IsAbstract |
True |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
|
Subtype of the BaseConditionClassType defined in OPC 10000-9. |
||||||
|
|
|
|
|||
ConformanceUnits |
||||||
LogObject BaseEvent |