Dynamic Optimization of Data Packet-based Communication for PLC Visual Monitoring

This paper presents a dynamic optimization solution for the data packet-based communication of programmable logic controller (PLC) visual monitoring, and the objective is to improve the communication efficiency between a supervisory computer and field PLCs in consideration of the network communication performance, such as network bandwidth, packet loss or retransmission rate, and human response delay. A nonlinear optimization model with constraints is formulated and solved analytically to obtain the minimized transmission time. Experimental results demonstrate that the proposed dynamic optimization can solve the practical industry problem in an efficient and effective manner, and it can provide useful guidance for the data packet-based communication setting of networked control systems.


Introduction
Networked control systems (NCSs) have been the development trend of modern control systems in both academics and industry in the past decades [1][2][3].The network-connected hardware devices and software systems can reduce the cost of operation and maintenance and improve the operational performance.For example, a real-time online specialist's diagnosis can immediately help field engineers to adjust the plant operations [4,5].Networked control monitoring systems using programmable logic controllers (PLCs) are among typical industry applications.For instance, Sekar et al. designed a PLC-based discrete automated system for remote diagnosis.Sabu et al. proposed online monitoring of PLC-based pressure control system [6].Priyanka et al. designed a new PLC based fuzzy-PID controller for automatically regulating the flowrate of petroleum transmitting pipelines [7].
A typical networked control monitoring system using PLCs is illustrated in Figure 1.A set of PLCs in the fieldbus network can be connected to the Ethernet network via the network adapters and Ethernet switch, and as a result, supervisory computers can communicate with the PLCs and monitor their status directly.When users run or debug PLC programs online in the environment of a programming software tool installed on the supervisory computer, it is highly expected that the data displayed on the monitoring screen of the supervisory computer can capture the internal data refreshes of those remote PLCs timely.Among standard PLC programming languages, the ladder diagram is the most predominant one.However, graphical ladder diagrams cannot be directly executed by PLC processors, and they should be compiled into instruction lists as an intermediate language for To improve monitoring effectiveness and communication efficiency between supervisory monitoring computers and remote PLCs, a spectrum of academic research and industry practice have been conducted in recent years, which involve system and architecture design for PLC-based system applications, advanced control, and optimization.
Among PLC-based system applications, a novel online diagnosis system framework was proposed for a distributed control system with expert decision support [4].Three different remote diagnosis architectures were tested for a PLC-based automated assembly system by incorporating advancements such as automated fault diagnosis, collaborative diagnosis, and mobile communication techniques [5].A cost-effective development environment was proposed for monitoring and data acquisition of PLC controlled applications [9].A packet-based control framework exploiting the characteristic of networked transmission was proposed for NCSs so as to deal with network-induced delay, data packet dropout and data packet disorder [10].A connection scheme of cascaded PLC communication was employed to solve the defects of long-distance decreasing transmission speed for a hydropower station's fire water system, where the Modbus communication scheme between one master station and more slave stations was difficult to use to meet real-time responses under the circumstances of faults [15].In the above research, the communication software of PLCs was optimized to reduce the cycle treatment time of PLC processors and further improve the communication efficiency and response speed.
In the context of modeling and optimizing PLC-based control systems, Konaka et al. presented a formal algebraic model of PLC control systems which enable designers to optimize system parameters.Advanced control and optimization solutions were built into a PLC platform [16].Purohit and Buch introduced a realistic case study of parallel compressor train load allocation optimization, which was also used to validate the analytical findings [17].In addition, research has been conducted recently for improving network communication performance, such as integrating code scheduling, memory allocation, and access optimization [18], optimizing data packet size in generic sensor networks [19,20], and nonlinear controllers [21,22].For example, an efficient hardware implementation of the Grünwald-Letnikov fractional order Proportional Integral Derivative (PID) was proposed as a building block in the fractional order PID controllers [21].A PLC-based fractional-order controller design was proposed for input delayed systems, and the non-integer-order controller was compared against integer-order PID controls on an industrial-oriented water tank volume control application [22].A PLC-and Simulink-based To improve monitoring effectiveness and communication efficiency between supervisory monitoring computers and remote PLCs, a spectrum of academic research and industry practice have been conducted in recent years, which involve system and architecture design for PLC-based system applications, advanced control, and optimization.
Among PLC-based system applications, a novel online diagnosis system framework was proposed for a distributed control system with expert decision support [4].Three different remote diagnosis architectures were tested for a PLC-based automated assembly system by incorporating advancements such as automated fault diagnosis, collaborative diagnosis, and mobile communication techniques [5].A cost-effective development environment was proposed for monitoring and data acquisition of PLC controlled applications [9].A packet-based control framework exploiting the characteristic of networked transmission was proposed for NCSs so as to deal with network-induced delay, data packet dropout and data packet disorder [10].A connection scheme of cascaded PLC communication was employed to solve the defects of long-distance decreasing transmission speed for a hydropower station's fire water system, where the Modbus communication scheme between one master station and more slave stations was difficult to use to meet real-time responses under the circumstances of faults [15].In the above research, the communication software of PLCs was optimized to reduce the cycle treatment time of PLC processors and further improve the communication efficiency and response speed.
In the context of modeling and optimizing PLC-based control systems, Konaka et al. presented a formal algebraic model of PLC control systems which enable designers to optimize system parameters.Advanced control and optimization solutions were built into a PLC platform [16].Purohit and Buch introduced a realistic case study of parallel compressor train load allocation optimization, which was also used to validate the analytical findings [17].In addition, research has been conducted recently for improving network communication performance, such as integrating code scheduling, memory allocation, and access optimization [18], optimizing data packet size in generic sensor networks [19,20], and nonlinear controllers [21,22].For example, an efficient hardware implementation of the Grünwald-Letnikov fractional order Proportional Integral Derivative (PID) was proposed as a building block in the fractional order PID controllers [21].A PLC-based fractional-order controller design was proposed for input delayed systems, and the non-integer-order controller was compared against integer-order PID controls on an industrial-oriented water tank volume control application [22].A PLCand Simulink-based fractional-order controller was presented for an industrial-oriented water tank level control system and its desired phase/gain margin is validated through hardware-in-the-loop simulations and experimental measurements [23].An innovative self-tuning nonlinear control algorithm was proposed for programmable logic controllers, and the performance was experimented with an industrial PLC platform [24].
New concepts and technologies have also been introduced to PLC-based control systems in the past years.For example, the concept of embedded PLCs was presented with the customization of hardware structure and real-time compilation for motion control [25].The design and implementation of a real-time wireless control and monitoring system was discussed with the potential of utilizing ZigBee protocol [26].
However, no previous research has been done to optimize data packet-based communication for PLC-based NCSs' visual monitoring specifically.In PLC-based NCS, it is important for supervisory engineers to obtain real-time information from remote PLCs, especially each logic sequence in a field PLC is individually coded to sub-networks.This paper aims to investigate a typical visual monitoring scenario between supervisory computers and field PLCs, and then optimize the data packet size of communication dynamically in order to meet the real-time requirement of human visual response.The rest of the paper is organized as follows: In Section 2, the typical visual monitoring scenario is introduced, and its data packet-based communication is briefly described, before a dynamic optimization solution is fully developed to determine the optimal data packet size with the consideration of system settings.In Section 3, a range of experimental results is provided to illustrate the effectiveness and efficiency of the proposed dynamic optimization method.The paper is concluded in Section 4.

