Fundamentals Package

The MTConnect Standard defines the normative information model and protocol for retrieving information from manufacturing equipment. This document specifies the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. behavior and protocol.

Agent

The MTConnect Standard specifies the minimum functionality of the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. . The functionality is as follows:

  • Provides store and forward messaging middleware service.
  • Provides key-value information storage and asset retrieval service.
  • Implements the REST API for the MTConnect Standard (See REST Protocol).
    • DeviceComponent not belonging to any Component that may have assets metadata.
    • observationsobserved value of a property at a point in time. collected by the agent.
    • assetsitem, thing or entity that has potential or actual value to an organization. ISO 55000:2014 > Note 1 to entry: Value can be tangible or intangible, financial or non-financial, and includes consideration of risks and liabilities. It can be positive or negative at different stages of the asset life. > Note 2 to entry: Physical assets usually refer to equipment, inventory and properties owned by the organization. Physical assets are the opposite of intangible assets, which are non-physical assets such as leases, brands, digital assets, use rights, licences, intellectual property rights, reputation or agreements. > Note 3 to entry: A grouping of assets referred to as an asset system could also be considered as an asset. collected by the agent.

There are three types of information stored by an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. that MAY be published in a response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request.. These are as follows:

  • equipment metadatametadata that defines both the entities that represent the physical and logical parts and sub-parts of each piece of equipment, the relationships between those parts and sub-parts, and the definitions of the DataItems associated with that piece of equipment. specified in Device Information Model.
  • streaming dataobservations published by a piece of equipment defined by the equipment metadata. provides the observationsobserved value of a property at a point in time. specified in Observation Information Model.
  • Assetsasset that is used by the manufacturing process to perform tasks. > Note 1 to entry: An Asset relies upon an Device to provide observations and information about itself and the Device revises the information to reflect changes to the Asset during their interaction. Examples of Assets are cutting tools, Part Information, Manufacturing Processes, Fixtures, and Files. > Note 2 to entry: A singular Asset::assetId uniquely identifies an Asset throughout its lifecycle and is used to track and relate the Asset to other Devices and entities. > Note 3 to entry: Assets are temporally associated with a device and can be removed from the device without damage or alteration to its primary functions. specified in Asset Information Model.

Agent Instance ID

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST set the instanceId to a unique value whenever the sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. in the agent is initialized to 1. (see Section Sequence Numbers and Section Persistence and Recovery below).

Storage of Equipment Metadata

An agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST be capable of publishing equipment metadatametadata that defines both the entities that represent the physical and logical parts and sub-parts of each piece of equipment, the relationships between those parts and sub-parts, and the definitions of the DataItems associated with that piece of equipment. for the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. as specified in Device Information Model.

Storage of Streaming Data

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MAY implement a buffersection of an agent that provides storage for information published from pieces of equipment. with a fixed number of observationsobserved value of a property at a point in time.. If the bufferSize is fixed, the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST store observationsobserved value of a property at a point in time. using a first-in-first-out pattern. The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. will remove the oldest observationobserved value of a property at a point in time. when the buffersection of an agent that provides storage for information published from pieces of equipment. is full and a new observationobserved value of a property at a point in time. arrives.

Data Storage in Buffer

In Figure first-in-first-out-buffer-management, the maximum number of observationsobserved value of a property at a point in time. that can be stored in the buffersection of an agent that provides storage for information published from pieces of equipment. of the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. is 8. The bufferSize in the header reports the maximum number of observationsobserved value of a property at a point in time.. This example illustrates that when the buffersection of an agent that provides storage for information published from pieces of equipment. fills up, the oldest piece of data falls out the other end.

First In First Out Buffer Management

Note: As an implementation suggestion, the buffersection of an agent that provides storage for information published from pieces of equipment. should be sized large enough to provide a continuous stream of observationsobserved value of a property at a point in time.. The implementer should also consider the impact of a temporary loss of communications when determining the size for the buffersection of an agent that provides storage for information published from pieces of equipment.. A larger buffersection of an agent that provides storage for information published from pieces of equipment. will allow more time to reconnect to an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. without losing data.

