Communication method and device of self anti-interference real-time bus

By employing a self-interference-resistant real-time bus communication method and Galois domain coding technology, the problems of complex wiring and poor anti-interference performance in PLC systems are solved, achieving efficient and stable data transmission and rapid fault response, making it suitable for high-precision mechanical equipment and extreme environments.

CN119945828BActive Publication Date: 2025-10-17HEFEI QIANXUN WANDIAN TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510154492.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-10-17
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

The existing PLC system has complex expansion bus wiring, inter-channel interference, low communication rate, and poor anti-interference performance, making it impossible to effectively apply it to high-precision mechanical equipment and extreme environments.

Method used

A self-interference-resistant real-time bus communication method is adopted. The main controller periodically sends encoded control instructions and feedback data packets, and uses check polynomial encoding in the Galois field to ensure that the data packets are transmitted in parallel on the bus, achieving high transmission rate and anti-interference ability.

Benefits of technology

Simplify wiring operations, increase data transmission rate, enhance system stability and fault response speed, reduce material and labor costs, and support multi-node data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945828B_ABST
    Figure CN119945828B_ABST
Patent Text Reader

Abstract

The application provides a communication method of a self anti-interference real-time bus, comprising the following steps: a master controller periodically sends control instructions to a slave station through a real-time bus; the slave station executes corresponding operations after receiving the control instructions, and generates feedback data based on the execution result; wherein the control instructions and the feedback data exist in the form of data packets; the slave station returns the feedback data to the master controller through the real-time bus, and the master controller adjusts the control instructions based on the feedback data; the application periodically sends the control instructions to the slave station in the form of small data packets, realizes high transmission rate for data transmission, encodes the control instructions into data packets, and the data packets of the control instructions are parallel on the bus, so that the slave station can accurately identify the data packets, the bus has strong anti-interference ability, and the use of the bus ensures the stable operation of the whole system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial communication, in particular to a communication method and device of a self-anti-interference real-time bus. BACKGROUND

[0002] In the prior art, PLC is extended I / O (Input / Output) point or function, which generally needs to be connected with various I / O modules or function modules to form a PLC control system through an extension bus, and the PLC communicates with the I / O modules or function modules through the extension bus.

[0003] The traditional PLC wiring is complex, and the wiring requirements are numerous. The cable will cause inter-channel interference during operation. Moreover, the CAN, RS485, Ethernet and EtherCAT communication cables of the PLC have the problems of low communication rate, poor anti-interference performance, short transportation distance, poor real-time performance and the like when performing long-distance transmission, and cannot be used in high-precision mechanical equipment or work in extremely harsh environments. SUMMARY

[0004] (I) Technical problems solved

[0005] In view of the deficiencies of the prior art, the present application provides a communication method and device of a self-anti-interference real-time bus to solve the problems in the background art.

[0006] (II) Technical solutions

[0007] To achieve the above purposes, the present application is implemented by the following technical solutions: a communication method of a self-anti-interference real-time bus, comprising the following steps:

[0008] The master controller periodically sends control instructions to the slave station through the real-time bus;

[0009] The slave station executes corresponding operations after receiving the control instructions, and generates feedback data based on the execution result;

[0010] The control instructions and the feedback data are in the form of data packets.

[0011] The slave station transmits the feedback data to the master controller through the real-time bus, and the master controller adjusts the control instructions based on the feedback data.

[0012] As a further optimization, the master controller periodically sends control instructions to the slave station through the real-time bus, comprising:

[0013] The master controller generates control instructions of the slave station according to the target state, encodes the control instructions, and makes the control instructions be encoded into a data packet with a fixed size of 1 KB. The master controller uses a timer interrupt to trigger a sending operation of the data packet, and sends the encoded data packet to the slave station at a fixed interval of 100 milliseconds.

[0014] The control instructions include an execution flow, configuration parameters, and a 64-bit synchronization clock.

[0015] As a further optimization, the process of encoding the control instructions by the master controller includes:

[0016] Data processing, parsing the content of the control instructions to obtain a plurality of different types of data, processing the plurality of different types of data respectively, and setting a priority of the data and marking important data.

[0017] The process of processing the plurality of different types of data respectively includes: scanning each type of data and eliminating duplicate data items, and screening out important data in the data that needs to be synchronized.

[0018] Encoding processing, selecting a communication encoding parameter, generating a check polynomial R(x) based on the communication encoding parameter, obtaining an encoded code word C(x) through a representation of the check polynomial in a Galois field, and converting each coefficient of C(x) to obtain a data packet of the control instructions.

[0019] In the communication encoding parameter, the code length n = 1024 (corresponding to 1 KB), the information bit length k = 592, and the check bit length r = n-k = 432.

[0020] As a further optimization, the process of generating a check polynomial R(x) based on the communication encoding parameter, obtaining an encoded code word C(x) through a representation of the check polynomial in a Galois field, and converting each coefficient of C(x) to obtain a data packet of the control instructions includes:

[0021] Selecting a communication encoding parameter, constructing elements of GF(2 9 ) based on a primitive polynomial p(x), mapping integers from 0 to 2 9 -1 to elements in the Galois field;

[0022] The primitive polynomial is p(x) = x9+x4+x3+x+1.

[0023] In the communication encoding parameter, the code length n = 1024 (corresponding to 1 KB), the information bit length k = 592, and the check bit length r = n-k = 432.

[0024] For a check bit length r = 432, a reference polynomial is generated as:

