lewis.examples.modbus_device
Members
The class attributes di, co, ir and hr represent Discrete Inputs, Coils, Input Registers and Holding Registers, respectively. |
|
- class lewis.examples.modbus_device.ExampleModbusInterface[source]
Bases:
ModbusInterface
The class attributes di, co, ir and hr represent Discrete Inputs, Coils, Input Registers and Holding Registers, respectively. Each attribute should be assigned a ModbusDataBank instance by the Interface implementation.
Here, two basic ModbusDataBanks are created and initialized to a default value across the full range of valid addresses. One DataBank is shared by di and co, and the other by ir and hr to demonstrate overlaid memory segments. If you want each segment to have its own memory, just create separate instances for all four.