Sequence Numbers

In an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. , each occurrence of an observationobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment. will be assigned a monotonically increasing unsigned 64-bit integer (sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent.) when it arrives. The first sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. MUST be 1.

The sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. for each observationobserved value of a property at a point in time. MUST be unique for an instance of an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. identified by an instanceId.

Table instanceid-and-sequence illustrates the changing of the instanceId when an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. resets the sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. to 1.

instanceIdsequence
234556234
 235
 236
 237
 238
Agent Stops and Restarts 
2345571
 2
 3
 4
 5

Figure identifying-the-range-of-data-with-firstsequence-and-lastsequence shows two additional pieces of information defined for an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. :

  • firstSequence – the oldest observationobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment.. The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. removes this observationobserved value of a property at a point in time. when it receives the next observationobserved value of a property at a point in time.

  • lastSequence – the newest observationobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment.

firstSequence and lastSequence provide the range of values for the REST API requests.

Indentifying the range of data with firstSequence and lastSequence

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST begin evaluating observationsobserved value of a property at a point in time. with sample requestrequest to an agent to produce an MTConnectStreams Response Document containing the Observation Information Model for a set of timestamped observations made by Components.’s from parameter. Also, the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST include a maximum number of observationsobserved value of a property at a point in time. given by the count parameter in the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

In Figure identifying-the-range-of-data-with-from-and-count, the request specifies the observationsobserved value of a property at a point in time. start at sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. 15 (from) and includes a total of three items (count).

Identifying the range of data with from and count

nextSequence header property has the sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. of the next observationobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment. for subsequent sample requestsrequest to an agent to produce an MTConnectStreams Response Document containing the Observation Information Model for a set of timestamped observations made by Components. providing a contiguous set of observationsobserved value of a property at a point in time.. In the example in Figure identifying-the-range-of-data-with-from-and-count, the next sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. (nextSequence) will be 18.

As shown in Figure identifying-the-range-of-data-with-nextsequence-and-lastsequence, the combination of from and count defined by the requestcommunications method where a client transmits a message to an agent. That message instructs the agent to respond with specific information. indicates a sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. for data that is beyond that which is currently in the buffersection of an agent that provides storage for information published from pieces of equipment.. In this case, nextSequence is set to a value of \(lastSequence + 1\).

Indentifying the range of data with nextSequence and lastSequence

Observation Buffer

An observationobserved value of a property at a point in time. has four pieces of information as follows:

  1. sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. associated with each observationobserved value of a property at a point in time. - sequence.
  2. The timestamp the observationobserved value of a property at a point in time. was made. .
  3. A reference to the dataitemid from the Device Information Model.
  4. The value of the observationobserved value of a property at a point in time..

Table data-storage-concept is an example demonstrating the concept of how data may be stored in an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. :

sequencetimestampdataItemIdresult
1012016-12-13T09:44:00.2221ZAVAIL-28277UNAVAILABLE
1022016-12-13T09:54:00.3839ZAVAIL-28277AVAILABLE
1032016-12-13T10:00:00.0594ZPOS-Y-2827725.348
1042016-12-13T10:00:00.0594ZPOS-Z-2827713.23
1052016-12-13T10:00:03.2839ZSS-282770
1062016-12-13T10:00:03.2839ZPOS-X-2827711.195
1072016-12-13T10:00:03.2839ZPOS-Y-2827724.938
1082016-12-13T10:01:37.8594ZPOS-Z-282771.143
1092016-12-13T10:02:03.2617ZSS-282771002

Timestamp

observationsobserved value of a property at a point in time. MUST have a timestamp giving the most accurate time that the observationobserved value of a property at a point in time. occurred.

The timezone of the timestamp MUST be UTC (Coordinated Universal Time) and represented using ISO 8601 format: e.g., “2010-04-01T21:22:43Z”.