[0025]

[0026]

[0027] Based on the primitive polynomial and the benchmark polynomial, the information polynomial M(x) is calculated, and the degree of the information polynomial is raised to 432, obtaining x r M(x)=x 432 M(x);

[0028] The quotient Q(x) and the remainder R(x) are obtained through the primitive polynomial and the information polynomial, satisfying x r M(x)=Q(x)g(x)+R(x);

[0029] R(x)=r0+r1x+r2x 2 +…+r 431 x 431 =a 13 +a 21 x+a 37 x 2 +…, which is the check polynomial, and the coefficients r0, R1... R 431 are elements in the Galois field;

[0030] The encoded code word C(x)=x r M(x)-R(x) that is The information bits and the check bits are combined to obtain a 1024-bit encoded data packet;

[0031] Among them, in the Galois field, it is represented as ;

[0032] c0, c1... c1023 are all Galois field elements.

[0033] Finally, the coefficients of C(x) are converted into binary to obtain a 1KB data packet.

[0034] As a further optimization, the slave station receives a control instruction and performs a corresponding operation, and generates feedback data based on the execution result, including:

[0035] The data packet is decoded by parsing the protocol header, verifying the checksum, and extracting the valid data, and the original information contained therein is extracted;

[0036] According to the decoded information, a corresponding operation is performed;

[0037] After the slave station completes the corresponding operation, according to its own state and processing result, the feedback data to be returned is generated.

[0038] As a further preferred, the slave station sends the feedback data back to the master controller through the real-time bus, and the master controller adjusts the control instruction based on the feedback data, including:

[0039] The slave station encodes the generated response data into a data packet with a fixed size of 15KB according to the same encoding rule as the master station;

[0040] The slave station determines whether there is a next slave station to perform forwarding or packet transmission;

[0041] If there is a next slave station, the slave station sends the encoded data packet to the next slave station, and the next slave station repeats the above-mentioned receiving, decoding, processing and forwarding process;

[0042] The master station further adjusts the control instruction according to the returned data packet, and starts the next round of control instruction transmission cycle.

[0043] As a further preferred, a self-interference real-time bus device is used to implement the communication method of the self-interference real-time bus, including:

[0044] The master controller is used to periodically send control instructions to a plurality of slave stations based on requirements, and encode the control instructions into data packets with a fixed size;

[0045] The bus is used to connect the master controller and the plurality of slave stations, and the bus is also used to complete the parallel communication of the control instructions;

[0046] The slave station is used to receive the data packet of the master controller, decode the data packet, obtain the control instruction and execute it, and generate feedback data;

[0047] Wherein, the master controller and the slave station can encode and decode the data packet.

[0048] As a further preferred, the specific process of the master controller encoding the control instruction into a data packet with a fixed size includes:

[0049] The master controller generates the control instruction of the slave station according to the target state, encodes the control instruction, and makes the control instruction be encoded into a data packet with a fixed size of 1KB. The master controller uses a timer interrupt to trigger the sending operation of the data packet, and sends the encoded data packet to the slave station at a fixed interval of 100 milliseconds.

[0050] Wherein, the control instruction includes an execution flow, a configuration parameter and a 64-bit synchronization clock.

[0051] As a further preferred, the process of the master controller encoding the control instruction includes:

[0052] Data processing, the content of the control instruction is parsed to obtain a plurality of different types of data, a plurality of different types of data are processed respectively, and the priority of the setting data is set, and important data is marked;

[0053] Among them, the process of processing a plurality of different types of data includes: scanning each type of data respectively and eliminating duplicate data items and screening out important data in the data that needs to be synchronized;

[0054] Encoding processing, selecting communication encoding parameters, generating a check polynomial R(x) based on the communication encoding parameters, obtaining the encoded code word C(x) through the representation of the check polynomial in the Galois field, and converting the coefficients of C(x) to obtain the data packet of the control instruction including:

[0055] Selecting communication encoding parameters, constructing elements of GF(2 9 ) based on the primitive polynomial p(x), mapping integers from 0 to 2 9 -1 to elements in the Galois field;

[0056] The primitive polynomial is p(x)=x9+x4+x3+x+1;

[0057] Among them, the code length n=1024 (corresponding to 1KB) in the communication encoding parameter, the information bit length k=592, and the check bit length r=n-k=432;

[0058] For the check bit length r=432, the reference polynomial is generated:

[0059]

[0060] Based on the primitive polynomial and the reference polynomial, the information polynomial M(x) is calculated, and the degree of the information polynomial is raised to 432, to obtain x r M(x)=x 432 M(x);

[0061] The quotient Q(x) and the remainder R(x) are obtained by the primitive polynomial and the information polynomial, which satisfy x r M(x)=Q(x)g(x)+R(x);

[0062] R(x)=r0+r1x+r2x 2 +…+r 431 x 431 =a 13 +a 21 x+a 37 x 2 +…, which is the check polynomial, and the coefficients r0, R1... R 431 are elements in the Galois field;

[0063] The coded code word C(x)=x r M(x)-R(x) that is Merging the information bits and the check bits, a 1024-bit coded data packet is obtained;

[0064] Wherein, in the Galois field, it is represented as ;

[0065] c0, c1,..., c1023 are all Galois field elements.

[0066] Finally, the coefficients of C(x) are converted into binary, and a 1KB data packet is obtained;

[0067] Wherein, in the communication coding parameters, the code length n=1024 (corresponding to 1KB), the information bit length k=592, and the check bit length r=n-k=432.

