This example gives a short overview on how to manually export a Hive instance using ModbusExport.
The full source code is located at: http://git.eclipse.org/c/eclipsescada/org.eclipse.scada.samples.git/tree/org.eclipse.scada.examples.modbus.exporter
This tutorial creates a simple hive with one item "mem1". This item is a non-persistent, in-memory item. The hive will be created programmatically and exported at "da:ngp://localhost:2199". It can be accessed using ESAC. The item can be written with ESAC and the value will be available via Modbus.
The Modbus port is 1502. This modbus export instance is a Modbus slave with ID 1.
The application is an Eclipse Application and can be started using the context menu -> Run As -> Eclipse Application. Once the application is running the data is accessible using the modbus export port (1502 in this case).
The class "SampleHive" holds the dummy hive implementation which provides exactly one item "mem1".
The class "SampleSetup" performs the hive creation and exporting with NGP and Modbus.
For exporting we only require once hive instance. Changed which will be performed over the NGP exporter are directly visible at the modbus side, and vice versa.
The modbus export has a fixed register layout. While the modbus driver (modbus master) of Eclipse SCADA can be configured to parse a arbitrary memory model, the modbus export provides a fixed layout. See also EclipseSCADA/GettingStarted/DemoSystem#Modbus_TCP.