Online configuration method and apparatus for a servo software user interface protocol
By using a parameterized definition and online configuration method based on the 1553B communication protocol, the problem of complex protocol types in servo control software is solved, achieving protocol universality and online configuration, and reducing redundant workload.
Patent Information
- Application Number
- CN202310294386.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-03-24
AI Technical Summary
The existing servo communication protocols vary, which means that servo control software needs to be configured separately for each project, making it impossible to achieve universality of host computer software and resulting in a large amount of redundant work.
Based on the 1553B communication protocol, the servo software user interface protocol is parameterized using a parameterized definition format, and then bound and initialized through the FLASH area to achieve online configuration.
Online configuration of the servo software user interface protocol has been implemented, reducing the need for separate programming, adapting to the requirements of most models, and improving the software's versatility and design efficiency.
Smart Images

Figure CN116527794B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data communication, and particularly relates to an online configuration method, device and equipment of a servo software user interface protocol based on 1553B communication and a storage medium. BACKGROUND
[0002] The 1553B data bus has a bidirectional output characteristic, high real-time performance and high reliability, is widely applied to civil aviation technology and military aircraft, and is also widely used in space systems. The 1553B bus adopts an instruction / response type communication protocol, has three types of interrupts, namely a bus controller (BC), a remote terminal (RT) and a bus monitor (BM), has BC-to-RT, RT-to-BC, RT-to-RT, broadcast mode and system control mode message formats, uses a shielded twisted pair as a transmission medium, has a multi-redundancy bus type topology, has a bidirectional transmission characteristic, has a transmission speed of 1 Mbps, uses a half-duplex mode for transmission, and uses a Manchester code for encoding transmission.
[0003] The communication of servo software is responsible for receiving servo instructions and feeding back state information, and is an important basis for normal operation of a servo mechanism. The servo communication protocols are various in type, and the protocol requirements of different projects are different in quantity, content and result interpretation. The individualization of communication protocols makes it necessary for servo control software to separately configure protocol content for each project requirement, and the host computer software of different protocols cannot be universal, which causes a large amount of repeated processes in the development of servo control software and also leads to a large amount of redundancy in the host computer software.
[0004] In view of the above phenomenon, the present project proposes a technical method of servo communication protocol parameterization based on a common 1553B communication protocol, realizes online configurable user interface protocol, and software does not need to be programmed to realize the user protocol. SUMMARY
[0005] The present application overcomes one of the deficiencies of the prior art, provides an online configuration method, device, equipment and storage medium of a servo software user interface protocol, and based on the basis of 1553B communication, can customize and expand the user interface communication protocol of servo software, does not need to program the servo software user interface protocol separately, can meet the needs of most models, and can solve the problem of complex and various servo software communication protocols.
[0006] According to an aspect of the present disclosure, an online configuration method of a servo software user interface protocol is provided, which comprises:
[0007] Parameterizing definition of the servo software user interface protocol according to a protocol definition format based on 1553B communication, to obtain servo software user interface protocol parameters;
[0008] binding the servo software user interface protocol parameters to the FLASH area of the servo software;
[0009] downloading the servo software user interface protocol parameters from the FLASH area to the servo software, the servo software initializing the user interface protocol communication module based on a 1553B communication protocol definition format and a 1553B communication protocol dictionary mapping, completing online configuration of the servo software user interface protocol.
[0010] In a possible implementation, the protocol definition format includes: an RT address, a transmission direction, a sub-address, a number of words, a word serial number, an operation type, a data type, a dictionary index, and a self-defined type.
[0011] The servo software user interface protocol includes: a position instruction protocol, a timing instruction protocol, and a bit field instruction protocol.
[0012] In a possible implementation, the downloading of the servo software user interface protocol parameters from the FLASH area to the servo software includes:
[0013] When the servo software receives a parameter download command frame, the servo software saves a data length and a check value of the servo software user interface protocol parameters corresponding to the parameter download command frame, sends a response command frame to a buffer, and enters a downloading state of the servo software user interface protocol parameters.
[0014] When the buffer receives the response command frame, the buffer responds to a current data frame and saves parameters of the current data frame to the buffer.
[0015] After responding to all the current data frames, a check value of the servo software user interface protocol parameters of the buffer is calculated, and when the check value is consistent with a received check value, the servo software user interface protocol parameters are downloaded to the servo software.
[0016] In a possible implementation, a format of the parameter download command frame is 1 command frame and N data frames, where N is a positive integer, a format of the response command frame is 0x55AA and 0xAAAA, and a format of the response current data frame is a frame number and 0xAAAA.
[0017] In a possible implementation, the 1553B communication protocol dictionary is a group of pointer arrays, including a dictionary index, a variable interface, and a protocol name, and is used to be changed according to different servo software user interface protocols to adapt to different servo software.
[0018] In a possible implementation, the receiving of the servo software user interface protocol parameters includes:
[0019] traversing the protocol definition format structure based on 1553B communication, comparing the interrupt command word of the protocol definition format structure;
[0020] when the interrupt command word of the protocol definition format structure is consistent with the message interrupt command word, parsing the current message interrupt command word according to the protocol definition format, and updating the parsing result of the current message interrupt command word to the variable interface of the 1553B communication protocol dictionary;
[0021] repeating the above process, traversing all protocol definition format structures, and completing the message receiving of the servo software user interface protocol based on 1553B communication.
[0022] In a possible implementation, the servo software user interface protocol parameters are sent, including:
[0023] traversing the protocol definition format structure based on 1553B communication, comparing the TR bit of the protocol definition format structure;
[0024] when the message TR bit of the protocol definition format structure is a sending protocol, parsing the current TR message according to the protocol definition format, and sending the variable interface of the 1553B communication protocol dictionary to the buffer;
[0025] repeating the above process, traversing all protocol definition format structures, and completing the message receiving of the servo software user interface protocol based on 1553B communication.
[0026] According to another aspect of the present disclosure, an online configuration device of a servo software user interface protocol is provided, the device comprising:
[0027] a parameterized definition module for parameterized definition of the servo software user interface protocol according to a protocol definition format based on 1553B communication, obtaining servo software user interface protocol parameters;
[0028] a binding module for binding the servo software user interface protocol parameters to the FLASH area of the servo software;
[0029] an online configuration module for downloading the servo software user interface protocol parameters from the FLASH area to the servo software, the servo software initializing the user interface protocol communication module based on 1553B communication protocol definition format and 1553B communication protocol dictionary mapping, completing online configuration of the servo software user interface protocol.
[0030] According to another aspect of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method as described above when executing the program.
[0031] According to another aspect of the present disclosure, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the method as described above when executed by a processor.
[0032] The online configuration method of the servo software user interface protocol according to the present disclosure parameterizes the servo software user interface protocol according to the protocol definition format based on 1553B communication, to obtain servo software user interface protocol parameters; the servo software user interface protocol parameters are bound to the FLASH area of the servo software; the servo software user interface protocol parameters are downloaded from the FLASH area to the servo software, and the servo software initializes the user interface protocol communication module based on the 1553B communication protocol definition format and the 1553B communication protocol dictionary mapping, to complete the online configuration of the servo software user interface protocol. The user interface communication protocol of the servo software can be customized and extended, without separately programming the servo software user interface protocol, to meet the requirements of most models, and to solve the problem of complex and diverse servo software communication protocols. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings are used to provide a further understanding of the technical solutions of the present application or the prior art, and constitute a part of the specification. Among them, the drawings expressing the embodiments of the present application are used together with the embodiments of the present application to explain the technical solutions of the present application, but do not constitute a limitation on the technical solutions of the present application.
[0034] Figure 1 A flow chart of the online configuration method of the servo software user interface protocol according to an embodiment of the present disclosure is shown;
[0035] Figure 2 A flow chart of the online configuration method of the servo software user interface protocol according to another embodiment of the present disclosure is shown;
[0036] Figure 3 An example flow chart of step S2 according to an embodiment of the present disclosure is shown;
[0037] Figure 4 A flow chart of the servo software user interface protocol parameter transmission according to an embodiment of the present disclosure is shown;
[0038] Figure 5 A block diagram of the online configuration device of the servo software user interface protocol according to an embodiment of the present disclosure is shown;
[0039] Figure 6 A structural schematic diagram of an electronic device 3 is shown according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and embodiments, so that how the present application applies technical means to solve technical problems and achieves corresponding technical effects can be fully understood and implemented. The embodiments of the present application and various features in the embodiments can be combined with each other without conflict, and the formed technical solutions are all within the protection scope of the present application.
[0041] In addition, the steps shown in the flowchart of the drawings can be executed in a computer such as a group of computer executable instructions. Moreover, although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0042] Figure 2 A flowchart of an online configuration method of a servo software user interface protocol according to another embodiment of the present disclosure is shown.
[0043] As shown in the figure, the online configuration method includes application protocol parameterization, parameter download, parameter parsing initialization, and parameter protocol usage processes. Among them, the communication protocol parameterization is one of the main innovations of the present application. According to the proposed protocol definition format, the commonly used communication protocol can be parameterized defined to form a protocol parameter. The protocol parameter is bound to the FLASH area of the servo software (lower computer) by the upper computer. The lower computer servo software initializes the communication module according to the definition format and dictionary mapping: the parameterization of the communication protocol provides a basis for the customization of the protocol online binding, and the specific implementation process is as follows. Figure 2
[0044] A flowchart of an online configuration method of a servo software user interface protocol according to an embodiment of the present disclosure is shown. As shown in the figure, the method can include: Figure 1 Figure 1
[0045] Step S1: parameterizing and defining the servo software user interface protocol according to a protocol definition format based on 1553B communication to obtain servo software user interface protocol parameters.
[0046] Based on the characteristics of the 1553B communication protocol and the protocol definition of the hardware layer, the user interface protocol of the application layer is extended and defined to define the communication protocol. Different project (such as servo software) communication protocols are unified based on the conventional protocol type and the special protocol type is extended. The protocol requirements of the project are summarized to form a set of servo field application protocol definition format.
[0047] The protocol definition format is a minimum unit for transmitting a protocol, and a plurality of data forms a communication protocol. Based on the protocol definition method, different protocol contents can be unified in a format parameter, which is a prerequisite for generalization of protocols, and also realizes the demand for protocol customization.
[0048] As shown in Table 1, the protocol definition format includes: RT address, transmission direction, sub-address, word number, word number, operation type, data type, dictionary index, and self-defined.
[0049] Table 1 Protocol definition format table
[0050]
[0051]
[0052] When the value of the transmission direction is 0, it is a received message; when the value of the transmission direction is 1, it is a sent message. The sub-address ranges from 0 to 31. The word number is the number of message words, and the maximum is 32 words. The sub-sequence number is the first word of the data area, and the value range is 0-31, 0 representing the first word. The operation type is the operation type of the servo software on the data corresponding to the message word sequence number; when the operation type is 0, the assignment operation is performed, and when the operation type is 1, the judgment operation is performed. The data type can be int16, int32, etc., which is not limited here. The dictionary index gives the software interface index value of the operation according to the protocol dictionary, which can take values of 00, 01, 10, etc. The self-defined can be defined according to different message types.
[0053] In an example, the servo software user interface protocol can include: position instruction protocol, timing instruction protocol, and bit field instruction protocol.
[0054] Taking the position instruction protocol as an example, the parameters converted by the servo software user interface protocol are described. For the control instruction of the position instruction protocol, in the servo software user interface protocol parameters: the operation type is assigned to 0, indicating the assignment operation; the data type is set to int16; the dictionary index is assigned to 00, indicating the position instruction A software interface; the dictionary index is assigned to 01, indicating the position instruction B software interface; self-defined 1 indicates the conversion coefficient 0.001, and self-defined 2 indicates the instruction amplitude limiting, which is shown in Table 2.
[0055] Table 2 Position instruction protocol customization parameter table
[0056]
[0057] Taking the time sequence instruction protocol as an example, the parameters converted by the servo software user interface protocol are described. For the protocol control parameters of the time sequence instruction: the operation type is assigned as 1, indicating a judgment operation; the dictionary index is assigned as 10, indicating an enable software interface, and the dictionary index is assigned as 11, indicating a stop software interface; if the data area data is consistent with 0x5555 in the self-defined 2, the start operation is executed, and if it is consistent with 0xAAAA, the stop operation is executed, and the specific contents are shown in Table 3.
[0058] Table 3 Customized parameter table of time sequence instruction protocol
[0059]
[0060]
[0061] The most important self-defined requirement of the servo communication protocol is the bit field instruction, each bit has different meanings, which increases the complexity of the protocol. The parameterized mode of the self-defined bit field type protocol introduces a bit mask to separate different variable positions, so as to define each bit.
[0062] Taking the bit field instruction protocol as an example, the servo software user interface protocol parameters are described. The operation type is assigned as 2, indicating a bit field assignment operation, and assigned as 3, indicating a bit field judgment operation; the dictionary index item corresponds to the software variable interface, the dictionary index is assigned as 09, indicating the ID current, and the dictionary index is assigned as 16, indicating the watchdog reset times; for the assignment operation, the self-defined 1 declares the conversion coefficient, for the judgment operation, the self-defined 1 indicates the criterion; for the bit field operation, the self-defined 2 indicates the data mask, 0x0FFF indicates the low 12 bits are valid, 0xF000 indicates the high four bits are valid, and 0x0008 indicates that BIT3 is valid (bit0 indicates the first bit).
[0063] Table 4 Customized parameter table of bit field instruction protocol
[0064]
[0065]
[0066] Through the above process, the customized servo software communication protocol can meet the needs of most models. It can be applied to the standard model communication protocol and the general-purpose upper computer software. It greatly saves the energy of the designers and reduces the design redundancy.
[0067] Step S2: binding the servo software user interface protocol parameters to the FLASH area of the servo software;
[0068] Step S3: downloading the servo software user interface protocol parameters from the FLASH area to the servo software, initializing the user interface protocol communication module based on the 1553B communication protocol definition format and 1553B communication protocol dictionary mapping, and completing the servo software user interface protocol online configuration.
[0069] To ensure the correctness and integrity of the protocol parameter downloading and facilitate the servo software receiving and analyzing, the application proposes a parameter downloading agreement of "1 command frame+N data frame".
[0070] Figure 2 An example flow chart of step S3 according to an embodiment of the present disclosure is shown.
[0071] As shown in Figure 2 , the step of binding the servo software user interface protocol parameters to the FLASH area of the servo software in step S3 can include:
[0072] Step S31: when the servo software receives the parameter downloading command frame, saving the data length and check value of the servo software user interface protocol parameters corresponding to the parameter downloading command frame, sending a response command frame to the buffer area, and entering the downloading state of the servo software user interface protocol parameters.
[0073] Step S32: when the buffer area receives the response command frame, the buffer area responds to the current data frame and saves the parameters of the current data frame to the buffer area.
[0074] Step S33: after responding to all the current data frames, calculating the check value of the servo software user interface protocol parameters in the buffer area, and when the check value is consistent with the received check value, downloading the servo software user interface protocol parameters to the servo software.
[0075] Wherein, the format of the parameter downloading command frame is 1 command frame and N data frames, where N is a positive integer; the format of the response command frame is 0x55AA and 0xAAAA, and the format of the response current data frame is frame number and 0xAAAA.
[0076] Take the parameter download command frame format in Table 5 as an example. After receiving the parameter download command frame, the servo software saves the servo software user interface protocol parameter data length and the check value to be downloaded. The servo software writes the "0x55AA+0xAAAA" response command frame to the sending buffer, and enters the servo software user interface protocol parameter download state; the buffer writes the "frame number+0xAAAA" response current data frame after receiving each response command frame, and saves the current parameter of the current data frame to the cache buffer; after receiving all the parameter data frames, the cache buffer calculates the parameter check value, compares it with the received check value, and if they are consistent, the buffer parameters are burned into the FLASH, and the "0xAA55+0xAAAA" response is given, completing the parameter download; if they are not consistent, the parameter burning fails, and the "0xAA55+0xBBBB" response is given, and the parameter download state is exited.
[0077] Table 5 parameter download command frame format table
[0078]
[0079]
[0080] The online configuration method of the servo software user interface protocol of the present disclosure defines the servo software user interface protocol by parameterizing according to the protocol definition format based on 1553B communication, obtains the servo software user interface protocol parameters, binds the servo software user interface protocol parameters to the FLASH area of the servo software, downloads the servo software user interface protocol parameters from the FLASH area to the servo software, and initializes the user interface protocol communication module based on the 1553B communication protocol definition format and the 1553B communication protocol dictionary mapping, thereby completing the online configuration of the servo software user interface protocol. The user interface communication protocol of the servo software can be customized and expanded, and most model requirements can be met without separately programming the servo software user interface protocol, thereby solving the problem of complex and diverse servo software communication protocols.
[0081] Figure 3 A step servo software user interface protocol parameter transceiving flowchart according to an embodiment of the present disclosure is shown.
[0082] In a possible implementation manner, as shown in Figure 3 The receiving the servo software user interface protocol parameters comprises:
[0083] Traversing the protocol definition format structure based on 1553B communication, and comparing the interrupt command word of the protocol definition format structure;
[0084] When the interrupt command word of the protocol definition format structure is consistent with the message interrupt command word, the current message interrupt command word is parsed according to the protocol definition format, and the parsed result of the current message interrupt command word is updated to the variable interface of the 1553B communication protocol dictionary;
[0085] The above process is repeated to traverse all protocol definition format structures, and message receiving of the servo software user interface protocol based on 1553B communication is completed.
[0086] In a possible implementation manner, as shown in Figure 3 The servo software user interface protocol parameter is sent, including:
[0087] The protocol definition format structure based on 1553B communication is traversed, and the TR bit of the protocol definition format structure is compared;
[0088] When the message TR bit of the protocol definition format structure is a sending protocol, the current TR message is parsed according to the protocol definition format, and the variable interface of the 1553B communication protocol dictionary is sent to the buffer;
[0089] The above process is repeated to traverse all protocol definition format structures, and message receiving of the servo software user interface protocol based on 1553B communication is completed.
[0090] Compared with the conventional 1553B message receiving and sending programming implementation mode, the servo software user interface protocol parameter receiving and sending mechanism enhances the universality of the software, does not need to be programmed separately for a specific protocol, and reduces a large amount of design and coding work.
[0091] The 1553B communication protocol dictionary is a group of pointer arrays, including a dictionary index, a variable interface and a protocol name, and is used for changing according to different servo software user interface protocols to adapt to different servo software, and details are shown in Table 6.
[0092] Table 6 1553B communication protocol dictionary format table
[0093] Dictionary Index Variable Interface Protocol Name 00 G_iInstructionA Actuator A Action Angle 01 G_iInstructionB Actuator B Action Angle 10 G_bStartFlag Start Command 11 G_bStopFlag Stop Command 09 G_fCurrentId Current ID 16 G_uiResetNum Watchdog Reset Count … … …
[0094] The application stores the corresponding relationship between the variable names of the host software of different projects and the data in the protocol and the definition of the operation of different projects through the 1553B communication protocol dictionary. The mapping relationship can be changed according to different protocol requirements to adapt to the change of the slave software. The dictionary index uniquely identifies an item, and the protocol name is used to describe the variable interface corresponding to the item in the slave. A pointer array is defined and declared in the servo software to realize the protocol dictionary, and the array variable pointer saves the address of the corresponding protocol variable for use in the message receiving and sending process. The change core of the technology is the protocol dictionary, and the protocol dictionary is dynamically updated, and all project software is universal.
[0095] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, refer to the method embodiments of the present application.
[0096] Figure 5 An online configuration apparatus block diagram of a servo software user interface protocol according to an embodiment of the present disclosure is shown. As shown in the figure, the online configuration apparatus includes: Figure 5
[0097] A parameterization definition module 501 is configured to parameterize and define the servo software user interface protocol according to a protocol definition format based on 1553B communication, to obtain servo software user interface protocol parameters.
[0098] A binding module 502 is configured to bind the servo software user interface protocol parameters to a FLASH area of the servo software.
[0099] An online configuration module 503 is configured to download the servo software user interface protocol parameters from the FLASH area to the servo software. The servo software initializes the user interface protocol communication module based on the 1553B communication protocol definition format and 1553B communication protocol dictionary mapping, to complete online configuration of the servo software user interface protocol.
[0100] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0101] Figure 6 A structural schematic diagram of an electronic device 3 provided by an embodiment of the present application is shown. As shown in the figure, the electronic device 3 of the embodiment includes a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. The processor 301 implements the steps in each of the above method embodiments when executing the computer program 303. Alternatively, the processor 301 implements the functions of each module / unit in each of the above apparatus embodiments when executing the computer program 303. Figure 6
[0102] By way of example, the computer program 303 can be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 303 in the electronic device 3.
[0103] The electronic device 3 can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The electronic device 3 can include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art can understand that Figure 3 The electronic device 3 is only an example and does not constitute a limitation on the electronic device 3, and can include more or fewer components than shown, or combine certain components, or different components, for example, the electronic device can also include an input / output device, a network access device, a bus, and the like.
[0104] The processor 301 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0105] The memory 302 can be an internal storage unit of the electronic device 3, for example, a hard disk or a memory of the electronic device 3. The memory 302 can also be an external storage device of the electronic device 3, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the memory 302 can include both the internal storage unit and the external storage device of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 can also be used to temporarily store data that has been output or will be output.
[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0107] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0108] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0109] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0111] In addition, each of the function units in each of the embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0112] If the integrated module / unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program can be executed by a processor to implement the steps of each method embodiment. The computer program can include computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0113] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An online configuration method of a user interface protocol of a servo software, characterized in that, The method comprises: Parameterizing the servo software user interface protocol according to a protocol definition format based on 1553B communication to obtain servo software user interface protocol parameters; Binding the servo software user interface protocol parameters to a FLASH area of the servo software; Downloading the servo software user interface protocol parameters from the FLASH area to the servo software, initializing a user interface protocol communication module of the servo software based on the 1553B communication protocol definition format and a 1553B communication protocol dictionary mapping, and completing online configuration of the servo software user interface protocol.
2. The online configuration method of claim 1, wherein, The protocol definition format comprises: RT address, transmission direction, sub-address, word number, word serial number, operation type, data type, dictionary index, and self-defined; The servo software user interface protocol comprises: position instruction protocol, timing instruction protocol, and bit field instruction protocol.
3. The online configuration method of claim 1, wherein, The downloading of the servo software user interface protocol parameters from the FLASH area to the servo software comprises: When the servo software receives a parameter download command frame, saving the data length and check value of the servo software user interface protocol parameters corresponding to the parameter download command frame, sending a response command frame to a buffer area, and entering a download state of the servo software user interface protocol parameters; When the buffer area receives the response command frame, the buffer area responds to a current data frame and saves the parameters of the current data frame to the buffer area; After responding to all the current data frames, calculating the check value of the servo software user interface protocol parameters of the buffer area, and when the check value is consistent with the received check value, downloading the servo software user interface protocol parameters to the servo software.
4. The online configuration method of claim 3, wherein, The format of the parameter download command frame is 1 command frame and N data frames, where N is a positive integer, the format of the response command frame is 0x55AA and 0xAAAA, and the format of the response current data frame is frame number and 0xAAAA.
5. The online configuration method of claim 2, wherein, The 1553B communication protocol dictionary is a group of pointer arrays, comprising dictionary index, variable interface, and protocol name, and is used for changing according to different servo software user interface protocols to adapt to different servo software.
6. The online configuration method of claim 5, wherein, Receiving the servo software user interface protocol parameters comprises: Traversing protocol definition format structure bodies based on 1553B communication, and comparing interrupt command words of the protocol definition format structure bodies; When the interrupt command words of the protocol definition format structure bodies are consistent with message interrupt command words, parsing the current message interrupt command words according to the protocol definition format, and updating the parsing results of the current message interrupt command words to the variable interface of the 1553B communication protocol dictionary; Repeating the above process to traverse all the protocol definition format structure bodies and complete message receiving of the servo software user interface protocol based on 1553B communication.
7. The online configuration method of claim 5, wherein, Sending the servo software user interface protocol parameters comprises: Traversing protocol definition format structure bodies based on 1553B communication, and comparing TR bits of the protocol definition format structure bodies; When the message TR bit of the protocol definition format structure is defined as a sending protocol, a current TR message is parsed according to the protocol definition format, and a variable interface of a 1553B communication protocol dictionary is sent to a buffer; The above process is repeated to traverse all protocol definition format structures, and message receiving of the servo software user interface protocol based on 1553B communication is completed.
8. An apparatus for online configuration of a user interface protocol of a servo software, characterized by The device comprises: A parameterization definition module is configured to parameterize the servo software user interface protocol according to a protocol definition format based on 1553B communication, to obtain servo software user interface protocol parameters; A binding module is configured to bind the servo software user interface protocol parameters to a FLASH area of the servo software; An online configuration module is configured to download the servo software user interface protocol parameters from the FLASH area to the servo software, and the servo software is initialized based on a 1553B communication protocol definition format and a 1553B communication protocol dictionary mapping to a user interface protocol communication module, to complete online configuration of the servo software user interface protocol.
9. An electronic device, comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method of any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executable on the processor to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Digital servo controller parameter online binding method based on 1553B bus
CN105302075A
1553B bus software dynamic configurable method
CN108170626A