Configuration method for BC period message queue of 1553B bus

By analyzing the cycles of multiple periodic messages in the 1553B bus system, calculating the required message frame number and intra-message arrangement, the problem of complex configuration of periodic message queues in the system is solved, and higher configuration accuracy and stability are achieved.

CN119759827APending Publication Date: 2025-04-04JIANGXI HONGDU AVIATION IND GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411828145.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the 1553B bus system, the sending cycles of multiple periodic messages are inconsistent, resulting in complex configuration of periodic message queues, prone to configuration errors, resulting in the failure to transmit messages on demand periodic cycles.

Method used

By analyzing the period of all messages, calculating the required message frames and the messages that need to be added in each frame, using the rotation phase division to calculate the greatest common divisor and the minimum common multiple, and then solving the number of message frames and intra message arrangement required to configure all periodic messages.

Benefits of technology

Reduces the complexity of message queue configuration, improves configuration accuracy and stability, avoids possible errors in manual configuration, and simplifies the work of software developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759827A_ABST
    Figure CN119759827A_ABST
Patent Text Reader

Abstract

The invention relates to a configuration method of a BC period message queue of a 1553B bus, which is characterized by comprising the following steps of: S1, picking out all period messages in all input messages; s2, acquiring cycle time consumption of the N cycle messages, and recording the cycle time consumption as T1, T2... Tn; s3, resolving the number FrameCnt of message frames required for configuring all period messages, which is obtained by dividing the least common multiple Tgb of all message period time consumption by the largest common divisor Tgy, namely FrameCnt = Tgb / Tgy; s4, messages needing to be added in each message frame are solved in sequence; and S5, after the process is executed, the configuration of the periodic messages in the BC message queue is completed. By automatically resolving and configuring a plurality of 1553B period message queues of different periods, the complexity of message queue configuration is reduced, software developers are helped to be liberated from complicated message queue configuration, meanwhile, the accuracy and stability of queue configuration are improved, and various problems possibly occurring in manual configuration are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of bus communication, and in particular relates to a configuration method of a 1553B bus BC cycle message queue. Background Art

[0002] MIL-STD-1553B is a digital time-division command / response multiplexed data bus. The bus system includes a bus controller (BC), a remote terminal (RT), and a bus monitor (BM). BC is the terminal that organizes message transmission in the bus system. A 1553B bus system must include and can only include one BC, so the message configuration of BC is particularly important.

[0003] BC usually uses messages and frames to configure periodic message queues. A message queue can contain one or more frames, and a frame can contain one or more messages. The message periodic transmission is controlled by setting the frame period. When using this method, if the period of all periodic messages is the same, the message queue configuration is relatively simple, and all messages can be implemented by adding them to one frame. However, in actual applications, there are often usage requirements for multiple messages with inconsistent sending periods, and the configuration of the message queue becomes very complicated. Suppose there are three periodic messages with message periods of 10 seconds, 20 seconds, and 100 seconds respectively. In this scenario, 10 frames need to be configured after calculation. Each frame needs to contain a message with a period of 10 seconds, even frames need to contain a message with a period of 20 seconds, and the last frame needs to contain a message with a period of 100 seconds. With the increase in the number of periodic messages and the increase in the difference in message periods, the complexity of BC periodic message queue configuration will be greatly increased, and configuration errors are prone to occur, resulting in messages not being transmitted according to the required period. Summary of the invention

[0004] A configuration method for a 1553B bus BC cycle message queue comprises the following steps:

[0005] S1. Pick out all periodic messages from all input messages;

[0006] S2, the periodic time required to obtain N periodic messages, recorded as T1, T2...Tn;

[0007] S3. Calculate the number of message frames FrameCnt required to configure all periodic messages, which is obtained by dividing the least common multiple Tgb of all message cycle times by the greatest common divisor Tgy, that is, FrameCnt = Tgb / Tgy;

[0008] S4, solving the message to be added in each message frame in turn;

[0009] S5. After the above process is completed, the configuration of the periodic message in the BC message queue is completed.

[0010] Preferably, the method for screening periodic messages in step S1 is as follows: If the period of a message is 0, it is a sporadic message; if the period of the message is greater than 0, it is a periodic message.

[0011] Preferably, the method for resolving a message frame in step S4 is as follows:

[0012] S41. Resolve the time consumption FrameTime of the message frame period, where FrameTime = Tgy;

[0013] S42. Assume that the current frame number is Framei (1 ≤ Framei ≤ FrameCnt). First, create an empty message buffer TempMsgBuf and initialize i = 0;