Dynamic Optimization of Data Packet-based Communication for PLC Visual Monitoring
The communication effectiveness between a supervisory computer and PLCs in practice takes into account both the protocol's transmission efficiency [27] and the human visual response delay [13,28,29].The communication timeline designs for PLC visual monitoring focus on two aspects, including transmission load and real-time response.A communication packet is associated with a communication request/response between a supervisor computer and field PLCs, and its data frame as illustrated in Figure 2 is normally composed of a preamble, start delimiter, destination and source addresses, data length, data and frame check sequence [11].
Appl.Sci.2019, 2, x FOR PEER REVIEW 3 of 12 fractional-order controller was presented for an industrial-oriented water tank level control system and its desired phase/gain margin is validated through hardware-in-the-loop simulations and experimental measurements [23].An innovative self-tuning nonlinear control algorithm was proposed for programmable logic controllers, and the performance was experimented with an industrial PLC platform [24].New concepts and technologies have also been introduced to PLC-based control systems in the past years.For example, the concept of embedded PLCs was presented with the customization of hardware structure and real-time compilation for motion control [25].The design and implementation of a real-time wireless control and monitoring system was discussed with the potential of utilizing ZigBee protocol [26].
However, no previous research has been done to optimize data packet-based communication for PLC-based NCSs' visual monitoring specifically.In PLC-based NCS, it is important for supervisory engineers to obtain real-time information from remote PLCs, especially each logic sequence in a field PLC is individually coded to sub-networks.This paper aims to investigate a typical visual monitoring scenario between supervisory computers and field PLCs, and then optimize the data packet size of communication dynamically in order to meet the real-time requirement of human visual response.The rest of the paper is organized as follows: In Section 2, the typical visual monitoring scenario is introduced, and its data packet-based communication is briefly described, before a dynamic optimization solution is fully developed to determine the optimal data packet size with the consideration of system settings.In Section 3, a range of experimental results is provided to illustrate the effectiveness and efficiency of the proposed dynamic optimization method.The paper is concluded in Section 4.