[0068] As a further optimization, decoding the data packet, obtaining the control instruction and executing, and generating feedback data include:

[0069] The data packet is decoded by parsing the protocol header, verifying the checksum, and extracting the valid data, and the original information contained therein is extracted;

[0070] According to the decoded information, the corresponding operation is performed;

[0071] After the slave station completes the corresponding operation, according to its own state and processing result, the feedback data to be returned is generated;

[0072] The slave station encodes the generated response data into a data packet with a fixed size of 15KB according to the same encoding rule as the master station;

[0073] The slave station determines whether there is a next slave station to execute forwarding or backhaul data packet;

[0074] If there is a next slave station, the slave station sends the encoded data packet to the next slave station, and the next slave station repeats the above receiving, decoding, processing and forwarding process;

[0075] The master station further adjusts the control instruction according to the backhauling data packet, and starts the next round of control instruction transmission cycle.

[0076] (Three) beneficial effects

[0077] The application provides a communication method and device of a self anti-interference real-time bus, which has the following beneficial effects: control instructions are periodically transmitted to slave stations in the form of small data packets, high transmission rate is realized for data transmission, the control instructions are encoded into data packets, the data packets of the control instructions are parallel on the bus, and the slave stations can accurately identify the data packets, so that the bus has strong anti-interference ability and ensures that the bus is used to make the whole system run stably.

[0078] In addition, higher data transmission rate enables the master controller to acquire feedback data faster, so that faults and communication problems can be determined faster, and the timeliness of remedial measures is enhanced.

[0079] The self anti-interference real-time bus device simplifies wiring operation, has higher wiring efficiency, can be wired at the same time, reduces huge material cost and time and labor cost of installation and debugging caused by complex cables, and improves assembly and maintainability; and uses a distributed control architecture, can process data transmission of multiple nodes at the same time, and provides efficient network communication capability. BRIEF DESCRIPTION OF DRAWINGS

[0080] Figure 1 The application provides a communication method flow chart of the self anti-interference real-time bus.

[0081] Figure 2 The application provides a schematic diagram of one embodiment of the communication method of the self anti-interference real-time bus.

[0082] Figure 3 The application provides a block diagram of the communication device of the self anti-interference real-time bus. DETAILED DESCRIPTION

[0083] The embodiments of the application are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the application, and cannot be understood as limiting the application.

[0084] The following disclosure provides many different embodiments or examples for implementing different structures of the application. In order to simplify the disclosure of the application, the components and settings of specific examples are described below. Of course, they are only examples and the purpose is not to limit the application. In addition, the application can repeatedly refer to numbers and / or letters in different examples, and such repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the application provides examples of various specific processes and materials, but those skilled in the art can realize the application of other processes and / or the use of other materials.

[0085] AsFigure 1 As shown, the embodiment of the present application provides a communication method of self anti-interference real-time bus, characterized in that, comprising the following steps:

[0086] S1: the master controller periodically sends control instructions to the slave station through the real-time bus;

[0087] Wherein, the control instruction is sent in the form of a data packet.

[0088] Specifically, the master controller generates the control instruction of the slave station according to the target state, and encodes the control instruction, so that the control instruction is encoded into a data packet of 1KB. The master controller uses a timer interrupt to trigger the sending operation of the data packet, and sends the encoded data packet to the slave station at a fixed interval of 100 milliseconds, so as to ensure the periodicity and stability of data transmission.

[0089] Wherein, the control instruction includes execution flow, configuration parameters and 64-bit synchronization clock and other information; These information may come from user input, system preset or other upper layer application program.

[0090] It should be noted that if the data packet is less than or equal to 1KB, a specific placeholder or meaningless data is directly filled to 1KB; If the data packet is greater than 1KB, combined with packeting and compression, the data packet is ensured to be 1KB. In order to ensure the accuracy and integrity of data in the transmission process.

[0091] Further, the process of encoding the control instruction by the master controller to make the control instruction be encoded into a data packet of 1KB includes:

[0092] Data processing, the content of the control instruction is parsed to obtain a plurality of different types of data, the plurality of different types of data are processed respectively, and the priority of the data is set, and the important data is marked;

[0093] Wherein, the process of processing the plurality of different types of data respectively includes: scanning each type of data and eliminating duplicate data items, and screening out important data in the data that need to be synchronized;

[0094] Wherein, the 64-bit synchronization clock in the control instruction is usually reserved as important data for synchronization due to its particularity.

[0095] Encoding processing, selecting communication encoding parameters, constructing elements of GF(2 9 ) based on the primitive polynomial p(x), mapping integers from 0 to 2 9 -1 to elements in Galois field;

[0096] The primitive polynomial is p(x)=x9+x4+x3+x+1;

[0097] Wherein, the code length n=1024 (corresponding to 1KB) in the communication coding parameter, the information bit length k=592, and the check bit length r=n-k=432.

[0098] For the check bit length r=432, the reference polynomial is generated:

[0099]

[0100]

[0101] The information polynomial M(x) is calculated based on the primitive polynomial and the reference polynomial, and the degree of the information polynomial is raised to 432, to obtain x r M(x)=x 432 M(x);

[0102] The quotient Q(x) and the remainder R(x) are obtained through the primitive polynomial and the information polynomial, satisfying x r M(x)=Q(x)g(x)+R(x);

