Underground coal mine RS485 two-parameter self-adaptive method

By employing a dual-parameter adaptive method in the RS485 bus communication system of an underground coal mine, and utilizing an improved multi-level peak detection algorithm and digital sequence verification, the problems of cumbersome baud rate configuration and poor equipment compatibility were solved. This enabled fast and accurate matching of baud rate and verification method, improving the system's adaptability and anti-interference capability.

CN121173718APending Publication Date: 2025-12-19TIANDI CHANGZHOU AUTOMATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511270811.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing RS485 bus communication systems in underground coal mines suffer from problems such as cumbersome baud rate configuration, poor equipment compatibility, and insufficient communication flexibility, making it difficult to adapt to the needs of different transmission rates and interference environments.

Method used

A dual-parameter adaptive method for RS485 in coal mines is adopted. The serial port receiving pin of the microcontroller is multiplexed into a timer input capture mode. An improved multi-level peak detection algorithm is used to process the raw pulse width data, calculate the narrowest pulse width and verify the baud rate. Combined with the identification of the parity bit of the digital sequence, adaptive matching of baud rate and parity method is achieved.

Benefits of technology

It achieves fast and accurate baud rate and parity matching, improves the system's adaptability and anti-interference ability, and has an identification accuracy of up to 99.5%, making it suitable for complex underground coal mine environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173718A_ABST
    Figure CN121173718A_ABST
Patent Text Reader

Abstract

The invention discloses a coal mine underground RS485 two-parameter self-adaptive method, which comprises the following steps of: S1, multiplexing a serial port receiving pin of a single chip microcomputer into a timer input capture mode, and capturing original pulse width data of an RS485 bus; s2, processing low-level pulse width data in the original pulse width data through an improved multi-stage peak detection algorithm, and calculating to obtain the narrowest pulse width; s3, calculating the Baud rate according to the narrowest pulse width, and verifying the effectiveness of the Baud rate; s4, converting the original pulse width data into a digital sequence, and locking a correct check mode based on check bit identification of the digital sequence; and S5, performing data validity verification on the application layer, if the verification is passed, ending the two-parameter self-adaption, and if the verification is not passed, returning to the step S1. According to the coal mine underground RS485 two-parameter self-adaption method, two-parameter self-adaption matching is carried out from the Baud rate and the verification mode of the equipment, and the method has the advantages of being high in matching speed, high in precision, high in interference resistance, good in adaptability and high in practicability.
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, and in particular to a coal mine underground RS485 double-parameter adaptive method. BACKGROUND

[0002] In coal mines, safety monitoring and accurate positioning are crucial for personnel safety and production efficiency. Traditional coal mine communication systems usually use wired communication, and bus communication based on RS485 interface is a common solution. RS485 bus communication has the advantages of long-distance transmission, strong anti-interference ability, low cost, support for one master and multiple slave nodes, flexible field wiring, etc., but also has the following defects:

[0003] 1. Complicated baud rate configuration: Existing RS485 bus communication systems usually require pre-configuration of baud rate for master and slave devices, which increases the complexity of field installation and debugging, and once the configuration is completed, the baud rate cannot be changed at will, limiting the flexibility of the system and making it difficult to adapt to different transmission rates and interference environments.

[0004] 2. Poor device compatibility: Since different devices may support different baud rates, it is difficult to support multiple devices on a bus, which is not conducive to system integration and expansion, limiting the diversity of system functions.

[0005] 3. Poor communication flexibility: RS485 can transmit long distances, but the transmission distance is inversely proportional to the transmission rate. To ensure real-time transmission, the higher the transmission rate, the better. The baud rate and parity of the RS485 master can be flexibly configured by the upper system or device, and the slave device needs to be flexibly matched.

[0006] The existing technology belongs to the existing baud rate option switching matching method, and does not involve matching of parity parameters. The existing method has the disadvantages of slow matching speed, slow access speed, and incomplete matching parameters. SUMMARY

[0007] The technical problem to be solved by the present application is to solve the technical problems of slow matching speed and incomplete parameters in the prior art. The present application provides a coal mine underground RS485 double-parameter adaptive method, which adaptively matches the baud rate and parity of the slave device, has the advantages of fast matching speed, high precision, strong anti-interference ability, good adaptability, and strong practicality.

