Simulate devices to test - assemblits/eru GitHub Wiki
Resume
It is important to see if Eru is connecting to remote devices and updating devices and tags in real time. In the real world you can use a device, assign an IP and configure the Eru to get data from it, but you can use a simulator too thanks to Device-Simulator.
Eru use a communications protocol called Modbus to connect to smart devices. Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). It has become a de facto standard communications protocol in industry, and is now the most commonly available means of connecting industrial electronic devices. Eru is a Master in a Modbus Network, and support the following slaves:
- Modbus RTU devices
- Modbus ASCII devices
- Modbus TCP devices
Detailed information about the Modbus protocol is available on the following website: Official website
There are also various tools available on the internet. We recommend using device-simulator which is an Eru application designed to operate as a Modbus Slave device to bring data points in a connected Modbus Network. It is designed primarily as a testing devices and verificate correct protocol operation in new or existing systems.
Requirements
- Modbus-sumulator: See README file in Device-Simulator
- Eru server (:))
Steps
- Run device-simulator as su.
- Configure: a. Connection type: TCP b. Address: 1 e. Activate randomizer
- Open Eru and configure:
a. Double click on Connections.
b. On the menu bar: Edit > Add > TCP with a fancy name
c. On the table:
- Type: TCP
- Enable: TRUE
- Hostname: localhost.
- Port: The defaul modbus port is 502. d. Double click on devices. e. On the menu bar: Edit > Add f. On the table:
- ID: The same ID as the configured in device-simulator (1)
- Enabled: TRUE
- Double click on Addresses field and configure: Start 1, End 10, Holding Registers.
- Zero based: TRUE
- Connection: Select the fancy name connection. g. Save. h. On the connection name: push connect button. i. If the connection is done successfully the connection change the status to connected and if you open the Addresses field in the Device table the values are updated. j. Change values on device-simulator (if you are not using randomizer) and compare them in the Eru server.
Conclusion
Remember to close connections before leaving and save!