[0014] S43. Resolve the sending time WorkTimei of the current frame, which is equal to the frame period consumption * the current frame number, i.e., WorkTimei = FrameTime * Framei;

[0015] S44. Traverse all periodic messages. If Framei * Tgy can divide the message period consumption, add the message to TempMsgBuf;

[0016] S45. If TempMsgBuf does not contain periodic messages, add an empty frame to the BC message queue;

[0017] S46. If TempMsgBuf contains periodic messages, add the messages to the BC message queue one by one, requiring that the first message is the frame header and the last message is the frame tail. If there is only one message, then this message is both the frame header and the frame tail.

[0018] Preferably, step S42 includes: 1. Initialize the current frame number Framei (1 ≤ Framei ≤ FrameCnt), where Framei = 1; 2. Create the message buffer TempMsgBuf.

[0019] Preferably, using the Euclidean algorithm to resolve {T1, T2,..., Tn} includes: 1. Resolve the greatest common divisor Tgy of T1, T2,..., Tn; 2. Resolve the least common multiple Tgb of T1, T2,..., Tn.

[0020] Preferably, step S44 includes: After i = i + 1, if i < N, determine whether the period time of the i-th periodic message can be divided by WorkTimei. If so, add the periodic message to TempMsgBuf; otherwise, do not add the periodic message to TempMsgBuf. If i ≥ N, go to step S45 for judgment.

[0021] Preferably, the step S45 includes: 1. Setting the BC control word of the message to BC_CONTROL_NOP; 2. Adding a frame header BC_CONTROL_MFRAME_BEG and a frame tail BC_CONTROL_MFRAME_END to the message.

[0022] Preferably, the step S46 includes: determining the position of the message to be inserted into the BC message queue, if it is the first message, adding a frame header BC_CONTROL_MFRAME_BEG to the BC control word; if it is the last message, adding a frame header BC_CONTROL_MFRAME_END to the BC control word, and setting the message number of the next message to 0xffff; if it is an intermediate message, setting the current message number and the message number of the next message for it; if there is only one message in the BC message queue, the BC control word needs to set BC_CONTROL_MFRAME_BEG and BC_CONTROL_MFRAME_END at the same time, and the current message number needs to be set to 0, and the message number of the next message needs to be set to 0xffff.

[0023] Technical Effects of the Invention

[0024] The present invention analyzes and processes according to the cycle of all messages, calculates the number of frames required to be added, and then sequentially calculates the message queues required to be added for each frame, and finally completes the message queue configuration of all periodic messages. By automatically calculating and configuring 1553B periodic message queues of multiple different cycles, the complexity of message queue configuration is reduced, helping software developers to be liberated from complicated message queue configuration, while improving the accuracy and stability of queue configuration, and avoiding various problems that may occur in manual configuration. The present invention provides a certain reference for 1553B board design manufacturers to optimize and improve hardware driver interface functions, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The present invention is a flow chart of a configuration method of a 1553B bus BC cycle message queue. Specific implementation methods

[0026] Generally, a 1553B bus message includes the message content itself, the BC control word, the current message number, and the next message number.

[0027] 1) The periodic time required to obtain N periodic messages is recorded as T1, T2, ... Tn;

[0028] 2) Use the Euclidean algorithm to calculate the greatest common divisor of {T1, T2, …, Tn}, denoted as Tgy;

[0029] 3) Use the Euclidean algorithm to solve the least common multiple of {T1, T2, ..., Tn}, denoted as Tgb;

[0030] 4) Calculate the number of message frames FrameCnt required to configure all periodic messages by dividing the greatest common multiple of the time consumed by all message cycles by the greatest common divisor, that is, FrameCnt = Tgb / Tgy;

[0031] 5) Calculate the message frame cycle time FrameTime, FrameTime = Tgy;

[0032] 6) Initialize the current frame number Framei (1<=Framei<=FrameCnt), Framei=1;

[0033] 7) Calculate the sending time of the current frame WorkTimei, which is equal to the frame cycle time * the current frame number, that is, WorkTimei = FrameTime * Framei;

[0034] 8) Create a message buffer TempMsgBuf and initialize i=0;

[0035] 9) If the cycle time of the i-th periodic message is divisible by WorkTimei, the periodic message is added to TempMsgBuf, otherwise the periodic message is not added to TempMsgBuf;

[0036] 10) After i=i+1, if i is less than N, repeat step 9), otherwise execute step 11;