[0103] R(x)=r0+r1x+r2x 2 +…+r 431 x 431 =a 13 +a 21 x+a 37 x 2 +…, which is the check polynomial, and the coefficients r0, R1... R 431 are elements in the Galois field;

[0104] The encoded code word C(x)=x r M(x)-R(x) is obtained, that is The information bits and the check bits are combined to obtain a 1024-bit encoded data packet.

[0105] Wherein, it is represented as in the Galois field.

[0106] c0, c1... c1023 are all Galois field elements.

[0107] Finally, the coefficients of C(x) are converted into binary to obtain a 1KB data packet.

[0108] It should be noted that in the control instructions of the present application, to turn on a certain function, it is represented as 0000000000000010 in binary, indicating the instruction code (a total of 16 bits) for turning on the function.

[0109] Some parameters of the working mode, frequency, etc. of the device are assumed to be represented by 512-bit binary as 110101010101...0101010 (512 bits in total).

[0110] The binary representation of the 64-bit synchronization clock is 010101010101...010101 (64 bits in total).

[0111] The three parts of information are spliced in order to obtain the original information sequence 0000000000000010110101010101...0101010010101010101...010101, which is 592 bits in total.

[0112] S2: The slave station executes the corresponding operation after receiving the control instruction and generates feedback data based on the execution result;

[0113] The control instruction and the feedback data are in the form of data packets.

[0114] Specifically, the slave station decodes the data packet by analyzing the protocol header, verifying the checksum, and extracting the valid data, and extracts the original information contained therein. The control instruction and configuration parameters, etc. sent by the master station are obtained.

[0115] The process of the slave station processing the control instruction data packet includes:

[0116] Performing operation: the slave station executes the corresponding operation according to the decoded information;

[0117] For example, if the received is an execution flow, the slave station may adjust its working mode, start or stop a certain function; if it is a configuration parameter, the slave station will update the internal configuration register or parameter table.

[0118] In this embodiment, when the slave station decodes the received data packet, it is divided according to the agreement when encoding (control instruction 16 bits, configuration parameter 512 bits, synchronization clock 64 bits), so that the original control instruction, configuration parameter and bit synchronization clock, etc. information can be obtained.

[0119] Specifically, when the slave station receives the control instruction, it will perform error correction on the control instruction data packet to obtain the original execution flow, configuration parameter and bit synchronization clock, etc. information.

[0120] Generating response data: the slave station generates the data to be returned according to its state and processing result after completing the corresponding operation.

[0121] It can be understood that these data may include the results of operation execution, data collected by sensors, the current state of the device, etc.

[0122] S3: the slave station returns the feedback data to the master controller through the real-time bus, and the master controller adjusts the control instruction based on the feedback data.

[0123] Specifically, the response data packet is encoded: the slave station encodes the generated response data into a data packet with a fixed size of 15KB according to the same encoding rules as the master station. Similarly, data format conversion, checksum addition, and protocol header encapsulation operations are required.

[0124] The slave station forwards or returns the data packet

[0125] Determine if there is a next slave station: the slave station detects whether there is a next slave station connected through the hardware connection state.

[0126] Forward the data packet: if there is a next slave station, the slave station sends the encoded data packet to the next slave station. The next slave station repeats the above receiving, decoding, processing, and forwarding process.

[0127] Return the data packet to the master station: if there is no next slave station, the slave station returns the encoded data packet directly to the master station. After the master station's receiving module receives the data packet, it performs decoding operations to obtain the processing results and state information returned by the slave station. The master station can further adjust the control instruction based on this information and start the next round of control instruction transmission cycle.

[0128] The entire data transmission cycle process is realized through the ordered sending, receiving, processing, and forwarding of data packets between the master station and the slave station, which realizes the effective control of the master station over the slave station and the feedback of the slave station state information, ensuring the normal operation of the self-interference real-time bus system and the accuracy of data interaction.

[0129] In other embodiments, the slave station can also cascade a secondary slave station through the real-time bus.

[0130] The self-interference real-time bus communication method of the present application realizes high transmission rate for data transmission by periodically sending control instructions to the slave station in the form of small data packets. At the same time, the control instructions are encoded into data packets, and the data packets of the control instructions are parallel on the bus, which can be accurately identified by the slave station, so that the bus has strong anti-interference ability, ensuring the smooth operation of the entire system.

[0131] Moreover, higher data transmission rate can enable the master controller to acquire feedback data faster, thereby enabling faster determination of faults and communication problems and enhancing the timeliness of remedial measures.

[0132] In order to further understand the anti-interference ability of the self-interference real-time bus communication method of the present application, the following describes the test results of the self-interference real-time bus, CAN bus, and Ethercat bus:

[0133] EMC test operation process:

[0134] According to the order of radiation emission test, conducted emission test, electrostatic discharge immunity test, electrical fast transient burst immunity test, etc., the Axesgo self-interference real-time bus, CAN bus and Ethercat bus are tested in turn.

[0135] Set up three independent test stations for placing Axesgo self-interference real-time bus, CAN bus and Ethercat bus test equipment. Each station is equipped with standard power socket, signal cable interface and grounding device to ensure stable power supply, reliable signal transmission and good grounding of the tested equipment.

[0136] Radiated emission (RE) test:

