Expansion IO module fault communication system and method based on dual-bus PLC
By introducing a dual bus solution in PLC and extended IO modules, using sampling resistors to determine the fault module and switch the bus network, the problem of communication failure between PLC and extended IO modules is solved, and communication recovery and network management capabilities are improved.
Patent Information
- Application Number
- CN202411191392.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-28
AI Technical Summary
During the communication process of the PLC and the extended IO module, the signals must pass through each chip in turn. When one of the IO expansion modules communicates, it will affect subsequent module communication, resulting in communication interruption and failure.
By introducing a dual bus scheme in the PLC controller and the extended IO module, the location and number of faulty modules are determined using sampling resistors, and switching the bus network through the control switch, skipping the faulty modules, thereby restoring the communication of subsequent extended IO modules.
It realizes bus communication that does not affect normal functions in the event of communication failure, improves network management capabilities, and solves the network management problem after a single high-speed bus interruption through the separation of high-speed and low-speed buses, and has high efficiency and rapid response.
Smart Images

Figure CN119045404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an extended IO module fault communication system and method based on a dual-bus PLC. Background Art
[0002] PLC is the main controller device for industrial automation, usually used in the fields of industrial manufacturing, aviation, power and other equipment control. It uses programmable memory to execute logic operations, timing, motion control and other operation instructions internally. At the same time, PLC collects analog and digital signals through itself or extended IO modules, and controls other devices through itself or extended IO modules.
[0003] In the existing PLC solution, the PLC itself carries fewer IO resources, and it is necessary to obtain more acquisition data and control resources through the expansion of IO modules. Most of the existing PLCs and expansion IOs use CAN bus or CANFD bus, but the maximum baud rate of the CAN bus is 1Mbps, and the maximum baud rate of the CANFD bus is 10Mbps. Considering the application scenarios of PLC and expansion IO modules, and in order to reduce communication cables, the LVDS of PLC and expansion IO communication mainly adopts a 2-transmit 2-receive interface, but after expansion, its communication rate can reach 100Mbps. The transmission mode of expansion IO adopts single-line transmission. Such an interface has the characteristics of rapid expansion and high cable utilization, but during the transmission process, the signal must pass through each chip in turn to reach the designated location. In the case of such linear transmission, when one of the IO expansion modules fails to communicate, it will affect the subsequent module communication, resulting in communication interruption, thereby causing communication failure. Summary of the invention
[0004] The technical problem to be solved by the present invention is that the signal must pass through each chip in turn. When one of the IO expansion modules fails in communication, it will affect the subsequent module communication, resulting in communication interruption, thereby causing communication failure. The purpose is to provide an expansion IO module failure communication system and method based on a dual-bus PLC, which processes the voltage data during the communication process, determines the location and number of the faulty modules, switches the bus network by controlling the SWITCH switch, and skips the faulty module, so that the subsequent expansion IO modules can achieve bus communication without affecting their normal functions.
[0005] The present invention is achieved through the following technical solutions:
[0006] A first aspect of the present invention provides an extended IO module fault communication system based on a dual-bus PLC, comprising a PLC controller, a plurality of extended IO modules and a terminal module;
[0007] The PLC controller serves as the control port of the entire system, and is used to receive the sampled data of each expansion IO module, monitor the communication status of each expansion IO module, and command the corresponding expansion IO module to take corresponding actions;
[0008] The extended IO module serves as an analog / digital input / output channel for PLC expansion, is used to collect analog and digital signals, receive monitoring results output by PLC commands, and process faults according to the monitoring results.
[0009] Further, the PLC controller includes a main CPU, a first communication chip, a slave MCU2 and a reference voltage source;
[0010] The main CPU is connected to the first communication chip and the slave MCU2 respectively;
[0011] The main CPU is used to process the data received by the first communication chip and output the processed data to the communication chip;
[0012] The first communication chip is used to receive data from the main CPU and forward it to the high-speed bus network;
[0013] The slave MCU2 is used to manage the network status of each module in the extended IO module, and isolate and jump the slave MCU2 of the faulty extended IO module according to the network status;
[0014] The reference voltage source is used to supply power to the sampling resistor of the subsequent series-connected expansion IO module.
[0015] Further, the extended IO module includes a master MCU1, a second communication chip, a slave MCU2, switches SW1-SW4 and a sampling resistor;
[0016] The main MCU is used to communicate with the second communication chip, forward the collected data to the high-speed bus network through the second communication chip, and receive corresponding data output from the bus network;
[0017] The second communication chip is used to send and receive bus data, communicate with the main MCU1, and forward data on site;
[0018] The switches SW1-SW4 are single-pole double-throw switches SPDT, which are used to switch the bus, skip the faulty module and establish communication with the next module;
[0019] The slave MCU2 is used to send the network status of the module, the status of the second communication chip and the status of the master MCU, and is also used to control switches SW1-SW4 to switch the bus;
[0020] Each of the extended IO modules includes a sampling resistor, and the voltage of the sampling resistor is used to determine the number of extended IO modules and the location of a faulty extended IO module.
[0021] Further, the master MCU1 is connected to the second communication chip, the master MCU1 is connected to the slave MCU2, the slave MCU2 is connected to the switches SW1-SW4 respectively; the slave MCU2 is connected to the input end and the output end of the sampling resistor respectively;
[0022] The second communication chip is connected to switches SW1-SW4 respectively. Among switches SW1-SW4, switches SW1-SW2 are connected to the output of the upper-level expansion IO module or PLC high-speed bus, and switches SW3-SW4 are connected to the input of the next-level expansion IO module high-speed bus.
[0023] Further, the control of switches SW1-SW4 of the extended IO module includes:
[0024] When a fault is detected in the expansion IO module, the slave MCU2 controls the SW1-SW4 switches to switch directions, connecting the upper module adjacent to the faulty module with the next module to establish communication.
[0025] Furthermore, it also includes a high-speed bus and a low-speed bus, wherein the high-speed bus is used for application data communication, and the low-speed bus is used for network management.
[0026] Furthermore, the extended IO module is also used to report the high-speed bus status, communication chip status, and main MCU status of the extended IO module to the PLC controller via the low-speed bus, and at the same time receive commands from the PLC controller to control the switches SW1-SW4 of the extended IO module.
[0027] Further, the slave MCU2 of the PLC controller and each extended IO module slave MCU2 are respectively connected to the low-speed bus;
[0028] The PLC communication chip is serially connected to each expansion IO module in sequence until it is connected to the last expansion IO module.
[0029] Furthermore, the extended IO module also includes a terminal module, and the terminal module is used as the last extended module to place a bus terminal resistor and a last grounded sampling resistor.
[0030] A second aspect of the present invention provides an extended IO module fault communication method based on a dual-bus PLC, which is applied to an extended IO module fault communication system based on a dual-bus PLC, and includes the following specific steps:
[0031] Obtain the input voltage and output voltage of the sampling resistor reported by each node of the extended IO module;
[0032] Monitor the status of each module based on the input voltage and output voltage to determine the number and location of the faulty expansion IO modules;
[0033] According to the number and position of the faulty expansion IO modules, a switching control command is issued to switch the bus network and restore the subsequent expansion IO module communication.
[0034] Furthermore, the number of expansion IO modules that are faulty is determined to include:
[0035] Obtain the input voltage Vf of the sampling resistor of the extended IO module, the output voltage Vb and the reference voltage Vr of the PLC controller, and calculate the number of extended IO modules m=Vr / (Vf-Vb)-1;
[0036] Determining the location of the faulty expansion IO module includes:
[0037] The nearest expansion IO module of the PLC controller is obtained, and so on until the last expansion IO module, whose expansion IO module position number i=(Vr-Vb) / (Vf-Vb).
[0038] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0039] By processing the voltage data during the communication process, the location and number of the faulty modules are determined, and the bus network is switched by controlling the SWITCH switch to skip the faulty modules, so that the subsequent expansion IO modules can achieve bus communication without affecting their normal functions;
[0040] By adopting high-speed and low-speed bus solutions, the high-speed bus is used for application data communication, and the low-speed bus is used for network management. The dual-redundant bus communication solution solves the problem of being unable to perform network management after a single high-speed bus is interrupted. It achieves the separation of application data and network management data, and improves network management capabilities;
[0041] By connecting sampling resistors in series and sampling the voltage of each expansion IO module, the location of the expansion IO module and the location of the fault point can be determined, which has the characteristics of high efficiency and fast response. When a high-speed bus fails, it will not be affected and the location of the faulty expansion IO module can still be reported. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0043] Figure 1 For existing expansion IO modules;
[0044] Figure 2 A fault communication method in an embodiment of the present invention;
[0045] Figure 3 A fault communication system in an embodiment of the present invention;
[0046] Figure 4 It is an extended IO module in the embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0048] like Figure 1 In the prior art shown, each expansion IO module is connected through an LVDS bus, and the LVDS communication chip of each expansion IO module adopts a 2-transmit 2-receive solution, RX1 and TX1 are used to communicate with the expansion IO module of the previous level, and RX2 and TX2 are used to communicate with the next expansion IO module. Communication data starts to flow in from expansion IO module 1, and expansion IO module 1 determines whether it is the data it needs. If not, it forwards the data to the next expansion IO module. After the data is forwarded, expansion IO module 2 receives the data, and expansion IO module 2 determines whether it is the data it needs. If it is, it will keep it. If not, it will continue to forward the data to the next expansion IO module, and so on for the entire communication process.
[0049] Such a communication network has a defect, that is, when one of the expansion IO modules fails, for example, if the expansion IO module 2 fails, the expansion IO module 3 and the expansion IO module 4 will not be able to establish a communication connection with the master station PLC, causing the expansion IO module 3 and the expansion IO module 4 to be offline, thereby affecting their normal functions and data communications.
[0050] As a possible implementation, Figure 3As shown, the first aspect of this embodiment provides an extended IO module fault communication system based on a dual-bus PLC, including a PLC controller, a plurality of extended IO modules and a terminal module;
[0051] The PLC controller serves as the control port of the entire system, and is used to receive the sampled data from each expansion IO module, monitor the communication status of each expansion IO module, and command the corresponding expansion IO module to take corresponding actions;
[0052] The extended IO module serves as the analog / digital input and output channel of the PLC expansion. It is used to collect analog and digital signals, receive the monitoring results output by the PLC command, and handle faults according to the monitoring results.
[0053] In some possible implementations, the PLC controller includes a master CPU, a first communication chip, a slave MCU2, and a reference voltage source;
[0054] The main CPU is connected to the first communication chip and the slave MCU2 respectively;
[0055] The main CPU is used for processing the data received by the first communication chip and outputting the processed data to the communication chip;
[0056] The first communication chip is used to receive data from the main CPU and forward it to the high-speed bus network;
[0057] The slave MCU2 is used to manage the network status of each module in the extended IO module, and isolate and jump the slave MCU2 of the faulty extended IO module according to the network status;
[0058] The reference voltage source is used to supply power to the sampling resistor of the subsequent series-connected expansion IO module.
[0059] In some possible implementations, such as Figure 4 As shown, the extended IO module includes a master MCU1, a second communication chip, a slave MCU2, switches SW1-SW4 and a sampling resistor;
[0060] The main MCU is used to communicate with the second communication chip, forward the collected data to the high-speed bus network through the second communication chip, and receive corresponding data output from the bus network;
[0061] The second communication chip is used to send and receive bus data, communicate with the main MCU1, and forward data on site;
[0062] Switches SW1-SW4 are single-pole double-throw switches SPDT, which are used to switch the bus, skip the faulty module and establish communication with the next module;
[0063] The slave MCU2 is used to send the network status of the module, the status of the second communication chip and the status of the master MCU, and is also used to control switches SW1-SW4 to switch the bus;
[0064] Each extended IO module includes a sampling resistor, and the voltage system of the sampling resistor is used to determine the number of extended IO modules and the location of a faulty extended IO module, wherein the sampling resistor values of each extended IO module are the same.
[0065] In some possible implementations, the master MCU1 is connected to the second communication chip, the master MCU1 is connected to the slave MCU2, the slave MCU2 is connected to the switches SW1-SW4 respectively; the slave MCU2 is connected to the input end and the output end of the sampling resistor respectively;
[0066] The second communication chip is connected to switches SW1-SW4 respectively. Among switches SW1-SW4, switches SW1-SW2 are connected to the output of the upper-level expansion IO module or PLC high-speed bus, and switches SW3-SW4 are connected to the input of the next-level expansion IO module high-speed bus.
[0067] In some possible implementations, controlling switches SW1-SW4 of the extended IO module includes:
[0068] When a fault is detected in the expansion IO module, the slave MCU2 controls the SW1-SW4 switches to switch directions, connecting the upper module adjacent to the faulty module with the next module to establish communication.
[0069] In some possible implementations, a high-speed bus and a low-speed bus are further included, wherein the high-speed bus is used for application data communication, and the low-speed bus is used for network management.
[0070] In some possible implementations, the high-speed bus may be LVDS, and the low-speed bus may be CAN.
[0071] In some possible implementations, the expansion IO module is also used to report the high-speed bus status, communication chip status, and main MCU status of the expansion IO module to the PLC controller through the low-speed bus, and at the same time receive commands from the PLC controller to control the switches SW1-SW4 of the expansion IO module.
[0072] In some possible implementations, the slave MCU2 of the PLC controller and each extended IO module slave MCU2 are respectively connected to the low-speed bus;
[0073] The PLC communication chip is serially connected to each expansion IO module in sequence until it is connected to the last expansion IO module.
[0074] In some possible implementations, the extended IO module further includes a terminal module, and the terminal module is used as the last extended module to place a bus terminal resistor and a last grounded sampling resistor.
[0075] As a possible implementation, Figure 2 As shown, the second aspect of this embodiment provides an extended IO module fault communication method based on a dual-bus PLC, comprising the following specific steps:
[0076] Obtain the input voltage and output voltage of the sampling resistor reported by each node of the extended IO module;
[0077] Monitor the status of each module based on the input voltage and output voltage to determine the number and location of the faulty expansion IO modules;
[0078] According to the number and position of the faulty expansion IO modules, a switching control command is issued to switch the bus network and restore the subsequent expansion IO module communication.
[0079] in,
[0080] Determine the number of faulty expansion IO modules:
[0081] Obtain the input voltage Vf of the sampling resistor of the extended IO module, the output voltage Vb and the reference voltage Vr of the PLC controller, and calculate the number of extended IO modules m=Vr / (Vf-Vb)-1;
[0082] Determining the location of the faulty expansion IO module includes:
[0083] Get the nearest expansion IO module of the PLC controller and so on until the last expansion IO module, whose expansion IO module position number i = (Vr-Vb) / (Vf-Vb);
[0084] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An extended IO module fault communication system based on dual-bus PLC, characterized in that: Including PLC controller, several expansion IO modules and terminal modules; The PLC controller serves as the control port of the entire system, and is used to receive the sampled data of each expansion IO module, monitor the communication status of each expansion IO module, and command the corresponding expansion IO module to take corresponding actions; The extended IO module serves as an analog / digital input / output channel for PLC expansion, is used to collect analog and digital signals, and receive monitoring results output by PLC commands, and process faults according to the monitoring results.
2. The extended IO module fault communication system based on dual-bus PLC according to claim 1 is characterized in that: The PLC controller includes a main CPU, a first communication chip, a slave MCU2 and a reference voltage source; The main CPU is connected to the first communication chip and the slave MCU2 respectively; The main CPU is used to process the data received by the first communication chip and output the processed data to the communication chip; The first communication chip is used to receive data from the main CPU and forward it to the high-speed bus network; The slave MCU2 is used to manage the network status of each module in the extended IO module, and isolate and jump the slave MCU2 of the faulty extended IO module according to the network status; The reference voltage source is used to supply power to the sampling resistor of the subsequent series-connected expansion IO module.
3. The extended IO module fault communication system based on dual-bus PLC according to claim 1 is characterized in that: The extended IO module includes a main MCU1, a second communication chip, a slave MCU2, switches SW1-SW4 and a sampling resistor; The main MCU is used to communicate with the second communication chip, forward the collected data to the high-speed bus network through the second communication chip, and receive corresponding data output from the bus network; The second communication chip is used to send and receive bus data, communicate with the main MCU1, and forward data on site; The switches SW1-SW4 are single-pole double-throw switches SPDT, which are used to switch the bus, skip the faulty module and establish communication with the next module; The slave MCU2 is used to send the network status of the module, the status of the second communication chip and the status of the master MCU, and is also used to control switches SW1-SW4 to switch the bus; Each of the extended IO modules includes a sampling resistor, and the voltage of the sampling resistor is used to determine the number of extended IO modules and the location of a faulty extended IO module.
4. The extended IO module fault communication system based on dual-bus PLC according to claim 3 is characterized in that: The master MCU1 is connected to the second communication chip, the master MCU1 is connected to the slave MCU2, the slave MCU2 is connected to the switches SW1-SW4 respectively; the slave MCU2 is connected to the input end and the output end of the sampling resistor respectively; The second communication chip is connected to switches SW1-SW4 respectively. Among switches SW1-SW4, switches SW1-SW2 are connected to the output of the upper-level expansion IO module or PLC high-speed bus, and switches SW3-SW4 are connected to the input of the next-level expansion IO module high-speed bus; The control of switches SW1-SW4 of the extended IO module includes: When a fault is detected in the expansion IO module, the slave MCU2 controls the SW1-SW4 switches to switch directions, connecting the upper module adjacent to the faulty module with the next module to establish communication.
5. The extended IO module fault communication system based on dual-bus PLC according to claim 1 is characterized in that: It also includes a high-speed bus and a low-speed bus, wherein the high-speed bus is used for application data communication, and the low-speed bus is used for network management.
6. The extended IO module fault communication system based on dual-bus PLC according to claim 5 is characterized in that: The extended IO module is also used to report the high-speed bus status, communication chip status, and main MCU status of the extended IO module to the PLC controller through the low-speed bus, and at the same time receive commands from the PLC controller to control the switches SW1-SW4 of the extended IO module.
7. The extended IO module fault communication system based on dual-bus PLC according to claim 6 is characterized in that: The slave MCU2 of the PLC controller and each extended IO module slave MCU2 are respectively connected to the low-speed bus; The PLC communication chip is serially connected to each expansion IO module in sequence until it is connected to the last expansion IO module.
8. The extended IO module fault communication system based on dual-bus PLC according to claim 1 is characterized in that: The extended IO module further comprises a terminal module, and the terminal module is used as the last extended module to place a bus terminal resistor and a last grounded sampling resistor.
9. A dual-bus PLC-based extended IO module fault communication method, applied to the dual-bus PLC-based extended IO module fault communication system according to any one of claims 1 to 8, characterized in that: The specific steps include: Obtain the input voltage and output voltage of the sampling resistor reported by each node of the extended IO module; Monitor the status of each module based on the input voltage and output voltage to determine the number and location of the faulty expansion IO modules; According to the number and position of the faulty expansion IO modules, a switching control command is issued to switch the bus network and restore the subsequent expansion IO module communication.
10. The extended IO module fault communication method based on dual-bus PLC according to claim 9, characterized in that: Determine the number of faulty expansion IO modules: Obtain the input voltage Vf of the sampling resistor of the extended IO module, the output voltage Vb and the reference voltage Vr of the PLC controller, and calculate the number of extended IO modules m=Vr / (Vf-Vb)-1; Determining the location of the faulty expansion IO module includes: The nearest expansion IO module of the PLC controller is obtained, and so on until the last expansion IO module, whose expansion IO module position number i=(Vr-Vb) / (Vf-Vb).
Citation Information
Patent Citations
Method and device for generating interruption / event of upper CPU in PLC module
CN105446914A
Integrated small PLC and automatic identification method of extended IO modules thereof
CN105955179A
PLC system and control method thereof
CN110806719A
Multi-redundancy design PLC control system and system control method
CN115576187A
Extension module, CPU module, system and communication method
JP2022011810A
Cited By
IO module hot plugging method, device and equipment based on FPGA and storage medium
CN121326814A
PLC communication expansion system and method supporting modularized dynamic reconstruction
CN121530785A
