XML File Format
Format to import a List of Tags
<Import>
<TagList>
<Tag>
<Tagname> .....</Tagname>
<Description> Test </Description>
</Tag>
</TagList>
</Import>
Format to Import Data
<Import>
<Datalist>
<Tag>
<Data>
<Timestamp>..... </Timestamp>
<Value>.... </Value>
</Data>
</Tag>
</Datalist>
</Import>
Format to Import Messages
<Import>
<MessageList>
<Data>
<Timestamp>..... </Timestamp>
<Topic>.... </Topic>
<Username>.... </Username>
<MessageNumber>.... </MessageNumber>
<MessageString>.... </MessageString>
<Substitutions>.... </Substitutions>
</Data>
</MessageList>
</Import>
DataQuality | Value |
---|---|
Tagname | Description |
EngineeringUnits | Comment |
DataType | StringLength Note: StringLength is twice the number of characters
(ASCII, Single Byte). For example, "ABC" = 6
StringLength. |
StoreMilliseconds | CollectorName |
CollectorType | SourceAddress Note: A value is required for the source name to be
added to tags created by the collector. |
CollectorType | CollectionInterval |
CollectionOffset | CollectionDisabled |
LoadBalancing | TimeStamp Note: The timestamp resolution is
milliseconds. |
Type | TimeZoneBias |
HiEngineeringUnits | LoEngineeringUnits |
InputScaling | HiScale |
LoScale | CollectorCompression |
CollectorDeadbandPercentRange | CollectorCompressionTimeout |
ArchiveCompression | ArchiveDeadbandPercentRange |
ArchiveCompressionTimeout | Timeout |
CollectorGeneral1 | CollectorGeneral2 |
CollectorGeneral3 | CollectorGeneral4 |
CollectorGeneral5 | ReadSecurityGroup |
WriteSecurityGroup | AdministratorSecurityGroup |
Calculation | CalculationDependencies |
Acked | Condition |
SubCondition | EventCategory |
Message | Source |
Severity | StartTime |
EndTime | TimestampType |
SpikeLogic | SpikeLogicOverride |
InterfaceAbsoluteDeadband | InterfaceAbsoluteDeadbanding |
LastModified | LastModifiedUser |
ArchiveAbsoluteDeadband | ArchiveAbsoluteDeadbanding |
StepValue | Value |
SpikeLogic | SpikeLogicOverride |
NumberOfElements | CalcType |
An XML File that Imports Tags
<Import>
<TagList Version="1.0.71">
<Tag Name="TIGER.IMPORT_TAG1.F_CV">
<Tagname>TIGER.IMPORT_TAG1.F_CV</Tagname>
<Description>Import Tag 1</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG11.F_CV">
<Tagname>TIGER.IMPORT_TAG11.F_CV</Tagname>
<Description>Import Tag 1</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG12.F_CV">
<Tagname>TIGER.IMPORT_TAG12.F_CV</Tagname>
<Description>Import Tag 2</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG13.F_CV">
<Tagname>TIGER.IMPORT_TAG13.F_CV</Tagname>
<Description>Import Tag 3</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG14.F_CV">
<Tagname>TIGER.IMPORT_TAG14.F_CV</Tagname>
<Description>Import Tag 4</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG15.F_CV">
<Tagname>TIGER.IMPORT_TAG15.F_CV</Tagname>
<Description>Import Tag 5</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG2.F_CV">
<Tagname>TIGER.IMPORT_TAG2.F_CV</Tagname>
<Description>Import Tag 2</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
<Tag Name="TIGER.IMPORT_TAG21.F_CV">
<Tagname>TIGER.IMPORT_TAG21.F_CV</Tagname>
<Description>Import Tag 1</Description>
<EngineeringUnits> PSI </EngineeringUnits>
</Tag>
</TagList>
</Import>
Example of an XML file that Imports Data and Data Quality
<Import>
<DataList Version="1.0.71">
<Tag Name="TIGER.IMPORT_TAG1.F_CV">
<Data>
<TimeStamp>20-Jul-2001 11:00:18.000</TimeStamp>
<Value>0</Value>
<DataQuality>Good</DataQuality>
</Data>
<Data>
<TimeStamp>20-Jul-2001 11:00:36.000</TimeStamp>
<Value>0</Value>
<DataQuality>Good</DataQuality>
</Data>
<Data>
<TimeStamp>20-Jul-2001 11:00:54.000</TimeStamp>
<Value>0</Value>
<DataQuality>Bad</DataQuality>
</Data>
<Data>
<TimeStamp>20-Jul-2001 11:01:12.000</TimeStamp>
<Value>0</Value>
<DataQuality>Good</DataQuality>
</Data>
</Tag>
</DataList>
</Import>
An XML file that Imports Messages
<Import>
<MessageList Version="1.0.71">
<Data>
<TimeStamp>28-Aug-2002 19:42:00.000</TimeStamp>
<Topic>General</Topic>
<Username>XMLUser</Username>
<MessageNumber>0</MessageNumber>
<MessageString>Another test message</MessageString>
<Substitutions></Substitutions>
</Data>
<Data>
<TimeStamp>28-Aug-2002 19:48:00.000</TimeStamp>
<Topic>General</Topic>
<Username>XMLUser</Username>
<MessageNumber>1</MessageNumber>
<MessageString>Message One</MessageString>
<Substitutions></Substitutions>
</Data>
</MessageList>
</Import>
An XML file that Imports a Tag with a Step Value
<Import>
<TagList Version="1.0.71">
<Tag Name="TAG6">
<Tagname>TAG6</Tagname>
<StepValue> TRUE </StepValue>
</Tag>
</TagList>
</Import>
An XML file that Imports Alarms
<Import>
<AlarmList Version="1.0.71">
<Alarm>
<Attribute name="Acked" value="false"/>
<Attribute name="Actor" value="TheActor"/>
<Attribute name="Condition" value="Condition"/>
<Attribute name="DataSource" value="File collector"/>
<Attribute name="Enabled" value="true"/>
<Attribute name="EndTime" value="12/25/2005 12:47:59.003"/>
<Attribute name="EventCategory" value="Process"/>
<Attribute name="Message" value="My message."/>
<Attribute name="Quality" value="Good"/>
<Attribute name="Severity" value="250"/>
<Attribute name="Source" value="SourceXML000003"/>
<Attribute name="StartTime" value="12/25/2005 12:47:59.003"/>
<Attribute name="SubCondition" value="Hi"/>
<Attribute name="TagName" value="TheTagName"/>
<Attribute name="Timestamp" value="12/09/2005 12:47:59.003"/>
</Alarm>
<Alarm>
<Attribute name="Acked" value="false"/>
<Attribute name="Actor" value="TheActor"/>
<Attribute name="Condition" value="Condition"/>
<Attribute name="DataSource" value="File collector"/>
<Attribute name="Enabled" value="true"/>
<Attribute name="EndTime" value="12/25/2005 12:47:59.004"/>
<Attribute name="EventCategory" value="Process"/>
<Attribute name="Message" value="My message."/>
<Attribute name="Quality" value="Good"/>
<Attribute name="Severity" value="250"/>
<Attribute name="Source" value="SourceXML000004"/>
<Attribute name="StartTime" value="12/25/2005 12:47:59.004"/>
<Attribute name="SubCondition" value="Hi"/>
<Attribute name="TagName" value="TheTagName"/>
<Attribute name="Timestamp" value="12/25/2005 12:47:59.004"/>
</Alarm>
</AlarmList>
</Import>
An XML file that Imports Enumerated Set
<Import>
<EnumeratedSetList>
<EnumeratedSet SetName="TestSet7">
<EnumeratedState StateName="State1">
<SetName>TestSet7</SetName>
<SetDescription>TestDesc</SetDescription>
<StateLowRawValue>1</StateLowRawValue>
<StateHighRawValue>10</StateHighRawValue>
<StateDescription>State1Desc</StateDescription>
<StateName>State1</StateName>
<StateRawValueDataType>DoubleFloat</StateRawValueDataType>
<LastModified>9/17/2012 16:37:48.260000</LastModified>
<LastModifiedUser>GECORPORATE\312006949</LastModifiedUser>
<AdministratorSecurityGroup></AdministratorSecurityGroup>
<NumberOfStatesInThisSet>2</NumberOfStatesInThisSet>
</EnumeratedState>
<EnumeratedState StateName="State2">
<SetName>TestSet7</SetName>
<SetDescription>TestDesc</SetDescription>
<StateLowRawValue>11</StateLowRawValue>
<StateHighRawValue>20</StateHighRawValue>
<StateDescription>State2Desc</StateDescription>
<StateName>State2</StateName>
<StateRawValueDataType>DoubleFloat</StateRawValueDataType>
<LastModified>9/17/2012 16:37:48.260000</LastModified>
<LastModifiedUser>GECORPORATE\312006949</LastModifiedUser>
<AdministratorSecurityGroup></AdministratorSecurityGroup>
<NumberOfStatesInThisSet>2</NumberOfStatesInThisSet>
</EnumeratedState>
</EnumeratedSet>
</EnumeratedSetList>
</Import>
An XML File that Imports Array Tags
<Import>
<TagList Version="1.0.71">
<Tag Name="ArrayTag1">
<Tagname>ArrayTag</Tagname>
<Description>Import array Tag 1</Description>
<EngineeringUnits> PSI </EngineeringUnits>
<NumberOfElements>-1</NumberOfElements>
</Tag>
<Tag Name="ArrayTag2">
<Tagname>ArrayTag2</Tagname>
<Description>Import array Tag 2</Description>
<EngineeringUnits> PSI </EngineeringUnits>
<NumberOfElements>-1</NumberOfElements>
</Tag>
</TagList>
</Import>
An XML File that Imports Array Tag data
<Import>
<DataList Version="1.0.71">
<Tag Name="ArrayTag[0]">
<Data>
<TimeStamp>11-June-2013 11:00:18.000</TimeStamp>
<Value>1</Value>
<DataQuality>Good</DataQuality>
</Data>
<Data>
<TimeStamp>11-June-2013 11:01:18.000</TimeStamp>
<Value>2</Value>
<DataQuality>Good</DataQuality>
</Data>
</Tag>
<Tag Name="ArrayTag[1]">
<Data>
<TimeStamp>11-June-2013 11:00:18.000</TimeStamp>
<Value>3</Value>
<DataQuality>Good</DataQuality>
</Data>
<Data>
<TimeStamp>11-June-2013 11:01:18.000</TimeStamp>
<Value>4</Value>
<DataQuality>Good</DataQuality>
</Data>
</Tag>
</DataList>
</Import>
An XML File that Imports Python Expression Tags
<Import>
<TagList Version="1.0.71">
<Tag Name="TagDerivedFromRawValue">
<Tagname>TagDerivedFromRawValue</Tagname>
<CollectorName>OpcServerCollector</CollectorName>
<SourceAddress>
"{"imports":["math"],"script":"tag.value + math.pow(10,tag.value/70)","parameters":
[{"name":"tag","source":{"address":"IO/READONLY/Temperature","dataType":"DoubleFloat"}}]}"
</SourceAddress>
<CalcType>PythonExpr</CalcType>
<DataType>DoubleFloat</DataType>
<Description>Python Expression Tag example</Description>
</Tag>
</TagList>
</Import>
Note:
- Python Expression tags do not support array or multi-field tags.
- It is important to include the CalcType header and set it to PythonExpr for each Python Expression tag. If the file contains a mix of tags that are Python Expression tags with those that are not, then the tags that are not Python Expression tags must have the CalcType field set to Raw.
- For Python Expression tags, the SourceAddress must contain the tag's minified JSON configuration constructed as described in the topic on Constructing the JSON Configuration for a Python Expression Tag. (Mini- fied JSON has no newline characters or comments. There are tools which can help you minify JSON.)
- Note that the example in the CSV file uses repeated quotation marks ("") in order to escape quotation marks (").
- It is important that your JSON is valid, since no validation will be performed on the JSON at tag creation.
For more information on these tags, refer to the Python Expression Tags .