Dynamic Optimization of Data Packet-based Communication for PLC Visual Monitoring
The communication effectiveness between a supervisory computer and PLCs in practice takes into account both the protocol's transmission efficiency [27] and the human visual response delay [13,28,29].The communication timeline designs for PLC visual monitoring focus on two aspects, including transmission load and real-time response.A communication packet is associated with a communication request/response between a supervisor computer and field PLCs, and its data frame as illustrated in Figure 2 is normally composed of a preamble, start delimiter, destination and source addresses, data length, data and frame check sequence [11].It is commonly known that the larger the data packet the longer transmission time it takes, although the transmission efficiency is higher without transmitting the packet headers and cyclic redundancy check (CRC) many times.However, transmitting a large data packet can cause time delay, which may lead to cognitive confusion.For example, if the real-time data cannot be transmitted and visualized to the current monitoring screen within the human response time limit, the user can simply take the out-of-date data as the current status of the monitoring system.In addition, a large data packet is more likely to incur packet errors or losses during transmission and the packets with data errors or losses should be retransmitted again, which contrarily decreases the communication efficiency.Thus, it is important to optimally decide the packet size in terms of the retransmission rate, human visual response, communication efficiency, etc.It is commonly known that the larger the data packet the longer transmission time it takes, although the transmission efficiency is higher without transmitting the packet headers and cyclic redundancy check (CRC) many times.However, transmitting a large data packet can cause time delay, which may lead to cognitive confusion.For example, if the real-time data cannot be transmitted and visualized to the current monitoring screen within the human response time limit, the user can simply take the out-of-date data as the current status of the monitoring system.In addition, a large data packet is more likely to incur packet errors or losses during transmission and the packets with data errors or losses should be retransmitted again, which contrarily decreases the communication efficiency.Thus, it is important to optimally decide the packet size in terms of the retransmission rate, human visual response, communication efficiency, etc.

