XmlEventConfguration

The file  XmlEventConfguration defines the event configuration of a Source Id in different languages. The XmlEventConfguration Source Id and the location must be added to the TcEventSourceLocation as a Location node.

Scheme

The following screenshot shows a XML scheme with the structure of the XmlEventConfguration xml file.

XmlEventConfguration 1:

The following table describes the nodes of the XML file

Interface

Description

TcEventSource

The only root element, it contains a list of Source nodes from 0 to infinite.

Source

Sub element of the TcEventSource node. This node is the configuration of a Source. The sub elements are Ids of the Source. 1 to infinite for the Source Name in different languages and 0 to infinite for the Events and Properties.

id

Sub element of the Source node. An Intger with the Source Id.

Name

Sub element of the Source node. The Source Name for the different languages. The language is defined by the attribute *LcId. If no *LcId attribute exists, the *LcId 1033 (US-English) is used.

Event

Sub element of the Source node.  This node is the configuration of a Event. The sub elements are Event id. a Message string for the different languages from 0 to infinite, ParaFormat is the format string for the Event data, the MustConfirm flag, the UserFlags, DocLinks from 0 to infintie and Property fron 0 to infinite.

Property

Sub element of the Source node. The property is displayed by name, value and comment.

id

Sub element of the Event node. A Integer with the Event Id.

Message

Sub element of the Event node. The Event message for the different Languages. The language is defined by the attribute *LcId. If no *LcId attribute exists, the *LcId 1033 (US-English) is used. The eventData was assigned when the Event was started from the PLC module ADSLOGEVENT by setting the Flag from FALSE to TRUE or by calling the function ITcEventLogC::ReportEvent, ITcEventC3 ::ReportEventEx or  ITcEventLog:: ReportEvent. It can added to the message with %1, %2, %,3 ... , %x is the number of the index of eventData.

ParaFormat

Sub element of the Event node. Defines a printf format description, that is used for eventData. The attribute ParaNo represents the Index of eventData for that the format string is used.

UserFlags

Sub element of the Event node. An integer that defines the user-defined flags.

Link

Sub element of the Event node. A DocLink is a link to a document that offers more informations in different languages. You can access to the DocLink Porperty with the TcEvent object ITcEvent:: EnumDocLink and in the context menu of the TcEventViewer. The language is defined by the attribute *LcId. The DocLink has a sub element Text that shows the URL for the requested *LcId.

Property

Sub element of the Event node. The Property element has a Name, a Value, and a Comment.

Example

The following text shows a example of a XmlEventConfguration file.

<?xml version="1.0" encoding="UTF-8"?>
<TcEventSources>
  <Source>
    <Id>1</Id>
    <Name LcId="1033">Axis Controller</Name>
    <Name LcId="1031">Achsen Controller</Name>
  
    <Event>
      <Id>1</Id>
     
      <Message LcId="1033">The Axis:%1 stop at the position %2
mm</Message>
      <Message LcId="1031">Die Achse:%1 hielt an der Position %2
mm</Message>
     
      <!-- format for the second parameter -->
      <ParaFormat ParaNo="2">%.3f</ParaFormat>
     
      <!--the event class and prio is defined here -->
     
      <!-- the event class is a WARNING-->
      <Class>6</Class>
     
      <!-- the event priority is implicit -->
     <Priority>0</Priority>
     
     <MustConfirm>true</MustConfirm>
      <Link LcId="1033">
       <Text>Help</Text>
       <URL>file:///C:/1033/AxisError.html</URL>
      </Link>
      <Link LcId="1031">
       <Text>Help</Text>
       <URL>file:///C:/1031/AxisError.html</URL>
      </Link>
      <Property>
       <Name>Log</Name>
       <Value>true</Value>
      </Property>
    </Event>
    <Event>
      <Id>2</Id>
     
      <Message LcId="1033">Emergency Stop!</Message>
      <Message LcId="1031">Not Stopp!</Message>
    </Event>
  </Source>
</TcEventSources>

This example shows the Event configuration for 2 Event with the languages German and English.

 

The following table gives a list of some language *LCIDs.

LCID

Description

1031

German

1033

US English

1034

Spanish

1036

French

 

*LCID: more information in the MSDN Library.