[0008] The technical scheme adopted by the present application to solve its technical problems is: a coal mine underground RS485 double-parameter self-adaptive method, comprising the following steps: S1. The serial port receiving pin of a single-chip microcomputer is multiplexed into a timer input capture mode to capture original pulse width data of an RS485 bus; S2. Low-level pulse width data in the original pulse width data is processed by an improved multi-stage peak value detection algorithm, and the narrowest pulse width is calculated; S3. The baud rate is calculated according to the narrowest pulse width, and the validity of the baud rate is verified; S4. The original pulse width data is converted into a digital sequence, and the correct check mode is locked based on check bit identification of the digital sequence; S5. Data validity check of the application layer is performed, and if the check passes, the double-parameter self-adaptation is ended, and if the check does not pass, step S1 is returned.

[0009] The coal mine underground RS485 double-parameter self-adaptive method of the present application uses a timer input capture method to listen to RS485 bus signals, applies an improved multi-stage peak value detection algorithm to process low-level pulse width data to calculate the narrowest pulse width, actively calculates the baud rate to match common standard baud rates, and after the baud rate is matched, the original pulse width data is converted into a digital sequence to identify the check mode, thereby realizing double-parameter self-adaptive matching of the baud rate and the check mode of the RS485 slave device, and having the advantages of fast matching speed, high precision, strong anti-interference, good adaptability, strong practicality and the like.

[0010] Further, the step S2 comprises the following steps:

[0011] S21. Calculate the pulse width values of each high and low level of the serial port signal waveform to obtain pulse width count values and corresponding level attribute sequences;

[0012] S22. Extract all low-level pulse width values and sort them in ascending order, then calculate the ratio of adjacent data, dynamically group according to the pulse width ratio, regard the group with too few data in the group as an invalid group, delete it, remove outliers, then calculate the data mean of each group, calculate the difference Δμ of adjacent groups, take min(Δμ) as the bit time reference, and obtain the narrowest pulse count value T min .

[0013] Further, the step S21 specifically comprises: calculating the pulse width values of each high and low level of the serial port signal waveform, subtracting the previous value from the current value of the captured value of the data record array, i.e. n -C n-1 obtaining the pulse width value P n , obtaining the high and low level attribute L n of the pulse width through the current corresponding capture mode: capturing low level logic 0 at rising edge, capturing high level logic 1 at rising edge; obtaining the pulse width count value and the corresponding level attribute sequence [(P1, L1),..., (P n , L n )], wherein Ln represents the level in the time interval [E n-1 , E n ].

[0014] Further, the step S3 includes the following steps: min wherein f is the capture frequency of the timer, and determining whether the baud rate is within a range of commonly used standard baud rates: K min *Bd < Baud < K max *Bd, and calculating a pulse width count value T corresponding to 1 bit time based on the standard baud rate.

[0015] Further, the step S4 includes the following steps:

[0016] S41. converting the original pulse width data into a digital sequence, and defining six symbols to represent different pulse width characteristics;

[0017] S42. searching for a frame in the digital sequence: starting from any position of the digital sequence, verifying the correct frame start position through the check bit and stop bit verification;

[0018] S43. determining the check mode: determining the start offset of three frames, the check mode, and the success number accumulation, and locking the frame mode with the most success number as the correct check mode.

[0019] Further, the step S41 includes:

[0020] S411. for a pulse width P, calculating the corresponding standard bit number: n = round(P / T);

[0021] S412. if |P-n*T| is less than a tolerance threshold, converting it into n consecutive same levels;

[0022] S413. if |P-n*T| is greater than the tolerance threshold, performing abnormal processing.

[0023] Further, in the S413, if n≥1 and P>n*T, merging the redundant part into the previous bit or the next bit, or directly marking it as abnormal, and then repairing it.

[0024] Further, the step S42 includes:

[0025] S421. scanning the digital sequence to find a start bit candidate;

