Functions | Variables
modbus_client Namespace Reference

Functions

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

Variables

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

Function Documentation

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

Definition at line 91 of file modbus_client.py.


Variable Documentation

Definition at line 44 of file modbus_client.py.

Definition at line 45 of file modbus_client.py.

tuple modbus_client::host = "192.168.0.123"

Definition at line 55 of file modbus_client.py.

tuple modbus_client::modclient = ModbusWrapperClient(host,port=port,rate=50,reset_registers=False,sub_topic="modbus_wrapper/output",pub_topic="modbus_wrapper/input")

Definition at line 66 of file modbus_client.py.

Definition at line 43 of file modbus_client.py.

tuple modbus_client::output = HoldingRegister()

Definition at line 100 of file modbus_client.py.

tuple modbus_client::output2 = HoldingRegister()

Definition at line 102 of file modbus_client.py.

tuple modbus_client::port = 502

Definition at line 56 of file modbus_client.py.

tuple modbus_client::pub = rospy.Publisher("modbus_wrapper/output",HoldingRegister,queue_size=500)

Example 3 writing to modbus registers using a standard ros publisher.

Definition at line 99 of file modbus_client.py.

Example 1 Sets an individual register using the python interface, which can automatically be reset, if a timeout is given.

Definition at line 78 of file modbus_client.py.

tuple modbus_client::sub = rospy.Subscriber("modbus_wrapper/input",HoldingRegister,showUpdatedRegisters,queue_size=500)

Definition at line 93 of file modbus_client.py.

Definition at line 80 of file modbus_client.py.

Definition at line 79 of file modbus_client.py.



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