Applications SHOULD use the observationobserved value of a property at a point in time.’s timestamp for ordering as opposed to sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent..

All observationsobserved value of a property at a point in time. occurring at the same time MUST have the same timestamp.

Recording Occurrences of Streaming Data

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST only place observationsobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment. if the data has changed from the previous observationobserved value of a property at a point in time. for the same DataItem.

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST place every observationobserved value of a property at a point in time. in the buffersection of an agent that provides storage for information published from pieces of equipment., without checking for changes, in the following cases:

Maintaining Last Value for Data Entities

An agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST retain the most recent observationobserved value of a property at a point in time. associated with each DataItem, even if the observationobserved value of a property at a point in time. is no longer in the buffersection of an agent that provides storage for information published from pieces of equipment.. This function supports the current requestrequest to an agent to produce an MTConnectStreams Response Document containing the Observation Information Model for a snapshot of the latest observations at the moment of the request or at a given sequence number. functionality.

Unavailability of Data

An observationobserved value of a property at a point in time. with the value of UNAVAILABLE indicates the value is indeterminate.

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST initialize every DataItem, unless it has a constant value (see below), with an observationobserved value of a property at a point in time. with the value of UNAVAILABLE. Aditionally, whenever the data source is unreachable, every DataItem associated with the data source must have an observationobserved value of a property at a point in time. with the value of UNAVAILABLE and timestamp when the connection was lost.

An DataItem that is constrained to a constant value, as defined in Device Information Model, MUST only have an observationobserved value of a property at a point in time. with the constant value and MUST NOT be set to UNAVAILABLE.

Persistence and Recovery

The agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MAY have a fixed size buffersection of an agent that provides storage for information published from pieces of equipment. and the buffersection of an agent that provides storage for information published from pieces of equipment. MAY be ephemeral.

If the buffersection of an agent that provides storage for information published from pieces of equipment. is recoverable, the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST NOT change the instanceId and MUST NOT set the sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. to 1. The sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent. MUST be one greater than the maximum value of the recovered observationsobserved value of a property at a point in time.. \(max(sequence) + 1\)

Storage of MTConnect Assets

An agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MAY only retain a limited number of Assets in the asset bufferbuffer for Assets.. The Assets are stored in first-in-first-out method where the oldest Asset is removed when the asset bufferbuffer for Assets. is full and a new Asset arrives.

Figure first-in-first-out-asset-buffer-management illustrates the oldest Asset being removed from the asset bufferbuffer for Assets. when a new Asset is added and the asset bufferbuffer for Assets. is full:

First In First Out Asset Buffer Management

Assets are indexed by Asset::assetId. In the case of Assets, Figure relationship-between-assetid-and-stored-asset-documents demonstrates the relationship between the key (Asset::assetId) and the stored Asset:

Relationship between assetId and stored Asset documents

Note: The key (Asset::assetId) is independent of the order of the Asset stored in the asset bufferbuffer for Assets..

When the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. receives a new Asset, one of the following rules MUST apply:

  • If the Asset is not in the asset bufferbuffer for Assets., the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST add the new Asset to the front of the asset bufferbuffer for Assets.. If the asset bufferbuffer for Assets. is full, the oldest Asset will be removed from the asset bufferbuffer for Assets..

  • If the Asset is already in the asset bufferbuffer for Assets., the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. MUST replace the existing Asset and move the Asset to the front of the asset bufferbuffer for Assets..

The number of Asset that may be stored in an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. is defined by the value for Header::assetBufferSize. An Header::assetBufferSize of 4,294,967,296 or \(2^{32 }\) MUST indicate unlimited storage.

The asset bufferbuffer for Assets. MAY be ephemeral and the Asset entities will be lost if the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. clears the asset bufferbuffer for Assets.. They must be recovered from the data source.