Typical Communication Scenarios of PLC Visual Monitoring
In a typical communication process, the PLC programming software tool on a supervisory computer sends a request of reading data, and then remote PLCs return data from memory in a specified frame as shown in Figure 2.This communication process takes place in different scenarios.For example, in most cases, real-time data should be refreshed from remote PLCs to the current monitoring view regularly.When the user scrolls the monitoring view, it is expected that the real-time monitoring data should be updated immediately.
In typical industry applications, the user program of PLCs usually includes a number of program blocks, each of which is formed by a set of subnetworks.When online debugging the variables of the program, loading the required data for visualization rather than all the real-time data of program blocks can satisfy the monitoring requirements and also decrease the communication load.For example, the data updating process of scrolling a monitoring view can be described as (1) generating a table of variables according to the current monitoring screen, and (2) generating monitoring data tables from multiple memory addresses in remote PLCs.
As illustrated in Figure 3, the monitoring data should be updated from data Table 1 in Figure 3c to Table 2 in Figure 3c, when the monitoring screen is scrolled from view 1 in Figure 3a to view 2 in Figure 3b.Since the monitoring data or so-called variables are often distributed in different internal memory areas in a field PLC, there are different strategies to load monitoring data from the discrete memory addresses and pack one or multiple data packets for transmission.Furthermore, it is essential to optimize the size of data packets so as to improve communication effectiveness and efficiency.

Typical Communication Scenarios of PLC Visual Monitoring
In a typical communication process, the PLC programming software tool on a supervisory computer sends a request of reading data, and then remote PLCs return data from memory in a specified frame as shown in Figure 2.This communication process takes place in different scenarios.For example, in most cases, real-time data should be refreshed from remote PLCs to the current monitoring view regularly.When the user scrolls the monitoring view, it is expected that the real-time monitoring data should be updated immediately.
In typical industry applications, the user program of PLCs usually includes a number of program blocks, each of which is formed by a set of subnetworks.When online debugging the variables of the program, loading the required data for visualization rather than all the real-time data of program blocks can satisfy the monitoring requirements and also decrease the communication load.For example, the data updating process of scrolling a monitoring view can be described as (1) generating a table of variables according to the current monitoring screen, and (2) generating monitoring data tables from multiple memory addresses in remote PLCs.
As illustrated in Figure 3, the monitoring data should be updated from data Table 1 in Figure 3c to Table 2 in Figure 3c, when the monitoring screen is scrolled from view 1 in Figure 3a to view 2 in Figure 3b.Since the monitoring data or so-called variables are often distributed in different internal memory areas in a field PLC, there are different strategies to load monitoring data from the discrete memory addresses and pack one or multiple data packets for transmission.Furthermore, it is essential to optimize the size of data packets so as to improve communication effectiveness and efficiency.

Descriptions of Data Packet-based Communication
Suppose that there are N sub-networks of PLC ladder programs in the present monitoring view, where multiple monitoring views could be displayed simultaneously in multiple windows.Sub-network i corresponds to a series of logic operations, in which   refers to their memory space (in bytes), and it is assumed  ≜ max ,…, {  }.Whenever a PLC responds to a request, a set of memory frames should be loaded to form a set of communication packets.If a communication request needs to get access to a total number of N sub-networks, the total number of successive sub-networks to be included in a communication packet, i.e., the maximum data length of a communication packet should be optimized in line with the visual monitoring requirement.Assume that a total number of

Descriptions of Data Packet-based Communication
Suppose that there are N sub-networks of PLC ladder programs in the present monitoring view, where multiple monitoring views could be displayed simultaneously in multiple windows.Sub-network i corresponds to a series of logic operations, in which L i refers to their memory space (in bytes), and it is assumed L max should be optimized in line with the visual monitoring requirement.Assume that a total number of N P packets should be generated to fulfill the communication request.When there is a communication error, a packet with data errors or losses should be transmitted, which will result in less effective communication.Thus, the size of a transmission packet should be moderate in consideration of the transmission error rate and the maximum transmission time.Here the available network bandwidth and transmission speed is denoted as ρ (byte/s), and the application layer packet loss or retransmission rate as δ (1/byte).
When the monitoring view remains the same, the data packets of associated sub-networks will be updated periodically.When the monitoring view is scrolled, the remote PLCs should respond to the command request immediately.Let's consider a request of loading a monitoring data packet i, the communication time T i mainly includes transmission time T s i , access time T a i , queue time T q i and broadcast time T b i , which can be denoted as below.
The expected transmission time of transmitting N P packets is represented as, Generally, the expected transmission time should be minimized as far as possible to achieve communication efficiency.However, this paper takes into account the response delay of human cognition [13,28] when optimally deciding the communication packets.The human cognitive response involves a complex psychological process, and it is commonly believed that different people have different response times towards the same situation and even the same person may have different response times in different situations.In addition, recent research also demonstrates that human responses can be highly correlated to the fractional-order representation of visual cues [14], and the human response delay can only be approximated by a Gamma distribution [29].As a result, it is difficult to measure the human response delay in a precise manner.Thus, in this paper, the human response delay is formulated as an adjustable parameter, and the upper bound of each single data packet's refreshing time between the monitoring computer and a field PLC is constrained by the human response time T R , i.e., : As a result, the communication effectiveness between the monitoring computer and field PLCs can be molded as an optimal decision problem: The optimization model includes the minimization objective of the total transmission time and a set of human response time constraints.Assume that the packet size is identical, thus the decision variable turns to determine an optimized number of P successive sub-networks in each data packet.