[0026] S422. starting from the position, scanning respectively with taking 10 bits as a frame and two kinds of 11 bits as a frame, and trying frame analysis;

[0027] S423. Check if the stop bit is 1, if not, discard, continue step S421, if yes, go to step S424;

[0028] S424. Extract data bits, try three kinds of check methods, if one of them is passed, record the corresponding check method of the offset position as a success, check which offset position has the most success times and the check method is consistent.

[0029] Further, the step S424 calculates the number of 1s in the data bits, and tries three kinds of check methods:

[0030] No check: consider the check bit invalid, do not check;

[0031] Odd check: the number of 1s in the data bits and the check bits is odd;

[0032] Even check: the number of 1s in the data bits and the check bits is even.

[0033] Further, the three kinds of frames in the step S41 are data frames extracted according to no check, odd check and even check respectively.

[0034] Compared with the prior art, the beneficial effects of the present application are:

[0035] 1. The coal mine RS485 double parameter adaptive method of the present application solves the double parameter matching problem through capture-detection-matching-conversion-recognition, improves precision, has strong anti-interference, good adaptability, high resource efficiency, is particularly suitable for the scene of continuous 0 data bits (long low level) in coal mine, and the narrowest effective pulse width is obtained by calculation, does not depend on the existence of the narrowest pulse width, and the influence of long pulse width on measurement is effectively eliminated through difference analysis, and the actual measurement recognition accuracy can reach more than 99.5%. BRIEF DESCRIPTION OF DRAWINGS

[0036] The present application will be further described below in combination with the drawings and examples.

[0037] Figure 1 It is a flowchart of the coal mine RS485 double parameter adaptive method of the present application;

[0038] Figure 2 It is a schematic diagram of a data frame;

[0039] Figure 3 It is a flowchart of the narrowest pulse count;

[0040] Figure 4 It is a flowchart of the coal mine RS485 adaptive baud rate communication method;

[0041] Figure 5 It is a structure schematic of the RS485 bus communication listening connection mode;

[0042] Figure 6 Serial port asynchronous communication parameters for the schematic diagram. DETAILED DESCRIPTION

[0043] The application will now be described further to with reference to the drawings. These drawings show only the essential features of the application and are not to scale. They show, in cross-section, the essential features of an embodiment of the application.

[0044] In the description of the present application, it needs to be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application. In addition, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0045] In the description of the present application, it needs to be understood that, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0046] In the personnel positioning system in the coal mine, the positioning card reader can be applied in roadway positioning, vehicle positioning and other different occasions, and different baud rates and check bits need to be selected according to different positioning areas and equipment types to ensure the real-time and reliability of data. Different baud rates are used in different occasions, which makes it difficult for the card reader to be applied in different occasions. Therefore, a new coal mine RS485 double parameter adaptive method needs to be provided.

[0047] As shown in Figure 1 A coal mine RS485 double parameter adaptive method, comprising the following steps:

[0048] Signal input capture: through the transceiver control pin R / D control RS485 controller for receiving mode, the serial port of the single-chip microcomputer receives the pin Rxd multiplexing as a timer input capture mode, the timer capture parameters as follows:

[0049]

[0050] Interrupt mode processing capture event, read the channel capture value and capture mode and record one by one, when the capture process timeout or the number of recorded data reaches the capture data depth, exit the capture process into the data processing process.

[0051] Data preprocessing: calculate the pulse width value of each high and low level of serial signal waveform, subtract the previous value from the current value of the capture value of the data record array, that is, C n -C n-1 Obtain the pulse width value P n , get the pulse width high and low level attribute L n through the current corresponding capture mode: rising edge capture low level logic 0, rising edge capture high level logic 1; get a series of pulse width count value and corresponding level attribute sequence [(P n , L n )], wherein L n represents the level in the time interval [E n-1 , E n ].

