A method for calculating cutting weight of interlocking lower machine
By calculating and comparing the weight values of the communication network port and board cutting machine of the interlocking lower computer, the frequent cutting problem of the interlocking lower computer in an unstable network environment is solved, and the accuracy and stability of the cutting operation are improved.
Patent Information
- Application Number
- CN202211456564.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-11-21
AI Technical Summary
The existing interlocking lower-level computers are difficult to adapt to in an unstable network environment, resulting in frequent machine cutting phenomena and the inability to assign different weights to different boards and communication connections, resulting in machine cutting problems caused by non-safety failures.
By initializing the communication connection information of System A and System B, obtaining the peripheral cutting coefficient, calculating the cutting weight value of the communication network port and communication board, and comparing the cutting weight value of System A and System B. If one of the The weight value of the cutting machine is small, so add the cutting machine flag position. If the mark position exceeds the limit value, send the cutting machine command to perform the interlocking lower cutting machine operation.
The inspection of hardware operation is added to ensure the stability of communication of high-weight interfaces, avoid unnecessary cutting machines in a short period of time, improve the accuracy of cutting machines operation, and reduce the cutting frequency caused by non-safety faults.
Smart Images

Figure CN115811460B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rail transit, and in particular to a method for calculating the cutting weight of an interlocking lower machine. Background Art
[0002] At present, the interlocking slave computer is an important component of the interlocking signal equipment. The interlocking slave computer communicates with different external devices at the same time through multiple communication boards. When the communication connection status between the main system of the interlocking slave computer and the external device is worse than the communication connection status between the standby system and the peripheral device, the main and standby switching is required to ensure the normal communication of the signal equipment, thereby improving the availability of the equipment.
[0003] The interlocking lower computer determines whether to cut off the machine, mainly based on the real-time check of the communication connection status of the communication board. When the number of effective communication connections of the main system is less than that of the backup system, the main and backup systems are switched immediately. Such a system is difficult to adapt to the working environment with unstable network, and frequent machine cutting often occurs on site. At the same time, since different weights cannot be assigned to different boards and communication connections, the phenomenon of machine cutting caused by non-safety equipment failure occurs. Summary of the invention
[0004] The purpose of the present invention is to provide a method for calculating the cutting weight of an interlocking lower machine to ensure a stable connection between the interlocking lower machine and the interlocking signal device, and to avoid the phenomenon of frequent cutting of the machine due to non-safety faults.
[0005] To achieve the above-mentioned purpose, the present invention provides a method for calculating the cutting weight of an interlocking lower machine, wherein the interlocking lower machine includes an A system, a B system and a switching device; the A system includes a plurality of first communication boards, the B system includes a plurality of second communication boards, and the A system and the B system are connected to corresponding peripherals through a first communication network port on the first communication board and a second communication network port of the second communication board, respectively. The method comprises: respectively initializing communication connection information of the A system and the B system to obtain a peripheral cutting coefficient; initializing the first communication network port connection information and the first communication board connection information connected to the A system according to the communication connection information, forming a plurality of first communication connections connected to corresponding peripherals through the first communication network port; and initializing the second communication network port connection information and the second communication board connection information connected to the B system to form a plurality of first communication connections connected to corresponding peripherals through the second communication network port. The second communication network port is connected to the second communication connection of the corresponding peripheral device; check whether the system cycle is updated, if the system cycle is updated, then loop through each communication connection of the A system and the B system respectively; if the current communication connection is normal, calculate the cutting weight value of the communication network port of the communication connection and the cutting weight value of the communication board; respectively summarize the sum of the cutting weight values of the communication network ports associated with all communication boards with normal communication connections corresponding to the A system and the B system, and obtain the A system cutting weight value and the B system cutting weight value respectively; compare the A system cutting weight value and the B system cutting weight value, if the system with the smaller cutting weight value is the main system, then increase the values of the cutting flag bits of the A system and the B system by 1; if the value of any of the cutting flag bits is greater than the limit value, the A system and the B system send a cutting command to the cutting device to execute the interlocking lower machine cutting operation.
[0006] Preferably, the communication network port connection information and the communication board connection information connected to the A system or the B system are initialized to form multiple communication connections, including: step S101, initializing all the first communication connection information of the A system, and binding each of the peripherals to its associated first communication network port; or initializing all the second communication connection information of the B system, and binding each of the peripherals to its associated second communication network port; step S102, initializing all the first communication network port connection information, and binding each of the first communication network port to its associated first communication board; or initializing all the second communication network port connection information, and binding each of the second communication network port to its associated second communication board; step S103, initializing all the first communication board connection information, and binding each of the first communication board to its associated interlocking lower computer A system; or initializing all the second communication board connection information, and binding each of the second communication board to its associated interlocking lower computer B system; step S104, initializing the A system connection information, and obtaining all the first communication boards connected to the A system; or initializing the B system connection information, and obtaining all the second communication boards connected to the B system.
[0007] Preferably, the initialization of all first communication network port connection information in step S102 includes: the first communication network port number, the first communication card board and the first communication connection linked list; the initialization of all second communication network port connection information includes: the second communication network port number, the second communication card board and the second communication connection linked list.
[0008] Preferably, the initialization of all first communication board connection information in step S103 includes: the first communication board number, the system and the first communication network port number linked list; the initialization of all second communication board connection information includes: the second communication board number, the system and the second communication network port number linked list.
[0009] Preferably, the initialization A series connection information described in step S104 includes: all first communication boards connected to the A series and a first communication board link list; the initialization B series connection information includes: all second communication boards connected to the B series and a second communication board link list.
[0010] Preferably, the checking whether the system cycle is updated includes: step S201, obtaining the current system cycle; step S202, determining whether the system cycle number is increased by one; if the system cycle number is increased by one, it indicates that the system cycle is updated; if the system cycle number is not increased by one, returning to step S201 to re-acquire a new current system cycle, and continuing to execute step S202 to determine whether the system cycle number is increased by one, and when the system cycle is updated, executing a loop to traverse the communication connections of the system.
[0011] Preferably, the looping through the communication connections of the system and calculating the weights of the communication connections include: step S301, looping through the communication board card linked list in the system connection information, checking the hardware working status of the communication board card, and marking the hardware working status of the communication board card as normal or abnormal; step S302, traversing the communication network port number linked list of the communication board card with a normal status, checking the hardware working status of the communication network port, and marking the communication network port status as normal or abnormal; step S303, traversing the communication connection linked list of the communication network port with a normal status, checking the status of all communication connections, and if the communication connection is normal, calculating the switching weight value of the communication connection.
[0012] Preferably, the step S301 comprises: step S311, respectively initializing the machine cutting weight values of the A series and the B series; step S312, respectively obtaining the first communication board card chain list of the A series and the second communication board card chain list of the B series; step S313, judging whether the first communication board card chain list of the A series and the second communication board card chain list of the B series have been traversed; if the traversal has been completed, outputting the current machine cutting weight values of the A series and the B series; if the traversal has not been completed, respectively obtaining the first communication board card and the second communication board card that have not been traversed, and judging in turn whether the hardware of the first communication board card and the second communication board card that have not been traversed is working normally; if the hardware of the first communication board card and the second communication board card are working normally, Execute step S314; if the hardware of the first communication board or the second communication board works abnormally, end the judgment of the first communication board or the second communication board, and return to step S313; step S314, respectively call the cutting weight values of all communication network ports associated with the first communication board and the second communication board through the communication network port processing function, obtain the communication board cutting weight values corresponding to the hardware of the first communication board and the second communication board whose hardware works normally, update the cutting weight values of the A series and the B series respectively by superposition, and return to step S313; repeat steps S313 to S314 until the traversal of the first communication board linked list and the second communication board linked list is completed.
[0013] Preferably, the first communication board card cutting weight value is equal to the sum of all first communication network port cutting weight values called by the communication network port processing function in step S314; the second communication board card cutting weight value is equal to the sum of all second communication network port cutting weight values called by the communication network port processing function in step S314.
[0014] Preferably, the step S302 includes: step S321, initializing the cutting weight value of the first communication board whose hardware working state is normal in the A system and the cutting weight value of the second communication board whose hardware working state is normal in the B system; step S322, obtaining the first communication network port chain list of the first communication board and the second communication network port chain list of the second communication board in step S321; step S323, judging whether the first communication network port chain list and the second communication network port chain list in step S322 have been traversed; if the traversal has been completed, outputting the current cutting weight value of the first communication board and the cutting weight value of the second communication board; if the traversal has not been completed, obtaining the first communication network port that has not been traversed, and judging in turn whether the hardware of the first communication network port and the second communication board that have not been traversed is working normally; if the hardware of the first communication network port is If the hardware of the first communication network port and the second communication board are working normally, execute step S324; if the first communication network port or the second communication network port is working abnormally, end the judgment of the first communication network port or the second communication network port, and return to step S323; step S324, respectively call the cutting weight values of all communication connections associated with the first communication network port and the second communication network port through the communication connection processing function, obtain the first communication network port cutting weight value corresponding to the first communication network port whose hardware is working normally and the second communication network port cutting weight value corresponding to the second communication network port whose hardware is working normally, update the cutting weight value of the first communication board and the cutting weight value of the second communication board respectively by superposition, and return to step S323; repeat steps S323 to S324 until the traversal of the first communication network port linked list and the second communication network port linked list is completed.
[0015] Preferably, the first communication network port cutting weight value is equal to the sum of all first communication connection cutting weight values called by the communication connection processing function in calling step S324; the second communication network port cutting weight value is equal to the sum of all second communication connection cutting weight values called by the communication connection processing function in calling step S324.
[0016] Preferably, the step S303 includes: step S331, initializing the machine-cutting weight value of the first communication network port whose hardware working state is normal in the A system and the machine-cutting weight value of the second communication network port whose hardware working state is normal in the B system; step S332, obtaining the first communication connection linked list of the A system and the second communication connection linked list of the B system; step S333, judging whether the first communication connection linked list and the second communication connection linked list have been traversed; if the traversal has been completed, outputting the current machine-cutting weight value of the first communication network port and the machine-cutting weight value of the second communication network port; if the traversal has not been completed, obtaining the first communication connection and the second communication connection that have not been traversed, and judging the communication layer of the first communication connection and the second communication connection that have not been traversed respectively. whether the communication layer of the first communication connection and the communication layer of the second communication connection are connected normally; if the communication layer connection of the first communication connection and the communication layer of the second communication connection are normal, execute step S334; if the communication layer connection of the first communication connection or the communication layer of the second communication connection is abnormal, end the judgment of the first communication connection or the second communication connection, and return to step S333; step S334, obtain the machine cutting weight value of each communication connection of the first communication network port, obtain the machine cutting weight value of the communication connection by adding and calculating, and update the machine cutting weight value of the first communication network port and the machine cutting weight value of the second communication network port respectively by superposition, and return to step S333; repeat steps S333 to S334 until the traversal of the first communication connection linked list and the second communication connection linked list is completed.
[0017] Preferably, the communication connection switching weight value=1*the peripheral switching coefficient.
[0018] Preferably, the A series and the B series include a first operation board and a second operation board, respectively, and the first operation board and the second operation board are connected to the switching device, respectively. The comparison of the cutting machine weight value of the A series and the cutting machine weight value of the B series includes two cases: Case 1: If the cutting machine weight value of the A series is greater than the cutting machine weight value of the B series and the B series is the main system, the values of the cutting machine flag bits in the first operation board and the second operation board are respectively increased by 1; or Case 2: If the cutting machine weight value of the B series is greater than the cutting machine weight value of the A series and the A series is the main system, the values of the cutting machine flag bits in the first operation board and the second operation board are respectively increased by 1; if the comparison of the cutting machine weight values of the A series and the B series does not belong to Case 1 or Case 2, the values of the cutting machine flag bits in the first operation board and the second operation board are cleared.
[0019] Preferably, if the machine cutting flag values of the first operation board and the second operation board are greater than or equal to the limit value, the A system and the B system send a machine cutting command to the machine cutting device, interlock the lower computer to complete the machine cutting, and clear the machine cutting flags in the first operation board and the second operation board; if the values of the machine cutting flags of the first operation board and the second operation board are both less than the limit value, there is no need to perform the machine cutting operation.
[0020] In summary, compared with the prior art, the method for calculating the cutting weight of an interlocking lower machine provided by the present invention has the following beneficial effects:
[0021] 1. The present invention adds a communication board inspection link, takes the working condition of the hardware into consideration, and overcomes the defect of ignoring hardware failure in the prior art;
[0022] 2. The present invention adds the calculation of the switching weights of different interface communication connections, and ensures the communication stability of high-weight interfaces when the communication is unstable;
[0023] 3. The invention provides a function of configuring the time delay of machine cutting, that is, increasing the limit value, so as to avoid unnecessary machine cutting caused by communication disturbance in a short period of time, thereby improving the accuracy of the machine cutting operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of hardware connection between an interlocking lower machine and peripherals based on the interlocking lower machine cutting weight calculation method of the present invention;
[0025] Figure 2 It is a software connection diagram of the interlocking lower machine cutting weight calculation method of the present invention;
[0026] Figure 3 It is a flow chart of the cutting module of the cutting weight calculation method of the interlocking lower machine of the present invention;
[0027] Figure 4 A series cutting weight value calculation flow chart of the interlocking lower machine cutting weight calculation method of the present invention;
[0028] Figure 5 A flow chart of calculating the cutting weight value of a communication board card in the cutting weight calculation method of an interlocking lower machine of the present invention;
[0029] Figure 6 The present invention is a flow chart of calculating the communication network port cutting weight value of the interlocking lower machine cutting weight calculation method. DETAILED DESCRIPTION
[0030] The following will be combined with the attached embodiment of the present invention Figure 1 ~Attached Figure 5 , the technical solutions, structural features, objectives achieved and effects in the embodiments of the present invention are described in detail.
[0031] It should be noted that, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only the elements explicitly listed, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0032] Please refer to Figure 1 , Figure 1 The schematic diagram of hardware connection between the interlocking lower computer and the external device (peripheral device) based on the interlocking lower computer cutting weight calculation method provided by the present invention, the interlocking lower computer includes an A system 1, a B system 2 and a switching device 3; wherein the A system 1 and the B system 2 are backed up for each other, the A system 1 includes an A computing board 11 and multiple A communication boards (including a first A communication board 12, a second A communication board 13 and a third A communication board 14 in this embodiment); one end of the A computing board 11 is respectively connected to the first A communication board 12, the second A communication board 13 and the third A communication board 14, and the other end is connected to the switching device 3; similarly, the B system 2 includes a B computing board 21 and multiple B communication boards (including a first B communication board 22, a second B communication board 23 and a third B communication board 24 in this embodiment); one end of the B computing board 21 is respectively connected to the first B communication board 22, the second B communication board 23 and the third B communication board 24, and the other end is connected to the switching device 3.
[0033] Further, if Figure 1 As shown, according to the hardware connection, in this embodiment, each A communication board is connected to the corresponding A series switch 41 through multiple first communication network ports, and each B communication board is connected to the corresponding B series switch 42 through multiple second communication network ports; the A series switch 41 is connected to each peripheral corresponding to the A series 1 (including A-peripheral 511, A-peripheral 512...A-peripheral 51n in this embodiment) through a network cable, and the B series switch 42 is connected to the peripheral corresponding to the B series 2 (including B-peripheral 521, B-peripheral 522...B-peripheral 52n in this embodiment) through a network cable, and the A series 1 and the B series 2 are connected through the switching device 3. Figure 2As shown, according to the software connection, each communication network port on each communication board is connected to the corresponding peripheral network port through multiple communication connections; in this embodiment, the communication connection adopted by the first communication network port 121 of the first A communication board 12 is a TCP / IP connection (including TCP / IP connection 1, TCP / IP connection 2...TCP / IP connection n) and is connected to each network port of the peripheral 511 (including the network port of peripheral 511, the network port of peripheral 512...the network port of peripheral 51n).
[0034] In order to ensure the availability of the interlocking lower computer, the interlocking lower computer needs to select the system with a more stable communication status in A series 1 or B series 2 as the main system. The machine cutting weight calculation method provided by the present invention is to be able to switch the system operation according to the machine cutting weight when A series 1 or B series 2 is working, to ensure that the interlocking lower computer works under the optimal system, and to avoid the problem of frequent machine cutting.
[0035] Specifically, Figure 3 As shown, the interlocking lower machine cutting weight calculation method includes: respectively initializing the communication connection information of the A system 1 and the B system 2, and obtaining the peripheral cutting coefficient; according to the communication connection information, initializing the first communication network port connection information and the first communication board connection information connected to the A system 1, forming a plurality of first communication connections corresponding to the peripherals through the first communication network port; and initializing the second communication network port connection information and the second communication board connection information connected to the B system 2, forming a plurality of second communication connections corresponding to the peripherals through the second communication network port; checking whether the system cycle is updated, if the system cycle is updated, looping through each communication connection of the A system 1 and the B system 2 (including the first communication connection and second communication connection); if the current communication connection is normal, then calculate the cutting weight value of the communication network port of the communication connection and the cutting weight value of the communication board; respectively summarize the sum of the cutting weight values of the communication network ports associated with all communication boards with normal communication connections corresponding to system A 1 and system B 2, and obtain the cutting weight value of system A 1 and the cutting weight value of system B 2 respectively; compare the cutting weight value of system A 1 and the cutting weight value of system B 2, if the system with the smaller cutting weight value is the main system, then increase the values of the cutting flag bits of system A 1 and system B 2 by 1; if the value of any one of the two cutting flag bits is greater than the limit value, system A 1 and system B 2 send a cutting command to the cutting device 3 to execute the interlocking lower machine cutting operation.
[0036] Wherein, according to the offline configuration input file, initializing the communication connection information further includes: initializing pid (communication connection unique identifier) and initializing the physical port of the communication board where the communication connection is located.
[0037] Further, if Figure 3As shown, taking the A series 1 in the interlocking lower computer as an example, the first communication network port connection information and the first communication board connection information connected to the A series 1 are initialized to form multiple first communication connections, including: step S101, initializing all the first communication connection information of the A series 1, and binding each of the peripherals to its associated first communication network port; step S102, initializing all the first communication network port connection information, and binding each of the first communication network port first communication board physical port to its associated first communication board; step S103, initializing all the first communication board connection information, and binding each of the first communication board to its associated interlocking lower computer A series 1; step S104, initializing the A series 1 connection information, and obtaining all the first communication boards connected to the A series 1.
[0038] According to the first communication connection information of the A series 1, the initialization of all first communication network port connection information in step S102 includes: the first communication network port number, the first communication card board and the first communication connection linked list (that is, the first communication connection pid is stored in the form of a linked list). Through the first network port number and the corresponding pid of the communication connection, the first communication network port is matched with the corresponding first communication board, that is, the first communication board information where the first communication network port is located is obtained.
[0039] Similarly, according to all the first communication network port connection information, the initialization of all the first communication board connection information described in step S103 includes: the first communication board number, the system (A system 1 or B system 2) and the first communication network port number linked list (i.e., the first communication network port number is stored in the form of a linked list). Based on step S101 and step S102, after the first communication board is matched with the A system 1, the A system 1 is connected to the corresponding peripheral device, and a first communication connection is formed between the first communication network port and the peripheral device.
[0040] Further, according to all the first communication board connection information, the initialization A series 1 connection information in step S104 includes: all the first communication boards connected to A series 1 and a first communication board linked list (ie, the first communication board numbers are stored in a linked list).
[0041] like Figure 3 As shown, the initialization of the second communication network port connection information and the second communication board connection information connected to the B system 2, and the formation of multiple second communication connections are the same as the formation of the first communication connection, which will not be repeated here.
[0042] like Figure 3As shown, the checking whether the system cycle is updated includes: step S201, obtaining the current system cycle; step S202, judging whether the system cycle number is increased by one; if the system cycle number is increased by one, it means that the system cycle is updated; if the system cycle number is not increased by one, returning to step S201 to re-acquire a new current system cycle, and continuing to perform step S202 to judge whether the system cycle number is increased by one, that is, judging whether the system cycle is updated. When the system cycle is updated, the communication connections of the system are traversed in a loop.
[0043] Among them, Figures 4 to 6 As shown, the loop traversing the communication connection of the system and calculating the weight of the communication connection include: step S301, looping through the communication board card linked list in the system connection information, checking the hardware working status of the communication board card, and marking the hardware working status of the communication board card as normal or abnormal; step S302, traversing the communication network port number linked list of the communication board card with a normal status, checking the hardware working status of the communication network port, and marking the communication network port status as normal or abnormal; step S303, traversing the communication connection linked list of the communication network port with a normal status, checking all communication connection statuses, if the communication connection is normal, the switching weight of the communication connection = 1*the peripheral switching coefficient.
[0044] Specifically, Figure 4 As shown, taking the A series 1 in the interlocking lower computer as an example, the step S301 includes: step S311, initializing the machine cutting weight value of the A series 1; in this embodiment, the initial machine cutting weight value of the A series 1 is 0; step S312, obtaining the first communication board card linked list of the A series 1; step S313, judging whether the first communication board card linked list has been traversed; if the traversal has been completed, outputting the current machine cutting weight value of the A series 1; if the traversal has not been completed, obtaining the first communication board card that has not been traversed, and judging in turn whether the hardware of the first communication board card that has not been traversed is working normally; if the hardware of the first communication board card is working normally, executing step S314; if the hardware of the first communication board card is working abnormally, ending the judgment of the first communication board card and returning to step S313; step S314, calling the machine cutting weight values of all communication network ports associated with the first communication board card through the communication network port processing function, obtaining the first communication board card machine cutting weight value corresponding to the first communication board card whose hardware is working normally, updating the machine cutting weight value of the A series 1 by superposition, and returning to step S313. Repeat steps S313 to S314 until the first communication card chain list is traversed. The first communication card switching weight value is equal to the sum of all communication network port switching weight values called by the communication network port processing function in step S314.
[0045] Further, if Figure 5As shown, taking the A series 1 in the interlocking lower computer as an example, the step S302 includes: step S321, initializing the machine cutting weight value of the first communication board whose hardware working state is normal in the A series 1; in this embodiment, the initial machine cutting weight value of the first communication board is 0; step S322, obtaining the first communication network port linked list of the first communication board in step S321; step S323, judging whether the first communication network port linked list in step S322 has been traversed; if the traversal has been completed, outputting the current machine cutting weight value of the first communication board; if the traversal has not been completed, obtaining the uncompleted For the first communication network port that is traversed, determine in turn whether the hardware of the first communication network port that is not traversed works normally; if the hardware of the first communication network port works normally, execute step S324; if the first communication network port works abnormally, end the judgment of the first communication network port and return to step S323; step S324, call the cutting weight values of all communication connections associated with the first communication network port through the communication connection processing function, obtain the first communication network port cutting weight value corresponding to the first communication network port whose hardware works normally, update the cutting weight value of the first communication board by superposition, and return to step S323. Repeat steps S323 to S324 until the traversal of the first communication network port linked list is completed. Among them, the cutting weight value of the first communication network port is equal to the sum of the cutting weight values of all communication connections called by the communication connection processing function in step S324.
[0046] Similarly, if Figure 6 As shown, taking the A series 1 in the interlocking lower computer as an example, the step S303 includes: step S331, initializing the machine cutting weight value of the first communication network port whose hardware working state is normal in the A series 1; in this embodiment, the initial machine cutting weight value of the first communication network port is 0; step S332, obtaining the first communication connection list of the A series 1; step S333, judging whether the first communication connection list has been traversed; if the traversal has been completed, outputting the current machine cutting weight value of the first communication network port; if the traversal has not been completed, obtaining the first communication connection that has not been traversed, and judging in turn whether the communication layer (such as the CFM layer) of the first communication connection that has not been traversed is connected normally; if the communication layer of the first communication connection is connected normally, executing step S334; if the communication layer of the first communication connection is abnormal, ending the judgment of the first communication connection, and returning to step S333; step S334, obtaining the machine cutting weight value of each communication connection of the first communication network port, obtaining the machine cutting weight value of the communication connection by adding and calculating, updating the machine cutting weight value of the first communication network port by superposition, and returning to step S333. Repeat steps S333 to S334 until the first communication connection linked list is traversed. The communication connection switching weight value = 1*the peripheral switching coefficient.
[0047] Further, taking the A series 1 in the interlocking lower computer as an example, the sum of the cutting weight values of all the first communication connections associated with the normally working first communication network port is summarized to obtain the cutting weight value of the first communication network port; the sum of the cutting weights of all the first communication network ports associated with the normally working first communication board is summarized to obtain the cutting weight value of the first communication board; the sum of the cutting weights of the first communication network ports associated with all the normal first communication boards of the A series is summarized to obtain the cutting weight value of the A series.
[0048] Similarly, the method for obtaining the cutting weight value of the B series 2 is the same as the method for obtaining the cutting weight value of the A series 1, which will not be repeated here.
[0049] Further, compare the cutting weight value of A system 1 and the cutting weight value of B system 2. If the cutting weight value of A system 1 is greater than the cutting weight value of B system 2 and B system 2 is currently the main system, or the cutting weight value of B system 2 is greater than the cutting weight value of A system 1 and A system 1 is currently the main system, then the values of the cutting flag bits in A computing board 11 and B computing board 12 are respectively increased by 1; if it is neither of the above two situations, the values of the cutting flag bits in A computing board 11 and B computing board 12 are cleared to zero.
[0050] Furthermore, the value of the cutting machine flag is checked. If the value of the cutting machine flag in the A computing board 11 and / or the B computing board 12 is greater than the limit value, the interlocking lower machine cutting operation is executed. In this embodiment, the limit value is 3. If the cutting machine flag values of the A computing board 11 and the B computing board 12 are both greater than 3, or only the cutting machine flag value of the A computing board 11 is greater than 3, or only the cutting machine flag value of the B computing board 12 is greater than 3, then the A system 1 and the B system 2 simultaneously send a cutting machine command to the cutting device 3, the interlocking lower machine completes the cutting, and the cutting machine flags in the A computing board 11 and the B computing board 12 are cleared; if the values of the cutting machine flags of both are less than 3, there is no need to execute the cutting operation. Then check whether the system cycle is updated. If the system cycle is updated, loop through the communication connections of system A 1 and system B 2 again. If the communication connection is normal, the interlocking lower machine cutting weight calculation method provided by the present invention calculates the cutting weight value of the communication network port of the communication connection and the cutting weight value of the communication board, and then calculates the cutting weight of the interlocking lower machine.
[0051] In summary, compared with the prior art, the interlocking lower computer weight calculation method provided by the present invention has the advantages of strong communication stability, more comprehensive inspection and high accuracy of cutting machine operation.
[0052] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A method for calculating the weight of an interlocking lower machine, wherein the interlocking lower machine comprises an A system, a B system and a switching device; the A system comprises a plurality of first communication boards, the B system comprises a plurality of second communication boards, the A system and the B system are connected to corresponding peripherals through a first communication network port on the first communication board and a second communication network port on the second communication board, respectively, characterized in that: include: Initialize the communication connection information of system A and system B respectively, and obtain the peripheral switching coefficient; Initialize the first communication network port connection information and the first communication board connection information connected to the A system according to the communication connection information, and form a plurality of first communication connections connected to the corresponding peripherals through the first communication network port; and initializing the second communication network port connection information and the second communication board connection information connected to the B system, forming a plurality of second communication connections corresponding to the peripherals through the second communication network port; Check whether the system cycle is updated. If the system cycle is updated, loop through each communication connection of system A and system B respectively; if the current communication connection is normal, calculate the switching weight value of the communication network port of the communication connection and the switching weight value of the communication board; Sum up the sum of the machine cutting weight values of the communication network ports associated with all the communication boards corresponding to the A series and the B series with normal communication connections, and obtain the machine cutting weight value of the A series and the machine cutting weight value of the B series respectively; Compare the cutting weight value of system A with the cutting weight value of system B. If the system with the smaller cutting weight value is the main system, increase the cutting flag values of both system A and system B by 1. If the value of any of the cutting flags is greater than the limit value, the A system and the B system send a cutting command to the cutting device to execute the cutting operation of the interlocked lower machine; Among them, looping through each communication connection between system A and system B, and calculating the weight of the communication connection includes: Step S301, looping through the communication board linked list in the system connection information, checking the hardware working status of the communication board, and marking the hardware working status of the communication board as normal or abnormal; Step S302, traverse the communication network port number list of the communication board in normal state, check the working state of the communication network port hardware, and mark the communication network port state as normal or abnormal; Step S303, traverse the communication connection list of the communication network ports in normal state, check the status of all communication connections, and if the communication connection is normal, calculate the switching weight value of the communication connection; Wherein, the step S301 includes: Step S311, respectively initialize the cutting weight values of the A series and the B series; Step S312, respectively obtain the first communication board link list of the A series and the second communication board link list of the B series; Step S313, determine whether the first communication board link list of the A series and the second communication board link list of the B series have been traversed; if the traversal has been completed, output the current switching weight values of the A series and the B series; if the traversal has not been completed, respectively obtain the first communication board and the second communication board that have not been traversed, and determine in turn whether the hardware of the first communication board and the second communication board that have not been traversed is working normally; if the hardware of the first communication board and the second communication board is working normally, execute step S314; if the hardware of the first communication board or the second communication board is working abnormally, end the determination of the first communication board or the second communication board, and return to step S313; Step S314: respectively call the machine cutting weight values of all communication network ports associated with the first communication board and the second communication board through the communication network port processing function, obtain the communication board machine cutting weight values corresponding to the first communication board and the second communication board whose hardware works normally, respectively update the machine cutting weight values of the A series and the B series by superposition, and return to step S313; repeat steps S313-S314 until the traversal of the first communication board chain list and the second communication board chain list is completed; Among them, the first communication board card cutting weight value is equal to the sum of all the first communication network port cutting weight values called by the communication network port processing function in step S314; the second communication board card cutting weight value is equal to the sum of all the second communication network port cutting weight values called by the communication network port processing function in step S314; Wherein, the step S302 includes: Step S321, initializing the switch-off weight value of the first communication board whose hardware working state is normal in the A system and the switch-off weight value of the second communication board whose hardware working state is normal in the B system; Step S322, obtaining the first communication network port link list of the first communication board and the second communication network port link list of the second communication board in step S321; Step S323, judging whether the first communication network port chain list and the second communication network port chain list in step S322 have been traversed; if the traversal has been completed, outputting the current first communication board and the second communication board cutting weight value; if the traversal has not been completed, obtaining the first communication network port that has not been traversed, and judging in turn whether the hardware of the first communication network port and the second communication board that have not been traversed is working normally; if the hardware of the first communication network port and the hardware of the second communication board are working normally, executing step S324; if the first communication network port or the second communication network port is working abnormally, ending the judgment of the first communication network port or the second communication network port, and returning to step S323; Step S324, respectively calling the machine cutting weight values of all communication connections associated with the first communication network port and the second communication network port through the communication connection processing function, obtaining the first communication network port machine cutting weight value corresponding to the first communication network port whose hardware is working normally and the second communication network port machine cutting weight value corresponding to the second communication network port whose hardware is working normally, respectively updating the machine cutting weight value of the first communication board and the machine cutting weight value of the second communication board by superposition, and returning to step S323; Repeat steps S323 to S324 until the first communication network port linked list and the second communication network port linked list are traversed completely; The first communication network port cutting weight value is equal to the sum of all first communication connection cutting weight values called by the communication connection processing function in calling step S324; the second communication network port cutting weight value is equal to the sum of all second communication connection cutting weight values called by the communication connection processing function in calling step S324; Wherein, the step S303 includes: Step S331, initializing the off-line weight value of the first communication network port whose hardware working state is normal in the A system and the off-line weight value of the second communication network port whose hardware working state is normal in the B system; Step S332, obtaining the first communication connection list of system A and the second communication connection list of system B; Step S333, determine whether the first communication connection list and the second communication connection list have been traversed; if the traversal has been completed, output the current cutting weight value of the first communication network port and the cutting weight value of the second communication network port; if the traversal is not completed, obtain the first communication connection and the second communication connection that have not been traversed, and respectively determine whether the communication layer of the first communication connection and the communication layer of the second communication connection that have not been traversed are connected normally; if the communication layer connection of the first communication connection and the communication layer of the second communication connection are normal, execute step S334; if the communication layer connection of the first communication connection or the communication layer of the second communication connection is abnormal, end the judgment of the first communication connection or the second communication connection, and return to step S333; Step S334, obtaining the off-machine weight value of each communication connection of the first communication network port, obtaining the off-machine weight value of the communication connection by adding and calculating, updating the off-machine weight value of the first communication network port and the off-machine weight value of the second communication network port by superposition, and returning to step S333; Repeat steps S333 to S334 until the first communication connection linked list and the second communication connection linked list are traversed completely.
2. The method for calculating the cutting weight of the interlocking lower machine according to claim 1, characterized in that: Initialize the communication network port connection information and communication board connection information connected to system A or system B to form multiple communication connections, including: Step S101, initializing all first communication connection information of system A, binding each of the peripherals to its associated first communication network port; or initializing all second communication connection information of system B, binding each of the peripherals to its associated second communication network port; Step S102: Initialize all first communication network port connection information, bind each of the first communication network ports to its associated first communication board; or initialize all second communication network port connection information, bind each of the second communication network ports to its associated second communication board; Step S103, initializing the connection information of all first communication boards, binding each of the first communication boards to its associated interlocking lower computer A series; or initializing the connection information of all second communication boards, binding each of the second communication boards to its associated interlocking lower computer B series; Step S104, initialize the connection information of the A series, and obtain all the first communication boards connected to the A series; or initialize the connection information of the B series, and obtain all the second communication boards connected to the B series.
3. The method for calculating the cutting weight of the interlocking lower machine according to claim 2, characterized in that: The initialization of all first communication network port connection information in step S102 includes: the first communication network port number, the first communication card board and the first communication connection list; the initialization of all second communication network port connection information includes: the second communication network port number, the second communication card board and the second communication connection list.
4. The method for calculating the cutting weight of the interlocking lower machine according to claim 3, characterized in that: The initialization of all first communication board connection information in step S103 includes: the first communication board number, the system and the first communication network port number list; the initialization of all second communication board connection information includes: the second communication board number, the system and the second communication network port number list.
5. The method for calculating the cutting weight of the interlocking lower machine according to claim 4, characterized in that: The initialization A series connection information described in step S104 includes: all first communication boards connected to the A series and the first communication board link list; the initialization B series connection information includes: all second communication boards connected to the B series and the second communication board link list.
6. The method for calculating the cutting weight of the interlocking lower machine according to claim 1, characterized in that: The checking whether the system period is updated includes: Step S201, obtaining the current system cycle; Step S202, determine whether the system cycle number is increased by one; if the system cycle number is increased by one, it means that the system cycle is updated; if the system cycle number is not increased by one, return to step S201 to re-acquire the new current system cycle, and continue to execute step S202 to determine whether the system cycle number is increased by one. When the system cycle is updated, execute a loop to traverse the communication connections of the system.
7. The method for calculating the cutting weight of the interlocking lower machine according to claim 1, characterized in that: The communication connection switching weight value=1×the peripheral switching coefficient.
8. The method for calculating the cutting weight of the interlocking lower machine according to claim 1, wherein the A system and the B system respectively include a first operation board and a second operation board, and the first operation board and the second operation board are respectively connected to the switching device, characterized in that: The comparison of the weight value of the A series cutting machine and the weight value of the B series cutting machine includes two cases: Case 1: If the machine cutting weight value of system A is greater than the machine cutting weight value of system B and system B is the main system, the machine cutting flag values in the first computing board and the second computing board are incremented by 1 respectively; Or case 2: If the machine cutting weight value of system B is greater than the machine cutting weight value of system A and system A is the main system, the machine cutting flag values in the first computing board and the second computing board are incremented by 1 respectively; If the comparison of the machine cutting weight values of the A series and the B series does not belong to case 1 or case 2, the values of the machine cutting flag bits in the first computing board and the second computing board are cleared.
9. The method for calculating the cutting weight of the interlocking lower machine according to claim 8, characterized in that: If the machine cutting flag values of the first operation board and the second operation board are greater than or equal to the limit value, the A system and the B system send a machine cutting command to the machine cutting device, interlock the lower computer to complete the machine cutting, and clear the machine cutting flags in the first operation board and the second operation board; if the values of the machine cutting flags of the first operation board and the second operation board are both less than the limit value, there is no need to perform the machine cutting operation.
Citation Information
Patent Citations
Control switch method of main machine and standby machine
CN103057572A
Computer interlocking subsystem main and standby switching system based on heartbeat message
CN112887176A
Automatic control right switching method for computer interlocking manipulator
CN113247058A
Communication circuit, relay connecting circuit, and communication network
US20110176560A1
