How to optimise SCADA systems through Modbus gateway

Changing social attitudes give rise to new awareness and expectations, which in turn put new demands on the technologies that benefit our everyday lives. A perfect example is the worldwide phenomenon that champions energy efficiency.

The advantages of following green policies are indisputable. For businesses, the enticing prospect is cost reduction. To turn this prospect into reality, the key words are control and monitoring. Focusing on energy efficiency, installing power meters at field sites is the obvious route to go. Primarily, these power meters will collect the data needed for further analysis to make sound business decisions regarding energy efficiency. For optimal control and monitoring, a large variety of devices, such as UPSs, smart relays, ATS controllers, to name a few, are required at field sites.
Commonly, these devices support the Modbus protocol, an easy-to-use protocol in most applications. However, in power monitoring applications, system integrators face two challenges: converting Modbus RTU/ASCII to Modbus TCP and deploying devices on a large scale.

When a SCADA system requests data from a power meter, the protocol conversion takes the following route.

Supervisory control and data acquisition (SCADA) is widely used in power monitoring applications to remotely monitor electrical parameters. SCADA systems usually employ Ethernet-based protocols, such as Modbus TCP. On the other side of the monitoring process, serial-based power meters, supported by the Modbus RTU protocol, generate the much-needed data. To overcome the interoperability issue, some users rely on embedded computers to conduct the required protocol conversion. The downside is that this solution requires extra resources in program design. Consequently, users turn to gateways as these devices easily perform conversions between Modbus TCP and Modbus RTU protocols. As a complex web of electrical parameter statuses needs to be collected from numerous serial- based devices for monitoring and control purposes, ideally, Modbus gateways with multiple serial ports (8 or 16 ports) should be acquired for easy management purposes.

A general solution beaten by the clock

Transparent mode communication is usually standard in the Modbus gateway market. Gateways performing transparent mode conversions are usually set up easily and quickly. But, that is about where the benefits stop. A notable drawback of transparent mode communication is that for each serial port only one Modbus protocol request-response action can be executed at any given time, so the SCADA system has to wait for each response one by one, resulting in poorer performance, especially in large-scale applications. If only a few meters are connected to a gateway, scan times might not be so much of an issue. In large-scale applications, however, it’s a different story as the aforementioned setup might cause operations to fail. In this case, a large number of devices are connected to each gateway’s serial port in a daisy chain topology through an RS-485 interface, and the gateway only deals with the simultaneous requests and responses one by one. Clearly, completing the steps in the above figure leads to lengthy scan times that are unacceptable in critical applications because this will take too much time to carry out data acquisition in the SCADA system. If, for example, 128 devices are connected to a gateway, the SCADA system will experience a huge time gap between reading the first device and the last one. Reduced scan times, therefore, are very much a sought-after feature in networks. Reducing scan times can be achieved in one of two ways: building an entirely new SCADA system or retrofitting the system.

The gateway’s internal memory can be adjusted so that the design of the SCADA program allows for more flexibility.

New-build SCADA system

This option requires you to start from scratch. The key to the success of the newly designed system is a gateway that boosts the SCADA system’s performance, increases the flexibility of the SCADA program’s design, and enables easy configuration. Gateways that support agent mode communication and have a multiport density can accomplish these goals. Agent mode, designed to overcome the shortcomings of transparent mode, allows each side of the gateway to conduct conversions independently from each other. On the one side, each serial port of the gateway acts as a Modbus RTU master actively polling the meters; on the other side, the gateway functions as a Modbus TCP server polled by the SCADA system. An all-important feature of gateways that support agent mode is an internal memory that facilitates seamless data retrievals.

Agent mode communication presents several advantages. From a SCADA system’s vantage point, its scan time is much faster than transparent mode communication. Only the duration of the Modbus TCP request and Modbus TCP response make up the scan time as there is no need for the SCADA system to wait on the RTU leg of the protocol conversion process. Another benefit is that agent mode allows all the data generated by the devices to be transferred in a few packets. From the SCADA system’s vantage point, the gateway represents a data bank that delivers the requested information. In its Modbus RTU master capacity, each serial port of the gateway actively polls the different meters to retrieve data from their various registers. The collected data is continuously stored in the gateway’s internal memory. It only requires a TCP channel to transfer the requested data in a few packets. For any system integrator, easy configuration is always a high priority. In agent mode, the gateway in its RTU master capacity can set many Modbus commands. In order to save time with configuration, some gateway brands support comma-separated value (CSV) files, which can be easily configured and imported into the gateway by using excel.

Employing intelligent mode, the MGate MB3660 will learn and remember the Modbus commands it receives from the SCADA system.

Retrofitting

If you are using transparent gateways and you are not happy with the scan times, then retrofitting your current system is your best solution. Although the market is flooded with an array of gateways, only one holds the key to reduced scan times through retrofitting. Once a command has been learned, the gateway will act as though it is in agent mode and actively send Modbus requests to the relevant Modbus devices. Since the data is saved in a gateway’s memory, the SCADA system can retrieve Modbus response data directly from the gateway’s memory, instead of waiting for the data to pass through the Modbus devices, dramatically increasing communication performance. All you need to do is enable the command learning function with one click on a web console. Again, from a SCADA system’s vantage point, the scan time will be much shorter, because the time spent on communication only occurs on the Ethernet side of the gateway. Users will see a dramatic reduction in the amount of time a Modbus device needs to wait to be accessed.

The proof is in the pudding

Protocol conversion rates were put to the test with technology such as the 16-port MGate MB3660-16, which supports transparent, agent, and intelligent modes. Each of these serial ports was connected to eight meters, with each power meter transmitting 16 bytes of data. So, altogether, 2048 bytes needed to be collected in each test. The test results showed that agent mode performed the fastest: it only took 41 ms to retrieve all the parameters. Intelligent and transparent modes took 312 ms and 7502 ms, respectively. These results compare well in comparison with that of traditional transparency gateways where you need to wait seven seconds for data to be uploaded. Just imagine if more data needs to be uploaded, how much longer it will take. Furthermore, the data acquired through traditional transparent gateways is not necessarily as accurate as those polled by gateways employing agent or intelligent mode. As illustrated Fig. 5, fewer data points are collected via transparent mode because of the slow scan times, while agent and intelligent mode collect far more data points because of faster scan times. Thus, the graph trajectory shown in the agent/intelligent mode graph below (on the right) shows that agent and intelligent modes increase the accuracy of data acquired through serial devices in SCADA systems. In large-scale applications, the results clearly show that transparent mode is not an ideal option due to the long scan times. For a new system, agent mode is your best choice. Clear benefits are short scan times and data is acquired in a few packets only. The retrofit option for existing SCADA systems, which requires fewer costs and less effort, points to intelligent mode as the optimal choice.