[0052] Baud rate calculation: as Figure 2 , the start bit (logic 0) in RS485 frame is always low, and the stop bit and idle bit (logic 1) are always high, so set T as the pulse width count value corresponding to 1 bit time, then the narrowest low level pulse width is 1T, and the widest is 10T (start bit + 8 data bit + check bit all logic 0). Using the discrete characteristics (1T, 2T,..., 10T) of RS485 pulse width distribution, the minimum unit pulse width count value T min is calculated by improved multi-stage peak detection method. As Figure 3 , the algorithm is as follows: extract all low level pulse width values and sort them in ascending order, remove a certain proportion of maximum and minimum values first, filter out the interference signals with extremely narrow and wide; then calculate the ratio of adjacent data, if the ratio is close to 1, place them in the same group, otherwise, put them into a new group until the calculation is completed; then delete the groups with too few data in the group as invalid groups, remove outliers; then calculate the data mean value of each group; finally, calculate the difference Δμ of adjacent groups, take min(Δμ) as the bit time reference, and get the narrowest pulse count value T min .

[0053] Baud rate calculation formula: Baud = f / T minwhere f is the capture frequency of the timer.

[0054] Baud rate validity verification: judge whether the baud rate is in the range of common standard baud rates (1200\2400\4800\9600\19200\38400\57600\115200bps, etc.): K min *Bd < Baud < K max *Bd, K : Calibration coefficient (downhole environment calibration value range 0.92-1.05), meet the required calibration range, calculate the pulse width count value T corresponding to 1 bit time based on the standard baud rate, used for subsequent test mode identification.

[0055] Verification mode identification: based on a series of pulse width count values and corresponding level attribute sequences [(P1, L1),...(P n , L n )] and the pulse width count value T corresponding to 1 bit time.

[0056] Original pulse width data is converted into a digital sequence, six symbols are defined to represent different pulse width characteristics, for particularly long pulse width (more than 10T), special values (such as 2 for long high level, 3 for long low level) are used according to the rules, context-related merging is performed for marker 4, and dynamic segmentation is performed for marker 5, as shown in the following table:

[0057]

[0058]

[0059] For pulse width P, calculate the corresponding standard bit number: n = round(P / T); for n>10: if the level is high, output special marker 2 (long high level); if the level is low, output special marker 3 (long low level).

[0060] If |P-n*T| is less than the tolerance threshold, it is converted into continuous n same level;

[0061] If |P-n*T| is greater than the tolerance threshold, abnormal processing is performed. If n≥1 and P>n*T, the excess part is merged into the previous bit (the level of the previous and next bits is the same) or the next bit (the level of the previous and next bits is different), or directly marked as abnormal, and then repaired.

[0062] Find the frame in the digital sequence:

[0063] Frame structure: each frame consists of 10-11 bits: 1 start bit (0), 8 data bits (LSB first), 1 parity bit (optional), 1 stop bit (1).

[0064] Due to the continuous transmission, the stop bit of one frame is followed by the start bit (0) of the next frame, so there is no interval between frames in the digital sequence. Therefore, it is possible to start trying to parse from any position of the sequence, through the specific steps of verification to determine the correct frame start position.

[0065] The specific steps are as follows:

[0066] a. Scan the digital sequence for 0 (start bit candidate).

[0067] b. Start scanning from this position, respectively taking 10 bits as a frame (0th bit: start bit, 1st-8th bits: data, 9th bit: check bit, 9th bit: stop bit) and two kinds of 11 bits as a frame (0th bit: start bit, 1st-8th bits: data, 9th bit: parity check bit, 10th bit: stop bit) to try frame parsing;

[0068] c. Check if the stop bit is 1, if not, discard and continue step a;

[0069] d. Extract the data bits: bits[1..8] Calculate the number of 1s in the data bits, try three kinds of checks:

[0070] No check: consider the check bit invalid (not checked);

[0071] Odd parity: the number of 1s in the data bits + check bits is odd;

[0072] Even parity: the number of 1s in the data bits + check bits is even;

[0073] If one of the checks passes, record the offset position corresponding to the check that succeeds once.

[0074] After scanning a long enough sequence (such as 100 bits), check which offset position has the most successes and the same check. Once the offset position and the check are determined, they can be used for subsequent parsing.

[0075] Check method determination: The start offset, check method and success number of the three kinds of frames (three kinds of frames are data frames extracted according to no check, odd check and even check respectively) are determined, and the frame method with the most success number can be locked as the correct check method.

