CN111245694B - Fault processing method based on Modbus extended communication - Google Patents

Fault processing method based on Modbus extended communication Download PDF

Info

Publication number
CN111245694B
CN111245694B CN201910876441.0A CN201910876441A CN111245694B CN 111245694 B CN111245694 B CN 111245694B CN 201910876441 A CN201910876441 A CN 201910876441A CN 111245694 B CN111245694 B CN 111245694B
Authority
CN
China
Prior art keywords
data
slave station
modbus
master station
station
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.)
Active
Application number
CN201910876441.0A
Other languages
Chinese (zh)
Other versions
CN111245694A (en
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.)
Zhejiang Chitic King Drive Control Tech Co ltd
Original Assignee
Zhejiang Chitic King Drive Control Tech 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 Zhejiang Chitic King Drive Control Tech Co ltd filed Critical Zhejiang Chitic King Drive Control Tech Co ltd
Priority to CN201910876441.0A priority Critical patent/CN111245694B/en
Publication of CN111245694A publication Critical patent/CN111245694A/en
Application granted granted Critical
Publication of CN111245694B publication Critical patent/CN111245694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40228Modbus

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses a fault processing method based on Modbus extended communication, wherein a master station, a slave station for controlling the textile machine to carry out textile, an encoder for reading a textile execution angle and a counter for reading the number of weft threads which are finished during the textile process are arranged on the textile machine, the master station and the slave station are connected through a Modbus data bus, the fault processing method is characterized in that the master station and the slave station carry out data transmission through the Modbus data bus, after communication abnormity or slave station data abnormity is read during the communication process, internal checking is carried out, normal communication is carried out after the checking, fault signals are transmitted to the outside or the current execution state is collected for troubleshooting when the checking fails, a Modbus extended communication mode is entered when the data transmission speed needs to be accelerated, and a physical layer supported by the Modbus extended communication mode is the same as the Modbus standard communication. The invention provides a Modbus-based extended communication method which does not need a large amount of time for frequently checking data.

Description

