Virtually all modern measuring and control systems are built on a client-server architecture. Applications that are based on this architecture, allow to collect, analyze, store, and transmit data over long distances by means of wired and wireless networks. These systems are used for the following tasks:

  • Monitoring sites and structures (bridges, buildings, stadiums, high-rise buildings, transport);

  • automated electricity metering (AMR system for collecting information from electricity meters);

  • automation of technological processes (SCADA systems).

Distributed systems are created in the NI LabVIEW development environment using the LabVIEW Datalogging and Supervisory Control (DSC) software module. In these systems, the UDP protocol is used to exchange data between the server and clients, which, in contrast to the TCP protocol, loads the data transmission channel less. However, the UDP protocol does not monitor the reliability of data delivery, and, accordingly, the server may not know whether the measuring system sent it data, and the measuring system, in turn, may not know whether the server received this data (Figure 1). Accordingly, with a large amount of data or a large number of clients and an unstable communication channel (which often happens in cellular networks), the transmitted information may be lost.

Figure 1 - Possible loss of data when transmitting information in wireless networks

1 - server, 2 - customers (measuring systems), 3 - router, 4 - data sent by the client, 5 - data received by the server, 6 - transmitted data packet, 7 - data packet corrupted during transmission

In order to avoid the loss of measured data in wireless networks, the library of functions "Shared Variables Handler" (SVH library) was developed. SVH-functions check the data transmitted by the client and received by the server and initiate retransmission upon their loss. The Shared Variables Handler library consists of the following functions:

  • «Open SVH». This function opens a data session between the client and the server;

  • «Write SVH Data». The function transfers data from the client to the server;

  • «Read SVH Data». The function reads the server sent the client data and verifies its integrity;

  • «Close SVH». Function closes a data session between the client and the server.

To send a data frame, SVH-function using the following algorithm (Figure 2):

  1. The client initiates the transmission of a data frame.

  2. The "Write SVH Data" function creates a copy of the data frame in the client's buffer.

  3. A data frame is transmitted from the client to the server.

  4. Write SVH Data is awaiting notification of data frame transmission. The maximum wait time is set by timeout.

  5. The function «Read SVH Data» receives the data frame and verify its integrity.

  6. «Read SVH Data» client sends notification of transfer of a data frame. It can be of two types:

    1. "The data frame is received", if the integrity check of the data packet is passed;

    2. "The data frame is damaged" if the integrity check of the data packet is not passed.

  7. Write SVH Data does one of the following:

    1. It clears the client buffer and initiates transmission of a new data packet. This action is performed when receiving the notification "data frame is received";

    2. copies the data packet from the client's buffer and initiates its retransmission. This action is performed when the "Data frame is corrupted" notification is received. Also, “Write SVH Data” performs this action if “Read SVH Data” did not send a notification during the timeout.

      Figure 2 - Algorithm for guaranteed data frame delivery using SVH functions

      1 - server, 2 - client.

Shared Variables Handler Library of completely solves the problem of guaranteed delivery of large volumes of data in a client-server applications in the wireless and wired networks unreliable. Unlike SCADA and AMR, which convey a lot of information is almost impossible, this solution allows you to work with a large volume of data, without fearing for their integrity.