[0137] Place the tested bus equipment on the turntable of the semi-anechoic chamber according to the standard requirements, adjust the position and direction of the equipment to ensure it is in the best test state. Connect the signal generator, power amplifier and transmitting antenna, use the receiving antenna and spectrum analyzer to measure the electromagnetic interference signals radiated into space in the frequency range of 30MHz-18GHz. Measure the electromagnetic radiation intensity emitted by the tested bus equipment. During the measurement process, the polarization direction and position of the transmitting antenna need to be adjusted constantly to obtain the maximum radiation signal.

[0138] Test the three buses in turn and record the test data.

[0139] Conducted emission (CE) test:

[0140] Connect the tested bus equipment with the power supply through the artificial power network, install current probes on the power line and signal line, and connect the current probes with the spectrum analyzer. Set the frequency range and measurement parameters of the spectrum analyzer, start the power supply, and measure the electromagnetic interference signals conducted through the power line in the frequency range of 150kHz-30MHz. Perform multiple measurements under different working conditions to ensure the comprehensiveness of the data.

[0141] Test the three buses in turn and record the test data.

[0142] Radio frequency electromagnetic field radiation immunity (RS):

[0143] Build a test site in an electromagnetic shielding room to ensure that the environmental background noise is lower than the test requirements, and avoid external electromagnetic interference affecting the test results.

[0144] Connect the radio frequency signal generator, power amplifier, antenna and other equipment, set the frequency range, field strength, modulation mode and other parameters of the radio frequency signal generator. The frequency range is 80MHz-1GHz, the field strength is 30V / m, the modulation mode is 80%AM, and the modulating signal is 1kHz.

[0145] Use oscilloscope, error code instrument and other monitoring equipment to monitor the data transmission of the bus in real time, such as error rate, packet loss rate, data transmission delay and other parameters.

[0146] Test the three buses in turn and record the test results

[0147] Electrostatic discharge immunity (ESD) test:

[0148] Place the bus equipment to be tested on the electrostatic discharge test bench and ensure good grounding of the equipment.

[0149] Use the electrostatic discharge generator to perform contact discharge (±8kV) and air discharge (±15kV) on the shell, interface and other parts of the bus equipment. Discharge 10 times at each test point and observe the working state of the equipment during discharge.

[0150] Discharge the shell, interface and other parts of the equipment and observe the working state of the equipment during discharge.

[0151] Test the three buses in turn and record the test results.

[0152] Electrical fast transient burst immunity (EFT) test:

[0153] Connect the electrical fast transient burst generator to the power line and signal line of the bus equipment to be tested through the capacitor coupling clamp.

[0154] Inject the pulse signal (4kV, 100kHz) generated by the electrical fast transient burst generator into the power line and signal line of the bus equipment through the capacitor coupling clamp and observe whether the equipment can work normally.

[0155] Test the three buses in turn and record the test results.

[0156] The following table shows the EMC test results of the three buses:

[0157]

[0158] From the above table, we can see that:

[0159] Self-immunity real-time bus: In all test items, the bus communication is always stable, the data transmission is error-free and packet loss-free, and the equipment works normally, fully meeting the EMC requirements in harsh industrial environments.

[0160] CAN bus: In the radiation emission and conducted emission test, the interference signal strength of some frequency bands is close to or exceeds the standard limit; in the electrostatic discharge immunity test, some nodes appear temporary communication interruption during contact discharge, and individual nodes appear dead phenomenon during air discharge; in the electrical fast transient burst immunity test, there are more data errors and packet loss phenomena.

[0161] Ethercat bus: In the radiation emission and conducted emission test, the interference signal strength of some frequency bands exceeds the standard limit; in the electrostatic discharge immunity test, multiple nodes appear dead phenomenon during air discharge; in the electrical fast transient burst immunity test, the bus communication is frequently interrupted, and the data transmission is seriously wrong.

[0162] In order to facilitate understanding, the application process of the self-interference real-time bus communication method of the present application will be described below in combination with Figure 2 ;

[0163] As shown in Figure 2 , a packaging production line is expressed, which needs to complete product conveying, counting, packaging and quality detection, etc. The master station, i.e. the host controller, is powered by a 24V power supply, and the "ACT bus" port of the host controller is connected to the "in" port of the 10XY module (i.e. a 10-channel digital input / output module) through a network cable. The "out" port of the 10XY module is connected to the "in" port of the 3MC module (i.e. a 3-channel pulse output module), the "out" port of the 3MC module is connected to the "in" port of the 3GSJ module (i.e. a 3-channel counter module), and the "out" port of the 3GSJ module is connected to the "in" port of the AI module (i.e. an intelligent AI module).

[0164] It should be noted that in Figure 2 , the master station, i.e. the host controller, is arranged from left to right along with the 10XY module, the 3MC module, the 3GSJ module and the AI module, and the 10XY module, the 3MC module, the 3GSJ module and the AI module all belong to the slave station.

[0165] I. Product conveying and position detection (mainly involving 10XY module and 3GSJ module)

[0166] 1. Master station sends instructions

[0167] After the master station, i.e. the host controller, is connected to the slave station, it starts to prepare data to be sent to the slave station. The control instruction for starting the conveyor motor and the related configuration parameters are encoded to form a 1KB data packet. It contains the instruction for starting the corresponding conveyor motor control output port in the 10XY module, and the instruction for setting the counter in the 3GSJ module to select AB phase pulse counting mode for connecting the encoder installed on the conveyor belt.

[0168] The master station sends data packets through the Axesgo self-anti-jamming real-time bus at fixed intervals of 100 milliseconds.

[0169] 2. (Slave 1) "10XY module" receives and processes

