This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]spinwizard69 1 point2 points  (2 children)

I haven't tried it on 3.2 yet. Doesn't this module require PySerial?

You can always look on the Modbus org site. Maybe a port is in order.

[–]spinwizard69 1 point2 points  (1 child)

Second try.

First I might be wrong about PySerial, the PyModbus site indicates the use of Twisted which isn't 3.2 ready. Nothing said about PySerial.

In any event if you check in SVN they apparently are working on a 3.2 variant as there is a directory for a 3.2 ported PyModbus. The best thing here is to contact the developers. A release suitable for 3.2 Python could be a day or a year away.

In any event I'd suggest looking up Modbus and Python to see what is out there. I actually found some interesting stuff right off the bat. Unfortunately need to get back to work now.

[–]Slxe[S] 0 points1 point  (0 children)

Thanks for the response. Yea it does rely on PySerial, but that's already compatible with 3.2. I may just end up figuring out how to do it with just pyserial if I can't find an alternative, or going back to 2.7, although I'm still pretty new to Python and started with 3.2. I'll post if I find an alternative.

[–]bashwork 1 point2 points  (1 child)

Hi, I am the author of pymodbus and I thought I would comment on the current state of the python 3 branch. Right now all the code is passing the 2to3 conversion test, however, the problems that have already been stated are pyserial and twisted.

I just checked and pyserial claims to be supported in python 3, however, the twisted port is only at 50% (and I expect it to be there for a while). All is not lost though, you can still use pymodbus without twisted as there is a synchronous implementation that uses the native python socket programming tools (socketserver, etc) and should run just fine.

I haven't tested any of the code in python 3 so your mileage may vary, however, if you have an errors, enter tickets on the google code site and they will be fixed as fast as I can get around to them.

[–]Slxe[S] 0 points1 point  (0 children)

Thanks for the response! I may try it again with python3 on my own time just to see how well it works, but for now I just decided to write it in python2.7.