UNPKG

node-red-contrib-glacial-mtconnect

Version:
197 lines 5.09 kB
[ { "id": "562c77bb50236c9d", "type": "tab", "label": "example", "disabled": false, "info": "", "env": [] }, { "id": "329abb47f9810545", "type": "debug", "z": "562c77bb50236c9d", "name": "Shows Full Message", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 760, "y": 380, "wires": [] }, { "id": "703903633b70c24c", "type": "comment", "z": "562c77bb50236c9d", "name": "At the moment it is geting XML data from a simulated machine", "info": "", "x": 340, "y": 380, "wires": [] }, { "id": "d82bace1db300ee6", "type": "comment", "z": "562c77bb50236c9d", "name": "Enable the node to start receiving data", "info": "", "x": 270, "y": 420, "wires": [] }, { "id": "a093ecb368e5caeb", "type": "comment", "z": "562c77bb50236c9d", "name": "If you want to use your own machine, find the IP address and port number of your MTconnect agent (on the machine)", "info": "", "x": 510, "y": 140, "wires": [] }, { "id": "6bc94bb1160fc4c2", "type": "comment", "z": "562c77bb50236c9d", "name": "For example: \"http://192.###.###.###:5000/current\"", "info": "", "x": 310, "y": 220, "wires": [] }, { "id": "b26f3816b4f103f8", "type": "comment", "z": "562c77bb50236c9d", "name": "(Make sure your device can connect to the IP address!!)", "info": "", "x": 320, "y": 180, "wires": [] }, { "id": "5e08ef9273027872", "type": "comment", "z": "562c77bb50236c9d", "name": "Moves selected data out of the nested JSON payload", "info": "", "x": 500, "y": 300, "wires": [] }, { "id": "a3365be3a253509c", "type": "debug", "z": "562c77bb50236c9d", "name": "Shows Extracted", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1010, "y": 320, "wires": [] }, { "id": "3c6797cfe3c647d9", "type": "debug", "z": "562c77bb50236c9d", "name": "Shows AssetCount ", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1010, "y": 360, "wires": [] }, { "id": "d4c1b71c00de35e7", "type": "function", "z": "562c77bb50236c9d", "name": "MSG splitter", "func": "//In the 'SETUP' tab, make sure to add 2 outputs\n\nvar input = msg.payload;\n\nlet msg1 = {payload: input.xmlns};\nlet msg2 = {payload: input.creationTime};\n\nreturn [msg1, msg2]; \n\n//msg 1 is output 1\n//msg 2 is output 2", "outputs": 2, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 730, "y": 340, "wires": [ [ "a3365be3a253509c" ], [ "3c6797cfe3c647d9" ] ] }, { "id": "3911b7d140a8aba8", "type": "MTconnect Receive", "z": "562c77bb50236c9d", "d": true, "name": "", "url": "http://mtconnect.mazakcorp.com:5719", "injectTime": "3", "x": 210, "y": 340, "wires": [ [ "4ce868fefb722bac" ] ] }, { "id": "4ce868fefb722bac", "type": "MTconnect Rules", "z": "562c77bb50236c9d", "name": "", "rules": [ { "t": "move", "p": "payload.MTConnectDevices.$.xmlns", "pt": "msg", "to": "payload.xmlns", "tot": "msg" }, { "t": "move", "p": "payload.MTConnectDevices.Header[0].$.instanceId", "pt": "msg", "to": "payload.instanceID", "tot": "msg" }, { "t": "move", "p": "payload.MTConnectDevices.Header[0].$.creationTime", "pt": "msg", "to": "payload.creationTime", "tot": "msg" } ], "x": 490, "y": 340, "wires": [ [ "d4c1b71c00de35e7", "329abb47f9810545" ] ] } ]