Optimization Formulation and Solution
As discussed above, an optimized number of P successive sub-networks are packed into a packet, and N sub-networks will be assigned into N P packets.Here, N P can be calculated as: Appl.Sci.2019, 9, 1721 Approximately, the total transmission time can be computed as two parts: where T s i denotes the transmission time while T 0 refers to the access delay.Except for additional bytes (denoted as d) such as the packet headers and the CRC bytes, the size of a data packet is mainly dependent on the load data size.Let's use S i to denote the size of the ith data packet.Accordingly, the bandwidth between the monitoring computer and a PLC is fixed.Then the transmission time T s i is shown as follows: It is obvious with a fixed d that packing large data packets will send less additional bits and provide higher transmission efficiency.To simplify the protocol design of the transmission, the load data size in a single packet can be bounded by the multiplication of the number of successive sub-networks P by its maximum data length L of sub-networks: Due to the complexity of industrial environments, there are sometimes transmission errors and packet losses.The probability that the ith packet needs to be re-transmitted is: If retransmission is needed under the constraints of Equations ( 6)-( 9), the expected transmission time is then formulated as: With respect to the optimization model ( 4), a relaxed function for visual monitoring in the PLC communication design can now be transformed as: Obviously, the objective function isn't in a strictly mathematical form duo to the ceiling function, and it is hardly possible to achieve the optimality through standard nonlinear optimization packages.However, an analytical solution will often fulfill the requirement in engineering practice.
Let's consider a corresponding unconstrained minimization problem: Through calculating the first-order derivative, its optimal solution can be located at: P 0 is not necessarily an integer.However, an integer solution should be obtained for industry applications.
Lemma 1.The optimized integer solution for the unconstrained optimization problem ( 12) is shown as follows: Proof.F(P) is monotonic decreasing, when P < P ; while it is monotonic increasing, when P > P .
Thus P gives the minimum solution.
Next, let's consider the solution for the optimization problem (11).
Lemma 2. An optimized minimum solution of J(P) is given as Here the candidate set D is identified analytically below.
Proof.It is evident that F(P) is a lower bound of J(P), i.e., J(P) ≥ F(P) for any positive P.
For a composite number N, we define: Similarly, for a prime number N, we can obtain that N P = N+1 P , for P ∈ {2, . . ., N − 1}.It means that J(P) remains the same for N or N − 1.
Hence when N is a prime number, we assume that: The objective J(P) and F(P) regarding N + 1 can be alternatively considered within [2, N − 1].
It is worth noting that J(P) = F(P) for any P ∈ D N .Hence, the monotonicity for J(P) is the same as that of F(P) in the domain D N .Let's introduce: Referring to the monotonicity of F(P), it can be drawn that the minimum of J(P) lies within P L , P U .In addition, for a given integer c, we define D N c P N P = c, P ∈ {1, 2, . . ., N} .It can be re-written as D N c P N/c = N/(c − 1) , ∀P ∈ {1, 2, . . ., N}.Note that F(P) is for P ∈ D N c , and it is monotonic increasing in D N c .Thus J(P) is a saw-tooth function.For any P, the corresponding local minimum for the saw-tooth function is: This minimum can be given analytically, i.e.,: Regarding any N, all local minima for the saw-tooth function are determined by: All local minima for the saw-tooth function in P L , P U are shown as: If N is a prime number, according to (17), the objective J(P) regarding N + 1 is alternatively considered within [2, N − 1].Hence the monotone is not guaranteed in boundary 1 and N. Let's revise: The minimum of J(P) is based on (20a) or (20b), i.e., P * = Arg min P∈D J(P).
It is worth noting that (1) the number of the local minimum for a saw-tooth function is much less than those in the feasible domain, and (2) the candidate space P L , P U for searching the optimal point is largely reduced, even if N is a prime number.
Next, let us consider the constrained problem (11).The upper bound constraints for the cognitive response (11) satisfies: Lemma 3.An optimized solution mode for (11) satisfies: Initially, we try to give an explicit formula for optimal packing strategy.The two local minimum around P for J(P) are shown as: In case N P − − 1 = 0, it implies P + = N.There is an analytical formula, i.e.,: In view of the characteristics of the saw-tooth function, it can be deduced that the minimum of J(P) is most likely chosen from the candidate set shown below: This obtained candidate set is very useful to provide support for site engineers to set the data packet size considering the communication performance of NCSs.

