ADAM 4017 Ascii commands through raspberry pi

I'm trying to connect ADAM 4017 (data acquisition module) to raspberry pi / node red program through RS485 USB converter and display some readings. The adam 4017 only supports ascii commands.
The command format works like this 0B is the address, #0B delivers the readings of all the channels. If i want special channel reading, for example 1th channel its #0B1
On node red, i injected a buffer [35,48,66,49] to serial request node to read the 1st channel reading but no output received.
Please consider my knowledge on node red is very low and my english is not much good.
If some one can explain the mistake that i've done, it's a great help
Thank you.

do you need to add another character for the [enter] key ? maybe "\r" or "\n"
(just guessing)
Also usually only one device can talk to the serial port at a time so make sure your other software isn't running.

The Adam 4017 supports Modbus/RTU as well as ASCII commands

That means instead of trying to build the ASCII communication protocol, you can simply install and use ModBus nodes (set to ModBus/RTU mode)

1 Like

Thanks for the reply sir..
I tried adding characters and test, but no any luck. Yes, only one device for the serial communication.

Thanks for the reply sir.. Adam 4017+ supports Modbus RTU, not 4017.

Ah yes, i missed that all importnant + character!

ok, then I can see from your screenshot you are sending #0B1




  • I see you are not sending a CR (AKA 0xD, AKA 13 AKA '\r')
  • I also see on your 1st screenshot it sends #0B not #0B1
  • how did you setup the inject node? Is that set to send JSON or BUFFER?

Things to try...

  • try removing the 1 from the INJECT node...
  • try adding 13 to the data in the INEJCT node...
  • use a function (inbetween INJECT and COM)
    msg.payload = "#0B\r"
    return msg

Oh my god..! Your are my savior..!
Just adding 13 worked..!

(I was injecting a buffer and tried 1st channel input. that's why #0B1)
Many thanks again..!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.