[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109101362A - Communication correction method, device, readable storage medium and slave - Google Patents

Communication correction method, device, readable storage medium and slave Download PDF

Info

Publication number
CN109101362A
CN109101362A CN201810689776.7A CN201810689776A CN109101362A CN 109101362 A CN109101362 A CN 109101362A CN 201810689776 A CN201810689776 A CN 201810689776A CN 109101362 A CN109101362 A CN 109101362A
Authority
CN
China
Prior art keywords
data
slave
communication
host
reversal connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810689776.7A
Other languages
Chinese (zh)
Inventor
陶巧文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Ruixin Electronics Co ltd
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Ruixin Electronics Co ltd, Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Ruixin Electronics Co ltd
Priority to CN201810689776.7A priority Critical patent/CN109101362A/en
Publication of CN109101362A publication Critical patent/CN109101362A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)

Abstract

A communication correction method, a device, a readable storage medium and a slave computer are provided, the method is applied to the slave computer, the slave computer is connected with a master computer through a 485 communication line, the method comprises the following steps: when communication data sent by the host computer is monitored, acquiring performance data in the slave computer, wherein the performance data is data displayed after the slave computer receives the communication data of the host computer; judging whether the signal lines of the slave machine and the host machine are reversely connected or not according to the verification information of the performance data; if yes, inquiring correction data corresponding to the performance data in a pre-stored data mapping table, and taking the inquired correction data as actual receiving data of the slave, wherein the data mapping table comprises a plurality of reverse connection data and correction data corresponding to each reverse connection data. The invention does not need manual interference and special chips, can realize data correction when the 485 communication line is reversely connected, and has simple mode and low cost.

Description

