Rev Pi Connect RS485
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
Thanks
Ryan
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
That's great, thanks Dirk.
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
Thanks
Ryan
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
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
Thanks
Ryan
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.
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
Thanks
Ryan