MODBUS
MODBUS
This Datastream module enable to register the datastreams of Modbus Hardware module.
This datastreams corresponds to the inputs/outputs obtained through modbus protocol.
To access source code click here.
Dependencies
This module requires the following modules:
- ModBus Hardware: Provide an implementation of ModBus Master that the datastream module need to connect to the bus and collect the information of each datastream.
Configuration
To configure ModBus Datastream module, a file named es.amplia.oda.datastreams.modbus.cfg must be created with the next parameters for each input channel that you want to register:
- datastreamId: Required parameter. The identifier name of the datastream.
- deviceId: Required parameter. The device identifier name that contents the datastream. It also indicates the data needed to connect with device (defined in modbus hardware configuration file).
- datastreamType: Required parameter. Name of the Java class that is the datastream. Allowed classes are: Bit, Boolean, Short, Integer, Long, Float, Double, Bytes .
- slaveAddress: null if not present. Direction of the device in modbus.
- dataType: Required parameter. ModBus type of the data recollected from the modbus direction. Allowed classes are: INPUT_DISCRETE, COIL, INPUT_REGISTER, HOLDING_REGISTER
- dataAddress: null if not present. Direction of the specific data controlled by datastream inside the device.
es.amplia.oda.datastreams.modbus.cfg will have a similar format to:
light=datastreamType:Long,slaveAddress:1,dataType:INPUT_DISCRETE,dataAddress:255
temp,testPi=datastreamType:Double,slaveAddress:2,dataType:INPUT_REGISTER,dataAddress:100