2021年10月6日 星期三

Node-Red ADAM6017 ADC + TRH303WA 溫溼度 感測器

Node-Red ADAM6017  ADC + TRH303WA 溫溼度 感測器 


























[{"id":"f8aead5bdb2334e3","type":"tab","label":"ADAM6017","disabled":false,"info":""},{"id":"be478ef4ab1af558","type":"modbus-read","z":"f8aead5bdb2334e3","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"InputRegister","adr":"0","quantity":"10","rate":"5","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"1c26a972471ee33a","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":170,"y":180,"wires":[[],["462d108569013796","4e5ee9792af3de14","de8c690b89ccac3d","340077d19d31e364"]]},{"id":"462d108569013796","type":"debug","z":"f8aead5bdb2334e3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":370,"y":140,"wires":[]},{"id":"4e5ee9792af3de14","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var D0= msg.payload.data[0];\nvar y=((20-4)/(65536-0))*D0+4\nmsg.payload=y;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":200,"wires":[["8527a715df02dc8a","69a3471ecafa62fc"]]},{"id":"8527a715df02dc8a","type":"debug","z":"f8aead5bdb2334e3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":160,"wires":[]},{"id":"de8c690b89ccac3d","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var D1= msg.payload.data[1];\nvar y=((20-4)/(65536-0))*D1+4\nmsg.payload=y;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":320,"wires":[["227558eb2347d5c2","cbc6bfe72568ad55"]]},{"id":"227558eb2347d5c2","type":"debug","z":"f8aead5bdb2334e3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":280,"wires":[]},{"id":"340077d19d31e364","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var D2= msg.payload.data[2];\nvar y=((20-4)/(65536-0))*D2+4\nmsg.payload=y;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":420,"wires":[["ddfae083bbee6e5b","06f31a2566cb5c80"]]},{"id":"ddfae083bbee6e5b","type":"debug","z":"f8aead5bdb2334e3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":420,"wires":[]},{"id":"69a3471ecafa62fc","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var x=msg.payload;\nvar y= (x-4)/0.16\nmsg.payload=parseFloat(y).toFixed( 2 );\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":200,"wires":[["a98c1c37da9783e3","31eb342236bdce7a"]]},{"id":"a98c1c37da9783e3","type":"debug","z":"f8aead5bdb2334e3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":240,"wires":[]},{"id":"cbc6bfe72568ad55","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var x=msg.payload;\nvar y= (x-4)/0.16\nmsg.payload=parseFloat(y).toFixed( 2 );\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":320,"wires":[["8f7534b4071f6061","ac182a5b7e8e8c98"]]},{"id":"8f7534b4071f6061","type":"debug","z":"f8aead5bdb2334e3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":360,"wires":[]},{"id":"06f31a2566cb5c80","type":"function","z":"f8aead5bdb2334e3","name":"","func":"var x=msg.payload;\nvar y= (x-4)/0.16\nmsg.payload=parseFloat(y).toFixed( 2 );\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":460,"wires":[["7a7611f554590db8","795042b2a6a8a37f"]]},{"id":"7a7611f554590db8","type":"debug","z":"f8aead5bdb2334e3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":500,"wires":[]},{"id":"31eb342236bdce7a","type":"ui_gauge","z":"f8aead5bdb2334e3","name":"","group":"d6cdb749c3a03f45","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":810,"y":200,"wires":[]},{"id":"ac182a5b7e8e8c98","type":"ui_gauge","z":"f8aead5bdb2334e3","name":"","group":"d6cdb749c3a03f45","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":810,"y":320,"wires":[]},{"id":"795042b2a6a8a37f","type":"ui_gauge","z":"f8aead5bdb2334e3","name":"","group":"d6cdb749c3a03f45","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":810,"y":460,"wires":[]},{"id":"1c26a972471ee33a","type":"modbus-client","name":"ADAM6017","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"192.168.1.108","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":"d6cdb749c3a03f45","type":"ui_group","name":"Default","tab":"0d29bd50275acb40","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0d29bd50275acb40","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

   

沒有留言:

張貼留言

Messaging API作為替代方案

  LINE超好用功能要沒了!LINE Notify明年3月底終止服務,有什麼替代方案? LINE Notify將於2025年3月31日結束服務,官方建議改用Messaging API作為替代方案。 //CHANNEL_ACCESS_TOKEN = 'Messaging ...