Communicate bearing calibration, device, readable storage medium storing program for executing and slave
Technical field
The present invention relates to electronic technology field, more particularly to a kind of communication bearing calibration, device, readable storage medium storing program for executing and Slave.
Background technique
485 serial line interfaces are the common interfaces of current communication apparatus, a kind of 485 Differencing communications when communicating, including A communication, B Communication line.However can often occur reversal connection problem when installing communication line, if AB line is reversely connected, it is unable to normal communication.
Existing 485 communication failure usually manually checked, by manually going to exchange AB if AB line is reversed Line, this mode check trouble, and the workload for increasing staff also influences the normal operation of equipment.There are also a kind of sides Formula is to carry out exchanging for AB line by a specific driving chip, and this mode hardware cost is higher.
Summary of the invention
In view of the above situation, it is necessary to be directed to the problems of the prior art, providing one kind can be certainly in the reversal connection of 485 communication lines Dynamic correction and communication bearing calibration, device, readable storage medium storing program for executing and slave at low cost.
A kind of communication bearing calibration is applied in slave, and the slave is connect by 485 communication lines with host, described logical Believe that bearing calibration includes:
When monitoring a communication data of the host transmission, the performance data in the slave, the performance are obtained Data are received the data shown after the communication data of the host by the slave;
Judge whether the signal wire of the slave and the host is reversely connected according to the check information of the performance data;
If so, inquire the corresponding amendment data of the performance data in the data mapping tables prestored, and will inquire Correct practical reception data of the data as the slave, the data mapping tables include multiple reversal connection data and it is each it is described instead Connect the corresponding amendment data of data.
Further, above-mentioned communication bearing calibration, wherein described according to the check information judgement of the performance data The step of whether signal wire of slave and the host is reversely connected include:
The performance data in the preset period in the slave are obtained, and verify the performance number in the period According to whether correct;
If it is not, determining the signal wire reversal connection of the slave and the host.
Further, above-mentioned communication bearing calibration, wherein the whether correct step packet of the verification performance data It includes:
It is whether correct that the performance data are verified according to CRC check method.
Further, above-mentioned communication bearing calibration, wherein described that the performance number is inquired in the data mapping tables prestored Include: according to the step of corresponding amendment data
By multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Character be successively compared, data are reversely connected with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
Further, above-mentioned communication bearing calibration, wherein before the step of the performance data obtained in the slave Further include:
Under conditions of the reversal connection of 485 communication lines of the slave and the host, the multiple logical of the host transmission is received Letter data, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data;
Mapping relations are established using the communication data as amendment data and the reversal connection data, to generate data mapping Table, and store the data mapping tables.
Further, above-mentioned communication bearing calibration, wherein the slave is judged according to the check information of the performance data After the step of whether being reversely connected with the signal wire of the host further include:
When the signal wire for determining the slave and the host is reversely connected, the connection status of the slave is revised as instead State is connect, and controls corresponding status indicator lamp work on the slave.
The embodiment of the invention also provides a kind of communication means for correctings, are applied in slave, and the slave passes through 485 communications Line is connect with host, and the communication means for correcting includes:
First obtains module, for obtaining in the slave when monitoring a communication data of the host transmission Data are showed, the performance data are received the data shown after the communication data of the host by the slave;
Judgment module, for judging the signal wire of the slave and the host according to the check information of the performance data Whether it is reversely connected;
Enquiry module, for inquiring the corresponding amendment data of the performance data in the data mapping tables prestored, and will Practical reception data of the amendment data inquired as the slave, the data mapping tables include multiple reversal connection data and every The corresponding amendment data of a reversal connection data.
Further, above-mentioned communication means for correcting, wherein the judgment module is specifically used for:
The performance data in the preset period in the slave are obtained, and verify the performance number in the period According to whether correct;
If it is not, determining the signal wire reversal connection of the slave and the host.
Further, above-mentioned communication means for correcting, wherein the whether correct step packet of the verification performance data It includes:
It is whether correct that the performance data are verified according to CRC check method.
Further, above-mentioned communication means for correcting, wherein the enquiry module is specifically used for:
By multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Character be successively compared, data are reversely connected with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
Further, above-mentioned communication means for correcting, further includes:
Second obtains module, under conditions of the reversal connection of 485 communication lines of the slave and the host, described in reception Multiple communication datas that host is sent, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data;
Data mapping tables establish module, for reflecting the communication data as amendment data and reversal connection data foundation Relationship is penetrated, to generate a data mapping tables, and stores the data mapping tables.
Further, above-mentioned communication means for correcting, further includes:
Modified module, for when determine the slave and the host signal wire be reversely connected when, by the company of the slave Connecing status modifier is reversal connection state, and controls corresponding status indicator lamp work on the slave.
The embodiment of the invention also provides a kind of readable storage medium storing program for executing, are stored thereon with program, described program is by processor The step of above method is realized when execution.
The embodiment of the invention also provides a kind of slave, including memory, processor and storage are on a memory and can The step of program run on a processor, the processor realizes the above method when executing described program.
In the embodiment of the present invention, when 485 signal wires of slave and host are reversed, slave passes through in inquiry data mapping tables Data are corrected to correct the data received from host, to also can guarantee the positive normal open of host and slave in the case where reversal connection Letter.The present embodiment passes through the correction of 485 communication data of software realization data, and automatic correction procedure is done on slave, Each slave is subject to the data of host hair and is not necessarily to artificial interference, and do not have to special chip, correction side to correct oneself data Formula is simple, and at low cost.
Detailed description of the invention
Fig. 1 is the flow chart of the communication bearing calibration in first embodiment of the invention;
Fig. 2 is the flow chart of the communication bearing calibration in second embodiment of the invention;
Fig. 3 is the structural block diagram of the communication means for correcting in third embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not considered as limiting the invention.
Referring to following description and drawings, it will be clear that these and other aspects of the embodiment of the present invention.In these descriptions In attached drawing, some particular implementations in the embodiment of the present invention are specifically disclosed, to indicate to implement implementation of the invention Some modes of the principle of example, but it is to be understood that the scope of embodiments of the invention is not limited.On the contrary, of the invention Embodiment includes all changes, modification and the equivalent fallen within the scope of the spirit and intension of attached claims.
Referring to Fig. 1, this method is applied to any one slave for the communication bearing calibration in first embodiment of the invention In, which is connect by 485 communication lines with host.The host can be with multiple slaves by 485 communication connections, using host " poll ", the point-to-point communication mode of slave " response ".The communication bearing calibration includes step S11~S13.
Step S11 obtains the performance data in the slave when monitoring a communication data of the host transmission, The performance data are received the data shown after the communication data of the host by the slave.
What host sent data is the TXD pin of single-chip microcontroller, that is to say, that shows data on TXD pin.For example, Data 0x55 is sent, being write as binary system is exactly 0x01010101, successively will embody 1 and 0 with low and high level on TXD pin. And slave receives data, is single-chip microcontroller pin RXD, that is to say, that show data on RXD pin.Receiving data In the process, TXD pin is always maintained at high level, and when TXD is high level, RE pin is low level, just improved at Reception state, then the RO pin (namely connecing the pin of RXD) of 485 chips will react the data that AB is transmitted.
Slave real-time sense bus data obtains slave RXD pin when detecting that host sends communication data to slave The data of upper performance, i.e. performance data.The data that the performance data and host of slave are sent may be identical, it is also possible to different 's.For example, host sends communication data to any one slave in the case where host connects correct situation with A, B communication line of slave When, the performance data of communication data and slave that host is sent be it is identical, slave executes accordingly according to the data that receive Control instruction.And when the connecting line of host and slave is in the case where reversal connection, slave can receive the information of host transmission, but Be showed on slave be mistake communication data, slave can not execute host transmission instruction.
Step S12, according to the check information of the performance data judge the slave and the host signal wire whether Reversal connection, if so, thening follow the steps S13.
In data transmission procedure, receive the accuracy of data to improve reciever as far as possible, recipient receive data it Before need to data carry out error detection, and if only if detection result be it is correct when receive really accept data just now.Detection There are many modes, common are even-odd check, internet verification and cyclic redundancy check etc..Slave receives the logical of host transmission When letter data, the performance data in slave are verified, with judge received data whether mistake, therefore, it is determined that host and from Whether the signal wire of machine is reversely connected.When determining host and slave is reversed, needs the performance data to slave to be corrected, make it It is consistent with the data that host is sent.When slave and host do not have reversed, then slave normally receives the communication data of host transmission.
Step S13 inquires the corresponding amendment data of the performance data in the data mapping tables prestored, and will inquire Practical reception data of the amendment data as the slave, the data mapping tables include multiple reversal connection data and each described It is reversely connected the corresponding amendment data of data.
When host and reversed slave, need to be corrected the received data of slave, when it is implemented, from the number prestored According to amendment data corresponding to the performance data for inquiring slave in mapping table, and using the amendment data inquired as slave reality Received data.The data mapping tables are stored in advance in slave, which includes multiple reversal connections under the conditions of reversal connection The corresponding relationship of data and amendment data.The received data of slave are consistent when the amendment data and normal 485 communications.Slave will be looked into The amendment data ask execute corresponding order as final reception data, and according to the amendment data, to guarantee host With the normal communication of slave.
In the present embodiment, when 485 signal wires of slave and host are reversed, slave in inquiry data mapping tables by correcting Data correct the data received from host, to also can guarantee the normal communication of host and slave in the case where reversal connection. For the present embodiment by the correction of 485 communication data of software realization data, automatic correction procedure is done on slave, respectively from Machine is subject to the data of host hair and is not necessarily to artificial interference, and do not have to special chip to correct oneself data, correcting mode letter It is single and at low cost.
Referring to Fig. 2, for the communication bearing calibration in second embodiment of the invention, including step S21~S27.
Step S21 receives the host and sends under conditions of the reversal connection of 485 communication lines of the slave and the host Multiple communication datas, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data.
Step S22 establishes mapping relations for the communication data as amendment data and the reversal connection data, to generate one Data mapping tables, and store the data mapping tables.
In above-mentioned steps, A, B line of 485 communications of host and slave are reversely connected, start to test.Host sends more to slave A communication data 0X00-0XFF corresponds to a control instruction to slave, each communication data, and user can need to be implemented according to slave All instructions, corresponding communication data is set.Slave receives the data that the data after the reversal connection of A, B line are showed as reversal connection number According to, by the reversal connection data establish with the mapping relations of communication data 0X00-0XFF one by one, generate a data mapping tables, and carry out Storage.
It should be understood that host can send multiple communication datas to each slave respectively when host connects multiple slaves, Instruction performed by different slaves is different, and the communication data that host is sent is also different.Each slave is actually received according to connecing Data and the transmission data of host can establish a data mapping tables.
Step S23 obtains the performance data in the slave when monitoring a communication data of the host transmission.
Slave real-time sense bus data obtains the table in slave when detecting that host sends communication data to slave Existing data.The data that the performance data and host of slave are sent may be identical, it is also possible to be different.For example, host and from A, B communication line of machine connect in correct situation, when host sends communication data to any one slave, the communication number of host transmission Be according to the performance data with slave it is identical, slave executes corresponding control instruction according to the data that receive.And when host and For the connecting line of slave in the case where reversal connection, slave can receive the information of host transmission, and still, what is showed on slave is The communication data of mistake, slave can not execute the instruction of host transmission.
Step S24 obtains the performance data in the preset period in the slave, and verifies the institute in the period State whether performance data are correct data.
Step S25 determines the slave and described when the performance data in the period are not correct data The signal wire of host is reversely connected.
The communication data that host is sent is generally the character string of continuous number composition, and slave is before the data of receiving host The communication data that will be sent to host verifies, if the performance data that slave obtains whithin a period of time are after verifying Mistake, illustrate that 485 communication lines of the slave and host are reversed.
In the present embodiment, verified using CRC (Cyclic Redundancy Check, cyclic redundancy check) method of calibration Whether the data in slave are correct.CRC check is mainly used to the mistake for detecting or verifying data transmission or be likely to occur after saving Accidentally.The method of calibration is characterized in that the length of information field and check field can be arbitrarily selected, and therefore, slave can be to a timing Interior data are continuously verified.Preset time period in above-mentioned steps can be configured according to the actual situation, such as can be set It is set to 30s, i.e. data in acquisition 30s carry out CRC check.If slave receives data, but data check mistake, and in this way Certain time (30S), then judgement is that the AB line of 485 communications is reversed.
Step S26 inquires the corresponding amendment data of the performance data in the data mapping tables prestored, and will inquire Practical reception data of the amendment data as the slave.
The received data of slave are a string of longer character strings in many cases, generally comprise start bit, data bit, effect Position and stop position.If the character in each character and data mapping tables in the performance data in slave is carried out one by one Match, if searching same reversal connection data in table, it will increase the operand of slave.And in actual conditions, host The character of its preceding numerical digit of different two communication data of transmission has shown difference, therefore only needs more former characters The specific reversal connection data in data mapping tables can be navigated to.Therefore, it in the present embodiment, is inquired in the data mapping tables prestored The step of performance data in slave corresponding amendment data includes:
By multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Character be successively compared, data are reversely connected with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
Wherein, the character of preset quantity can be configured according to the actual situation, such as in the present embodiment, may compare first 3 Character carries out the front three character of each reversal connection data in the front three and data mapping tables of the performance data in slave Compare, data is reversely connected to find same target, so that it is determined that the corresponding amendment data of the data.
Further, it is further comprised the steps of: later as a kind of enforceable mode above-mentioned steps S25
The connection status of the slave is revised as reversal connection state by step S27, and controls corresponding state on the slave Indicator light work.
In above-mentioned steps, when the communication line for determining host and slave is reversely connected, the connection status of slave is revised as instead State is connect, when it is implemented, can be operated by marker bit, is just being connect status indication " 1 ", is reversely connected status indication " 0 ".And according to Connection status controls corresponding status indicator lamp work, in order to which staff understands the connection status of the slave.
It is illustrated below with a specific embodiment:
In heat pump project, mainboard passes through 485 bus communications as slave, mainboard and display board as host, display board. When mainboard and display board AB are first reversely connected, mainboard sends multiple 0X00-0XFF data to display board, and display board is received and recorded aobvious Show the data that plate is showed, to establish an one-to-one mapping table TAB.
In actual engineering, the display board moment monitors 485 bus datas.Display board obtains the data that mainboard is sent, and goes forward side by side Row verification;When the display data for verifying display board in 30S are the data of mistake, it is determined that A, B line are reversely connected.At this point, Display board enables correction program, is gone to search corresponding amendment data in data mapping tables with the data received, to obtain just True data.
Referring to Fig. 3, being applied in slave for the communication means for correcting in third embodiment of the invention, the slave is logical It crosses 485 communication lines to connect with host, which includes:
First obtains module 100, for obtaining in the slave when monitoring a communication data of the host transmission Performance data, the performance data receive the data shown after the communication data of the host by the slave;
Judgment module 200, for judging the letter of the slave and the host according to the check information of the performance data Whether number line is reversely connected;
Enquiry module 300, for inquiring the corresponding amendment data of the performance data in the data mapping tables prestored, and Using the amendment data inquired as the practical reception data of the slave, the data mapping tables include multiple reversal connection data and The corresponding amendment data of each reversal connection data.
Further, above-mentioned communication means for correcting, wherein the judgment module 200 is specifically used for:
The performance data in the preset period in the slave are obtained, and verify the performance number in the period According to whether correct;
If it is not, determining the signal wire reversal connection of the slave and the host.
Further, above-mentioned communication means for correcting, wherein the whether correct step packet of the verification performance data It includes:
It is whether correct that the performance data are verified according to CRC check method.
Further, above-mentioned communication means for correcting, wherein the enquiry module 300 is specifically used for:
By multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Character be successively compared, data are reversely connected with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
Further, above-mentioned communication means for correcting, further includes:
Second obtains module 400, for receiving under conditions of the reversal connection of 485 communication lines of the slave and the host Multiple communication datas that the host is sent, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data;
Data mapping tables establish module, for reflecting the communication data as amendment data and reversal connection data foundation Relationship is penetrated, to generate a data mapping tables, and stores the data mapping tables.
Further, above-mentioned communication means for correcting, further includes:
Modified module 500, for when determine the slave and the host signal wire be reversely connected when, by the slave Connection status is revised as reversal connection state, and controls corresponding status indicator lamp work on the slave.
The technical effect and preceding method of means for correcting, realization principle and generation are communicated provided by the embodiment of the present invention Embodiment is identical, and to briefly describe, Installation practice part does not refer to place, can refer in corresponding in preceding method embodiment Hold.
The present invention also proposes a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is executed by processor Shi Shixian above-mentioned communication bearing calibration.
This is the embodiment of the invention also provides a kind of slave, including memory, processor and storage are on a memory simultaneously The step of computer program that can be run on a processor, the processor realizes the above method when executing described program.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.
The more specific example (non-exhaustive list) of computer-readable medium include the following: there are one or more wirings Electrical connection section (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (14)

1. a kind of communication bearing calibration is applied in slave, the slave is connect by 485 communication lines with host, and feature exists In the communication bearing calibration includes:
When monitoring a communication data of the host transmission, the performance data in the slave, the performance data are obtained The data shown after the communication data of the host are received by the slave;
Judge whether the signal wire of the slave and the host is reversely connected according to the check information of the performance data;
If so, inquiring the corresponding amendment data of the performance data in the data mapping tables prestored, and the amendment that will be inquired Practical reception data of the data as the slave, the data mapping tables include multiple reversal connection data and each reversal connection number According to corresponding amendment data.
2. communication bearing calibration as described in claim 1, which is characterized in that the check information according to the performance data Judge that the step of whether signal wire of the slave and the host is reversely connected includes:
The performance data in the preset period in the slave are obtained, and verify the performance data in the period to be It is no correct;
If it is not, determining the signal wire reversal connection of the slave and the host.
3. communication bearing calibration as claimed in claim 2, which is characterized in that whether the verification performance data are correct Step includes:
It is whether correct that the performance data are verified according to CRC check method.
4. communication bearing calibration as described in claim 1, which is characterized in that described to inquire institute in the data mapping tables prestored The step of stating performance data corresponding amendment data include:
By the word of multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Symbol is successively compared, and is reversely connected data with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
5. communication bearing calibration as described in claim 1, which is characterized in that described to obtain performance data in the slave Before step further include:
Under conditions of the reversal connection of 485 communication lines of the slave and the host, multiple communication numbers that the host is sent are received According to, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data;
Mapping relations are established using the communication data as amendment data and the reversal connection data, to generate a data mapping tables, And store the data mapping tables.
6. communication bearing calibration as described in claim 1, which is characterized in that judged according to the check information of the performance data After the step of whether signal wire of the slave and the host is reversely connected further include:
When the signal wire for determining the slave and the host is reversely connected, the connection status of the slave is revised as reversal connection shape State, and control corresponding status indicator lamp work on the slave.
7. a kind of communication means for correcting is applied in slave, the slave is connect by 485 communication lines with host, and feature exists In the communication means for correcting includes:
First obtains module, for obtaining the performance in the slave when monitoring a communication data of the host transmission Data, the performance data are received the data shown after the communication data of the host by the slave;
Judgment module, for judged according to the check information of the performance data slave and the host signal wire whether Reversal connection;
Enquiry module, for inquiring the corresponding amendment data of the performance data in the data mapping tables prestored, and will inquiry Practical reception data of the amendment data arrived as the slave, the data mapping tables include multiple reversal connection data and each institute State the corresponding amendment data of reversal connection data.
8. communication means for correcting as claimed in claim 7, which is characterized in that the judgment module is specifically used for:
The performance data in the preset period in the slave are obtained, and verify the performance data in the period to be It is no correct;
If it is not, determining the signal wire reversal connection of the slave and the host.
9. communication means for correcting as claimed in claim 7, which is characterized in that whether the verification performance data are correct Step includes:
It is whether correct that the performance data are verified according to CRC check method.
10. communication means for correcting as claimed in claim 7, which is characterized in that the enquiry module is specifically used for:
By the word of multiple reversal connection data in the character and the data mapping tables of preset quantity forward in the performance data Symbol is successively compared, and is reversely connected data with the matched target of determination;
The corresponding amendment data of the target reversal connection data are determined according to the data mapping tables.
11. communication means for correcting as claimed in claim 7, which is characterized in that further include:
Second obtains module, for receiving the host under conditions of reversal connection of 485 communication lines of the slave and the host The multiple communication datas sent, and corresponding performance data in the slave are obtained, to obtain multiple reversal connection data;
Data mapping tables establish module, close for the communication data to be established mapping as amendment data and the reversal connection data System, to generate a data mapping tables, and stores the data mapping tables.
12. communication means for correcting as claimed in claim 7, which is characterized in that further include:
Modified module, for when determine the slave and the host signal wire be reversely connected when, by the connection shape of the slave State is revised as reversal connection state, and controls corresponding status indicator lamp work on the slave.
13. a kind of readable storage medium storing program for executing, is stored thereon with program, which is characterized in that realization when described program is executed by processor Method as described in claim 1-6 is any.
14. a kind of slave including memory, processor and stores the program that can be run on a memory and on a processor, It is characterized in that, the processor realizes method as claimed in any one of claims 1 to 6 when executing described program.
CN201810689776.7A 2018-06-28 2018-06-28 Communication correction method, device, readable storage medium and slave Pending CN109101362A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810689776.7A CN109101362A (en) 2018-06-28 2018-06-28 Communication correction method, device, readable storage medium and slave

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810689776.7A CN109101362A (en) 2018-06-28 2018-06-28 Communication correction method, device, readable storage medium and slave

Publications (1)

Publication Number Publication Date
CN109101362A true CN109101362A (en) 2018-12-28

Family

ID=64845405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810689776.7A Pending CN109101362A (en) 2018-06-28 2018-06-28 Communication correction method, device, readable storage medium and slave

Country Status (1)

Country Link
CN (1) CN109101362A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271202A (en) * 2023-11-23 2023-12-22 中国西安卫星测控中心 Optimal extraction method for multi-pass retransmission data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102062820A (en) * 2010-12-03 2011-05-18 深圳市科陆电子科技股份有限公司 Method for automatically correcting wiring error when measuring three-phase alternating current
CN102394734A (en) * 2011-07-29 2012-03-28 四川长虹电器股份有限公司 RS 485 communication system with nonpolarized connection and control method thereof
CN103019873A (en) * 2012-12-03 2013-04-03 华为技术有限公司 Replacing method and device for storage fault unit and data storage system
CN103323737A (en) * 2013-06-13 2013-09-25 国家电网公司 RS-485 interface polarity detecting method and system based on electric energy meter communication protocol
CN104090511A (en) * 2014-06-30 2014-10-08 上海贝岭股份有限公司 Circuit and method for achieving non-polar 485 communication
US20140365832A1 (en) * 2013-06-11 2014-12-11 James Neeb Techniques and configurations for communication between devices
CN106991066A (en) * 2017-02-27 2017-07-28 北京博纳电气股份有限公司 Intelligent electric energy meter and its communication AB polarity adaptive communications methods of RS 485
CN107193697A (en) * 2017-05-05 2017-09-22 西安电子工程研究所 A kind of method for realizing the nonpolarity connections of RS485

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102062820A (en) * 2010-12-03 2011-05-18 深圳市科陆电子科技股份有限公司 Method for automatically correcting wiring error when measuring three-phase alternating current
CN102394734A (en) * 2011-07-29 2012-03-28 四川长虹电器股份有限公司 RS 485 communication system with nonpolarized connection and control method thereof
CN103019873A (en) * 2012-12-03 2013-04-03 华为技术有限公司 Replacing method and device for storage fault unit and data storage system
US20140365832A1 (en) * 2013-06-11 2014-12-11 James Neeb Techniques and configurations for communication between devices
CN103323737A (en) * 2013-06-13 2013-09-25 国家电网公司 RS-485 interface polarity detecting method and system based on electric energy meter communication protocol
CN104090511A (en) * 2014-06-30 2014-10-08 上海贝岭股份有限公司 Circuit and method for achieving non-polar 485 communication
CN106991066A (en) * 2017-02-27 2017-07-28 北京博纳电气股份有限公司 Intelligent electric energy meter and its communication AB polarity adaptive communications methods of RS 485
CN107193697A (en) * 2017-05-05 2017-09-22 西安电子工程研究所 A kind of method for realizing the nonpolarity connections of RS485

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡鹏飞: "无极性RS_485芯片的关键技术研究与智能电网中的应用", 《智能电网》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271202A (en) * 2023-11-23 2023-12-22 中国西安卫星测控中心 Optimal extraction method for multi-pass retransmission data
CN117271202B (en) * 2023-11-23 2024-02-09 中国西安卫星测控中心 Optimal extraction method for multi-pass retransmission data

Similar Documents

Publication Publication Date Title
US8660130B2 (en) Transmitting a packet
EP2425238B1 (en) An addressable integrated circuit and method thereof
US8700814B2 (en) Intelligent bus address self-configuration in a multi-module system
US7908407B1 (en) Method, computer-readable storage media, and integrated circuit for providing enclosure management services utilizing multiple interfaces and protocols
CN109558371A (en) Serial connection between Management Controller and microcontroller
CN105261329A (en) Multi-LED display module management method
US9692635B2 (en) Identifying port misconnections on a network device
EP2388960A1 (en) Intelligent bus address self-configuration in a multi-module system
US8793364B1 (en) Remote power controller
US8831903B2 (en) Test apparatus, test method and system
CN105446837B (en) The method, apparatus and system whether detection IIC interface device connects
CN109101362A (en) Communication correction method, device, readable storage medium and slave
CN113630294B (en) Switch modularization detection method and device
EP2398190B1 (en) Field communication system
US6351831B1 (en) Storage network cabling verification system
US7065621B2 (en) System and method for implementing a hidden address in a communication module
CN115914327B (en) Control method, device, equipment and storage medium
CN108228520B (en) BMC-oriented I2C controller fast transmission method
CN212411180U (en) Credible starting printer and printing system
CN111083015B (en) Board card testing method and device
CN107203246A (en) A kind of board and a kind of board attachment means
US20090187891A1 (en) Verification of input/output hardware configuration
CN106993241A (en) A kind of master control borad, fan frame and the network equipment
CN210573754U (en) IIC bus test module
CN105956251A (en) Design method and device of I2C (Inter-Integrated Circuit) bus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200313

Address after: 510530 Guangdong city of Guangzhou province YUNPU Whampoa district four Road No. 6

Applicant after: Guangzhou Shiyuan Electronic Technology Company Limited

Address before: 510530 Guangdong city of Guangzhou province YUNPU Whampoa district four Road No. 6

Applicant before: Guangzhou Shiyuan Electronic Technology Company Limited

Applicant before: GUANGZHOU RUIXIN ELECTRONICS Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20181228

RJ01 Rejection of invention patent application after publication