Turck IM18-CCM50 Modbus read

This flow polls a modbus-read node to read out the temperature of a Banner QM30VT2 sensor connect via modbus RTU to a Turck IM18-CCM50. This flow polls the temperature register every 30 seconds (this can be changed after importing) and converts the temperature register to a JSON object.

VibrationSensor_read-flow

[{"id":"7adfcca41334b23a","type":"tab","label":"VibrationSensor_Read","disabled":false,"info":""},{"id":"516658eaeb338f3c","type":"debug","z":"7adfcca41334b23a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":200,"wires":[]},{"id":"2461d2b4c0a66a0d","type":"function","z":"7adfcca41334b23a","name":"","func":"var temperature = msg.responseBuffer.data[0];\ntemperature = temperature/100;\n//delete msg.payload;\nmsg = {};\nmsg.timestamp = new Date().valueOf();\nmsg.payload = {};\n// Use parseFloat to convert string to float\nmsg.payload.temperature = temperature;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":660,"y":200,"wires":[["516658eaeb338f3c"]]},{"id":"ca36aa3f826d5f51","type":"modbus-read","z":"7adfcca41334b23a","name":"","topic":"","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"","dataType":"HoldingRegister","adr":"5203","quantity":"1","rate":"30","rateUnit":"s","delayOnStart":true,"startDelayTime":"10","server":"2a6c230d1b558f62","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":430,"y":200,"wires":[["2461d2b4c0a66a0d"],[]]},{"id":"2a6c230d1b558f62","type":"modbus-client","name":"","clienttype":"serial","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyO1","serialType":"RTU-BUFFERD","serialBaudrate":"19200","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

Flow Info

Created 2 years, 9 months ago
Rating: 5 1

Owner

Actions

Rate:

Node Types

Core
  • debug (x1)
  • function (x1)
Other
  • modbus-client (x1)
  • modbus-read (x1)
  • tab (x1)

Tags

  • Turck
  • IM18-CCM50
  • Modbus
  • QM30VT2
  • Banner
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option