[0170] 10XY module (slave 1): Slave 1 receives the data packet and stores it in the receive buffer, then decodes it. After parsing the synchronization clock and the instruction to start the conveyor motor, it synchronizes the clock and sets the corresponding output port to high level, turning on the motor power, and the conveyor belt starts running. At the same time, the module monitors the state input signal of the conveyor belt in real time, encodes the response data packet together with the synchronization information, and sends it to the 3MC module (slave 2).

[0171] 3. (Slave 2) "3MC module" receives and processes

[0172] 3MC (slave 2): Slave 2 receives the data packet and stores it in the receive buffer, then decodes it. After parsing the synchronization clock information, it calibrates its own clock with the master station's 64-bit synchronization clock. There is no control instruction information for the 3MC module in the data packet, so it directly encodes the synchronization clock information into the data packet and sends it to the 3GSJ module (slave 3).

[0173] 4. (Slave 3) "3GSJ module" receives and processes

[0174] 3GSJ (slave 3): Receives and decodes the data packet, and configures the counter to AB phase pulse counting mode as required. When the encoder on the conveyor belt rotates and generates AB phase pulse signals, the 3GSJ module counts these pulses. Each product passing through the encoder generates a certain number of pulses, and the position of the product on the conveyor belt is determined by the value of the counter. The 3GSJ module encodes the feedback information and the synchronization clock into a 1KB data packet and sends it to the AI module (slave 4).

[0175] 5. (Slave 4) "AI module" receives and processes

[0176] AI module (slave 4): Slave 4 receives the data packet and decodes it. After parsing the synchronization clock information, it calibrates its own clock with the master station's 64-bit synchronization clock. There is no control instruction information for the AI module in the data packet, so it directly encodes the synchronization clock information into the data packet, and there is no next slave, so it sends the data packet to the host computer.

[0177] Host computer receives and decodes, Host computer receives and decodes, obtains conveyor belt running status and product position information.

[0178] II. Product counting and packaging control (mainly involving 3MC module and 10XY module)

[0179] 1. Master sends instructions

[0180] When the product reaches the designated position, the master encodes and sends the instructions to control the 3MC module to drive the packaging machinery, and the instructions and configuration parameters to control the supply of packaging materials in the 10XY module, the output of the finished product, and the packaging.

[0181] 2. (Slave 1) "10XY module" receives and processes

[0182] 10XY module (slave 1): After receiving and decoding the data packet from slave 1, the digital output control electromagnetic valve opens the packaging material supply device, and at the same time monitors whether the packaging material is used up, whether the packaging is completed, etc. The running state of the packaging related equipment, the material state and synchronization information are encoded into a 1KB response data packet. The response data packet is sent to the 3MC module (slave 2).

[0183] 3. (Slave 2) "3MC module" receives and processes

[0184] 3MC slave 2): After receiving and decoding the data packet from slave 2, according to the instructions, start the corresponding pulse output channel, output pulse signals according to the set frequency, pulse number and direction, drive the packaging machinery to operate according to the predetermined flow.

[0185] The state of the pulse output and the current pulse parameters and synchronization information are encoded into a 1KB response data packet, which is sent to the 3GSJ module (slave 3).

[0186] 4. (Slave 3) "3GSJ module" receives and processes

[0187] 3GSJ (slave 3): Slave 3 receives the data packet and stores it in the receiving buffer, then decodes it. Analyze the synchronization clock information, and calibrate the clock of itself with the 64-bit synchronization clock of the master. There is no control instruction information for the 3GSJ module in the data packet, directly encode the synchronization clock information into the data packet, and send the data packet to the AI module (slave 4).

[0188] 5. (Slave 4) "AI module" receives and processes

[0189] AI module (slave 4): Slave 4 receives the data packet and decodes it. Analyze the synchronization clock information, and calibrate the clock of itself with the 64-bit synchronization clock of the master. There is no control instruction information for the AI module in the data packet, directly encode the synchronization clock information into the data packet, and send the data packet to the host without the next slave.

[0190] The host receives and decodes, the host receives and decodes, and obtains the running state of the conveyor belt and the product position information.

[0191] III. Quality detection and parameter adjustment (mainly involving AI module and 10XY module)

[0192] 1. Master station sends instructions

[0193] During the packaging process, quality detection of the product is required, such as detecting the sealing of the package (detected by a pressure sensor). The master station will send instructions to the intelligent AI module for pressure detection and related configuration parameters (such as pressure detection threshold, etc.) to the intelligent AI module, and send instructions to control the devices related to quality detection in the 10-way digital input / output module (such as a cylinder to push the product to be detected to the detection station, etc.).

[0194] 2. (Slave station 1) "10XY module" receives and processes

[0195] 10XY module (slave station 1): After receiving and decoding the data packet from slave station 1, control the relevant equipment to push the product to the detection station, monitor the state of the detection station, and encode the state information and synchronization information of the quality detection related equipment into a 1KB response data packet. Send the response data packet to the 3MC module (slave station 2).

[0196] 3. (Slave station 2) "3MC module" receives and processes

[0197] 3MC slave station 2): Receive data packet from slave station 2 and store in receive buffer, then decode. Parse the synchronization clock information and calibrate the clock of itself with the 64-bit synchronization clock of the master station. There is no control instruction information for the 3MC module in the data packet, directly encode the synchronization clock information into the data packet, and send the data packet to the 3GSJ module (slave station 3).

[0198] 4. (Slave station 3) "3GSJ module" receives and processes

