How is data sent to the backend when the ATG is unable to connect to the fuel dispenser?
In the scene of industrial Internet of Things, there may be data transmission problems between devices and systems. For example, the tanker has no extra interface for the liquid level meter. In order to solve this problem, the ATG can be connected to the computer, and the data from the ATG can be transmitted to the background through the program. Taking the serial relay service program of the ATG as an example, this paper discusses how to realize the protocol conversion and data relay of industrial equipment through custom service and build stable and reliable data transmission.

How does this system need to be connected?
First, the carbon rod needs to be connected to the liquid level meter, and then the liquid level meter is connected to the computer system through the serial port. The computer system runs the relay service program to send the data of the liquid level meter to the background system.
First of all, it is necessary to build a multi-task collaborative polling service, which is mainly composed of three asynchronous tasks: the timed data sending service periodically sends query instructions to serial devices, maintains the heartbeat of devices, and triggers data reporting. The serial communication service is responsible for the management of serial connections, data transceiver and protocol conversion. Network monitoring service provides a network interface, allowing external systems to interact with devices through network protocols.
What kind of framework pattern should be built?
This architecture embodies the typical “two-way communication+active polling” mode of an industrial communication system.
The regular sending service sends inquiry instructions to the equipment at intervals of 10 seconds, which simulates the polling mechanism of the tanker to the ATG and ensures real-time data. The serial communication module shows several key characteristics of industrial protocol processing, and the configuration parameters are all read from the configuration file, which reflects the demand of flexible deployment in an industrial system. When the device returns data, the data processing function is triggered to receive the original data, check and verify the data integrity, perform different parsing logic according to the device type, and finally send the parsed data to the background system through a network request.

In the process of modern industrial digitalization, software programs convert the equipment data in the physical world into understandable information in the digital world, which is the infrastructure for the landing of the industrial Internet. In the complex and changeable industrial environment, stability and reliability are always more important than novel functions, and moderate abstraction and decoupling are the best strategies to deal with future changes. This pragmatic and rigorous engineering practice is the fundamental guarantee for industrial software to run stably in a harsh environment for a long time.