Asset Information Model provides additional information on assetitem, thing or entity that has potential or actual value to an organization. ISO 55000:2014 > Note 1 to entry: Value can be tangible or intangible, financial or non-financial, and includes consideration of risks and liabilities. It can be positive or negative at different stages of the asset life. > Note 2 to entry: Physical assets usually refer to equipment, inventory and properties owned by the organization. Physical assets are the opposite of intangible assets, which are non-physical assets such as leases, brands, digital assets, use rights, licences, intellectual property rights, reputation or agreements. > Note 3 to entry: A grouping of assets referred to as an asset system could also be considered as an asset. management.

Response Documents

response documentselectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. are electronic documents generated by an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. in response to a requestcommunications method where a client transmits a message to an agent. That message instructs the agent to respond with specific information. for data.

The response documentselectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. defined in the MTConnect Standard are:

  • MTConnectDevices Response Documentresponse document published by an MTConnect Agent in response to a probe request.: Describes the composition and configuration of the DeviceComponent not belonging to any Component that may have assets and the data that can be observed. See MTConnectDevices Response Document and Device Information Model for details on this information model.

  • MTConnectStreams Response Documentresponse document published by an MTConnect Agent in response to a current request or a sample request.: Observationsobservation that provides telemetry data for a DataItem. made at a point in time about related DataItemsobservable observed by a Component that may make Observations. See MTConnectStreams Response Document and Observation Information Model for details on this information model.

  • MTConnectAssets Response Documentresponse document published by an MTConnect Agent in response to an asset request.: Assetsasset that is used by the manufacturing process to perform tasks. > Note 1 to entry: An Asset relies upon an Device to provide observations and information about itself and the Device revises the information to reflect changes to the Asset during their interaction. Examples of Assets are cutting tools, Part Information, Manufacturing Processes, Fixtures, and Files. > Note 2 to entry: A singular Asset::assetId uniquely identifies an Asset throughout its lifecycle and is used to track and relate the Asset to other Devices and entities. > Note 3 to entry: Assets are temporally associated with a device and can be removed from the device without damage or alteration to its primary functions. related to DevicesComponent not belonging to any Component that may have assets. See MTConnectAssets Response Document and Asset Information Model for details on this information model.

  • MTConnectErrors Response Documentresponse document published by an MTConnect Agent whenever it encounters an error while interpreting an MTConnect Request.: Information in response to a failed request. See MTConnectErrors Response Document for details on this information model.

Request/Response Information Exchange

The transfer of information between an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. and a client software application is based on a request and responsecommunications pattern that supports the transfer of information between an agent and a client. REST protocol. A client application requests specific information from an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. and an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. responds with a response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

There are four types of MTConnect Requestsrequest for information issued from a client to an MTConnect Agent.. These requestscommunications method where a client transmits a message to an agent. That message instructs the agent to respond with specific information. are as follows:

  • probe requestrequest to an agent to produce an MTConnectDevices Response Document containing the Device Information Model.: Requests information about one more more DevicesComponent not belonging to any Component that may have assets as an MTConnectDevices block.

  • current requestrequest to an agent to produce an MTConnectStreams Response Document containing the Observation Information Model for a snapshot of the latest observations at the moment of the request or at a given sequence number.: Requests the most recent, or snapshot at a sequence numberprimary key identifier used to manage and locate a specific piece of streaming data in an agent., observationsobserved value of a property at a point in time. as an MTConnectStreams block.

  • sample requestrequest to an agent to produce an MTConnectStreams Response Document containing the Observation Information Model for a set of timestamped observations made by Components.: Requests a series of observationsobserved value of a property at a point in time. as an MTConnectStreams block.

  • asset requestHTTP Request to the agent regarding Assets.: Requests a set of assetsitem, thing or entity that has potential or actual value to an organization. ISO 55000:2014 > Note 1 to entry: Value can be tangible or intangible, financial or non-financial, and includes consideration of risks and liabilities. It can be positive or negative at different stages of the asset life. > Note 2 to entry: Physical assets usually refer to equipment, inventory and properties owned by the organization. Physical assets are the opposite of intangible assets, which are non-physical assets such as leases, brands, digital assets, use rights, licences, intellectual property rights, reputation or agreements. > Note 3 to entry: A grouping of assets referred to as an asset system could also be considered as an asset. as an MTConnectAssets block.