[0199] 3GSJ (slave station 3): Receive data packet from slave station 3 and store in receive buffer, then decode. Parse the synchronization clock information and calibrate the clock of itself with the 64-bit synchronization clock of the master station. There is no control instruction information for the 3GSJ module in the data packet, directly encode the synchronization clock information into the data packet, and send the data packet to the AI module (slave station 4).

[0200] 5. (Slave station 4) "AI module" receives and processes

[0201] AI module (slave station 4): After receiving and decoding the data packet from slave station 4, initialize the pressure sensor, and real-time collect the pressure value of the packaging area. Compare the collected pressure value with the set threshold, if not in the normal range, calculate the control output according to the self-tuning PID control algorithm, and determine whether the packaging is qualified.

[0202] The pressure detection value, control output, detection result, and module self-working state are encoded into a 1KB response data packet. The data packet is returned to the host. The host receives and decodes, decides whether to adjust the packaging process according to the quality detection information, and then starts the next round of data transmission and control flow.

[0203] Through the above process, the host and each slave station realize orderly data transmission, processing and feedback on the self-interference-resistant real-time bus, ensuring the collaborative work and automatic operation of each link of the entire production line. In each link, accurate transmission of data packets and correct processing of the slave station are the key to ensure stable operation of the system, and real-time decision and control instruction sending of the host according to the feedback information of the slave station realize effective management and optimization of the entire production process.

[0204] The embodiment also provides a self-interference-resistant real-time bus device for realizing the communication method of the self-interference-resistant real-time bus, which comprises:

[0205] a host controller configured to periodically send control instructions to a plurality of slave stations based on requirements and encode the control instructions into data packets of a fixed size;

[0206] a bus configured to connect the host controller and the plurality of slave stations and complete parallel communication of the control instructions;

[0207] a slave station configured to receive data packets of the host controller, decode the data packets, obtain control instructions and execute the control instructions, and generate feedback data;

[0208] The host controller and the slave station can encode and decode data packets.

[0209] Further, the specific process in which the host controller encodes the control instructions into data packets of a fixed size comprises:

[0210] The host controller generates control instructions of the slave station according to a target state, encodes the control instructions, encodes the control instructions into data packets of a fixed size of 1KB, and uses a timer interrupt to trigger a sending operation of the data packets. The encoded data packets are sent to the slave station at a fixed interval of 100 milliseconds.

[0211] The control instructions comprise an execution flow, configuration parameters and a 64-bit synchronization clock.

[0212] Further, the process in which the host controller encodes the control instructions comprises:

[0213] data processing, which comprises parsing the content of the control instructions to obtain a plurality of different types of data, processing the plurality of different types of data respectively, setting priorities of the data, and marking important data;

[0214] The process of processing different types of data separately includes: scanning each type of data separately and eliminating duplicate data items and screening out important data that needs to be synchronized;

[0215] Coding processing, select communication coding parameters, generate a check polynomial R(x) based on the communication coding parameters, obtain the encoded codeword C(x) through the representation of the check polynomial in the Galois field, and convert the coefficients of C(x) to obtain the control instruction data packet including:

[0216] Select the communication coding parameters and construct GF (2 9 ) elements, from 0 to 2 9 The integer of -1 is mapped to the element in the Galois field;

[0217] The primitive polynomial is p(x)=x9+x4+x3+x+1;

[0218] Among them, the code length n in the communication coding parameter is 1024 (corresponding to 1KB), the information bit length k is 592, and the check bit length r=nk=432;

[0219] For the check bit length r=432, generate the base polynomial:

[0220]

[0221]

[0222] Based on the primitive polynomial and the benchmark polynomial, the information polynomial M(x) is calculated and the degree of the information polynomial is increased by 432 times to obtain x r M(x)=x 432 M(x);

[0223] The quotient Q(x) and remainder R(x) are obtained by the primitive polynomial and the information polynomial, satisfying x r M(x)=Q(x)g(x)+R(x);

[0224] R(x)=r0+r1x+r2x 2 +…+r 431 x 431 =a 13 +a 21 x+a 37 x 2 +…, is the check polynomial, its coefficients r0, R1…R 431 is an element in the Galois Field;

[0225] The encoded codeword C(x)=x r M(x)-R(x) The information bits and the check bits are combined to obtain a 1024-bit encoded data packet;

[0226] wherein, in the Galois field, is represented as ;

[0227] c0, c1,..., c1023 are all Galois field elements.

[0228] Finally, the coefficients of C(x) are converted into binary to obtain a 1KB data packet;

[0229] In the communication encoding parameters, the code length n = 1024 (corresponding to 1KB), the information bit length k = 592, and the check bit length r = n-k = 432.

[0230] Further, the decoding of the data packet, the acquisition of the control instruction and the execution, and the generation of the feedback data include:

[0231] The data packet is decoded by parsing the protocol header, verifying the checksum, and extracting the valid data, and the original information contained therein is extracted;

[0232] According to the decoded information, the corresponding operation is performed;

[0233] After the slave station completes the corresponding operation, the feedback data to be returned is generated according to the state and processing result of the slave station;

[0234] The slave station encodes the generated response data into a data packet with a fixed size of 15KB according to the same encoding rule as the master station;

[0235] The slave station determines whether there is a next slave station to execute forwarding or returning of the data packet;

[0236] If there is a next slave station, the slave station sends the encoded data packet to the next slave station, and the next slave station repeats the above receiving, decoding, processing and forwarding process;

