General information about connectivity and gateway
The connectivity configuration between Machine Advisor and the gateway has to be done inside the MONITOR > Config panel of each machine.
Modicon M262 is the IIoT ready controller for logic and motion applications with direct cloud communication including encryption.
Modicon M262 supports MQTTs and HTTPs, as form of libraries that can be configured inside the engineering software EcoStruxure Machine Expert.
Following links can help to configure Modicon M262’s connectivity with Machine Advisor using different standard protocols:
There is some documentation about the HttpHandling and MqttHandling libraries (Software > Libraries… > Libraries > Communication Libraries)
There is a project example with Modicon M262 that presents the way to use either HTTPs or MQTTs protocols within dedicated
A guide called “Machine Advisor Communication Example Guide” is also delivered (Software > Libraries, Templates and Examples > Example Guides > Machine Advisor Communication Example Guide)
The project examples can be found inside EcoStruxure Machine Expert software: File > new project > From Example
Magelis Edge Box Connectivity
There are many ways to connect your machine to EcoStruxure Machine Advisor. To help you to implement Machine Advisor in a simple way, here are some guides and solutions using a Schneider Electric Magelis Edge Box.
Install Node-red on your Magelis Edge Box.
For the next steps, you need a Magelis Edge Box and an internet connection.
Download the last version of Node.JS
Open a Command prompt and run the following commands :
npm install -g –unsafe-perm node-red
npm install node-red-contrib-modbus
npm install node-red-contrib-iiot-opcua
In case you are behind a proxy insert this command before the npm commands : npm config set proxy http://your-proxy:port
Example: npm config set proxy http://gateway.zscaler.net:80
Once Node-RED is installed, open a command prompt and write the command :node-red
Open your web browser (chrome is recommended) and write http://127.0.0.1:1880 in the search bar. You now have access to your Node-RED home page.
Be sure that you are using a recent version of Node-RED. To update Node-RED, enter the command npm install -g –unsafe-perm node-red
Connect through Modbus TCP with HTTPs
This is a Node-RED flow which request values from a ModbusTCP-Server and send this via HTTPS to Machine Advisor.
You need the following node in your Node-Red environment: node-red-contrib-modbus (link to add the node : https://flows.nodered.org/node/node-red-contrib-modbus).
Download the .txt file below:
In Node-red, go to Menu, Import, Clipboard.
Paste the .txt file you just downloaded in the box, click on new flow, Import.
You now have a Modbus TCP tab with preconfigured nodes
Follow the next steps to configure your flow:
1) Open “ModbusTCP Request” and set up your connection in the server properties.
Fill the name, the IP address of your controller, the port (port is 502 by default) and click on Update, Done.
2) Set the config on your machine in Machine Advisor to: Custom, HTTPS, Charlie.
3) Open the node “set Monitor Data” and copy the CustomHeader2 and Server from Machine Advisor and define a prefix (this will be added before each variable name).
4) Enter your proxy server if needed in the node “Set Monitor Data”
5) Click on Deploy. After few seconds, check if the showStatus node shows “Connected”.
6) If it is connected, go to Machine Advisor and check your variables in the “Value” tab.
7) You can change the read interval in the node “Timestamp”.
8) Delete the Buffer by clicking on the node “delete Buffer” in case you entered the wrong monitor configuration.