[0037] 11) If there is periodic message content in TempMsgBuf, the periodic message is written into the Framei message frame and the message frame is inserted into the frame queue, otherwise an empty frame is inserted into the frame queue (the empty frame does not contain a message, but will consume cycle time); BC does not process the empty message.

[0038] 12) After Framei=Framei+1, if Framei≤FrameCnt, execute step 7), otherwise execute step 13);

[0039] 13) After the message frame is configured, start sending the frame message, and set the period to FrameTime.

[0040] The embodiment of the present invention has been successfully applied to the message queue configuration of the 1553B bus BC in the ground integrated test software of multiple models of air-to-surface missiles, and has achieved the expected effect and been effectively verified. The configuration method of the 1553B bus BC periodic message queue is reasonable and reliable, can continue to be used in other model projects, and is simple and effective to use.

[0041] Although the above is a description of the illustrative specific embodiments of the present invention to facilitate the understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. Where equivalent substitution or equivalent substitution is adopted, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.

Claims

1. A configuration method for a 1553B bus BC cycle message queue, characterized in that: It includes the following steps: S1. Pick out all periodic messages from all the input messages; S2. Obtain the periodic time consumption of N periodic messages, denoted as T1, T2…Tn; S3. Calculate the number of message frames FrameCnt required to configure all periodic messages. It is obtained by dividing the least common multiple Tgb of all message periodic time consumptions by the greatest common divisor Tgy, that is, FrameCnt = Tgb / Tgy; S4. Calculate the messages to be added in each message frame in turn; S5. After the above process is completed, the configuration of periodic messages in the BC message queue is all completed.

2. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 1, characterized in that: The method for screening periodic messages in step S1 is: if the period of this message is 0, it is a sporadic message; if the period of this message is greater than 0, it is a periodic message.

3. A configuration method for a 1553B bus BC cycle message queue as claimed in claim 1, characterized in that: The method for calculating message frames in step S4 is: S41. Calculate the frame periodic time consumption FrameTime, FrameTime = Tgy; S42. Assume that the current frame number is Framei (1≤Framei≤FrameCnt). First, create an empty message buffer TempMsgBuf and initialize i = 0; S43. Calculate the sending time WorkTimei of the current frame, which is equal to the frame periodic time consumption * the current frame number, that is, WorkTimei = FrameTime * Framei; S44. Traverse all periodic messages. If Framei * Tgy can divide the message periodic consumption, add this message to TempMsgBuf; S45. If TempMsgBuf does not contain periodic messages, add an empty frame to the BC message queue; S46. If TempMsgBuf contains periodic messages, add messages to the BC message queue one by one, requiring the first message to be the frame header and the last message to be the frame tail. If only one message is included, this message is both the frame header and the frame tail.

4. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 3, characterized in that: Step S42 includes:

1. Initialize the current frame number Framei (1≤Framei≤FrameCnt), Framei = 1; 2. Create the message buffer TempMsgBuf.

5. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 1, characterized in that: Use the Euclidean algorithm to calculate {T1, T2, …, Tn}, including:

1. Calculate the greatest common divisor Tgy of T1, T2, …, Tn; 2. Calculate the least common multiple Tgb of T1, T2, …, Tn.

6. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 3, characterized in that: Step S44 includes: after i = i + 1, if i < N, judge whether the periodic time of the i-th periodic message can be divided by WorkTimei. If so, add this periodic message to TempMsgBuf, otherwise do not add this periodic message to TempMsgBuf; if i ≥ N, go to step S45 for judgment.

7. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 3, characterized in that: Step S45 includes:

1. Set the BC control word of this message to BC_CONTROL_NOP; 2. Add the frame header BC_CONTROL_MFRAME_BEG and the frame tail BC_CONTROL_MFRAME_END to this message.

8. A method for configuring a 1553B bus BC cycle message queue as claimed in claim 3, characterized in that: The step S46 includes: determining the position of the message to be inserted into the BC message queue, if it is the first message, adding a frame header BC_CONTROL_MFRAME_BEG to the BC control word; if it is the last message, adding a frame header BC_CONTROL_MFRAME_END to the BC control word, and setting the message number of the next message to 0xffff; if it is an intermediate message, setting the current message number and the message number of the next message for it; if there is only one message in the BC message queue, the BC control word needs to set BC_CONTROL_MFRAME_BEG and BC_CONTROL_MFRAME_END at the same time, and the current message number needs to be set to 0, and the message number of the next message needs to be set to 0xffff.