Hilscher Forum
[INFO] Support for MTConnect standard confirmed - Printable Version

+- Hilscher Forum (https://forum.hilscher.com)
+-- Forum: netPI - Ruggedized Raspberry Pi with Industrial Ethernet (https://forum.hilscher.com/Forum-netPI-Ruggedized-Raspberry-Pi-with-Industrial-Ethernet)
+--- Forum: Projects (https://forum.hilscher.com/Forum-Projects)
+--- Thread: [INFO] Support for MTConnect standard confirmed (/Thread-INFO-Support-for-MTConnect-standard-confirmed)

[INFO] Support for MTConnect standard confirmed - Armin@netPI - October-18th-2018

MTConnect is a standard for exchanging information and data of factory automation equipment like machines, sensors, actuators across Ethernet using a standardizes device data format which is XML.

Today I wanted to proof if MTConnect can be supported by netPI too. MTConnect web site provides a source code containing an agent (master) to scan for adapters (slaves) and if found any to provide their informations on a simple HTML page.

Here is what I did.

  1. I installed the Raspbian Container https://hub.docker.com/r/hilschernetpi/netpi-raspbian/ on my netPI, but activated the container to run in host network mode
  2. I opened a terminal console with putty to access Linux command line
  3. I installed node.js including npm (cause it comes not preinstalled) command using the following commands
    sudo apt-get update
    sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    sudo apt-get install -y node

  4. I installed git command using sudo apt-get install git
  5. I cloned the agent from github using git clone https://github.com/mtconnect/mtconnect-agent command
  6. I was continuing to follow the README provided in this repo and called npm install in the created mtconnect-agent folder
  7. Then I called sudo npm start and the agent immediately started its work and was scanning for adapter periodically
  8. As the README is telling I opened another terminal console to start simulating an adapter on the same netPI (can be any second hardware too)
  9. In this console I had to install the fs-ext file system package first with sudo npm install -g --unsafe-perm fs-ext needed to run the simulator
  10. Then I started the adapter simulation using sudo npm run simulator2 command. I was able to follow a logging output on the screen
  11. I saw the agent logging quite more data since it found the adapter present in the current network
  12. He wsa preparing me an HTML site of the found adapter data in the background I am able to call under the URL http://<netPi's IP address>:7000/probe

This simple setup cost me 10 minutes of work to prove that netPI can be either MTConnect agent or adaptor or even both.

Of couse my examination proves just MTConnect connectivity on the lowest communication level only and for sure there is much more work to spent on realizing a user application on top of the agent or adapter, but it shows to me that MTConnect is indeed as open and interoperable as they proclaim on their web site.

Good luck for any MTConnect project you want to realize with netPI


RE: [INFO] Support for MTConnect standard confirmed - MGharat - June-7th-2019

Hello Armin,

I was trying to run MTconnect container , but get error on npm install command as attached , Is something wrong I am doing?


RE: [INFO] Support for MTConnect standard confirmed - Armin@netPI - June-7th-2019

Updated the steps to get npm command installed in the Raspbian container cause it comes not preinstalled. So repeat at step 3

RE: [INFO] Support for MTConnect standard confirmed - MGharat - September-19th-2019

Hello Armin,

I have reexecuted the commnands today for mtconnect  , not I am getting below error as attached.
git :command not found


RE: [INFO] Support for MTConnect standard confirmed - Armin@netPI - September-19th-2019

The latest version of Raspbian does not include the command git.

I corrected the description above. In topic no .4 I am explaining now how to install git.


RE: [INFO] Support for MTConnect standard confirmed - MGharat - September-20th-2019

Hello Armin,

thanks. I again got stuck at npm install command .
As you suggested I executed step 3 again ,
Is something missed by me?


I tried further & now I get as below attached:

Is mtconnect agent running? 


RE: [INFO] Support for MTConnect standard confirmed - Armin@netPI - September-20th-2019

The latest Raspbian container uses Debian 10 or named as "Buster". Many things have been changed between the old version "stretch".

Here is a short test I made:

sudo apt-get update
sudo apt-get install nodejs
curl https://www.npmjs.com/install.sh | sudo sh
sudo apt-get install git
sudo git clone https://github.com/mtconnect/mtconnect-agent
cd mtconnect-agent
sudo npm install
sudo npm run simultator2

But when you visit the repositor web site under https://github.com/mtconnect/mtconnect-agent it says it is deprecated and no longer maintained. It also says that the new version is located at https://github.com/mtconnect/cppagent. The readme tells a programmer how to get it compiled. You need indeep knowledge to get it up and running. It is not as easy as the "old" mtconnect-agent.


RE: [INFO] Support for MTConnect standard confirmed - MGharat - October-1st-2019

Dear Armin,

I have executed few steps from below link

& now below is the output as attached.

How we can test further? any guidance?


RE: [INFO] Support for MTConnect standard confirmed - Armin@netPI - October-1st-2019

Hello Madhumati,

I am sorry to say that I have never investigated the MT Connect stuff deeply.

Your link sent seems to me a proper information how to get the cppagent installed. But what this agent is capable of and what it does I really don't know.

All I know is that MTConnect is a system to transport data between devices and you need an agent. This is what the landing page of MT connect says: https://www.mtconnect.org/

What I also see is that the source code of cppagent and its README tells more about the agent in general: https://github.com/mtconnect/cppagent
Maybe here you find how to use it and how to write a program that deals with the agent ... and then with other MT connect capable devices.

Sorry for having no better information for you.