Experimental Studies and Discussions
As discussed in Section 2, the dynamic optimization of the data packet-based communication under study is mainly concerned with optimizing the packet size for updating the PLC visual monitoring views.

Initialization and Optimization of Communication Packet Size
It has been proven in Section 2 that the optimized packet size of packing P * successive sub-networks can be identified from a candidate set by taking into account the real-time packet loss or retransmission rate δ and the human response time limit T R .In the experimental studies, the maximum human response time T R is set to be 200 ms as a benchmark, rather than a precise measurement [13,29].Furthermore, a larger P * can be achieved by tightening the upper bound of the length of sub-networks in the present monitoring view.The size of the communication packet should be reduced if δ increases.Otherwise, the size of the communication packet could be made larger.Basically, the following steps can be considered to initialize and optimize the communication packet size.
(1) Collect the initial parameters of the monitoring system and calculate P * with the use of the optimization models in Section 2.3.
(2) Monitor the communication performance, especially the actual real-time packet loss or retransmission rate δ.
(3) Adjust the tightening upper bound of the length of sub-networks and restart the packet size optimization process, when the packet loss or retransmission rate is changed outside a pre-specified range, e.g., ±10%.

Experimental Results
A series of simulation tests is first conducted in Table 1, where the system parameters are set empirically, including T 0 = 3 ms, δ = 10 −5 , ρ = 200 kilobyte/s.The additional packet header and the maximum data length of sub-networks are assumed to be 40 bytes and 300 bytes, respectively.The lower bound function F(P) and the optimized packet size on the saw-tooth function J(P) for the six tests are illustrated respectively in Figure 4. F(P) is convex, while J(P) is nonlinear and nonconvex, which makes it difficult to determine the optimal packet size mathematically.It has been discussed in Lemma 1, 2, and 3 that the optimized solution lies at one of the local minima on the saw-tooth curve.
We take Test 2 in sub-Figure 4b as an example, and the global minimum for the convex unconstrained F(P) is 11, as labeled in the figure.However, the optimized packet size should be among the candidate set of local minima {5, 7, 9, 13, 25} and the optimal solution is validated at 5 as highlighted by red labels in terms of the optimization model in Section 2.3.It means that 25 sub-networks should be packed into 5 packets with 5 sub-networks in each of the packets, and the optimal communication mode can be achieved in terms of the retransmission rate and the given human response time 200 ms.The optimal solution can be located from solving the optimization models in Section 2.3 for the other five tests, and the saw-tooth functions have different patterns, which makes it difficult to identify the optimized packet size empirically.The lower bound function () and the optimized packet size on the saw-tooth function () for the six tests are illustrated respectively in Figure 4. () is convex, while () is nonlinear and nonconvex, which makes it difficult to determine the optimal packet size mathematically.It has been discussed in Lemma 1, 2, and 3 that the optimized solution lies at one of the local minima on the saw-tooth curve.We take Test 2 in sub-Figure 4b as an example, and the global minimum for the convex unconstrained () is 11, as labeled in the figure.However, the optimized packet size should be among the candidate set of local minima {5, 7, 9, 13, 25} and the optimal solution is validated at 5 as highlighted by red labels in terms of the optimization model in Section 2.3.It means that 25 sub-networks should be packed into 5 packets with 5 sub-networks in each of the packets, and the optimal communication mode can be achieved in terms of the retransmission rate and the given human response time 200 ms.The optimal solution can be located from solving the optimization models in Section 2.3 for the other five tests, and the saw-tooth functions have different patterns, which makes it difficult to identify the optimized packet size empirically.
A real experiment was also carried out in a prototype electric power monitoring system of a high-tech industrial park, where there are 35 buildings and the monitoring system is composed of 5 PC workstations, 2 data storage servers and 35 S7-300 PLCs (i.e., one PLC monitoring one building).In the real experiment, the upper bound of the sub-network length L can be tightened for achieving efficient communication within the human response time constraint.Experimental results with the use of the optimization model in Section 2 are summarized in Table 2.A real experiment was also carried out in a prototype electric power monitoring system of a high-tech industrial park, where there are 35 buildings and the monitoring system is composed of 5 PC workstations, 2 data storage servers and 35 S7-300 PLCs (i.e., one PLC monitoring one building).In the real experiment, the upper bound of the sub-network length L can be tightened for achieving efficient communication within the human response time constraint.Experimental results with the use of the optimization model in Section 2 are summarized in Table 2.It is shown in Table 2 that a tightened bound can achieve more efficient interaction between a supervisory computer and field PLCs.The optimized data packet-based communication is more efficient than the trial-and-test engineering practice, and the actual process time using the optimized packet size is always 5%-20% less than the expected time under the empirical settings of updating the monitoring views.

