2021年10月7日 星期四

Node-Red ADAM6050

 Node-Red ADAM6050




[{"id":"b9a182891490f9df","type":"modbus-read","z":"4239b774f8721b1d","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"Coil","adr":"0","quantity":"12","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"1c26a972471ee33a","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":170,"y":120,"wires":[[],["8b4a7dc4777d8336","5e0c43458daab19e","0c83c8edb1f39c89","0ab4cc152a51b57f","75158d2acc30c8d1","e37a29188cb33622","3fba559024265d72","f8eb4fa9e1e9d628","75720321edfb9d9e","aeddf07984642288","fcc30500a80afb8e","4302637915b254ae","d261dccb76ef4f3e"]]},{"id":"8b4a7dc4777d8336","type":"debug","z":"4239b774f8721b1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":370,"y":80,"wires":[]},{"id":"5e0c43458daab19e","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[0];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":140,"wires":[["aa3e49cb573d3ac6","e81f5f3c9b6893d4"]]},{"id":"aa3e49cb573d3ac6","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":100,"wires":[]},{"id":"e81f5f3c9b6893d4","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":140,"wires":[]},{"id":"0c83c8edb1f39c89","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[1];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":220,"wires":[["3562a24ccbca2034","d49a9c90e19c87a8"]]},{"id":"d49a9c90e19c87a8","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":220,"wires":[]},{"id":"3562a24ccbca2034","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":180,"wires":[]},{"id":"0ab4cc152a51b57f","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[2];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":300,"wires":[["e343db4289b90b05","38751dd700de9ff6"]]},{"id":"e343db4289b90b05","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":260,"wires":[]},{"id":"38751dd700de9ff6","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":300,"wires":[]},{"id":"75158d2acc30c8d1","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[3];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":380,"wires":[["c51748cd27954dfb","19e01153fef1a35d"]]},{"id":"19e01153fef1a35d","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":380,"wires":[]},{"id":"c51748cd27954dfb","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":340,"wires":[]},{"id":"e37a29188cb33622","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[4];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":460,"wires":[["c0b1e1da6c173894","fd8735eb59ee994b"]]},{"id":"c0b1e1da6c173894","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":420,"wires":[]},{"id":"fd8735eb59ee994b","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":460,"wires":[]},{"id":"3fba559024265d72","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[5];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":540,"wires":[["08a9663f0cfa661e","7153d7cbbcbf39f9"]]},{"id":"7153d7cbbcbf39f9","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":560,"y":540,"wires":[]},{"id":"08a9663f0cfa661e","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":500,"wires":[]},{"id":"f8eb4fa9e1e9d628","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[6];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":620,"wires":[["dbe3a5c5e78e4091","2071bf12acd6bce7"]]},{"id":"dbe3a5c5e78e4091","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":580,"wires":[]},{"id":"2071bf12acd6bce7","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":620,"wires":[]},{"id":"75720321edfb9d9e","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[7];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":700,"wires":[["8839f03aaec7602a","283474913630e7f6"]]},{"id":"283474913630e7f6","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":700,"wires":[]},{"id":"8839f03aaec7602a","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":660,"wires":[]},{"id":"bde0e6b605676392","type":"modbus-read","z":"4239b774f8721b1d","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"Coil","adr":"16","quantity":"8","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"1c26a972471ee33a","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":770,"y":100,"wires":[["b7269a6a7cfe3d45"],["2162096b59c2404f","15ec5959e25ac419","734b198ed21277c9","9b04f9cba4bdae68","3276d4357312f85a","1cc4348c3a6a2c59"]]},{"id":"2162096b59c2404f","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[0];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":120,"wires":[["e70a812513c48d45","20473a4d09604ebc"]]},{"id":"e70a812513c48d45","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":120,"wires":[]},{"id":"15ec5959e25ac419","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[1];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":200,"wires":[["0ad924f0da4d9159","084d36a1b40e3850"]]},{"id":"084d36a1b40e3850","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":200,"wires":[]},{"id":"0ad924f0da4d9159","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":160,"wires":[]},{"id":"734b198ed21277c9","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[2];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":280,"wires":[["e3a58718f608c672","2b9cdee1dd90ac64"]]},{"id":"e3a58718f608c672","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":240,"wires":[]},{"id":"2b9cdee1dd90ac64","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":280,"wires":[]},{"id":"9b04f9cba4bdae68","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[3];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":360,"wires":[["5940e95141d44b98","d4d5f18a441710dd"]]},{"id":"d4d5f18a441710dd","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":360,"wires":[]},{"id":"5940e95141d44b98","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":320,"wires":[]},{"id":"3276d4357312f85a","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[4];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":440,"wires":[["504319ef0232d4e1","4aed4a15612da5f6"]]},{"id":"504319ef0232d4e1","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":400,"wires":[]},{"id":"4aed4a15612da5f6","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":440,"wires":[]},{"id":"1cc4348c3a6a2c59","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[5];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":520,"wires":[["b961bc491e849997","1432709e26ba7875"]]},{"id":"1432709e26ba7875","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"d6cdb749c3a03f45","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1140,"y":520,"wires":[]},{"id":"b961bc491e849997","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":480,"wires":[]},{"id":"20473a4d09604ebc","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":80,"wires":[]},{"id":"b7269a6a7cfe3d45","type":"debug","z":"4239b774f8721b1d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":950,"y":60,"wires":[]},{"id":"aeddf07984642288","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[8];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":780,"wires":[["25f5f4130256a469","68d79e82c82d4faa"]]},{"id":"25f5f4130256a469","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":740,"wires":[]},{"id":"68d79e82c82d4faa","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":780,"wires":[]},{"id":"fcc30500a80afb8e","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[9];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":860,"wires":[["97ac6eeef621a35c","bd948460dd13fd47"]]},{"id":"bd948460dd13fd47","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":860,"wires":[]},{"id":"97ac6eeef621a35c","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":820,"wires":[]},{"id":"4302637915b254ae","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[10];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":940,"wires":[["292f9a45b99eefb5","c9ad53f97c342312"]]},{"id":"292f9a45b99eefb5","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":900,"wires":[]},{"id":"c9ad53f97c342312","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":940,"wires":[]},{"id":"d261dccb76ef4f3e","type":"function","z":"4239b774f8721b1d","name":"","func":"msg.payload=msg.payload.data[11];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":1020,"wires":[["60bfb93308bedfd7","9deb78f6bf1df47b"]]},{"id":"9deb78f6bf1df47b","type":"ui_led","z":"4239b774f8721b1d","order":5,"group":"bcc80421681f5ec7","width":"1","height":"1","label":"","labelPlacement":"left","labelAlignment":"right","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"square","showGlow":true,"name":"","x":560,"y":1020,"wires":[]},{"id":"60bfb93308bedfd7","type":"debug","z":"4239b774f8721b1d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":980,"wires":[]},{"id":"1c26a972471ee33a","type":"modbus-client","name":"ADAM6050","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.152","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"bcc80421681f5ec7","type":"ui_group","name":"DIN","tab":"0d29bd50275acb40","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"d6cdb749c3a03f45","type":"ui_group","name":"DOUT","tab":"0d29bd50275acb40","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0d29bd50275acb40","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

沒有留言:

張貼留言

2024_09 作業3 以Node-Red 為主

 2024_09 作業3  (以Node-Red 為主  Arduino 可能需要配合修改 ) Arduino 可能需要修改的部分 1)mqtt broker  2) 主題Topic (發行 接收) 3) WIFI ssid , password const char br...