Get Started
Install the Agent to connect machines and serve their data, or use the NuGet packages to build Agents, Adapters, and Clients of your own. Everything is free and open source under the MIT License.
docker run -p 5000:5000 trakhound/mtconnect.net-agentDocker Hub
dotnet new install MTConnect.NET-Agent-Template dotnet new mtconnect.net-agentGetting Started
dotnet add package MTConnect.NETClient Libraries
MTConnect Agent
A complete MTConnect Agent that reads data from machines, adapters, and other Agents, and serves it to any MTConnect client. Install it on Windows, run it on Linux, or start it in Docker, then choose what it does by adding Modules to its configuration file.
- Supports MTConnect versions up to 2.7, and answers each client in the version it asks for
- Input Modules read from SHDR Adapters, MQTT brokers, other Agents, and Fanuc, Haas, and Tormach controls
- Output Modules serve Probe, Current, Sample, and Assets over HTTP, and publish to MQTT, in XML or JSON, with HTTPS and TLS
- A Web UI for browsing Devices, current values, and Assets, and for editing the configuration
- A durable buffer that keeps the Agent's data through restarts
- Python Processors that transform data as it arrives
- Validates Devices and data against the MTConnect Standard
- Devices in a single
devices.xmlfile, or a folder with a file for each Device - Restarts itself when its configuration changes
- Runs as a Windows Service or a console application, with logging through NLog
Built-In Machine Support
The Agent includes Modules that read data directly from Fanuc, Haas, and Tormach CNC controls. Add a Module to the Agent's configuration with the machine's address, and the Agent creates the Device and starts reporting MTConnect data, with no separate adapter to install or maintain.
modules:
- fanuc-adapter:
deviceKey: M1
server: 192.168.1.70
port: 8193
modules:
- haas-adapter:
deviceKey: VF2
server: 192.168.1.60
port: 5051
modules:
- tormach-adapter:
deviceKey: PCNC1100
server: 192.168.1.80
port: 7890
MTConnect Adapter Framework
For equipment without built-in support, write a Data Source that reads the PLC or controller, and the Adapter Framework sends its data to any MTConnect Agent. You write the code that reads the machine, and the framework does the rest.
- Data Source Modules read the equipment, and Output Modules send the data
- The SHDR Module sends data to an MTConnect Agent over TCP
- The MQTT Module publishes data to an MQTT broker for an Agent to read
- Runs as a Windows Service, and restarts when its configuration file changes
- Updated through NuGet, so new versions don't mean copying source code
- Or skip the Adapter and embed an Agent in your application with the
mtconnect.net-agenttemplate
MTConnect Client Libraries
NuGet libraries for reading data from any MTConnect Agent, from a single Current request to a long-running stream, in applications that target .NET Framework 4.6.1 through .NET 10.
- Probe, Current, Sample, and Assets requests
- HTTP and MQTT clients, reading XML or JSON
- Streams Sample data, with compression, and reconnects when the connection drops
- HTTPS and TLS
- Typed Response Documents and entities, the same whatever the protocol or format
- IntelliSense documentation from the MTConnect Standard, generated from the MTConnect SysML model
- Converts units automatically
var client = new MTConnectHttpClient("localhost", 5000);
client.ObservationReceived += (s, observation) =>
{
var value = observation.GetValue(ValueKeys.Result);
Console.WriteLine($"{observation.DataItemId} = {value}");
};
client.Start();NuGet Packages
MTConnect.NET is split into packages by protocol and format. Install MTConnect.NET to get everything, or only the packages your application needs. Each one supports MTConnect versions up to 2.7.
Sponsor

