Skip to main content

MTConnect

Device Production Ethernet

MTConnect Agent via the Site Runtime mtconnect (HTTP /current + XPath).

PropertyValue
Console protocol idmtconnect
Site Runtime pluginmtconnect
TransportEthernet (TCP/UDP)
Readyes
Writeno
Subscribe—
Device familiesMTConnect Agent
Default group interval1000 ms
MaturityProduction: complete driver (connection handling, address forms, batching, read and write)

Create the device​

  1. Open Connectivity → Devices and click Add device.
  2. Pick MTConnect in the protocol list.
  3. Choose the Site Runtime that can reach the device, fill the connection parameters below and click Create & connect.
  4. Add a group (poll interval) and tags with the address formats below. See Devices and Groups and tags for the full walk-through.

Connection parameters​

Every field the Console shows for this protocol. Required fields must be set before the device can be saved.

ParameterTypeDefaultRange / optionsRequiredDescription
Target Device IP Address
host
string—max 30 charsyes
Target Device Port
port
int50001 – 65535yes
Namespace Prefix
ns_prefix
string——yes
Namespace Uri
ns_uri
string——yes

Tag addresses and data types​

Supported data types: INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, BOOL, STRING. The Console validates each tag address against the pattern for its data type before it is saved:

Data typesAddress pattern (regular expression)
INT8 UINT8 INT16 UINT16 INT32 UINT32 INT64 UINT64 FLOAT DOUBLE BOOL STRING

Addressing and notes​

Address syntax and examples​

An MTConnect address is an XPath expression, evaluated on the agent's /current document. The connection form asks for a Namespace Prefix and a Namespace Uri, so the XPath can use the prefix.

<xpath>
node-name:<xpath>

With prefix m and URI urn:mtconnect.org:MTConnectStreams:1.3 (use the URI of your agent):

AddressTypeMeaning
//m:Samples/m:Position[@dataItemId='Xact']DOUBLEValue of a sample by data item id
//m:Samples/m:SpindleSpeed[@name='Sspeed']DOUBLEA sample by name
//m:Events/m:ExecutionSTRINGThe text of an event (for example ACTIVE)
//m:Events/m:AvailabilitySTRINGAvailability
//m:DeviceStream[@name='M1']//m:Events/m:ControllerModeSTRINGAn event of one device stream
node-name://m:Condition/*[@dataItemId='logic']STRINGThe element name (for example Normal, Warning, Fault)
  • A normal address returns the text of the first matching node that converts to the tag type.
  • node-name: returns the name of the matching element if it has no children. Use it for conditions, where the state is the element name.
  • The XPath is not checked by the Console. The runtime reports an error for a path with no match.
  • Use FLOAT or DOUBLE for numbers, INT types for integers, BOOL, and STRING for text.

MTConnect is read only.

Endianness​

Not applicable. Values arrive as text in XML.

Typical settings​

SettingTypicalNote
Target Device IP Address, Target Device Portagent host, 5000The agent's HTTP port.
Namespace PrefixmA short prefix of your choice. Used in the XPath.
Namespace Uriurn:mtconnect.org:MTConnectStreams:1.3Must equal the namespace of the agent's streams document (the version in the URI depends on the agent).

The runtime sends one HTTP GET /current per poll and evaluates all tags of the group on that one document. Use a group interval of 1000 ms or more. Several groups cause several requests.

Common errors​

SymptomCauseFix
All tags badThe agent does not answer, wrong port, HTTP error.Open http://host:5000/current in a browser from the runtime host.
One tag bad, others goodThe XPath does not match.Test the XPath on the /current document. Check the prefix and the URI.
XPath matches nothing although the element existsWrong namespace URI (the version differs).Copy the URI from the xmlns of the document.
Value 0 or emptyThe data item has the value UNAVAILABLE.The machine or adapter is off. The text does not convert to a number.
Condition is not a stringPlain XPath returns no text for a condition.Use node-name:.