Fault processing method based on Modbus extended communication
Technical Field
The invention relates to the technical field of communication, in particular to a fault processing method based on Modbus extended communication.
Background
At present, in the textile industry, a master station and a slave station are communicated in a data bus mode, the master station and the slave station are common setting methods, due to the fact that pattern data are large, a large amount of time needs to be consumed in the transmission process, in order to guarantee the accuracy of the pattern data of the slave station when abnormal fault reporting occurs, the pattern data of the slave station needs to be checked, and when debugging or interlocking fault occurs, the working time can be greatly delayed, and the working efficiency is reduced.
The invention provides a data flow abnormity analysis method facing a Modbus protocol, which is invented and created by Chinese patent publication No. CN106209843A, 2016, month 07 and 12, and comprises the following steps: the method comprises the following steps: in the initialization stage, a Modbus protocol data flow abnormity analysis model is generated; step two: in the initialization stage, a self-learning normal behavior model of a Modbus protocol is generated; step three: in the operation stage, judging the operation state of Modbus protocol data flow; step four: in the operation stage, judging the normal/abnormal behavior state of the Modbus protocol data message; step five: and visually presenting the results in the third step and the fourth step. The abnormity analysis method of the application is time-consuming, the spinning speed is important for the textile industry, the time is delayed on abnormity processing, and the spinning speed is undoubtedly reduced.
Disclosure of Invention
The invention provides a fault processing method based on Modbus extended communication, which aims to overcome the problem that a large amount of time is needed for frequently checking data in the prior art and does not need a large amount of time for frequently checking data.
In order to achieve the purpose, the invention adopts the following technical scheme:
the technical scheme adopted by the invention for solving the technical problems is as follows: a fault processing method based on Modbus extended communication is characterized in that a master station is arranged on a textile machine, a slave station for controlling the textile machine to carry out textile, an encoder for reading an execution angle of a textile process and a counter for reading the number of weft yarns which are woven in the textile process, the master station is connected with the slave station through a Modbus data bus, the master station and the slave station carry out data transmission through the Modbus data bus, after communication abnormity or slave station data abnormity is read in the communication process, internal checking is advanced, normal communication is carried out through the checking, fault signals are transmitted to the outside or the current execution state is acquired and fault removal is carried out when the checking fails, a Modbus extended communication mode is entered when the data transmission speed needs to be accelerated, and a physical layer supported by the Modbus extended communication mode and a physical layer which is the same as the Modbus standard communication. Upon reading a fault signal, it cannot be fully determined that the fault will not cause communication obstruction or data corruption from the station, such as reading an abnormal signal of voltage or current, such an abnormality may cause a part of the equipment to be damaged, thereby causing communication failure or data damage of the slave station, and the result can not be accurately judged, so that when the abnormal signal is detected, the communication path is checked to check whether the communication path is smooth or not, at the same time, the data of the slave station is checked to confirm whether the slave station data receives interference, when the slave station data is confirmed, because the slave station data is large, a lot of time is needed for transmission in the Modbus standard communication mode, at this moment, a Modbus extended communication mode is used, a large amount of data can be transmitted at one time in the Modbus extended communication mode, and the transmission speed is greatly improved.
Preferably, the reading process of the communication abnormality includes the following steps:
s1: setting a time threshold;
s2: the master station and the slave station carry out connection confirmation operation, the next step is started after confirmation, and otherwise, a fault is reported;
s3: selecting to enter an extended communication mode or a standard communication mode according to the capacity of the check data to be transmitted;
s4: if the master station receives the response of the received data of the slave station within the time threshold, the internal check is passed, otherwise, the internal check is not passed, and the current communication mode is exited and the next step is started;
s5: the master station and the slave station carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
s6: selecting the communication mode not selected in step S3 to transmit the verification data;
s7: if the time threshold value is within, the master station receives the response of the received data of the slave station, the internal check is passed, otherwise, the internal check is not passed and the fault is reported, and the current communication mode is exited. The method comprises the steps of checking abnormity, checking whether a communication path is smooth, checking data of a slave station only after the communication path is smooth, firstly confirming that a master station and the slave station are connected, confirming that the data can be transmitted, then sending check data, checking whether abnormity occurs in the transmission of the master station and the receiving of the slave station in the communication process, continuing working if the check is passed, and changing a communication mode if the check is not passed, so that the check caused by the communication mode can be eliminated.
Preferably, the process of step S3 is:
s31: setting a data capacity threshold;
s31: and if the volume of the check data to be transmitted exceeds the data volume threshold, selecting to transmit the check data by using an extended communication mode, and if the volume of the data to be transmitted does not exceed the data volume threshold, selecting to transmit the check data by using a standard communication mode. According to different specific conditions, the capacity of the check data is large sometimes, and a large amount of time is consumed when the large check data is transmitted by using a standard communication mode, so that the size of the data is judged before transmission, and if the data is large, the data is transmitted by using an extended communication mode, the transmission speed can be increased, and the check can be completed quickly.
Preferably, the slave station data exception reading process includes the following steps:
l1: after the master station receives any fault information reported by the slave station, starting the next step;
l2: the slave station transmits the working data to the master station for data verification, if the data verification is passed, the master station transmits a continuous working signal to the slave station, the slave station continues working after receiving the continuous working signal, and if the data verification is not passed, the next step is started;
l3: reading the current execution state of the working data from the slave station;
l4: the master station and the slave station carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
l5: the master station selects an extended communication mode to send new working data to the slave station, and exits the extended communication mode after the sending is finished;
l6: and the slave station continues to work from the current execution state according to the new working data. The working data of the slave station is checked to avoid the slave station executing damaged data, an extended communication mode is adopted because the data in the slave station is large, the checking speed is accelerated, too much working time is not occupied, if the checking fails, the working data in the slave station needs to be updated, but the slave station needs to continuously execute the data, the current execution state needs to be acquired, the slave station continues to work from the current execution state according to new working data, the progress stored by the master station or the slave station cannot be adopted, the progress is inaccurate in some cases, for example, under the condition of sudden power failure, the current execution state data in the master station or the slave station is not updated, and therefore the current execution state data in the master station or the slave station is not accurate.
Preferably, the process of step L2 is:
l21: the master station and the slave station carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
l22: the slave station selects an extended communication mode to send working data to the master station, and exits the extended communication mode after the working data are sent;
l23: and the master station compares the data transmitted by the slave station with the data of the master station, if the data are completely consistent, the check is passed, the master station transmits a continuous working signal to the slave station, and otherwise, the check is not passed. The working data stored by the master station is accurate, so that when the working data of the slave station is checked, the working data in the slave station is transmitted to the master station, the master station compares the working data transmitted by the slave station with the working data stored by the master station, whether the working data in the slave station changes or not can be known, and if the working data in the slave station changes, the working data of the slave station cannot be used any more, and the master station needs to update the working data of the slave station.
Preferably, the step L3 includes the following steps: the slave station reads the current execution angle from the encoder; and the slave station reads the number of currently executed wefts from the counter. The encoder records the working angle of the textile machine in real time, the counter records the number of the finished textile wefts of the textile machine in real time, and the data reflects the current execution state in real time, so that when the current execution state needs to be known, the data is read from the data.
Preferably, the process of the master station and the slave station performing the operation of confirming the connection is performed through three handshakes, and the process is as follows:
for the first time: the master station sends a connection request confirmation character to the slave station;
and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state;
and thirdly: and after receiving the information replied by the slave station, the master station is set to be in a sending state. Whether the communication channel is established between the master station and the slave station can be judged through three-way handshaking, and some connection problems such as data line damage and unreliable data line connection can be detected without classifying the abnormalities into data receiving abnormalities, so that the abnormal types are effectively identified, and the time for repairing the faults in the later period is saved.
Preferably, one setting mode of the extended communication mode is to set the content of one byte counted for the number of bytes in the function code of the Modbus function code 16 to 0, in this setting mode, if it is required to identify that the transmission mode is the extended communication mode, the number of bytes counted is set to odd, and another setting mode is to extend a register counted for the bytes by one byte. The byte counting number is set to be an odd number so as to effectively identify data of extended communication, the bytes of standard communication data are all even numbers, one byte content counted on the byte number in the functional code of the Modbus functional code 16 is set to be 0, so that data transmission is carried out according to the register number calculation under the transmission condition, 65535 bytes can be transmitted at one time by counting the byte number of the 16-bit register number, and 65535 bytes can be transmitted at one time by extending the register counted on the byte number by one byte according to the Modbus communication protocol compatible with the standard.
Therefore, the invention has the following beneficial effects: (1) upon reading a fault signal, it cannot be fully determined that the fault will not cause communication obstruction or data corruption from the station, such as reading an abnormal signal of voltage or current, such an abnormality may cause a part of the equipment to be damaged, thereby causing communication failure or data damage of the slave station, and the result can not be accurately judged, so that when the abnormal signal is detected, the communication path is checked to check whether the communication path is smooth or not, at the same time, the data of the slave station is checked to confirm whether the slave station data receives interference, when the slave station data is confirmed, because the slave station data is large, a lot of time is needed for transmission in the Modbus standard communication mode, at the moment, a Modbus extended communication mode is used, and a large amount of data can be transmitted at one time in the Modbus extended communication mode, so that the transmission speed is greatly improved;
(2) checking the abnormality, checking whether a communication path is smooth, checking the data of the slave station only after the communication path is smooth, firstly confirming that the master station and the slave station are connected, confirming that the data can be transmitted, then sending the check data, checking whether the master station sending and the slave station receiving are abnormal in the communication process, continuing working if the check is passed, and changing to a communication mode if the check is not passed, so that the check caused by the communication mode can be eliminated;
(3) checking the working data of the slave station to prevent the slave station from executing damaged data, wherein the data in the slave station is large, so that an extended communication mode is adopted to accelerate the checking speed, so that too much working time is not occupied, if the checking fails, the working data in the slave station needs to be updated, but the slave station needs to continuously execute the data, so that the current execution state is acquired, the slave station continues to work from the current execution state according to new working data, the progress stored by the master station or the slave station cannot be adopted, the progress is inaccurate in some cases, for example, the current execution state data in the master station or the slave station is not updated in time under the condition of sudden power failure, so that the current execution state data in the master station or the slave station is not accurate;
(4) the working data in the slave stations are sent to the master station, and the master station compares the working data sent by the slave stations with the working data stored in the master station, so that whether the working data in the slave stations are changed or not can be known, and as long as one position is changed, the working data of the slave stations are interfered, the slave stations can not be used any longer, and the master station needs to update the working data of the slave stations;
(5) three-way handshake is carried out before the master station and the slave station send data, so that whether a communication channel is established between the master station and the slave station can be judged, connection problems such as damaged data lines and unreliable data line connection can be detected, the abnormalities cannot be classified as data receiving abnormalities, the abnormality type is effectively identified, and the time for repairing the faults at the later stage is saved;
(6) the byte counting number is set to be an odd number so as to effectively identify data of extended communication, the bytes of standard communication data are all even numbers, one byte content counted on the byte number in the functional code of the Modbus functional code 16 is set to be 0, so that data transmission is carried out according to the register number calculation under the transmission condition, 65535 bytes can be transmitted at one time by counting the byte number of the 16-bit register number, and 65535 bytes can be transmitted at one time by extending the register counted on the byte number by one byte according to the Modbus communication protocol compatible with the standard.
Drawings
FIG. 1 is a schematic diagram of a connection of hardware to which the present invention relates
In the figure: 1. textile machine, 11, master station, 12, slave station, 13, encoder, 14, counter.
Detailed Description
The invention is further described with reference to the following detailed description and accompanying drawings.
Example (b): a fault processing method based on Modbus extended communication is characterized in that a master station 11, a slave station 12 for controlling the textile machine to carry out textile, an encoder 113 for reading a textile execution angle and a counter 14 for reading the number of weft yarns finished in the textile process are arranged on the textile machine 1, the master station and the slave station are connected through a Modbus data bus, the master station and the slave station carry out data transmission through the Modbus data bus, after communication abnormity or slave station data abnormity is read in the communication process, internal checking is carried out, normal communication is carried out through checking, fault signals are transmitted to the outside when checking fails, or the slave station reads a current execution angle from the encoder and reads the number of currently executed weft yarns from the counter to carry out fault clearing, a Modbus extended communication mode is entered when the data transmission speed needs to be accelerated, one byte content of byte counting in a function code with a Modbus function code of 16 is set as 0, in the setting mode, if the transmission mode needs to be identified as the extended communication mode, the byte counting number is set to be an odd number, and the other setting mode is to extend a register for byte counting by one byte. And the physical layer supported by the Modbus extended communication mode is the same as the physical layer of Modbus standard communication.
The reading process of the communication abnormity comprises the following steps:
s1: setting a time threshold;
s2: the master station and the slave station confirm the connection operation, and the master station and the slave station confirm the connection operation process and need to be subjected to three-way handshake for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station sets the slave station to be in a sending state, if the connection is confirmed, the next step is started, and if the connection is not confirmed, the master station reports a fault;
s3: selecting an expansion communication mode to transmit check data or selecting a standard communication mode to transmit check data according to the capacity of the check data to be transmitted;
s31: setting a data capacity threshold;
s31: and if the volume of the check data to be transmitted exceeds the data volume threshold, selecting to transmit the check data by using an extended communication mode, and if the volume of the data to be transmitted does not exceed the data volume threshold, selecting to transmit the check data by using a standard communication mode.
S4: if the time threshold value is within, the master station receives the response of the received data of the slave station, the internal check is passed, otherwise, the internal check is not passed and the fault is reported, and then the current communication mode is exited and the next step is started;
s5: the master station and the slave station confirm the connection operation, and the master station and the slave station confirm the connection operation process and need to be subjected to three-way handshake for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station sets the slave station to be in a sending state, if the connection is confirmed, the next step is started, and if the connection is not confirmed, the master station reports a fault;
s6: selecting the communication mode not selected in step S3 to transmit the verification data;
s7: if the time threshold value is within, the master station receives the response of the received data of the slave station, the internal check is passed, otherwise, the internal check is not passed and the fault is reported, and the current communication mode is exited.
The reading process of the slave station data exception comprises the following steps:
l1: after the master station receives any fault information reported by the slave station, starting the next step;
l2: the slave station transmits the working data to the master station for data verification, if the data verification is passed, the master station transmits a continuous working signal to the slave station, and if not, the next step is started;
l21: the master station and the slave station confirm the connection operation, and the master station and the slave station confirm the connection operation process and need to be subjected to three-way handshake for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station sets the slave station to be in a sending state, if the connection is confirmed, the next step is started, and if the connection is not confirmed, the master station reports a fault;
l22: the slave station selects an extended communication mode to send working data to the master station, and exits the extended communication mode after the working data are sent;
l23: and the master station compares the data transmitted by the slave station with the data of the master station, if the data are completely consistent, the check is passed, the master station transmits a continuous working signal to the slave station, and otherwise, the check is not passed.
L3: the slave station reads the current execution angle from the encoder; and the slave station reads the number of currently executed wefts from the counter. (ii) a
L4: the master station and the slave station confirm the connection operation, and the master station and the slave station confirm the connection operation process and need to be subjected to three-way handshake for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station sets the slave station to be in a sending state, if the connection is confirmed, the next step is started, and if the connection is not confirmed, the master station reports a fault;
l5: the master station selects an extended communication mode to send new working data to the slave station, and exits the extended communication mode after the sending is finished;
l6: and the slave station continues to work from the current execution state according to the new working data.
The master station and the slave station need to perform three-way handshake in the process of confirming connection operation, and the process is as follows:
for the first time: the master station sends a connection request confirmation character to the slave station;
and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state;
and thirdly: and after receiving the information replied by the slave station, the master station is set to be in a sending state.
The process of the present invention is further illustrated below with reference to specific examples, as shown in FIG. 1: the master station and the slave station can be a PLC or a single chip microcomputer, the slave station controls an executing mechanism of a loom to weave according to pattern data transmitted by the master station, one setting mode of the extended communication mode is that one byte content of byte statistics in the functional codes with Modbus functional codes of 16 is set as 0, the byte statistics is set as an odd number, and a physical layer supported by the extended communication mode is the same as a physical layer of Modbus standard communication.
S1: setting a time threshold value to be 3S;
s2: the master station and the slave station perform three-way handshake operation, and for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information + the current slave station number 3 and sets the state as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station is set to be in a sending state, if connection is confirmed, the next step is started, and if the master station cannot receive the reply information of the slave station in the third-time handshake, or the slave station cannot receive the information of the master station in the second-time handshake, the master station reports the face data connection fault;
s3: selecting an expansion communication mode to transmit check data or selecting a standard communication mode to transmit check data according to the size of the check data to be transmitted;
s31: setting a data capacity threshold value to be 255 characters;
s31: the volume of check data to be transmitted is 563 characters: the capacity of the check data to be transmitted exceeds the data capacity threshold, so the check data is transmitted by using the expanded communication mode, and if the capacity of the data to be transmitted is less than 255 characters, the check data is transmitted by using the standard communication mode.
S4: in 3S, the master station does not receive the response of the received data of the slave station, the internal check does not pass and the communication fault is checked, at this time, the current communication mode is exited and the next step is started, if the master station receives the response of the received data of the slave station, the internal check passes, and the operation is continued according to the original program;
s5: the master station and the slave station perform three-way handshake operation, and for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information + the current slave station number 3 and sets the state as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station is set to be in a sending state, if connection is confirmed, the next step is started, and if the master station cannot receive the reply information of the slave station in the third-time handshake, or the slave station cannot receive the information of the master station in the second-time handshake, the master station reports the face data connection fault;
s6: selecting a standard communication mode to transmit check data;
s7: and in 3S, the master station receives the response of the received data of the slave station, which indicates that the internal check is passed, and if the master station does not receive the response of the received data of the slave station in 3S, the internal check is not passed and the communication fault is checked, and the master station exits the standard communication mode.
L1: when the master station receives fault information of the slave station with abnormal power supply voltage, starting the next step;
l2: the slave station transmits pattern working data of the cloth to the master station for data verification, if the data verification is passed, the master station transmits a continuous working signal to the slave station, and if not, the next step is started;
l21: the master station and the slave station perform three-way handshake operation, and for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information + the current slave station number 3 and sets the state as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station is set to be in a sending state, if connection is confirmed, the next step is started, and if the master station cannot receive the reply information of the slave station in the third-time handshake, or the slave station cannot receive the information of the master station in the second-time handshake, the master station reports the face data connection fault;
l22: the slave station selects an extended communication mode to send pattern working data of the cloth to the master station, and exits the extended communication mode after the sending is finished;
l23: the master station compares the pattern working data of the cloth sent by the slave station with the pattern working data of the cloth with the master station, if the comparison result shows that the pattern data of 3 positions are inconsistent, the verification is not passed, the next step is started, and if the comparison result shows that the pattern data of the cloth are completely consistent, the verification is passed, and the master station sends a continuous working signal to the slave station;
l3: reading the execution angle of the pattern of the current cloth from the encoder by the slave station; reading a signal that a loom puts a weft in place by a counter, adding one to the counter when reading a signal, and reading the number of the weft which is woven at present by a slave station from the counter;
l4: the master station and the slave station perform three-way handshake operation, and for the first time: the master station sends a connection request confirmation character to the slave station; and (3) for the second time: after receiving the information, the slave station replies the connection success information + the current slave station number 3 and sets the state as a receiving state; and thirdly: after receiving the information replied by the slave station, the master station is set to be in a sending state, if connection is confirmed, the next step is started, and if the master station cannot receive the reply information of the slave station in the third-time handshake, or the slave station cannot receive the information of the master station in the second-time handshake, the master station reports the face data connection fault;
l5: the master station selects an extended communication mode to send pattern working data of new cloth to the slave station, and exits the extended communication mode after the sending is finished;
l6: and the slave station takes the execution angle of the pattern of the current cloth and the number of the wefts which are woven as search points, finds data points of the search points from the pattern working data of the new cloth according to the search points, and then executes the pattern working data of the cloth from the data points to the next step.

