Skip to content

Simulate devices to test

Marlon Trujillo edited this page Sep 20, 2017 · 2 revisions

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

  1. Modbus-sumulator: See README file in Device-Simulator
  2. Eru server (:))

Steps

  1. Run device-simulator as su.
  2. Configure: a. Connection type: TCP b. Address: 1 e. Activate randomizer
  3. 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!

Clone this wiki locally