[0076] Parameter verification: After matching the baud rate and check method, set the parameters of the RS485 port to the matching parameters, enter the RS485 slave mode for normal serial port data reception, and perform application layer data validity check (XOR check, CRC check, etc.) after receiving a complete data frame. If the check passes, the adaptive recognition of the two parameters ends, otherwise a new round of identification process begins.

[0077] In summary, the coal mine RS485 double parameter adaptive method solves the double parameter matching problem through capture-detection-matching-conversion-recognition, significantly reduces the measurement error by using multiple information cross-validation, is not sensitive to uniform interference by difference analysis, automatically processes 1T-10T various pulse width combinations with a calculation complexity of O(n), is suitable for embedded systems, and is particularly suitable for scenarios with continuous 0 data bits (long low level) in coal mines. The narrowest effective pulse width is obtained by calculation and does not depend on the existence of the narrowest pulse width. The influence of long pulse width on measurement is effectively eliminated by difference analysis, and the actual measurement recognition accuracy can reach more than 99.5%.

[0078] As shown in Figure 4 A coal mine RS485 adaptive baud rate communication method. Applied to coal mine RS485 bus-based master-slave communication mode, the substation as the master device can connect card readers, sensors, power supplies, switches and other slave devices through the RS485 bus. The baud rate of the substation can only be configured to switch between supported options, and the baud rate of the substation cannot be set at will. The master-slave devices on the bus will attach the application layer check code of the information to the last information when sending information, which can check the integrity of the information. The slave device with unmatched baud rate will listen to all signals on the bus. As long as the information cannot pass the application layer check, the serial port parameters will be switched to match. Once the information on the bus can pass the application layer check, it means that the baud rate matching is successful and the complete data information is received. According to the method, the coal mine RS485 baud rate adaptation is realized, and the problem of difficult matching of coal mine device RS485 bus baud rate is solved.

[0079] The coal mine RS485 adaptive baud rate communication method is as follows:

[0080] The Rx multiplexer is converted into a timer input capture mode, and matching calculation is performed after a specified time (the matching calculation process is as described above). If the matching is successful, the serial port mode is configured according to the matched baud rate and check bit, and normal transmission and reception processing is performed. If the number of matching failures does not reach a certain number, return to the matching calculation step. If the number of matching failures reaches a certain number, configure the serial port mode according to the default baud rate and check bit, and perform normal transmission and reception processing. If the application layer check fails continuously, perform the range matching calculation step. If the check does not fail continuously, normally receive data.

[0081] As shown in Figure 5As shown, the RS485 interface uses two differential signal lines, A and B, which are connected to the microcontroller's serial port receive pin Rxd and transmit pin Txd via the RS485 receiver. Simultaneously, one GPIO output from the microcontroller controls the RS485 transceiver's transmit / receive control pin R / D. For RS485, receiving and transmitting data cannot occur simultaneously; therefore, it is a half-duplex asynchronous serial communication method based on a serial port.

[0082] like Figure 6 As shown, the parameters that need to be defined for asynchronous serial communication are: start bit, data bits (8 or 9 bits), parity bit (9th bit), stop bits (1, 1.5, 2 bits), and baud rate setting. Serial communication data packets are in frames. The most common single-frame structure is: 1 start bit + 8 data bits + 1 parity bit (optional) + 1 stop bit, representing 1 byte of data. Therefore, for RS485 communication, only the baud rate and parity bit need to be negotiated for normal data transmission and reception.

[0083] The above description is based on the preferred embodiments of the present invention. Through the above description, those skilled in the art can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification, but must be determined by the scope of the claims.

Claims

1. A coal mine underground RS485 double parameter adaptive method, characterized in that, The method comprises the following steps: S1. The serial port receiving pin of the single-chip microcomputer is multiplexed as a timer input capture mode to capture the original pulse width data of the RS485 bus; S2. The low-level pulse width data in the original pulse width data is processed by an improved multi-stage peak value detection algorithm, and the narrowest pulse width is calculated; S3. The baud rate is calculated according to the narrowest pulse width, and the validity of the baud rate is verified; S4. The original pulse width data is converted into a digital sequence, and the correct check mode is locked based on the check bit identification of the digital sequence; S5. The data validity check of the application layer is performed, and if the check passes, the double-parameter self-adaptation is ended, and if the check does not pass, the step S1 is returned.