Claims (7)

1. A fault handling method based on Modbus expanded communication is characterized in that a master station (11), a slave station (12) for controlling the textile machine to carry out textile, an encoder (13) for reading a textile execution angle and a counter (14) for reading the number of weft yarns which are finished during the textile process are arranged on the textile machine (1), the master station is connected with the slave station through a Modbus data bus, the master station and the slave station carry out data transmission through the Modbus data bus, after communication abnormity or slave station data abnormity is read during the communication process, advanced internal checking is carried out, normal communication is carried out after the checking is passed, failure of the checking is carried out, a fault signal is transmitted to the outside or the current execution state is collected for troubleshooting, a Modbus expanded communication mode is entered when the data transmission speed needs to be accelerated, and a physical layer supported by the Modbus expanded communication mode is the same as a physical layer of Modbus standard communication; one setting mode of the extended communication mode is to set one byte content of byte statistics in a functional code of which the Modbus functional code is 16 as 0, set the byte statistics as an odd number if the communication mode needs to be identified as the extended communication mode, set the byte statistics as an even number if the communication mode does not need to be identified as the extended communication mode, and set a register of byte statistics as an extended byte in another setting mode.
2. The fault handling method based on Modbus extended communication of claim 1, wherein the reading process of the communication exception comprises the following steps:
s1: setting a time threshold;
s2: the master station (11) and the slave station (12) carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
s3: selecting an expansion communication mode to transmit check data or selecting a standard communication mode to transmit check data according to the capacity of the check data to be transmitted;
s4: if the master station receives the response of the received data of the slave station within the time threshold, the internal check is passed, otherwise, the internal check is not passed, and the current communication mode is exited and the next step is started;
s5: the master station and the slave station carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
s6: selecting the communication mode not selected in step S3 to transmit the verification data;
s7: if the time threshold value is within, the master station receives the response of the received data of the slave station, the internal check is passed, otherwise, the internal check is not passed and the fault is reported, and the current communication mode is exited.
3. The fault processing method based on the Modbus extended communication of claim 2, wherein the step S3 is executed by:
s31: setting a data capacity threshold;
s31: and if the volume of the check data to be transmitted exceeds the data volume threshold, selecting to transmit the check data by using an extended communication mode, and if the volume of the data to be transmitted does not exceed the data volume threshold, selecting to transmit the check data by using a standard communication mode.
4. The fault handling method based on Modbus extended communication of claim 1, wherein the reading process of the slave station data exception comprises the following steps:
l1: after the master station (11) receives the failure information reported by any one of the slave stations (12), the next step is started;
l2: the slave station transmits the working data to the master station for data verification, if the data verification is passed, the master station transmits a continuous working signal to the slave station, the slave station continues working after receiving the continuous working signal, and if the data verification is not passed, the next step is started;
l3: reading the current execution state of the working data from the slave station;
l4: the master station and the slave station carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
l5: the master station selects an extended communication mode to send new working data to the slave station, and exits the extended communication mode after the sending is finished;
l6: and the slave station continues to work from the current execution state according to the new working data.
5. The fault processing method based on the Modbus extended communication of claim 4, wherein the process of the step L2 is as follows:
l21: the master station (11) and the slave station (12) carry out connection confirmation operation, if the connection is confirmed, the next step is started, and if the connection is not confirmed, a fault is reported;
l22: the slave station selects an extended communication mode to send working data to the master station, and exits the extended communication mode after the working data are sent;
l23: and the master station compares the data transmitted by the slave station with the data of the master station, if the data are completely consistent, the check is passed, the master station transmits a continuous working signal to the slave station, and otherwise, the check is not passed.
6. The fault processing method based on the Modbus extended communication of claim 4, wherein the step L3 comprises the following steps: the slave station (12) reads the current execution angle from the encoder (13); the slave station reads the number of currently executed wefts from the counter (14).
7. A fault handling method based on Modbus extended communication according to claim 2, 4 or 5, wherein the operation process of the master station (11) and the slave station (12) for confirming the connection is performed through three handshakes, which are:
for the first time: the master station sends a connection request confirmation character to the slave station;
and (3) for the second time: after receiving the information, the slave station replies the connection success information plus the current slave station number and sets the connection success information and the current slave station number as a receiving state;
and thirdly: and after receiving the information replied by the slave station, the master station is set to be in a sending state.
CN201910876441.0A 2019-09-17 2019-09-17 Fault processing method based on Modbus extended communication Active CN111245694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910876441.0A CN111245694B (en) 2019-09-17 2019-09-17 Fault processing method based on Modbus extended communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910876441.0A CN111245694B (en) 2019-09-17 2019-09-17 Fault processing method based on Modbus extended communication