[0237] The master station further adjusts the control instruction according to the returned data packet and starts the next round of control instruction transmission cycle.

[0238] The self-anti-interference real-time bus device provided by the application simplifies the wiring operation, has higher wiring efficiency, can be wired at the same time, reduces the huge material cost and installation and debugging time and labor cost caused by the complexity of the cable, improves the assembly and maintenance, uses a distributed control architecture, can process data transmission of multiple nodes at the same time, and provides efficient network communication capability.

[0239] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is to be understood that all related terms not specifically defined in the specification shall be interpreted in accordance with 37 C.F.R. § 1.822.

Claims

1. A communication method for a real-time bus with self-interference rejection, characterized in that: The following steps are involved: The master controller periodically sends control instructions to the slaves via the real-time bus; After receiving the control instruction, the slave executes the corresponding operation and generates feedback data based on the execution result; Wherein, the control instructions and the feedback data are both in the form of data packets; The slave station transmits the feedback data back to the master controller via a real-time bus, and the master controller adjusts the control instructions based on the feedback data; The main controller periodically sends control instructions to the slave station via the real-time bus, including: The master controller generates control instructions for the slave station based on the target state and encodes the control instructions so that the control instructions are encoded into a fixed 1KB data packet. The master controller uses a timer interrupt to trigger the sending operation of the data packet and sends the encoded data packet to the slave station at a fixed interval of 100 milliseconds. Among them, the control instructions include execution flow, configuration parameters and 64-bit synchronous clock; The process of encoding the control instruction by the main controller includes: Data processing: parsing the content of the control instructions to obtain several different types of data, processing the different types of data separately, setting the priority of the data, and marking important data; The process of processing different types of data separately includes: scanning each type of data separately and eliminating duplicate data items and screening out important data that needs to be synchronized; Coding processing: selecting communication coding parameters, generating a check polynomial R(x) based on the communication coding parameters, obtaining the encoded codeword C(x) through the representation of the check polynomial in the Galois field, and converting the coefficients of C(x) to obtain the data packet of the control instruction; Among them, the code length n in the communication coding parameter is 1024 (corresponding to 1KB), the information bit length k is 592, and the check bit length r=nk=432; The method of generating a check polynomial R(x) based on the communication coding parameter, obtaining the encoded codeword C(x) by representing the check polynomial in the Galois field, and converting the coefficients of C(x) to obtain a data packet of the control instruction includes: Select the communication coding parameters and construct GF (2 9 ) elements, from 0 to 2 9 The integer of -1 is mapped to the element in the Galois field; The primitive polynomial is p(x)=x9+x4+x3+x+1; Among them, the code length n in the communication coding parameter is 1024 (corresponding to 1KB), the information bit length k is 592, and the check bit length r=nk=432; For the check bit length r=432, generate the base polynomial: ; ; Based on the primitive polynomial and the benchmark polynomial, the information polynomial M(x) is calculated and the degree of the information polynomial is increased by 432 times to obtain x r M(x)=x 432 M(x); The quotient Q(x) and remainder R(x) are obtained through the primitive polynomial and the information polynomial, satisfying x r M(x)=Q(x)g(x)+R(x); R(x)=r0+r1x+r2x 2 +…+r 431 x 431 =a 13 +a 21 x+a 37 x 2 +…, is the check polynomial, its coefficients r0, r1…r 431 is an element in the Galois Field; The encoded codeword C(x)=x r M(x)-R(x) , combining the information bits and the check bits to obtain a 1024-bit encoded data packet; Among them, it is expressed in Galois field as ; c0, c1...c1023 are all Galois field elements; Finally, each coefficient of C(x) is converted into binary to obtain a 1KB data packet.

2. The communication method of a real-time bus with self-interference rejection according to claim 1, characterized in that: The slave station performs corresponding operations after receiving the control instruction, and generates feedback data based on the execution result, including: Decode the data packet by parsing the protocol header, verifying the checksum, and extracting the valid data to extract the original information contained in it; Perform corresponding operations based on the information obtained by decoding; After completing the corresponding operation, the slave generates feedback data that needs to be returned based on its own status and processing results.

3. The communication method of a real-time bus with self-interference rejection according to claim 1, characterized in that: The slave station transmits the feedback data back to the master controller via a real-time bus, and the master controller adjusts the control instructions based on the feedback data, including: The slave station encodes the generated response data into a data packet with a fixed size of 1KB according to the same encoding rules as the master station; The slave station determines whether there is a next slave station to forward or return the data packet; If there is a next slave station, the slave station sends the encoded data packet to the next slave station, and the next slave station repeats the above process of receiving, decoding, processing and forwarding; The master station further adjusts the control instructions based on the returned data packets and starts the next round of control instruction transmission cycle.

4. A real-time bus device capable of resisting interference, used to implement the communication method of the real-time bus capable of resisting interference according to any one of claims 1 to 3, characterized in that: include: A master controller is used to periodically send control instructions to a number of slave stations based on demand, and encode the control instructions into data packets of fixed size; A bus, used to connect the master controller and several slave stations, and the bus is also used to complete parallel communication of control instructions; The slave station is used to receive data packets from the master controller, decode the data packets, obtain control instructions, execute them, and generate feedback data; Among them, both the master controller and the slave station can encode and decode data packets.

Citation Information

Patent Citations

  • Bus type distributed control system master-salve station opposite terminal control method

    CN101232425A