Rev Pi Connect RS485

Topics about the Hardware of Revolution Pi
Post Reply
RBevin707
Posts: 6
Joined: 23 Jan 2019, 10:00
Answers: 0

Rev Pi Connect RS485

Post by RBevin707 »

Hi everyone. I have a Rev Pi Connect I am using for a project in work. I am having trouble finding out how to access the RS485 protocol of the device. Does anyone know how to do this or is there a guide that I cannot find?

Thanks

Ryan
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Rev Pi Connect RS485

Post by dirk »

Hi, you may access the built in RS485 interface via the device path "/dev/ttyRS485". Have a look at this tutorial for an example: Tutorial Modbus RTU Master
RBevin707
Posts: 6
Joined: 23 Jan 2019, 10:00
Answers: 0

Re: Rev Pi Connect RS485

Post by RBevin707 »

That's great, thanks Dirk.
RBevin707
Posts: 6
Joined: 23 Jan 2019, 10:00
Answers: 0

Re: Rev Pi Connect RS485

Post by RBevin707 »

Hi Dirk, I am using the RS485 to communicate with a RS232. I am using a serial converter to convert the RS232 to RS485. I am having some problems with this at the moment. I did a bit of research and found that serial ASCII characters cannot transmit correctly to a MODBUS RTU receiver. Am I correct in saying this?

Thanks

Ryan
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Rev Pi Connect RS485

Post by dirk »

Correct, there exist Modbus RTU and Modbus ASCII protocols. But RS232 and RS485 are just different standards on the physical transmission level and define a frame of a bit stream. How you interpret those bytes is a matter of your application layer. Here is a page that provides some examples for a data exchange in both protocols http://www.simplymodbus.ca/ASCII.htm
RBevin707
Posts: 6
Joined: 23 Jan 2019, 10:00
Answers: 0

Re: Rev Pi Connect RS485

Post by RBevin707 »

That is a great help. Do you know of a way to convert modbus ASCII to modbus RTU using python or do I need to buy a converter?

Thanks

Ryan
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Rev Pi Connect RS485

Post by dirk »

Hi I am by far not an expert in this field but maybe this is a good start the MinimalModbus Python Library offers a good start. It is able to process Modbus ASCII and RTU.
RBevin707
Posts: 6
Joined: 23 Jan 2019, 10:00
Answers: 0

Re: Rev Pi Connect RS485

Post by RBevin707 »

Hi Dirk, my main problem is that I am trying to send ASCII characters to the REVPI Connect and I am trying to read them in a python program on the Pi. I understand that MODBUS RTU and MODBUS ASCII are incompatible but is there any other way to get ASCII characters to read into a python program on the REVPI Connect? If ther isn't can you suggest any other alternative?

Thanks

Ryan
Post Reply