Page 1 of 1

Rev Pi Connect RS485

Posted: 24 Jan 2019, 16:30
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

Re: Rev Pi Connect RS485

Posted: 25 Jan 2019, 10:07
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

Re: Rev Pi Connect RS485

Posted: 25 Jan 2019, 10:35
by RBevin707
That's great, thanks Dirk.

Re: Rev Pi Connect RS485

Posted: 12 Feb 2019, 15:51
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

Re: Rev Pi Connect RS485

Posted: 12 Feb 2019, 17:05
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

Re: Rev Pi Connect RS485

Posted: 19 Feb 2019, 16:36
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

Re: Rev Pi Connect RS485

Posted: 20 Feb 2019, 08:25
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.

Re: Rev Pi Connect RS485

Posted: 21 Feb 2019, 15:58
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