If an agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. is unable to respond to the request for information or the request includes invalid information, the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. will publish an MTConnectErrors Response Documentresponse document published by an MTConnect Agent whenever it encounters an error while interpreting an MTConnect Request.. See MTConnectErrors.

See REST Protocol for the details on the normative requirements of the agent.

Fundamentals Appendix

Fundamentals of Using XML to Encode Response Documents

The MTConnect Standard specifies the structures and constructs that are used to encode response documentselectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request.. When these response documentselectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. are encoded using XML, there are additional rules defined by the XML standard that apply for creating an XML compliant document. An implementer should refer to the W3C website for additional information on XML documentation and implementation details - http://www.w3.org/XML.

The following provides specific terms and guidelines referenced in the MTConnect Standard for forming response documentselectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. with XML:

  • tag: A tag is an XML construct that forms the foundation for an XML expression. It defines the scope (beginning and end) of an XML expression. The main types of tags are:

  • start-tag: Designates the beginning on an XML element; e.g., «span class=”hoverterm”>element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.</span>>

  • end-tag: Designates the end on an XML element; e.g., </element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.>.

Note: If an element has no child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. or CDATA, the end-tag may be shortened to />.

  • Element: An element is an XML statement that is the primary building block for a document encoded using XML. An element begins with a start-tag and ends with a matching end-tag. The characters between the start-tag and the end-tag are the element’s content. The content may contain attributes, CDATA, and/or other elements. If the content contains additional elements, these elements are called child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained..

