Namespaces | Functions | Variables
modbus_client.py File Reference

Go to the source code of this file.

Namespaces

namespace  modbus_client

Functions

def modbus_client.showUpdatedRegisters
 Example 2 Create a listener that show us a message if anything on the readable modbus registers change.

Variables

int modbus_client.ADDRESS_READ_START = 40000
int modbus_client.ADDRESS_WRITE_START = 40020
string modbus_client.host = "192.168.0.123"
tuple modbus_client.modclient = ModbusWrapperClient(host,port=port,rate=50,reset_registers=False,sub_topic="modbus_wrapper/output",pub_topic="modbus_wrapper/input")
int modbus_client.NUM_REGISTERS = 20
tuple modbus_client.output = HoldingRegister()
tuple modbus_client.output2 = HoldingRegister()
int modbus_client.port = 502
tuple modbus_client.pub = rospy.Publisher("modbus_wrapper/output",HoldingRegister,queue_size=500)
 Example 3 writing to modbus registers using a standard ros publisher.
int modbus_client.register = 40020
 Example 1 Sets an individual register using the python interface, which can automatically be reset, if a timeout is given.
tuple modbus_client.sub = rospy.Subscriber("modbus_wrapper/input",HoldingRegister,showUpdatedRegisters,queue_size=500)
float modbus_client.timeout = 0.5
int modbus_client.value = 1


modbus
Author(s): Sven Bock
autogenerated on Thu Jun 6 2019 17:39:35