Upgrading system and upgrading method of CODESYS controller
Through the virtual private network communication between the telematics processing unit T-BOX and the upgrade server, the automation software upgrade of the CODESYS controller is realized, solving the cumbersome upgrade process in the existing technology, improving efficiency and security, saving time and manpower .
Patent Information
- Application Number
- CN202411320026.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-06
AI Technical Summary
The software to upgrade the CODESYS controller in the prior art requires a lot of time and manpower, mainly due to the cumbersome configuration of on-site network connections and manual operations.
The telematics processing unit T-BOX is used to communicate with the upgrade server through a virtual private network VPN tunnel, realizing remote software upgrade requests and data transmission, reducing manual operations, and automating the upgrade process.
Through remote upgrade of the system, the manual operation time and human participation are significantly reduced, the upgrade efficiency and safety are improved, and time and human resources are saved.
Smart Images

Figure CN119088423A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of engineering machinery, and in particular to an upgrade system and an upgrade method of a CODESYS controller. Background Art
[0002] In the field of construction machinery, the Cooperative Development System (CODESYS) is a widely used controller software development platform. Summary of the invention
[0003] In the related art, upgrading the software of the CODESYS controller requires a lot of time and manpower.
[0004] The analysis found that, on the one hand, the upgrade method in the relevant technology requires maintenance personnel to connect the electronic equipment equipped with CODESYS integrated development environment (IDE) and the target controller to be upgraded to the same local area network on site to ensure the network connectivity between CODESYS IDE and the target controller. In this way, since personnel need to go to the site to configure the network connection, it consumes a lot of time and manpower.
[0005] On the other hand, during the upgrade process of the controller software, the maintenance personnel need to manually select and open the CODESYS project file to be downloaded (including the upgrade program for upgrading the software) through CODESYS IDE, and perform corresponding operations in the CODESYS IDE interface (for example, select the target controller) to download the upgrade program to the target controller. In this way, a large number of manual operations are required during the upgrade process, which consumes a lot of time and manpower.
[0006] In order to solve the above problems, the embodiments of the present disclosure propose the following solutions.
[0007] According to one aspect of an embodiment of the present disclosure, there is provided an upgrade system for a CODESYS controller, comprising: a telematics unit T-BOX, communicatively connected to the CODESYS controller, and configured to: send a remote upgrade request for software of the CODESYS controller to an upgrade server; receive upgrade data from the upgrade server, and send the upgrade data to the CODESYS controller to upgrade the software, wherein the upgrade data includes a program for upgrading the software; the upgrade server, communicatively connected to the T-BOX, and configured to: upon receiving the remote upgrade request, obtain the upgrade data from a file storage unit storing the upgrade data, and send the upgrade data to the T-BOX.
[0008] In some embodiments, the T-BOX communicates with the upgrade server via a virtual private network VPN tunnel.
[0009] In some embodiments, the upgrade system also includes a network server, wherein the VPN tunnel includes a first VPN tunnel and a second VPN tunnel; the T-BOX is configured to: when it is necessary to send the remote upgrade request, establish a connection with the network server through the first VPN tunnel to send the remote upgrade request to the network server through the first VPN tunnel; the upgrade server is configured to: establish a connection with the network server through the second VPN tunnel to send the upgrade data to the network server through the second VPN tunnel; the network server is configured to: send the remote upgrade request to the upgrade server through the second VPN tunnel; and send the upgrade data to the T-BOX through the first VPN tunnel.
[0010] In some embodiments, the upgrade system also includes: an upgrade management platform, which is communicatively connected to the T-BOX and is configured to: store reference information, wherein the reference information includes the latest version number of the software; the T-BOX is configured to: obtain the reference information from the upgrade management platform, and send the remote upgrade request to the upgrade server when the current version number of the software is lower than the latest version number.
[0011] In some embodiments, the reference information also includes a storage location where the file storage unit stores the upgrade data, the remote upgrade request includes the storage location, and the upgrade server is configured to obtain the upgrade data from the file storage unit according to the storage location.
[0012] In some embodiments, the upgrade server is configured to: obtain a CODESYS project file from the file storage unit according to the storage location; and parse the upgrade data from the CODESYS project file.
[0013] In some embodiments, the T-BOX is further configured to: receive the upgrade data via the first port of the T-BOX; and send the upgrade data to the second port of the CODESYS controller according to a port mapping table, wherein the port mapping table reflects a mapping relationship between the first port and the second port.
[0014] In some embodiments, the upgrade system includes a plurality of the T-BOXs, and the plurality of the T-BOXs correspond one-to-one to a plurality of the CODESYS controllers.
[0015] In some embodiments, the upgrade management platform is connected to the T-BOX via a cellular network, and the T-BOX is connected to the CODESYS controller via Ethernet.
[0016] According to another aspect of the embodiment of the present disclosure, there is provided a method for upgrading a CODESYS controller, comprising: a telematics unit T-BOX sends a remote upgrade request for software of the CODESYS controller to an upgrade server, wherein the T-BOX is communicatively connected to the CODESYS controller; upon receiving the remote upgrade request, the upgrade server obtains upgrade data from a file storage unit storing the upgrade data, and sends the upgrade data to the T-BOX, wherein the upgrade server is remotely communicatively connected to the T-BOX, and the upgrade data includes a program for upgrading the software; the T-BOX receives the upgrade data from the upgrade server, and sends the upgrade data to the CODESYS controller to upgrade the software.
[0017] In the disclosed embodiment, the upgrade system of the CODESYS controller includes a telematics unit (T-BOX) connected to the CODESYS controller for communication, and an upgrade server connected to the T-BOX for remote communication.
[0018] T-BOX sends a remote upgrade request for the CODESYS controller software to the upgrade server; upon receiving the remote upgrade request, the upgrade server obtains the upgrade data from the file storage unit storing the upgrade data and sends the upgrade data to T-BOX; T-BOX receives the upgrade data and sends it to the CODESYS controller to upgrade the software. In this way, using the CODESYS controller upgrade system to complete the remote upgrade of the CODESYS controller software can reduce a large amount of manual operations, thereby reducing human participation and the time spent on manual operations, thereby saving time and manpower.
[0019] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 is a schematic diagram of an upgrade system of a CODESYS controller according to some embodiments of the present disclosure.
[0022] Figure 2is a schematic diagram of an upgrade system of a CODESYS controller according to some other embodiments of the present disclosure.
[0023] Figure 3 is a schematic diagram of a T-BOX and a CODESYS controller according to some embodiments of the present disclosure.
[0024] Figure 4 is a schematic diagram of an upgrade server according to some embodiments of the present disclosure.
[0025] Figure 5 It is a flowchart of a method for upgrading a CODESYS controller according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0027] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0028] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not necessarily drawn according to the actual proportional relationship.
[0029] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0030] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0031] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0032] In addition, in the description of the present disclosure, the terms "first", "second", "third", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance and order. Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing can be advantageous.
[0033] Figure 1 is a schematic diagram of an upgrade system of a CODESYS controller according to some embodiments of the present disclosure.
[0034] like Figure 1 As shown, the upgrade system of the CODESYS controller includes a T-BOX 101 and an upgrade server 102. Here, the T-BOX 101 is connected to the CODESYS controller 110 for communication, and the upgrade server 102 is connected to the T-BOX 101 for communication.
[0035] T-BOX 101 is configured to send a remote upgrade request for the software of CODESYS controller 110 to upgrade server 102, and receive upgrade data from upgrade server 102 and send the upgrade data to CODESYS controller 110 to upgrade the software of CODESYS controller 110. Here, the upgrade data includes a program for upgrading the software.
[0036] In some embodiments, the T-BOX 101 and the CODESYS controller 110 are in a construction machine, such as an excavator or a loader.
[0037] In the following, the specific structure of the T-BOX 101, the specific structure of the CODESYS controller 110, and the specific connection method between the T-BOX 101 and the CODESYS controller 110 will be introduced in combination with some embodiments.
[0038] The upgrade server 102 is configured to, upon receiving a remote upgrade request for the software of the CODESYS controller 110 sent by the T-BOX 101, obtain upgrade data including a program for upgrading the software from the file storage unit 150 storing the upgrade data, and send the upgrade data to the T-BOX 101.
[0039] In the following, the specific structure of the upgrade server 102 and the specific connection method between the upgrade server 102 and the T-BOX 101 will be introduced in combination with some embodiments.
[0040] As some implementations, the upgrade server 102 may obtain the upgrade data from a preset storage location. For example, upon receiving a remote upgrade request, the upgrade server 102 obtains the upgrade data from a preset storage location of the file storage unit 150 .
[0041] As some other implementations, the upgrade server 102 may obtain the upgrade data according to the storage location carried in the remote upgrade request. The following will introduce how to obtain the upgrade data according to the storage location carried in the remote upgrade request in conjunction with some embodiments.
[0042] It should be understood that the upgrade server 102 is in communication connection with the file storage unit 150 so that the upgrade server 102 obtains the upgrade data from the file storage unit 150 .
[0043] In the above embodiment, the upgrade system of the CODESYS controller includes a T-BOX 101 communicatively connected to the CODESYS controller 110 , and an upgrade server 102 communicatively connected to the T-BOX 101 .
[0044] When the upgrade server 102 receives a remote upgrade request for the software of the CODESYS controller 110 sent by the T-BOX 101 to the upgrade server 102, the upgrade server 102 obtains the upgrade data from the file storage unit 150 storing the upgrade data and sends the upgrade data to the T-BOX 101; after receiving the upgrade data, the T-BOX 101 sends the upgrade data to the CODESYS controller 110 to upgrade the software in the CODESYS controller 110.
[0045] In this way, using the CODESYS controller upgrade system to complete the remote upgrade of the CODESYS controller software can reduce a large amount of manual operations, thereby reducing human participation and the time spent on manual operations, thereby saving time and manpower.
[0046] In some embodiments, the T-BOX 101 is connected to the CODESYS controller 110 via Ethernet. In this way, the communication mode of Ethernet connection can improve the data transmission efficiency, thereby helping to improve the efficiency of the upgrade system of the CODESYS controller.
[0047] In some embodiments, T-BOX 101 communicates with upgrade server 102 via a virtual private network (VPN) tunnel.
[0048] That is, the remote upgrade request sent by T-BOX 101 to the upgrade server 102 and the upgrade data sent by the upgrade server 102 to T-BOX 101 are all sent through the VPN tunnel.
[0049] In the above embodiment, the T-BOX 101 communicates with the upgrade server 102 through a VPN tunnel, which can improve the security of the transmission of remote upgrade requests and upgrade data, thereby helping to improve the security of the upgrade system of the CODESYS controller.
[0050] Figure 2 is a schematic diagram of an upgrade system of a CODESYS controller according to some other embodiments of the present disclosure.
[0051] In some embodiments, Figure 2 As shown, the upgrade system of the CODESYS controller further includes a network server 103. The VPN tunnel for the T-BOX 101 to communicate with the upgrade server 102 includes a first VPN tunnel 1031 and a second VPN tunnel 1032. The network server 103 is, for example, a VPN server.
[0052] The T-BOX 101 is configured to establish a connection with the network server 103 through the first VPN tunnel 1031 when a remote upgrade request needs to be sent, so as to send the remote upgrade request to the network server 103 through the first VPN tunnel 1031 .
[0053] As some implementations, T-BOX 101 may determine that a remote upgrade request needs to be sent in response to a user input. For example, a user may send an upgrade instruction to T-BOX 101, and T-BOX 101 determines that a remote upgrade request needs to be sent in response to the instruction.
[0054] As some other implementations, the T-BOX 101 itself can determine whether it is necessary to send a remote upgrade request. The following will introduce how the T-BOX 101 itself determines whether it is necessary to send a remote upgrade request.
[0055] The upgrade server 102 is configured to establish a connection with the network server 103 through the second VPN tunnel 1032 , so as to send the upgrade data to the network server 103 through the second VPN tunnel 1032 .
[0056] The network server 103 is configured to send the remote upgrade request sent by the T-BOX 101 to the upgrade server 102 through the second VPN tunnel 1032 , and to send the upgrade data sent by the upgrade server 102 to the T-BOX 101 through the first VPN tunnel 1031 .
[0057] That is to say, on the one hand, the network server 103 receives the remote upgrade request from the T-BOX 101 via the first VPN tunnel 1031, and sends the remote upgrade request to the upgrade server 102 via the second VPN tunnel 1032; on the other hand, the network server 103 receives the upgrade data from the upgrade server 102 via the second VPN tunnel 1032, and sends the upgrade data to the T-BOX 101 via the first VPN tunnel 1031.
[0058] In this way, the network server 103 is used as a transit server between the T-BOX 101 and the upgrade server 102, so that the T-BOX 101 and the network server 103 are connected through a VPN tunnel, and the upgrade server 102 and the network server 103 are connected through another VPN tunnel, which increases the combination of VPN tunnels between the T-BOX 101 and the upgrade server 102, reduces the occurrence of data failure caused by line failure when the T-BOX 101 and the upgrade server 102 are directly connected, and helps to improve the efficiency of the CODESYS controller upgrade system.
[0059] In some embodiments, Figure 2 As shown, the upgrade system of the CODESYS controller also includes an upgrade management platform 104 that is communicatively connected to the T-BOX 101 .
[0060] Here, the upgrade management platform 104 is configured to store reference information including the latest version number of the software.
[0061] T-BOX 101 is configured to obtain reference information from the upgrade management platform 104, and send a remote upgrade request to the upgrade server 102 when the current version number of the software is lower than the latest version number. It should be understood that when the current version number of the software is the same as the latest version number, there is no need to send a remote upgrade request to the upgrade server 102. For example, T-BOX 101 can periodically obtain reference information from the upgrade management platform 104 at a preset time interval (for example, one week or one month); for another example, T-BOX 101 can obtain reference information from the upgrade management platform 104 in response to user input.
[0062] That is, the T-BOX can obtain the latest version number of the CODESYS controller software corresponding to the T-BOX from the upgrade management platform 104 , and determine whether to send a remote upgrade request to the upgrade server 102 by comparing the current version number of the software with the latest version number of the software.
[0063] In the above embodiment, T-BOX 101 obtains reference information including the latest version number of the software of CODESYS controller 110 from the upgrade management platform 104, and compares the current version number of the software with the latest version number based on the reference information. If the current version number of the software is lower than the latest version number, a remote upgrade request is sent to the upgrade server 102. In this way, a remote upgrade request for the software can be issued when a software upgrade is required, which helps to improve the efficiency of the upgrade system of the CODESYS controller.
[0064] In some embodiments, the upgrade management platform 104 is connected to the T-BOX 101 via a cellular network. The cellular network is, for example, a 4G or 5G network. In this way, the T-BOX 101 can wirelessly communicate with the upgrade management platform 104 remotely using a mobile communication network, which helps to improve the flexibility of the layout of the CODESYS controller upgrade system.
[0065] In some embodiments, the reference information also includes a storage location where the upgrade data is stored in the file storage unit 150. Here, the remote upgrade request sent by the T-BOX 101 includes the storage location.
[0066] The upgrade server 102 is configured to obtain the upgrade data from the file storage unit 150 according to the storage location.
[0067] That is, the T-BOX 101 not only obtains the latest version number of the software of the CODESYS controller 110 from the upgrade management platform 104 , but also obtains the storage location where the file storage unit 150 stores the upgrade data for upgrading the software of the CODESYS controller 110 .
[0068] In this case, the remote upgrade request sent by the T-BOX 101 includes the storage location, and the upgrade server 102 obtains the upgrade data for upgrading the software of the CODESYS controller 110 from the file storage unit 150 according to the storage location.
[0069] In the above embodiment, T-BOX 101 also obtains the storage location of the file storage unit 150 storing the upgrade data from the upgrade management platform 104, and carries the storage location in the remote upgrade request. In this way, when the storage location of the upgrade data in the file storage unit 150 changes, the latest storage location of the upgrade data can be updated in time by maintaining the upgrade management platform 104, which helps to improve the accuracy of the software upgrade of the CODESYS controller.
[0070] In some embodiments, the software of the CODESYS controller 110 has a number, the upgrade management platform 104 stores reference information corresponding to the number, and the T-BOX 101 obtains the reference information from the upgrade management platform 104 based on the number.
[0071] For example, assuming that the software of the CODESYS controller 110 is numbered “0001”, in this case, the T-BOX 101 obtains reference information corresponding to the number “0001” from the upgrade management platform 104 based on the number “0001”.
[0072] In the above embodiment, different software and corresponding reference information are distinguished by numbering, and when the upgrade management platform 104 stores reference information of different software, the reference information corresponding to the T-BOX can be accurately provided to the T-BOX, which helps the upgrade system of the CODESYS controller to accurately complete the software upgrade of the CODESYS controller.
[0073] In some embodiments, the upgrade server 102 is configured to obtain the CODESYS project file from the file storage unit 150 according to the storage location where the file storage unit 150 stores the upgrade data, and parse the upgrade data from the CODESYS project file.
[0074] As some implementation methods, the parsing process can be implemented through CODESYS IDE. The following will introduce how to parse the upgrade data from the CODESYS project file.
[0075] In the above embodiment, the upgrade server 102 obtains the CODESYS project file from the file storage unit 150 according to the storage location, and parses the upgrade data from the CODESYS project file, which can reduce the occurrence of incomplete upgrade data caused by data packet loss when directly obtaining the upgrade data from the file storage unit 150, improve the integrity of the upgrade data, and help improve the accuracy of the software upgrade of the CODESYS controller.
[0076] In some embodiments, the T-BOX 101 is further configured to receive the upgrade data via the first port of the T-BOX 101, and send the upgrade data to the second port of the CODESYS controller 110 according to the port mapping table. Here, the port mapping table reflects the mapping relationship between the first port and the second port. For example, the port mapping table is a transmission control protocol (TCP) port mapping table. The following will introduce how to implement port mapping in conjunction with some embodiments.
[0077] In the above embodiment, T-BOX 101 receives the upgrade data via the first port, and sends the upgrade data to the second port of CODESYS controller 110 according to the port mapping table. In this way, the upgrade data can be accurately sent to CODESYS controller 110 to upgrade the software of CODESYS controller 110, thereby helping the upgrade system of CODESYS controller to accurately complete the upgrade of the software of CODESYS controller.
[0078] In some embodiments, the upgrade system of the CODESYS controller includes multiple T-BOXs, and the multiple T-BOXs correspond one-to-one to multiple CODESYS controllers.
[0079] As some embodiments, Figure 2 As shown, the upgrade system of the CODESYS controller includes T-BOX 101 and T-BOX 111. T-BOX 101 corresponds to CODESYS controller 110, and T-BOX 111 corresponds to CODESYS controller 120. T-BOX 101 is connected to CODESYS controller 110 for communication, and T-BOX 111 is connected to CODESYS controller 120 for communication.
[0080] Here, the operation performed by the T-BOX 111 is similar to that of the T-BOX 101 , and the operation performed by the CODESYS controller 110 is similar to that of the CODESYS controller 120 .
[0081] In some embodiments, Figure 2 As shown, T-BOX 101 and CODESYS controller 110 are in engineering machine 130 , and T-BOX 111 and CODESYS controller 120 are in engineering machine 140 .
[0082] It should be understood that the upgrade system of the CODESYS controller includes not limited to two T-BOXs, and this is not limited here.
[0083] In the above embodiment, the upgrade system of the CODESYS controller includes multiple T-BOXs corresponding to multiple CODESYS controllers. In this way, the software of the CODESYS controllers in multiple engineering machines can be upgraded by using the same upgrade server 102, which helps to simplify the structure of the upgrade system while improving the efficiency of the CODESYS controller upgrade system.
[0084] Next, take T-BOX 101 and CODESYS controller 110 as an example, Figure 2 and Figure 3 Introduce the specific structures of these two.
[0085] Figure 3 is a schematic diagram of a T-BOX and a CODESYS controller according to some embodiments of the present disclosure.
[0086] First, combine Figure 2 and Figure 3 , introduces the various components of T-BOX 101 and their functions.
[0087] In some embodiments, Figure 3 As shown, T-BOX 101 includes a cellular module 1011, an Ethernet card 1012, and a LINUX system 1013. Here, the LINUX system 1013 can run a VPN virtual network card 10131, a VPN client 10132, and a remote upgrade client 10133. In addition, the LINUX system 1013 includes a port mapping table 10134.
[0088] As some implementation methods, the cellular module 1011 is used for communication between the T-BOX 101 and the outside world (for example, the upgrade management platform 104). The cellular module 1011 is, for example, a 4G or 5G communication module.
[0089] As some embodiments, the Ethernet card 1012 is connected to the CODESYS controller 110 via Ethernet, and the IP address of the Ethernet card 1012 is in the same subnet as the IP address of the Ethernet peripheral 1102 of the CODESYS controller 110. For example, the IP address of the Ethernet card 1012 is: 192.168.0.2 / 24.
[0090] As some implementation methods, the VPN client 10132 shakes hands with the network server 103 through the cellular module 1011, and creates a VPN virtual network card 10131 in the LINUX system 1013 after the handshake is successful.
[0091] As some implementation methods, the VPN virtual network card 10131 is used for T-BOX 101 to communicate with the upgrade server 102 in the VPN virtual local area network. The VPN virtual network card 10131 can obtain an IP address from the network server 103, thereby establishing a VPN tunnel between T-BOX 101 and the network server 103.
[0092] For example, the IP address of T-BOX 101 in construction machine 130 is 10.6.0.1 / 24, and the IP address of T-BOX 111 in construction machine 140 is 10.6.0.2 / 24.
[0093] As some embodiments, the remote upgrade client 10133 communicates with the CODESYS controller 110 through the Ethernet card 1012, communicates with the upgrade management platform 104 through the cellular module 1011, and communicates with the upgrade server 102 through the VPN virtual network card 10131 via the first VPN tunnel 1031 and the second VPN tunnel 1032.
[0094] As some implementations, the remote upgrade client 10133 configures the port mapping table 10134 to map the port (ie, the second port) of the program burning service 11031 in the CODESYS controller 110 to the target port (ie, the first port) of the VPN virtual network card 10131 in the T-BOX 101 .
[0095] Next, combine Figure 2 and Figure 3 , introduces the various components of the CODESYS controller 110 and the functions of these various components.
[0096] In some embodiments, Figure 3 As shown, the CODESYS controller 110 includes a permanent memory 1101 , an Ethernet peripheral 1102 , and a CODESYS real-time runtime system (Runtime) 1103 .
[0097] Next, the functions of the components in the CODESYS controller 110 are introduced.
[0098] As some implementation methods, the permanent memory 1101 is used to store the program of the burned CODESYS controller 110 .
[0099] As some implementations, the Ethernet peripheral 1102 is connected to the T-BOX 101 via Ethernet, and the IP address of the Ethernet peripheral 1102 is in the same subnet as the IP address of the Ethernet card 1012 of the T-BOX 101. For example, the IP address of the Ethernet peripheral 1102 is: 192.168.0.1 / 24.
[0100] As some embodiments, the CODESYS real-time operating system 1103 is used to run a program burning service 11031. The program burning service 11031 parses the upgrade data from the Ethernet peripheral 1102 to obtain the program included in the upgrade data, and burns the program into the permanent memory 1101 to implement the software upgrade of the CODESYS controller 110. The IP address of the program burning service 11031 is, for example, 192.168.0.1, and the port number is 11710.
[0101] In the above embodiment, the mutual cooperation of the various components of T-BOX 101 enables T-BOX 101 to receive upgrade data and send the upgrade data to CODESYS controller 110, and the mutual cooperation of the various components of CODESYS controller 110 enables CODESYS controller 110 to receive upgrade data and complete software upgrade.
[0102] Next, combine Figure 2 and Figure 4 The specific structure of the upgrade server 102 is introduced.
[0103] Figure 4 is a schematic diagram of an upgrade server according to some embodiments of the present disclosure.
[0104] The upgrade server 102 includes a physical network card 1021 and a Windows system 1022. The Windows system 1022 has a Python script 10221, a CODESYS API 10222, a CODESYS IDE 10223, a VPN client 10224 and a VPN virtual network card 10225.
[0105] As some implementations, the physical network card 1021 is used for communication between the upgrade server 102 and the outside world (eg, the file storage unit 105 ).
[0106] As some implementation methods, the upgrade server 102 performs the following operations by running the Python script 10221: access the file storage unit 105 to obtain the CODESYS project file through the Ethernet accessed by the physical network card 1021; communicate with the T-BOX 101 through the VPN virtual network card 10225; and call the CODESYS API 10222 to control the CODESYS IDE 10223 to perform the parsing of the CODESYS project file.
[0107] As some implementations, CODESYS API 10222 allows developers to control CODESYS IDE 10223 programmatically to achieve automated operations of CODESYS IDE 10223 .
[0108] As some implementation methods, CODESYS IDE 10223 communicates with T-BOX via VPN virtual network card 10225, first VPN tunnel 1031 and second VPN tunnel 1032. CODESYS IDE 10223 can also parse the upgrade data from the CODESYS project file.
[0109] As some implementations, the VPN client 10224 shakes hands with the network server 103 through the physical network card 1021, and creates a VPN virtual network card 10225 in the Windows system 1022 after the handshake is successful.
[0110] The VPN virtual network card 10225 is used for the communication between the upgrade server 102 and the T-BOX 101. For example, the IP address of the VPN virtual network card 10225 is: 10.6.0.3 / 24.
[0111] In the above embodiment, the mutual cooperation of the various components of the upgrade server 102 enables the upgrade server 102 to obtain the upgrade data and send the upgrade data to the T-BOX 101 , thereby facilitating the upgrade of the software of the CODESYS controller 110 .
[0112] The present disclosure also proposes a method for upgrading a CODESYS controller.
[0113] Figure 5 It is a flowchart of a method for upgrading a CODESYS controller according to some embodiments of the present disclosure.
[0114] In step 502, T-BOX sends a remote upgrade request for the software of the CODESYS controller to the upgrade server. Here, T-BOX is in communication connection with the CODESYS controller.
[0115] In step 504, upon receiving the remote upgrade request, the upgrade server obtains the upgrade data from the file storage unit storing the upgrade data and sends the upgrade data to the T-BOX. Here, the upgrade server is remotely connected to the T-BOX, and the upgrade data includes a program for upgrading the software.
[0116] In step 506, the T-BOX receives the upgrade data from the upgrade server and sends the upgrade data to the CODESYS controller to upgrade the software.
[0117] In the above embodiment, T-BOX sends a remote upgrade request for the software of the CODESYS controller to the upgrade server; when the upgrade server receives the remote upgrade request, it obtains the upgrade data from the file storage unit storing the upgrade data and sends the upgrade data to T-BOX; T-BOX receives the upgrade data and sends the upgrade data to the CODESYS controller to upgrade the software.
[0118] In this way, using the CODESYS controller upgrade system to complete the remote upgrade of the CODESYS controller software can reduce a large amount of manual operations, thereby reducing human participation and the time spent on manual operations, thereby saving time and manpower.
[0119] Next, combine Figures 2 to 4 The following steps describe in detail an example of how to implement a CODESYS controller software upgrade.
[0120] In step S1, the upgrade server 102 joins a VPN virtual local area network.
[0121] As some embodiments, the upgrade server 102 connects to the network server 103 via the VPN client 10224, and creates a VPN virtual network card 10225 in the Windows system 1022 of the upgrade server 102 to form a VPN tunnel, thereby joining the VPN virtual local area network. For example, the IP address of the VPN virtual network card 10225 is a fixed IP address: 10.6.0.3 / 24.
[0122] In step S2, T-BOX 101 performs software version comparison.
[0123] As some implementation methods, the T-BOX in each engineering machine obtains the current version number of the software from the CODESYS controller to which it is connected and compares it with the latest version number of the software in the upgrade management platform 104. Next, the step S2 is described in detail by taking the T-BOX 101 in the engineering machine 130 as an example.
[0124] In sub-step S2.1, the remote upgrade client 10133 in the T-BOX 101 communicates with the CODESYS controller 110 via Ethernet to obtain the serial number of the software currently running on the CODESYS controller 110 and the current version number V1 of the software.
[0125] In sub-step S 2.2, the remote upgrade client 10133 in the T-BOX 101 accesses the upgrade management platform 104 via a cellular signal, and obtains the latest version number V2 of the software and the storage location of the software in the file storage unit 150 from the upgrade management platform 104 according to the obtained software serial number.
[0126] In sub-step S2.3, the remote upgrade client 10133 in the T-BOX 101 compares the latest version number V2 with the current software version number V1 of the CODESYS controller 110. If the version number V1 is lower than the version number V2, then proceed to step S3, otherwise the remote upgrade ends.
[0127] In step S3, T-BOX joins the VPN virtual local area network.
[0128] As some implementation methods, taking T-BOX 101 as an example, T-BOX 101 connects to network server 103 through VPN client 10132, and creates VPN virtual network card 10131 in LINUX system 1013 of T-BOX 101 to form VPN tunnel, thereby joining VPN virtual local area network. For example, the IP address of T-BOX 101 is: 10.6.0.1 / 24; for another example, taking T-BOX 111 as an example, the IP address of T-BOX 111 is: 10.6.0.2 / 24.
[0129] In step S4, T-BOX creates a port mapping table.
[0130] As some implementation methods, taking T-BOX 101 as an example, T-BOX 101 maps the port of the program burning service 11031 in the CODESYS controller 110 to the target port of the VPN virtual network card 10131 in T-BOX 101 through the port mapping table 10134 configured by the remote upgrade client 10133.
[0131] For example, T-BOX 101 maps the port 192.168.0.1:11710 of the program burning service 11031 to the target port 10.6.0.1:11710 of the VPN virtual network card 10131. For another example, taking T-BOX 111 as an example, T-BOX 111 maps the program burning service port 192.168.0.1:11710 of the CODESYS controller 120 to the target port 10.6.0.2:11710 of the VPN virtual network card of T-BOX 111.
[0132] In step S5 , the T-BOX sends a remote upgrade request to the upgrade server 102 .
[0133] As some implementation methods, taking T-BOX 101 as an example, T-BOX 101 encapsulates the storage location of the software obtained in sub-step S2.2 as a remote upgrade request through the remote upgrade client 10133, and sends it to the upgrade server 102 through the first VPN tunnel 1031 and the second VPN tunnel 1032 according to the IP address of the upgrade server 102. The IP address of the upgrade server 102 is, for example, a fixed IP address 10.6.0.3.
[0134] In step S6, the upgrade server 102 obtains the CODESYS project file.
[0135] As some implementation methods, the upgrade server 102 receives the remote upgrade request and records the source IP address of the remote upgrade request using the Python script 10221 running in the upgrade server 102. Then, the upgrade server 102 uses the Python script 10221 to obtain the corresponding CODESYS project file from the file storage unit 150 according to the storage location of the software in the remote upgrade request.
[0136] In step S7, the upgrade server 102 performs remote upgrade of the controller's software.
[0137] As some implementations, the upgrade server 102 sends upgrade data for each remote upgrade request. As some implementations, the upgrade data is in the form of a data message. In this case, the upgrade data can be called a program burning message, for example.
[0138] Next, step S7 is described in detail by taking T-BOX 101 as an example.
[0139] In step S7.1, the Python script 10221 running in the upgrade server 102 calls the CODESYS IDE 10223 through the CODESYS API 10222 to parse the CODESYS project file obtained in step S6 to obtain a program burning message.
[0140] In step S7.2, Python script 10221 calls CODESYS API 10222 to configure the target IP address to be connected to the upgrade server 102 as the source IP address of the remote upgrade request recorded in step S6, so as to send the program burning message to the source IP address. For example, for T-BOX 101, the target IP address is configured as 10.6.0.1.
[0141] In step S7.3, Python script 10221 calls CODESYS API 10222 to send a program burning message to the target port of VPN virtual network card 10131 of T-BOX 101 via first VPN tunnel 1031 and second VPN tunnel 1032. Here, as in step S4, the target port of VPN virtual network card 10131 is, for example, 10.6.0.1:11710.
[0142] It should be understood that the upgrade server 102 can send a program burning message in response to other remote upgrade requests. For example, the upgrade server 102 can send a program burning message to the T-BOX 111 in response to the remote upgrade request sent by the T-BOX 111.
[0143] In step S8, after receiving the program burning message, the T-BOX forwards the program burning message to the CODESYS controller through the port mapping table.
[0144] As some implementation methods, taking T-BOX 101 as an example, after receiving the program burning message, T-BOX 101 converts the target IP address and target port number in the program burning message into the actual IP address and actual port number of the program burning service 11031 of the CODESYS controller 110 according to the port mapping table.
[0145] For example, T-BOX 101 converts the target IP: 10.6.0.1 and the target port number: 11710 in the program burning message into the actual IP: 192.168.0.1 and the actual port number: 11710 of the program burning service 11031. The program burning message after port mapping is sent to the CODESYS controller 110 via the Ethernet card 1012 in T-BOX 101.
[0146] In step S9, taking T-BOX 101 as an example, the CODESYS controller 110 receives the program burning message sent by T-BOX 101 through the Ethernet peripheral 1102, and the program burning service 11031 in the CODESYS controller 110 parses the program burning message to obtain a program for upgrading the software, and solidifies the program into the permanent memory 1101, thereby completing the remote upgrade.
[0147] In the above embodiment, a virtual local area network is built based on VPN technology, and an upgrade server is used to realize automated remote software upgrade, which reduces a large number of manual operations, thereby reducing human participation and the time spent on manual operations, thereby saving time and manpower. In addition, the upgrade method disclosed in the present invention supports the parallel upgrade of the software of the CODESYS controllers of multiple engineering machines, thereby helping to improve the efficiency of software upgrades.
[0148] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referenced to each other.
[0149] So far, various embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0150] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A CODESYS controller upgrade system, comprising: a telematics unit T-BOX, which is in communication with the CODESYS controller and is configured to: send a remote upgrade request for the software of the CODESYS controller to an upgrade server; receive upgrade data from the upgrade server, and send the upgrade data to the CODESYS controller to upgrade the software, wherein the upgrade data includes a program for upgrading the software; The upgrade server is in communication connection with the T-BOX and is configured to, upon receiving the remote upgrade request, obtain the upgrade data from a file storage unit storing the upgrade data and send the upgrade data to the T-BOX.
2. The upgrade system according to claim 1, wherein: The T-BOX communicates with the upgrade server via a virtual private network VPN tunnel.
3. The upgrade system according to claim 2, further comprising a network server, wherein: The VPN tunnel includes a first VPN tunnel and a second VPN tunnel; The T-BOX is configured to: establish a connection with the network server through the first VPN tunnel when the remote upgrade request needs to be sent, so as to send the remote upgrade request to the network server through the first VPN tunnel; The upgrade server is configured to: establish a connection with the network server through the second VPN tunnel to send the upgrade data to the network server through the second VPN tunnel; The network server is configured to: send the remote upgrade request to the upgrade server through the second VPN tunnel; and send the upgrade data to the T-BOX through the first VPN tunnel.
4. The upgrade system according to any one of claims 1 to 3, further comprising: An upgrade management platform, which is in communication with the T-BOX and is configured to: store reference information, wherein the reference information includes the latest version number of the software; The T-BOX is configured to: obtain the reference information from the upgrade management platform, and send the remote upgrade request to the upgrade server when the current version number of the software is lower than the latest version number.
5. The upgrade system according to claim 4, wherein: The reference information also includes a storage location where the file storage unit stores the upgrade data, and the remote upgrade request includes the storage location. The upgrade server is configured to obtain the upgrade data from the file storage unit according to the storage location.
6. The upgrade system according to claim 5, wherein: The upgrade server is configured as follows: Acquire a CODESYS project file from the file storage unit according to the storage location; The upgrade data is parsed from the CODESYS project file.
7. The upgrade system according to claim 2, wherein: The T-BOX is also configured to: receiving the upgrade data via the first port of the T-BOX; The upgrade data is sent to the second port of the CODESYS controller according to a port mapping table, wherein the port mapping table reflects a mapping relationship between the first port and the second port.
8. The upgrade system according to any one of claims 1 to 3, wherein: The upgrade system includes a plurality of the T-BOXs, and the plurality of the T-BOXs correspond one-to-one to a plurality of the CODESYS controllers.
9. The upgrade system according to claim 4, wherein: The upgrade management platform is connected to the T-BOX via a cellular network, and the T-BOX is connected to the CODESYS controller via Ethernet.
10. A method for upgrading a CODESYS controller, comprising: The telematics unit T-BOX sends a remote upgrade request for the software of the CODESYS controller to an upgrade server, wherein the T-BOX is in communication connection with the CODESYS controller; Upon receiving the remote upgrade request, the upgrade server obtains the upgrade data from the file storage unit storing the upgrade data, and sends the upgrade data to the T-BOX, wherein the upgrade server is remotely connected to the T-BOX in communication, and the upgrade data includes a program for upgrading the software; The T-BOX receives the upgrade data from the upgrade server, and sends the upgrade data to the CODESYS controller to upgrade the software.
