MTConnect
MTConnect Agent via the Site Runtime mtconnect (HTTP /current + XPath).
| Property | Value |
|---|---|
| Console protocol id | mtconnect |
| Site Runtime plugin | mtconnect |
| Transport | Ethernet (TCP/UDP) |
| Read | yes |
| Write | no |
| Subscribe | — |
| Device families | MTConnect Agent |
| Default group interval | 1000 ms |
| Maturity | Production: complete driver (connection handling, address forms, batching, read and write) |
Create the device
- Open Connectivity → Devices and click Add device.
- Pick MTConnect in the protocol list.
- Choose the Site Runtime that can reach the device, fill the connection parameters below and click Create & connect.
- 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.
| Parameter | Type | Default | Range / options | Required | Description |
|---|---|---|---|---|---|
Target Device IP Addresshost | string | — | max 30 chars | yes | |
Target Device Portport | int | 5000 | 1 – 65535 | yes | |
Namespace Prefixns_prefix | string | — | — | yes | |
Namespace Urins_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 types | Address 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):
| Address | Type | Meaning |
|---|---|---|
//m:Samples/m:Position[@dataItemId='Xact'] | DOUBLE | Value of a sample by data item id |
//m:Samples/m:SpindleSpeed[@name='Sspeed'] | DOUBLE | A sample by name |
//m:Events/m:Execution | STRING | The text of an event (for example ACTIVE) |
//m:Events/m:Availability | STRING | Availability |
//m:DeviceStream[@name='M1']//m:Events/m:ControllerMode | STRING | An event of one device stream |
node-name://m:Condition/*[@dataItemId='logic'] | STRING | The 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
| Setting | Typical | Note |
|---|---|---|
| Target Device IP Address, Target Device Port | agent host, 5000 | The agent's HTTP port. |
| Namespace Prefix | m | A short prefix of your choice. Used in the XPath. |
| Namespace Uri | urn:mtconnect.org:MTConnectStreams:1.3 | Must 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
| Symptom | Cause | Fix |
|---|---|---|
All tags bad | The agent does not answer, wrong port, HTTP error. | Open http://host:5000/current in a browser from the runtime host. |
One tag bad, others good | The XPath does not match. | Test the XPath on the /current document. Check the prefix and the URI. |
| XPath matches nothing although the element exists | Wrong namespace URI (the version differs). | Copy the URI from the xmlns of the document. |
Value 0 or empty | The data item has the value UNAVAILABLE. | The machine or adapter is off. The text does not convert to a number. |
| Condition is not a string | Plain XPath returns no text for a condition. | Use node-name:. |