Pymodbus package installation error

505 views
Skip to first unread message

Saad Durrani

unread,
Aug 12, 2015, 3:18:58 PM8/12/15
to modbus-tk
Hi Guys

I am new user to Python and doing Project to implement Modbus Client in the Python .

I found the package pymodbus . I installed in Windows it works fine , When I installed the package in raspberry debian Linux ,it was successful. I installed by using the following commands sudo easy_install pip sudo pip install pymodbus

Pathbrowser is updated ,show the path of the package in the dist-package .

But when I run the code ,it gives me the error,My code is mentioned below.

from pymodbus.client.sync import ModbusTcpClient

Accessing the ModBus Client with the IP address

client = ModbusTcpClient('127.0.0.1')

Function Code 05 (x05) Write single Output coil (Coil_number,Data(True /False),Slave_ID(hex))

client.write_coil(5, True,unit=0x02)

Function Code 01 (x01) Read output coils and store in vector ,(Start_coil_no,count_coil,Slave_ID)

result = client.read_coils(1,10,unit=0x02) print (result.bits[4])

please help me as I have few days to solve the problem ,

Luc JEAN

unread,
Aug 12, 2015, 3:22:14 PM8/12/15
to modb...@googlegroups.com
Hello,

This group is for modbus_tk which is another python library for modbus. You should ask on a pymodbus group :-)

Best
luc

--
You received this message because you are subscribed to the Google Groups "modbus-tk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modbus-tk+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages