Install-Package MTConnect.NET -Version 3.4.2
dotnet add package MTConnect.NET --version 3.4.2
<PackageReference Include="MTConnect.NET" Version="3.4.2" />
paket add MTConnect.NET --version 3.4.2
#r "nuget: MTConnect.NET, 3.4.2"
// Install MTConnect.NET as a Cake Addin #addin nuget:?package=MTConnect.NET&version=3.4.2 // Install MTConnect.NET as a Cake Tool #tool nuget:?package=MTConnect.NET&version=3.4.2
Updated for the new MTConnect 2.0 release
MTConnect.NET is a fully featured .NET library for MTConnect to develop Agents, Adapters, and Clients. Supports MTConnect Versions up to 2.0.
The Agent, Buffers, and Adapter are separated into individual classes in order to allow for modular implementations such as the following :
- A traditional Agent that uses a REST Api, in-memory buffer, and Adapters that communicate using the SHDR protocol
- An agent imbedded with the Adapter (which elminates the need for the Adapter TCP communication)
- Interfaces other than Http REST such as MQTT
- Integration with cloud services such as AWS and Azure
Other features of MTConnect.NET :
- (In-Progress) Models framework for setting and accessing data using an object model as opposed to DataItem ID's and Types
- Extensible through plugin libraries to extend Types
- Presistent Buffers that are backed up on the File System. Retains state after Agent is restarted
- Supports multiple MTConnect Version output. Automatically removes data that is not compatible with the requested version
- Supports running as Windows Service with easy to use command line arguments
- Full data validation
- Validation on Input
- XML Schema Validation on output
- Configurable Validation Levels
- Fully documented objects using text from the MTConnect Standard. This enables Intellisense in applications such as Visual Studio.
- Full list of Device, Component, Composition, and DataItem types. See Devices for more information.
- Full list of Asset types. See Devices for more information.
- Fully supports Unit conversion. Default Units and UnitConversion is done automatically when sending Streams and when reading Streams.
- Full client support for requesting data from any MTConnect Agent (Probe, Current, Sample Stream, Assets, etc.). See Clients for more information.
MTConnect HTTP Agent : A traditional MTConnect Agent using a REST Api, in-memory buffer, and SHDR for Adapters. Uses the MTConnectHttpServer as the web server.
(NEW) MTConnect HTTP Persistent Agent : A traditional MTConnect Agent using a REST Api, in-memory buffer as well as backed up on the File System (retains state after restart), and SHDR for Adapters. Uses the MTConnectHttpServer as the web server.
MTConnect HTTP Agent - AspNetCore : Similar to the MTConnect Agent application but uses either the built-in Kestrel server or can be setup through IIS (Internet Information Services). This allows the agent to be used with all of the features available through ASP.NET and IIS such as security, permissions, monitoring, etc.
MTConnect HTTP Gateway Agent : An Agent that runs mulitple MTConnectClients on the backend and passes that data to an MTConnectAgent. This can be used to access MTConnect data on a central server.
MTConnect HTTP Gateway Agent - AspNetCore : An Agent that runs mulitple MTConnectClients on the backend and passes that data to an MTConnectAgent. This can be used to access MTConnect data on a central server. Uses either the built-in Kestrel server or can be setup through IIS (Internet Information Services). This allows the agent to be used with all of the features available through ASP.NET and IIS such as security, permissions, monitoring, etc.
MTConnect MQTT Agent : (In-Progress) An MTConnect Agent with an MQTT broker built-in.
MTConnect MQTT Gateway Agent : (In-Progress) An MTConnect Gateway Agent with an MQTT broker built-in.
A live demo of the MTConnect Gateway HTTP Agent (AspNetCore) application is running at https://mtconnect.trakhound.com.
A Discussion has been created to log the progress of the Beta. Feel free to use this discussion to request features or ask questions.
The Nuget packages for the libraries in this repo are listed below:
.NET Core 3.1
.NET Standard 2.0
.NET Framework 4.8
.NET Framework 4.7.2
.NET Framework 4.7.1
.NET Framework 4.7
.NET Framework 4.6.2
.NET Framework 4.6.1
MTConnect Version Compatibility
MTConnect.NET is designed to be fully compatible for all versions of the MTConnect standard. This is done through processing by the MTConnectAgent class before data is output. This allows the version to be a parameter when requesting data from the Agent. More information can be found in the Devices README.
Validation is performed on a Device, Component, Composition, or DataItem level through the classes in Devices. This allows for validation without the need to use XML schemas (although XML Validation against XSD schemas is supported).
Releases are available at : Releases
Agents are implemented using the MTConnectAgent class and IMTConnectAgent interface. The MTConnectAgent class implements the MTConnect standard and is inteded to be full implemenation. More information about agents can be found at Agents and Agent Applications can be found at Agent Applications.
The only adapter currently available is one using the SHDR protocol. More information can be found at Adapters.
This repo along with the libraries and applications are free to use and hopefully will help those that are looking at either getting started using MTConnect or those that are looking to use MTConnect for more advanced use cases. The Models framework will hopefully make using MTConnect much easier and straight forward and promote better usage of the standard's lesser used features.
Feel free to comment, or create pull-requests for anything that could be coded, formatted, or worded better. Attention to detail and continuous improvement are important in manufacturing so they should be just as important for manufacturing software.
One of this project's goals is to expand the use cases for MTConnect and by breaking apart the functionalities of the agent, hopefully that will allow others to be creative in how to use the MTConnect standard.
Hopefully this repo will serve as a "one stop shop" for .NET developers looking to use MTConnect. If anyone is interested in developing a similar repo for another framework or language, feel free to use this as a guide as I imagine some of the classes (which is the most tedious part of the code) could be converted to other languages fairly easily.
This MTConnect.NET update is Part 1 of The TrakHound Project which is a project to provide open source code as well as products for each part of a full IIOT implementation. Please show support for our project at www.TrakHound.com.
Thanks for your interest in using these libraries and applications and feel free to contribute or give feedback.
|.NET||net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows|
|.NET Core||netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1|
|.NET Standard||netstandard2.0 netstandard2.1|
|.NET Framework||net461 net462 net463 net47 net471 net472 net48|
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MTConnect.NET:
.NET library for finding MTConnect® Devices on a network.
MTConnect.NET-Pallets is an extension library to MTConnect.NET that contains classes and tools for modeling a Pallet Changer
This package is not used by any popular GitHub repositories.