Conclusions
This paper proposed a dynamic packet optimization solution for the data packet-based communication of PLC visual monitoring in the context of networked control systems.The key logic is that the sub-networks in the PLC ladder programs of a supervisory computer should be packed into different packets for efficient communication, and the data packet size of the communication should be optimally determined in consideration of the transmission error rate and the human response delay.The optimization problem is formulated as a nonlinear saw-tooth function with human response constraints and is then solved analytically to obtain the optimized data packet size, which minimizes the total transmission time.The proposed solution can meet the technical needs of optimizing the data packet size and providing an effective human-machine interaction in both simulation and experimental studies.
This practical research can provide useful guidance for the settings of networked control system applications, especially when field equipment, PLCs, or supervisory computers are deployed in geographically-distant locations, and remote monitoring or fault diagnosis should be implemented effectively.In addition, the research can be a valuable reference for industrial wireless communications and remotely controlling drones or other unmanned vehicles, where the data transmission strategy is dependent on the dynamically-changing environment.

Figure 1 .
Figure 1.A typical networked control monitoring system using programmable logic controllers (PLCs.).

Figure 1 .
Figure 1.A typical networked control monitoring system using programmable logic controllers (PLCs.).

Figure 2 .
Figure 2. A typical frame of communication data packets.

Figure 2 .
Figure 2. A typical frame of communication data packets.

Figure 3 .
Figure 3. Illustrative examples of scrolling views and updating monitoring data.

Figure 3 .
Figure 3. Illustrative examples of scrolling views and updating monitoring data.

6 Figure 4 .
Figure 4. Optimized packet size on the lower bound and saw-tooth function.

Figure 4 .
Figure 4. Optimized packet size on the lower bound and saw-tooth function.

Table 1 .
Simulation results of optimized data packet-based communication.

Table 2 .
Experimental results on optimized data packet-based communication for monitoring views.