Publications (2)

Publication Number Publication Date
CN111245694A CN111245694A (en) 2020-06-05
CN111245694B true CN111245694B (en) 2021-11-23

Family

ID=70877517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910876441.0A Active CN111245694B (en) 2019-09-17 2019-09-17 Fault processing method based on Modbus extended communication

Country Status (1)

Country Link
CN (1) CN111245694B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112615769B (en) * 2020-12-11 2022-07-12 杭州和利时自动化有限公司 Exception handling method, device and communication system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950175A (en) * 2010-10-21 2011-01-19 广州数控设备有限公司 Implementation method of high-speed fieldbus based on industrial Ethernet
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN103746783A (en) * 2013-11-29 2014-04-23 国电南瑞科技股份有限公司 Extended communication method based on Modbus communication protocol
CN104065545A (en) * 2014-06-27 2014-09-24 浙江大学 RS485 bus communication method based on Modbus protocol and power electronic system based on communication method
KR20160002058A (en) * 2014-06-30 2016-01-07 한국전자통신연구원 Modbus Communication Pattern Learning Based Abnormal Traffic Detection Apparatus and Method
CN105871623A (en) * 2016-05-18 2016-08-17 广州数控设备有限公司 Occasional fault diagnosis method of field bus
CN105975424A (en) * 2016-04-28 2016-09-28 北京信息科技大学 Master-slave serial communication protocol
CN106209843A (en) * 2016-07-12 2016-12-07 工业和信息化部电子工业标准化研究院 A kind of data flow anomaly towards Modbus agreement analyzes method
CN106941396A (en) * 2017-04-11 2017-07-11 深圳易能电气技术股份有限公司 A kind of method of test Modbus communication qualities and slave station response performance
CN108733604A (en) * 2018-05-11 2018-11-02 深圳市脉联电子有限公司 A kind of 485 bus intelligent expansion method and devices based on modbus communications protocol
CN110061896A (en) * 2019-05-06 2019-07-26 浙江明度智控科技有限公司 A kind of MODBUS-RTU bus address collision detection method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006100950A (en) * 2004-09-28 2006-04-13 Toshiba Tec Corp Communication system
CN201477434U (en) * 2009-05-05 2010-05-19 霍进 Automatic control system accessed into automatic heterogeneous controller
CN101976074B (en) * 2010-11-03 2012-05-30 浙江工业大学 Industrial control system based on field bus and control network
CN102053935A (en) * 2010-11-25 2011-05-11 广东雅达电子股份有限公司 MODBUS serial communication protocol-based communication method
CN104486182B (en) * 2014-11-27 2018-05-01 上海仪电楼宇科技有限公司 A kind of method of serial Modbus expanding communications
CN105376232A (en) * 2015-11-18 2016-03-02 路斯特运动控制技术(上海)有限公司 Data transmission communication protocol for servo drivers

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101950175A (en) * 2010-10-21 2011-01-19 广州数控设备有限公司 Implementation method of high-speed fieldbus based on industrial Ethernet
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN103746783A (en) * 2013-11-29 2014-04-23 国电南瑞科技股份有限公司 Extended communication method based on Modbus communication protocol
CN104065545A (en) * 2014-06-27 2014-09-24 浙江大学 RS485 bus communication method based on Modbus protocol and power electronic system based on communication method
KR20160002058A (en) * 2014-06-30 2016-01-07 한국전자통신연구원 Modbus Communication Pattern Learning Based Abnormal Traffic Detection Apparatus and Method
CN105975424A (en) * 2016-04-28 2016-09-28 北京信息科技大学 Master-slave serial communication protocol
CN105871623A (en) * 2016-05-18 2016-08-17 广州数控设备有限公司 Occasional fault diagnosis method of field bus
CN106209843A (en) * 2016-07-12 2016-12-07 工业和信息化部电子工业标准化研究院 A kind of data flow anomaly towards Modbus agreement analyzes method
CN106941396A (en) * 2017-04-11 2017-07-11 深圳易能电气技术股份有限公司 A kind of method of test Modbus communication qualities and slave station response performance
CN108733604A (en) * 2018-05-11 2018-11-02 深圳市脉联电子有限公司 A kind of 485 bus intelligent expansion method and devices based on modbus communications protocol
CN110061896A (en) * 2019-05-06 2019-07-26 浙江明度智控科技有限公司 A kind of MODBUS-RTU bus address collision detection method