An example would be: «span class=”hoverterm”>element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.</span>>Content of the Element</element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.>.

  • child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained.: An XML element that is contained within a higher-level parent elementelement of a data modeling structure that illustrates the relationship between itself and the lower-level child element.. A child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. is also known as a sub-element. XML allows an unlimited hierarchy of parent elementelement of a data modeling structure that illustrates the relationship between itself and the lower-level child element.-child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. relationships that establishes the structure that defines how the various pieces of information in the document relate to each other. A parent elementelement of a data modeling structure that illustrates the relationship between itself and the lower-level child element. may have multiple associated child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained..

  • element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.: A descriptive identifier contained in both the start-tag and end-tag that provides the name of an XML element.

  • Attribute: A construct consisting of a name–value pair that provides additional information about that XML element. The format for an attribute is `name=”value”; where the value for the attribute is enclosed in a set of quotation (“) marks. An XML attribute MUST only have a single value and each attribute can appear at most once in each element. Also, each attribute MUST be defined in a schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. to either be required or optional.

  • An example of attributes for an XML element is example-of-attributes-for-an-element:

<DataItem category="SAMPLE" id="S1load"
  nativeUnits="PERCENT"  type="LOAD"
  units="PERCENT"/>

In this example, DataItem is the element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element.. category, id, nativeUnits, type, and units are the names of the attributes. “SAMPLE”, “S1load”, “PERCENT”, “LOAD”, and “PERCENT” are the values for each of the respective attributes.

  • CDATA: CDATA is an XML term representing Character Data. Character Data contains a value(s) or text that is associated with an XML element. CDATA can be restricted to certain formats, patterns, or words.

An example of CDATA associated with an XML element would be example-of-cdata-associated-with-element:

<Message id="M1">This is some text</Message>

In this example, Message is the element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element. and This is some text is the CDATA.

  • namespaceorganizes information into logical groups.: An XML namespaceorganizes information into logical groups. defines a unique vocabulary for named elements and attributes in an XML document. An XML document may contain content that is associated with multiple namespacesorganizes information into logical groups.. Each namespaceorganizes information into logical groups. has its own unique identifier.

Elements and attributes are associated with a specific namespaceorganizes information into logical groups. by placing a prefix on the name of the element or attribute that associates that name to a specific namespaceorganizes information into logical groups.; e.g., x:MyTarget associates the element name MyTarget with the namespaceorganizes information into logical groups. designated by x: (the prefix).

namespacesorganizes information into logical groups. are used to avoid naming conflicts within an XML document. The naming convention used for elements and attributes may be associated with either the default namespaceorganizes information into logical groups. specified in the header of an XML document or they may be associated with one or more alternate namespacesorganizes information into logical groups.. All elements or attributes associated with a namespaceorganizes information into logical groups. that is not the default namespaceorganizes information into logical groups., must include a prefix (e.g., x:) as part of the name of the element or attribute to associate it with the proper namespaceorganizes information into logical groups.. See Section Schema and Namespace Declaration Information for details on the structure for XML headers.

The names of the elements and attributes declared in a namespaceorganizes information into logical groups. may be identified with a different prefix than the prefix that signifies that specific namespaceorganizes information into logical groups.. These prefixes are called namespaceorganizes information into logical groups. aliases. As an example, MTConnect Standard specific namespacesorganizes information into logical groups. are designated as m: and the names of the elements and attributes defined in that namespaceorganizes information into logical groups. have an alias prefix of mt: which designates these names as MTConnect Standard specific vocabulary; e.g., mt:MTConnectDevices.

XML documents are encoded with a hierarchy of elements. In general, XML elements may contain child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained., CDATA, or both. However, in the MTConnect Standard, an element MUST NOT contain mixed content; meaning it cannot contain both child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. and CDATA.

The semantic data modelmethodology for defining the structure and meaning for data in a specific logical way that can be interpreted by a software system. defined for each response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. specifies the elements and child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. that may appear in a document. The semantic data modelmethodology for defining the structure and meaning for data in a specific logical way that can be interpreted by a software system. also defines the number of times each element and child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. may appear in the document.

example-of-hierarchy-of-xml-elements demonstrates the hierarchy of XML elements and child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. used to form an XML document:

<Root Level>    (Parent Element)
  <First Level>  (Child Element to Root Level and 
  Parent Element to Second Level)
    <Second Level>  (Child Element to First Level
    and Parent Element to Third Level)
      <Third Level name="N1"></Third Level>  
      (Child Element to Second Level)
      <Third Level name="N2"></Third Level>  
      (Child Element to Second Level)
      <Third Level name="N3"></Third Level>  
      (Child Element to Second Level)
    </Second Level>   (end-tag for Second Level)
  </First Level>   (end-tag for First Level)
</Root Level>   (end-tag for Root Level)

In the example-of-hierarchy-of-xml-elements, Root Level and First Level have one child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. (sub-elements) each and Second Level has three child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained.; each called Third Level. Each Third Level element has a different name attribute. Each level in the structure is an element and each lower level element is a child elementelement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained..

Schema and Namespace Declaration Information

There are four pseudo-attributes typically included in the header of a response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. that declare the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. for the document. Each of these pseudo-attributes provides specific information for a client software application to properly interpret the content of the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

The pseudo-attributes include:

  • xmlns:xsi – The xsi portion of this attribute name stands for XML Schemaschema defining a specific document encoded in XML. instance. An XML Schemaschema defining a specific document encoded in XML. instance provides information that may be used by a software application to interpret XML specific information within a document. See the W3C website for more details on xmlns:xsi.

  • xmlns – Declares the default namespaceorganizes information into logical groups. associated with the content of the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request.. The default namespaceorganizes information into logical groups. is considered to apply to all elements and attributes whenever the name of the element or attribute does not contain a prefix identifying an alternate namespaceorganizes information into logical groups..

The value of this attribute is an URN identifying the name of the file that defines the details of the namespaceorganizes information into logical groups. content. This URN provides a unique identify for the namespaceorganizes information into logical groups..

  • xmlns:m – Declares the MTConnect specific namespaceorganizes information into logical groups. associated with the content of the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request.. There may be multiple namespacesorganizes information into logical groups. declared for an XML document. Each may be associated to the default namespaceorganizes information into logical groups. or it may be totally independent. The :m designates that this is a specific MTConnect namespaceorganizes information into logical groups. which is directly associated with the default namespaceorganizes information into logical groups..

Note: See Section Extensibility for details regarding extended namespacesorganizes information into logical groups..

The value associated with this attribute is an URN identifying the name of the file that defines the details of the namespaceorganizes information into logical groups. content.

  • xsi:schemaLocation - Declares the name for the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. associated with the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. and the location of the file that contains the details of the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. for that document.

The value associated with this attribute has two parts:

  • A URN identifying the name of the specific XML Schemaschema defining a specific document encoded in XML. instance associated with the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

  • The path to the location where the file describing the specific XML Schemaschema defining a specific document encoded in XML. instance is located. If the file is located in the same root directory where the agentsoftware that collects data published from one or more piece(s) of equipment, organizes that data in a structured manner, and responds to requests for data from client software systems by providing a structured response in the form of a response document that is constructed using the semantic data model of a Standard. is installed, then the local path MAY be declared. Otherwise, a fully qualified URL must be declared to identify the location of the file.

Note: In the format of the value associated with xsi:schemaLocation, the URN and the path to the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. file MUST be separated by a “space”.

In example-of-schema-and-namespace-declaration, the first line is the XML declaration. The second line is a root elementfirst structural element provided in a response document encoded using XML. called MTConnectDevices. The remaining four lines are the pseudo-attributes of MTCconnectDevices that declare the XML schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. associated with an MTConnectDevices Response Documentresponse document published by an MTConnect Agent in response to a probe request..

<?xml version="1.0" encoding="UTF-8"?>
  <MTConnectDevices
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
   xmlns="urn:mtconnect.org:MTConnectDevices:1.3"
   xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"
   xsi:schemaLocation="urn:mtconnect.org:
    MTConnectDevices:1.3 /schemas/MTConnectDevices\_1.3.xsd">

The format for the values provided for each of the pseudo-attributes MUST reference the semantic data modelmethodology for defining the structure and meaning for data in a specific logical way that can be interpreted by a software system. (e.g., MTConnectDevices, MTConnectStreams, MTConnectAssets, or MTConnectError) and the version (i.e.; 1.1, 1.2, 1.3, etc.) of the MTConnect Standard that depict the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups.(s) associated with a specific response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

When an implementer chooses to extend an MTConnect data modelorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. by adding custom data types or additional structural elementselement that organizes information that represents the physical and logical parts and sub-parts of a piece of equipment., the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. for that data modelorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. should be updated to reflect the additional content. When this is done, the namespaceorganizes information into logical groups. and schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. information in the header should be updated to reflect the URI for the extended namespaceorganizes information into logical groups. and schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document..

Extensibility

MTConnect is an extensible standard, which means that implementers MAY extend the data modelsorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. defined in the various sections of the MTConnect Standard to include information required for a specific implementation. When these data modelsorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. are encoded using XML, the methods for extending these data modelsorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. are defined by the rules established for extending any XML schema (see the W3C website for more details on extending XML data models).

The following are typical extensions that MAY be considered in the MTConnect data modelsorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities.:

  • Additional type and subtype values for DataItemsobservable observed by a Component that may make Observations.

  • Additional structural elementselement that organizes information that represents the physical and logical parts and sub-parts of a piece of equipment. as containers.

  • Additional Composition elements.

  • New Asset types that are sub-typed from the abstract Asset type.

  • child elementselement of a data modeling structure that illustrates the relationship between itself and the higher-level parent element within which it is contained. that may be added to specific XML elements contained within the MTConnect Information Modelsinformation model that defines the semantics of the MTConnect Standard.. These extended elements MUST be identified in a separate namespaceorganizes information into logical groups..

When extending an MTConnect data modelorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities., there are some basic rules restricting changes to the MTConnect data modelsorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities..

When extending an MTConnect data modelorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities., an implementer:

  • MUST NOT add new value for category for DataItemsobservable observed by a Component that may make Observations,

  • MUST NOT add new root elementsfirst structural element provided in a response document encoded using XML. ,

  • SHOULD NOT add new top levelelement that represents the most significant physical or logical functions of a piece of equipment. Componentsengineered system part of a Device composed of zero or more Components, and

  • MUST NOT add any new attributes or include any sub-elements to Composition.

Note: Throughout the documents additional information is provided where extensibility may be acceptable or unacceptable to maintain compliance with the MTConnect Standard.

When a schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. representing a data modelorganizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. is extended, the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. declaration at the beginning of the corresponding response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. MUST be updated to reflect the new schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. so that a client software application can properly validate the response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request..

An XML example of a schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. declaration, including an extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups., is shown in example-of-extended-schema-and-namespace-in-declaration:

<?xml version="1.0" encoding="UTF-8"?>
  <MTConnectDevices
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
   xmlns="urn:mtconnect.org:MTConnectDevices:1.3"
   xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"
   xmlns:x="urn:MyLocation:MyFile:MyVersion"
   xsi:schemaLocation="urn:MyLocation:MyFile:MyVersion
     /schemas/MyFileName.xsd" />

In this example:

  • xmlns:x is added in Line 6 to identify the XML Schemaschema defining a specific document encoded in XML. instance for the extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document.. element namesdescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element. identified with an “x” prefix are associated with this specific XML Schemaschema defining a specific document encoded in XML. instance.

Note: The “x” prefix MAY be replaced with any prefix that the implementer chooses for identifying the extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups..

  • xsi:schemaLocation is modified in Line 7 to associate the namespaceorganizes information into logical groups. URN with the URL specifying the location of schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. file.

  • MyLocation, MyFile, MyVersion, and MyFileName in Lines 6 and 7 MUST be replaced by the actual name, version, and location of the extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document..

When an extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. is implemented, each structural elementelement that organizes information that represents the physical and logical parts and sub-parts of a piece of equipment., DataItemobservable observed by a Component that may make Observations, and assetitem, thing or entity that has potential or actual value to an organization. ISO 55000:2014 > Note 1 to entry: Value can be tangible or intangible, financial or non-financial, and includes consideration of risks and liabilities. It can be positive or negative at different stages of the asset life. > Note 2 to entry: Physical assets usually refer to equipment, inventory and properties owned by the organization. Physical assets are the opposite of intangible assets, which are non-physical assets such as leases, brands, digital assets, use rights, licences, intellectual property rights, reputation or agreements. > Note 3 to entry: A grouping of assets referred to as an asset system could also be considered as an asset. defined in the extended schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. MUST be identified in each respective response documentelectronic document published by an MTConnect Agent in response to a probe request, current request, sample request or asset request. by adding a prefix to the XML element namedescriptive identifier contained in both the start-tag and end-tag of an XML element that provides the name of the element. associated with that structural elementelement that organizes information that represents the physical and logical parts and sub-parts of a piece of equipment., DataItemobservable observed by a Component that may make Observations, or assetitem, thing or entity that has potential or actual value to an organization. ISO 55000:2014 > Note 1 to entry: Value can be tangible or intangible, financial or non-financial, and includes consideration of risks and liabilities. It can be positive or negative at different stages of the asset life. > Note 2 to entry: Physical assets usually refer to equipment, inventory and properties owned by the organization. Physical assets are the opposite of intangible assets, which are non-physical assets such as leases, brands, digital assets, use rights, licences, intellectual property rights, reputation or agreements. > Note 3 to entry: A grouping of assets referred to as an asset system could also be considered as an asset. . The prefix identifies the schemadefinition of the structure, rules, and vocabularies used to define the information published in an electronic document. and namespaceorganizes information into logical groups. where that XML Element is defined.


Table of contents


Back to top

Copyright © 2017-2026 Association for Manufacturing Technology (AMT). All rights reserved. MTConnect® is a trademark of AMT. Terms of Use.

MTConnect SysML Model V2.3