2. The coal mine underground RS485 double parameter adaptive method according to claim 1, characterized in that, The step S2 comprises the following steps: S21. The pulse width values of each high and low level of the serial port signal waveform are calculated to obtain pulse width count values and corresponding level attribute sequences; S22. Extract all low-level pulse width values and sort in ascending order, then calculate the ratio of adjacent data, dynamically group according to pulse width ratio, and then delete the group with too few data in the group as invalid group, remove outliers, then calculate the data mean of each group, calculate the difference Δμ of adjacent groups, take min(Δμ) as the bit time reference, and get the narrowest pulse count value T min .

3. The coal mine underground RS485 double parameter adaptive method according to claim 2, characterized in that, The step S21 specifically comprises: calculating the pulse width value of each high and low level of the serial port signal waveform, subtracting the previous value from the current value of the capture value of the data record array, i.e. C n -C n-1 Obtaining the pulse width value P n , obtaining the pulse width high and low level attribute L n by the current corresponding capture mode: rising edge capture low level logic 0, rising edge capture high level logic 1; obtaining the pulse width count value and the corresponding level attribute sequence [(P1, L1),..., (P n , L n )], wherein L n represents the level in the time interval [E n-1 , E n ].

4. The coal mine underground RS485 double parameter adaptive method according to claim 3, characterized in that, The baud rate calculation formula in step S3: Baud = f / T min where f is the capture frequency of the timer, and whether the baud rate is within the range of commonly used standard baud rates: K min *Bd < Baud < K max *Bd, the pulse width count value T corresponding to 1 bit time is calculated based on the standard baud rate.

5. The coal mine underground RS485 double parameter adaptive communication method according to claim 4, characterized in that, The step S4 comprises the following steps: S41. The original pulse width data is converted into a digital sequence, and six symbols are defined to represent different pulse width characteristics; S42. The frame is found in the digital sequence: the correct frame starting position is determined by verifying the check bit and the stop bit from any position of the digital sequence; S43. The check mode is determined: the starting offset, the check mode and the success number of three frames are accumulated, and the frame mode with the most success number is locked as the correct check mode.

6. The coal mine underground RS485 double parameter adaptive communication method according to claim 5, characterized in that, The step S41 comprises: S411. For the pulse width P, the corresponding standard bit number n is calculated: n = round (P / T); S412. If |P-n*T| is less than the tolerance threshold, it is converted into continuous n same levels; S413. If |P-n*T| is greater than the tolerance threshold, abnormal processing is performed.

7. The coal mine underground RS485 double parameter adaptive communication method according to claim 6, characterized in that, In the S413, if n≥1 and P>n*T, the redundant part is merged into the previous bit or the next bit, or directly marked as abnormal, and then repaired.

8. The coal mine underground RS485 double parameter adaptive communication method according to claim 5, characterized in that, The step S42 comprises: S421. The digital sequence is scanned to find the starting bit candidate; S422. The frame analysis is attempted by scanning from the position, taking 10 bits as a frame and two kinds of 11 bits as a frame respectively; S423. It is checked whether the stop bit is 1, if not, it is discarded, and the step S421 is continued, if yes, it is entered into the step S424; S424. The data bit is extracted, and three check modes are attempted, if one of the check modes passes, the check mode corresponding to the offset position is recorded once, and it is checked which offset position has the most success number and consistent check mode.

9. The coal mine underground RS485 double parameter adaptive communication method according to claim 8, characterized in that, In the step S424, bits[1..8] calculates the number of 1s in the data bit, and three check modes are attempted: No check: the check bit is considered invalid and is not checked; Odd check: the number of 1s in the data bit and the check bit is odd; Even check: the number of 1s in the data bit and the check bit is even.

10. The coal mine underground RS485 double parameter adaptive communication method according to claim 9, characterized in that, The three frames in the step S41 are the data frames extracted according to no check, odd check and even check respectively.