Also Published As

Publication number Publication date
CN111245694A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN110380907B (en) Network fault diagnosis method and device, network equipment and storage medium
WO2022228499A1 (en) Pcie fault self-repairing method, apparatus and device, and readable storage medium
CN111245694B (en) Fault processing method based on Modbus extended communication
CN108073105B (en) Safety P L C device based on heterogeneous dual-processor redundant structure and implementation method
CN104062967A (en) Fault diagnosis method and device of start stop system
CN108708064B (en) Online automatic error correction method and system for absolute value encoder of jacquard knitting machine
CN111142042A (en) Automatic coding system and method
CN110427526A (en) Unit, control method, device, equipment, electrical equipment and storage medium thereof
CN101054750B (en) Electronic jacquard machine control system with data checking and correction function and control method thereof
CN102611600A (en) Method and device for locating short circuit position of CAN (Controller Area Network) network
CN103137227B (en) The software common mode failure detection system of nuclear power station security level DCS and control method thereof
CN112532467A (en) Method, device and system for realizing fault detection
CN109067567B (en) Network communication interruption diagnosis method
CN114363145A (en) BIT fault injection and detection time sequence control method for airborne electronic system
CN112711502B (en) Gao Wenkao machine testing method, control end, tooling end and system for iMS-CPU board
CN114189466A (en) Method for detecting local maintenance interface communication mode of low-voltage power acquisition terminal
CN112751688A (en) Flow control processing method of OTN device, electronic device and storage medium
CN111126277A (en) Power failure alarm signal identification method, device, terminal and storage medium
CN111158300B (en) Data acquisition and reduction method
CN110686358A (en) Variable frequency air conditioner fault diagnosis method based on detection tool
CN112965457B (en) Fault detection system and method for bus cycle transmission controller fault code
CN111736069B (en) Relay state safety acquisition system for avoiding signal acquisition line mixing
CN113079066B (en) Communication test system and test method for comprehensive protection measurement and control device
CN211826973U (en) Analog input signal processing device and steam turbine control device
CN111913842B (en) Test method for complete machine interface of ATCA (advanced telecom computing architecture) chassis multi-board card

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
GR01 Patent grant
GR01 Patent grant