Programmable logic control system
By designing interactive information between the control module and the response module, the system automatically identifies the replacement of IO components and reconfigures their addresses and parameters, thus solving the problem of poor flexibility in replacing and reconfiguring IO modules in PLC systems and enabling flexible system expansion and stable communication.
Patent Information
- Application Number
- CN202511160413.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-28
AI Technical Summary
The poor flexibility in replacing and reassembling I/O modules in PLC systems leads to communication interruptions and system instability.
By employing a control module and a response module design, the system automatically identifies changes in I/O components through interactive information, reconfigures addresses and parameters, and achieves flexible I/O component management and smooth communication.
It improves the system's scalability and ease of maintenance, ensures smooth communication, reduces downtime, and enhances system reliability and flexibility.
Smart Images

Figure CN121028664A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of editable logic control, and particularly relates to a programmable logic control system. BACKGROUND
[0002] With the programmable logic controller (PLC) being widely applied to motion control, production manufacturing, new energy and various fields, according to technical requirements of various fields, the input / output (IO) module in the PLC system needs to be further expanded and has various functions.
[0003] At present, in the PLC system, the controller and the IO module are generally connected through a bus. In the process of information interaction between the controller and the IO module based on the bus, a plurality of IO modules are connected on the bus.
[0004] When any IO module is faulty or is replaced during use, communication of the whole line is interrupted, which seriously affects data communication, and the flexibility of module replacement and recombination is poor. SUMMARY
[0005] Embodiments of the present application provide a programmable logic control system to at least solve the problem of poor flexibility of module replacement and recombination in the related art.
[0006] In a first aspect, the embodiments of the present application provide a programmable logic control system, comprising: a control module configured to generate and send interaction information; The response module comprises a plurality of input / output components connected in sequence, the input / output component close to the control module is connected to the control module, and any input / output component is connected to an external device to be collected; in the direction of transmitting the interaction information from the control module to the response module, any input / output component is set as a current input / output component, the input / output component adjacent to the current input / output component and close to the control module is a previous input / output component, and the input / output component adjacent to the current input / output component and away from the control module is a next input / output component; the current input / output component is configured to: collect monitoring data from the external device to be collected; receive the interaction information sent by the control module or the previous input / output component, generate response information, and send the response information to the previous input / output component; according to the interaction information, obtain data required for updating the current input / output component, update self data, and write self data and / or monitoring data of the current input / output component into the interaction information; determine whether the response information sent by the previous input / output component is received, if yes, send the changed interaction information to the next input / output component; and if not, send the changed interaction information to the control module. After the control module receives the changed interaction information, it is determined whether the input / output component in the response module is replaced according to the changed interaction information, if yes, the interaction information is generated again and sent to the response module, and the data in the response module is updated again.
[0007] In some embodiments, the interaction information comprises addressing information, the addressing information comprises an addressing function code and a module counter, and the data required for updating the current input / output component comprises an address offset; The current input / output component is further configured to: after receiving the addressing information, calculate the address offset of the current input / output component according to the addressing information, and update the self offset address; According to the addressing function code, the component type of the current input / output component is written into the addressing information, and the number of module counters in the addressing information is accumulated by one; After the addressing information is changed, it is sent out.
[0008] In some embodiments, the interaction information comprises a function code, and in the case that any input / output component fails and is replaced, the offset address of the replaced input / output component and the offset addresses of the input / output components after the replaced input / output component are in an abnormal state; The current input / output component is further configured to change the function code in the interaction information to a fault function code when the offset address is in an abnormal state, and send the changed interaction information to the control module. The control module is further configured to, after receiving the interaction information with the fault function code, generate and send the interaction information again, and reconfigure the offset address in the input / output component.
[0009] In some embodiments, the interaction information includes configuration information, and the configuration information includes a plurality of first data areas, and the parameter information set in each first data area is data required for updating the current input / output component; The current input / output component is further configured to, after receiving the configuration information, determine a first data area corresponding to the current input / output component among the plurality of first data areas according to the offset address of the current input / output component, and read the parameter information therein; According to the read parameter information, configure parameters of the current input / output component for controlling the collection of monitoring data and parameters for maintaining safety; Write the running state information of the current input / output component into the first data area corresponding to the current input / output component; After changing the configuration information, send it.
[0010] In some embodiments, the interaction information includes instruction information, and the instruction information includes a plurality of second data areas; The current input / output component is further configured to collect monitoring data from the external device to be collected according to the instruction information; According to the offset address of the current input / output component, determine a second data area corresponding to the current input / output component among the plurality of second data areas, and write the monitoring data into the second data area corresponding to the current input / output component; After changing the instruction information, send it.
[0011] In some embodiments, when the control module receives the changed interaction information, the control module is further configured to judge whether the received interaction information is correct, and if not, generate and send the interaction instruction again, and perform data interaction with the response module connected again.
[0012] In some embodiments, during the process of sending the changed interaction information to the control module when the current input / output component does not receive the response information, each input / output component between the current input / output component and the control module is further configured to receive the changed interaction information sent by the next input / output component, and send it to the previous input / output component or the control module.
[0013] In some embodiments, two communication interfaces are arranged on two sides of any of the input / output components respectively, when any of the input / output components is connected with the adjacent input / output component, the two corresponding communication interfaces are connected, forming two paths, and the two paths transmit the interaction information independently.
[0014] In some embodiments, the priority of the communication interface of the previous input / output component is higher than that of the communication interface of the next input / output component, and the two adjacent and connected communication interfaces are further configured to monitor the communication state of the path formed by the two communication interfaces, if the communication state of the path is idle, the communication interfaces transmit the interaction information according to the priority from high to low.
[0015] In some embodiments, the input / output component further comprises a power supply, and a hot plug protection component is arranged on the power supply and the communication interface respectively.
[0016] Compared with the related art, the programmable logic control system provided by the embodiments of the present application solves the problem of poor flexibility of module replacement and module flexibility in the prior art by responding to the information interaction between the response module and the control module, timely judging whether the response module is replaced, and reconfiguring the address and parameters of the response module, and can flexibly configure the number of input / output components according to actual needs, and ensure smooth communication of the overall system.
[0017] Details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS
[0018] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a structural block diagram of a programmable logic control system according to an embodiment of the present application; Figure 2 is a structural block diagram of a programmable logic control system according to an embodiment of the present application; Figure 3 is a structural block diagram of a programmable logic control system according to an embodiment of the present application; Figure 4 is a flowchart of a programmable logic control system according to an embodiment of the present application; Figure 5 is an addressing information schematic diagram of a programmable logic control system according to an embodiment of the present application; Figure 6 is another addressing information schematic diagram in a programmable logic control system according to an embodiment of the present application; Figure 7 is a configuration information schematic diagram in a programmable logic control system according to an embodiment of the present application; Figure 8 is an instruction information schematic diagram in a programmable logic control system according to an embodiment of the present application; Figure 9 is a running flowchart of a programmable logic control system according to an embodiment of the present application.
[0019] In the drawings: 101, control module; 102, response module; 1021, input / output component; 201, main controller; 202, coupler; 1011, first communication port; 1012, second communication port; 201, first interface; 202, second interface; 203, third interface; 204, fourth interface. DETAILED DESCRIPTION
[0020] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is described and explained below in connection with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application.
[0021] Obviously, the drawings in the following description are only some examples or embodiments of the present application, and for those of ordinary skill in the art, the present application can be applied to other similar scenarios without creative efforts based on these drawings. In addition, it can be understood that although the efforts made in this development process can be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacture or production changes based on the technical content disclosed in the present application are only routine technical means and should not be understood as insufficient disclosure of the present application.
[0022] In the present application, "embodiment" means that the specific features, structures or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it mutually exclusive or alternative to other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in the present application can be combined with other embodiments without conflict.
[0023] Unless otherwise defined, technical terms and scientific terms used in the present application shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terms "a", "an", "one", "this", and similar referents in the context of describing the application are to be construed to be open-ended, referring to one or more than one, unless otherwise noted. The terms "including", "comprising", "having" and variations thereof in this application are meant to encompass the possibility of non-exclusive inclusion, such that processes, methods, systems, products, or apparatuses that comprise a list of steps or elements are not limited to only those steps or elements but can include other steps or elements not expressly listed or inherent to such processes, methods, systems, products, or apparatuses. The terms "connected", "coupled", and similar referents in the context of this application are to be construed as beading in a manner that permits the causal agent or signal to act upon the causally affected agent or signal. The term "plurality" refers to two or more. The term "and / or" describes association between or among multiple options, and indicates that when there are multiple possibilities present, that the term can cover both the individual options, combinations thereof, or the "or" of the multiple possibilities. The term "first", "second", "third", and the like in the context of this application are used only to distinguish one object from another, and do not necessarily indicate a specific order or sequence.
[0024] Programmable Logic Controller (PLC) systems are widely used in motion control, manufacturing, new energy and other industrial automation fields. A PLC system is mainly composed of a main controller, a coupler and an Input / Output (IO) module. The main controller is used to implement the required logic control, the coupler is used to implement the communication interface conversion between the main controller and the IO module to connect the remotely extended IO module. The IO module has functions such as analog input and output, digital input and output.
[0025] With the continuous development of PLC systems, the demand for miniaturization and modularization is increasing. To meet the demand, an extended IO module with multiple functions is designed. In the prior art, the communication scheme of the extended IO module can use a serial port, a Serial Peripheral Interface (SPI), a Controller Area Network (CAN) or a Modbus industrial communication protocol, etc. The communication rate of these communication schemes is generally not more than 5 Mbps.
[0026] In addition, Ethernet based on the EtherCAT (Ethernet for Control Automation Technology) protocol can be used for communication. Although it has a high communication speed and is easily scalable, it requires the expansion IO module to be used as an EtherCAT slave, which increases the cost of the IO module.
[0027] The communication scheme that combines off-the-shelf Field-Programmable Gate Array (FPGA) with Low-Voltage Differential Signaling (LVDS) is currently also used for communication between PLC and IO modules. However, it does not support hot-swapping. If a module needs to be replaced after the equipment is put into operation, it is often necessary to shut down the equipment and power it off. The shutdown of large equipment will inevitably result in losses.
[0028] To address the aforementioned problems, this invention provides a programmable logic control system that ensures smooth system communication and enables flexible configuration of I / O modules. Furthermore, it allows for the expansion of both remote and local I / O modules, and provides unified management of these expanded I / O modules.
[0029] like Figure 1 , Figure 2 As shown, this embodiment provides a programmable logic control system, including a control module 101 and a response module 102.
[0030] The control module 101 is configured to generate and send interactive information.
[0031] The control module 101 includes a main controller 201 and a coupler 202.
[0032] Furthermore, multiple couplers 202 are connected sequentially. The coupler 202 closest to the main controller 201 is connected to the main controller 201. Data interaction is possible between couplers 202 and between couplers 202 and the main controller 201. It should be understood that, through the above structure, a series path is formed between the main controller 201 and the couplers 202. The first coupler 202 directly connected to the main controller 201 is capable of bidirectional data interaction, and adjacent couplers 202 can interact with each other. Therefore, other couplers 202 connected in series behind the first coupler 202 can interact with the main controller 201 through the series path.
[0033] The main controller 201 adopts a multiprocessor system on chip (MPSoC) including a programmable logic side and a processor side. The processor side is used for developing a PLC program and running an EtherCat master protocol stack, and the programmable logic side is used for implementing communication with the response module 102 and placing data returned by the response module 102 into a buffer area, data in the buffer area being capable of being transmitted between the programmable logic side and the processor side through a high-speed bus inside the multiprocessor system on chip.
[0034] The coupler 202 adopts a design combining a communication chip and an FPGA. The communication chip runs an EtherCAT slave protocol and communicates with the main controller 201, and the FPGA is used for communicating with the response module 102.
[0035] The response module 102 includes a plurality of input and output components 1021 connected in sequence. The input and output component 1021 close to the control module 101 is connected to the control module 101, and any input and output component 1021 is connected to an external device to be collected. It should be understood that the control module 101 and the plurality of input and output components 1021 constitute a serial communication link. The control module 101 and the input and output component 1021 directly connected thereto can communicate bidirectionally, and two adjacent input and output components 1021 can communicate bidirectionally. The communication link takes the control module 101 as a starting end.
[0036] The input and output component 1021 can be provided as an IO board card. The IO board card adopts a complex programmable logic device (CPLD) as a main control chip to realize functions such as analog input and output and digital input and output.
[0037] The CPLD itself has LVDS pins. The pins of two adjacent IO board cards are connected to each other as a physical layer interface for communication between the IO board cards. The plurality of IO board cards are connected in sequence to constitute a response module 102.
[0038] The response module 102 includes a plurality of groups. One main controller 201 can be connected to one response module 102. One coupler 202 can be connected to one response module 102. According to expansion requirements, the response module 102 connected to the main controller 201 can be expanded as a local IO expansion module, and the response module 102 connected to the coupler 202 can be expanded as a remote IO expansion module.
[0039] The number of input and output components 1021 in one response module 102 can be set according to actual requirements.
[0040] Supporting flexible addition, removal or replacement of the input / output components 1021, the system can automatically identify and reconfigure, improving the scalability and maintenance convenience of the system.
[0041] In the direction of transmitting the interaction information from the control module to the response module, any input / output component is set as the current input / output component, the input / output component adjacent to the current input / output component and close to the control module is the previous input / output component, and the input / output component adjacent to the current input / output component and away from the control module is the next input / output component.
[0042] The current input / output component 1021 is configured to collect monitoring data from an external device to be collected. The current input / output component 1021 receives the interaction information sent by the control module 101 or the previous input / output component 1021, generates response information, and sends the response information to the previous input / output component 1021. According to the interaction information, the current input / output component 1021 obtains the data required for updating, updates its own data, and writes the monitoring data and / or the data of the current input / output component 1021 into the interaction information. It is judged whether the response information sent by the previous input / output component 1021 is received, if yes, the changed interaction information is sent to the next input / output component 1021. If not, the changed interaction information is sent to the control module 101.
[0043] Wherein, after the control module 101 receives the changed interaction information, it judges whether the input / output component 1021 in the response module 102 is replaced according to the changed interaction information, if yes, it generates and sends the interaction information to the response module 102 again, and updates the data in the response module 102 again.
[0044] The control module 101 generates and sends the interaction information, wherein the main controller 201 can generate the interaction information and transmit it to the coupler 202, and the coupler 202 transmits the interaction information to the response module 102 connected thereto. The first input / output component 1021 receives and processes the information, and the subsequent components transmit and process the interaction information in series. The control module 101 and the multi-node input / output component 1021 realize automatic information interaction without manual intervention, and can complete data collection, transmission and updating. Through response judgment and information forwarding, it ensures the orderly flow of interaction information in the series components, avoiding data congestion or loss.
[0045] In some embodiments, the interaction information includes addressing information, the addressing information includes an addressing function code and a module counter, and the data required for the current input / output component 1021 to update includes an address offset.
[0046] The current input / output component 1021 is further configured to, after receiving the addressing information, calculate the address offset of the current input / output component 1021 according to the addressing information, and update its own offset address.
[0047] According to the addressing function code, the component type of the current input / output component 1021 is written into the addressing information, and the number of module counters in the addressing information is accumulated by one.
[0048] After the addressing information is changed, it is sent out.
[0049] After all the input / output components 1021 on the entire link are completed, the addressing information received by the control module 101 includes the component type of each input / output component 1021, the number of input / output components 1021, and the address offset of each input / output component 1021. On the one hand, it realizes the automatic addressing of the input / output components 1021, without the need for manual address setting, greatly reducing the operation cost during system deployment and expansion. On the other hand, the recording of the module counter and the component type enables the control module 101 to master the number and type of the input / output components 1021 in real time, providing basic data for subsequent configuration and management. The standardization of the addressing logic also ensures that different types of input / output components 1021 can be compatible in series, improving the compatibility of the system.
[0050] In some embodiments, the interaction information includes a function code. In the case where any input / output component 1021 fails and is replaced, the offset address of the replaced input / output component 1021 and the offset addresses of the input / output components 1021 after it are in an abnormal state.
[0051] The current input / output component 1021 is further configured to change the function code in the interaction information to a fault function code when the offset address is in an abnormal state, and send the changed interaction information to the control module 101.
[0052] The control module 101 is further configured to, after receiving the interaction information with the fault function code, generate and send the interaction information again to reconfigure the offset address in the input / output component 1021.
[0053] By identifying the fault state through the function code, the transmission and processing logic of the fault information are simplified, and the fault tolerance of the system is improved. The control module 101 automatically detects the received information and can accurately locate according to the fault function code, without the need for manual troubleshooting to find component replacement or address abnormality problems. After a fault, address reconfiguration is automatically triggered to ensure that the system quickly recovers to normal operation, reduces downtime, and improves reliability.
[0054] In some embodiments, the interaction information includes configuration information, and the configuration information includes a plurality of first data areas. The parameter information set in each first data area is the data required for updating the current input / output component 1021.
[0055] The current input / output component 1021 is further configured to, after receiving the configuration information, determine the first data area corresponding to the current input / output component 1021 in the plurality of first data areas according to the offset address of the current input / output component 1021, and read the parameter information therein.
[0056] According to the read parameter information, the parameters for controlling the collection of monitoring data and the parameters for maintaining safety of the current input / output component 1021 are configured.
[0057] The running state information of the current input / output component 1021 is written into the first data area corresponding to the current input / output component 1021.
[0058] After the configuration information is changed, the changed configuration information is sent out.
[0059] Each input / output component 1021 has a first data area corresponding thereto, and the configuration of the input / output component 1021 is updated according to the configuration information in the first data area, so that the parameters are accurately configured, the confusion of the parameters is avoided, and the configuration accuracy is improved.
[0060] The running state information of the input / output component 1021 is fed back in real time, so that the control module 101 can comprehensively monitor the working states of the components, and abnormalities can be found in time.
[0061] In some embodiments, the interaction information includes instruction information, and the instruction information includes a plurality of second data areas.
[0062] The current input / output component 1021 is further configured to collect monitoring data from an external device to be collected according to the instruction information.
[0063] According to the offset address of the current input / output component 1021, the second data area corresponding to the current input / output component 1021 is determined in the plurality of second data areas, and the monitoring data is written into the second data area corresponding to the current input / output component 1021.
[0064] After the instruction information is changed, the changed instruction information is sent out.
[0065] Each input / output component 1021 stores the monitoring data collected by the input / output component 1021 in the second data area corresponding to the input / output component 1021, so that the monitoring data is uploaded in a structured manner, and the control module 101 can quickly identify and process the monitoring data. The input / output component 1021 acts according to the instruction information, and the data collection and the instruction execution are bound, so that the control module 101 can trigger the collection process as needed, and the flexibility of data collection is improved.
[0066] In some embodiments, when the control module 101 receives the changed interaction information, the control module 101 is further configured to judge whether the received interaction information is correct, and if not, generate and send out the interaction instruction again, and perform data interaction with the connected response module 102 again.
[0067] The control module 101 automatically determines the correctness of information, correcting transmission errors without manual intervention and reducing system maintenance costs. Through information verification and retransmission mechanisms, the impact of data transmission errors on the system is significantly reduced, improving the reliability of interaction. This ensures the accuracy of the data acquired by the control module 101, providing a reliable basis for subsequent decision-making.
[0068] In some embodiments, during the process of sending modified interactive information to the control module 101 when the current input / output component 1021 does not receive a response, each input / output component 1021 located between the current input / output component 1021 and the control module 101 is further configured to: receive the modified interactive information sent by the next input / output component 1021, and send it to the previous input / output component 1021 or the control module 101.
[0069] After the control module 101 transmits information to the input / output component 1021, the input / output component 1021 completes the information processing and needs to transmit the processed information back to the control module 101. During the process of transmitting back to the control module 101, the last input / output component 1021 sends the information to be transmitted. All input / output components 1021 located between the last input / output component 1021 and the control module 101 only receive the information to be transmitted from the next input / output component 1021 and send the information to the previous input / output component 1021 without making any changes to the information to be transmitted.
[0070] On the one hand, this system supports bidirectional information transmission, enhancing system flexibility and fault tolerance, ensuring that local node failures do not affect the overall information flow. On the other hand, it accelerates information transmission speed and improves system operating efficiency.
[0071] Furthermore, based on this two-way communication, the input / output component 1021 at the end can actively report errors to the control module 101 according to its own situation, which facilitates system maintenance.
[0072] In practical applications, such as Figure 4 As shown, the communication process between the control module 101 and the response module 102 is divided into three stages.
[0073] The first stage is the addressing stage, where the control module 101 sends addressing information to the response module 102, such as... Figure 5 As shown, the addressing information includes the addressing function code and the module counter.
[0074] The input / output component 1021 in the response module 102 receives the addressing information, calculates its own address offset based on the addressing information, increments the number of modules recorded in the module counter in the addressing information by one, and writes its own component type code into the addressing information. Then, it sends the modified addressing information to the next input / output component 1021. In the next input / output component 1021, the addressing information is rewritten again in the same way, until the last input / output component 1021 in the entire link.
[0075] Since the last input / output component 1021 did not receive a response from the next input / output component 1021, the addressing information is rewritten and then transmitted back to the control module 101. During the transmission process, the rewritten addressing information passes through each input / output component 1021 in sequence, and the rewritten addressing information is only transmitted without being parsed in each input / output component 1021, thus shortening the data transmission time.
[0076] like Figure 6 As shown, after receiving the returned addressing information, the control module 101 obtains the number of input / output components 1021 in the response module 102 and the type of each input / output component 1021.
[0077] The second stage is the parameter configuration stage, where the control module 101 sends configuration information to the response module 102, such as... Figure 7 As shown, the configuration information includes configuration function codes, module counters, and multiple first data areas, each storing the configuration parameters corresponding to each input / output component 1021.
[0078] The input / output component 1021 has analog input / output and digital input / output functions. When inputting analog or digital signals, parameters such as filtering time can be configured. When outputting analog or digital signals, parameters such as safety guidance status can be configured.
[0079] After receiving the configuration information, the input / output component 1021 finds the corresponding first data area according to its own address offset, reads the data in it, updates its own parameters, writes its own running status into the corresponding first data area, and then sends the rewritten configuration information to the next input / output component 1021. In the next input / output component 1021, the configuration information is rewritten again in the same way, until the last input / output component 1021 in the entire link.
[0080] The process of returning the rewritten configuration information is the same as the process of returning the addressing information.
[0081] The third stage is the periodic interaction stage, in which the control module 101 sends instruction information to the response module 102, such as... Figure 8As shown, the instruction information includes an instruction function code, a module counter, and a plurality of second data areas. The plurality of second data areas respectively store output state commands corresponding to the respective input / output components 1021.
[0082] After the input / output component 1021 receives the instruction information, it finds the corresponding second data area according to its address offset, reads the data therein, writes the monitoring data collected by itself into the corresponding second data area according to the output state command, and then sends the changed instruction information to the next input / output component 1021. In the next input / output component 1021, the instruction information is again rewritten in the same way until the last input / output component 1021 in the entire link.
[0083] The rewritten instruction information is returned in the same way as the addressing information.
[0084] The control module 101 receives the rewritten addressing information, the rewritten configuration information, and the rewritten instruction information in turn, determines whether there is an error, and if there is an error, re-executes the addressing stage, the configuration stage, and the periodic interaction stage in turn.
[0085] In some embodiments, as shown, two communication interfaces are arranged on both sides of any input / output component 1021. When any input / output component 1021 is connected to an adjacent input / output component 1021, the two corresponding communication interfaces are connected, forming two paths, and the two paths independently transmit interaction information. Figure 3
[0086] The two paths transmit interaction information in parallel, independently of each other, and do not interfere with each other. When one path fails, the other path can continue to transmit information. The double-path design provides communication redundancy, greatly improving the fault tolerance of the system and avoiding communication interruption caused by single-path failure. At the same time, the standardized interface design facilitates quick connection and replacement of components, reducing maintenance difficulty.
[0087] The input / output component 1021 adopts a hand-in-hand double-path redundancy cascading mode to form two paths. On one path, a plurality of communication interfaces are arranged, and the communication interfaces have a serializer function and a deserializer function. The interaction information is converted into a high-speed LVDS signal through the bidirectional buffer of the CPLD bidirectional port. Specifically, the control module 101 includes two communication ports, a first communication port 1011 and a second communication port 1012. The input / output component 1021 includes a first interface 201, a second interface 202, a third interface 203, and a fourth interface 204.
[0088] The first interface 201 of the input / output component 1021 close to the control module 101 is connected to the first communication port 1011 of the control module 101. The second interface 202 of the input / output component 1021 close to the control module 101 is connected to the second communication port 1012 of the control module 101. The third interface 203 of the input / output component 1021 close to the control module 101 is connected to the first interface 201 of the next input / output component 1021. The fourth interface 204 of the input / output component 1021 close to the control module 101 is connected to the second interface 202 of the next input / output component 1021.
[0089] In addition to the input / output component 1021 close to the control module 101, the first interface 201 of the current input / output component 1021 is connected to the third interface 203 of the previous input / output component 1021, the second interface 202 of the current input / output component 1021 is connected to the fourth interface 204 of the previous input / output component 1021, the third interface 203 of the current input / output component 1021 is connected to the first interface 201 of the next input / output component 1021, and the fourth interface 204 of the current input / output component 1021 is connected to the second interface 202 of the next input / output component 1021.
[0090] In the direction of transmitting interactive information from the control module 101 to the response module 102, the first interface 201 of the last input / output component 1021 is connected to the third interface 203 of the previous input / output component 1021, and the second interface 202 is connected to the fourth interface 204 of the previous input / output component 1021.
[0091] The communication ports and the communication interfaces are both bidirectional LVDS communication, and two redundant paths are formed between the input / output components 1021. The two paths run independently and are redundantly switched by the main controller 201 or the coupler 202. When one of the data paths fails during data processing, the other data path is switched for processing, improving the reliability of the system.
[0092] In some embodiments, the priority of the communication interface of the previous input / output component 1021 to send information is higher than the priority of the communication interface of the next input / output component 1021 to send information, and the two adjacent and connected communication interfaces are further configured to monitor the communication state of the path formed by the two communication interfaces, and if the communication state of the path is idle, the communication interfaces transmit interactive information in descending order of priority.
[0093] Through the priority scheduling mechanism, the conflict of bidirectional information in the path is avoided, the communication delay and data loss are reduced, the utilization efficiency of the path is improved, and the bidirectional information transmission is orderly performed.
[0094] The control module 101 is equipped with a communication port, and the information sent from the communication port of the control module 101 has a higher priority than the information sent from the communication interface of the input / output component 1021. This ensures that the interactive information sent by the control module 101 is transmitted first, guaranteeing the timeliness of the core system operations.
[0095] Specifically, between adjacent input / output components 1021, each pair of connected communication interfaces maintains bidirectional peer-to-peer communication. During the communication process, the communication interfaces at both ends of the path will monitor the communication status of the path. If there is a data change on the path, it means that the path is occupied. If there is no data change on the path within a certain period of time, it means that the path is idle.
[0096] The communication interfaces at both ends of the path monitor the communication status of the path in real time. When the path is idle, the data transmission priority of the communication interface of the previous input / output component 1021 is higher than the data transmission priority of the communication interface of the current input / output component 1021. During data transmission, when the path is occupied, the lower-priority communication interface must wait for the higher-priority communication interface to complete its data transmission before it can send its own data.
[0097] Furthermore, in order to better transmit data, the control module 101 needs to set a reasonable transmission cycle when sending instruction information; otherwise, high-priority communication interfaces will continuously occupy the channel, causing channel data congestion, thereby improving the utilization rate of communication bandwidth and shortening the data update cycle.
[0098] Furthermore, during the periodic interaction phase, the control module 101 issues multiple instruction messages within one transmission cycle. During the addressing phase, the control module 101 issues one addressing message. During the configuration phase, the control module 101 issues one configuration message.
[0099] In some embodiments, the input / output component 1021 further includes a power supply, and hot-swap protection components are provided for the power supply and the communication interface, respectively.
[0100] Hot-swap protection prevents electrical signal interference or damage during the insertion and removal process, extending equipment lifespan. It supports online replacement of the 1021 input / output components, allowing maintenance without downtime, significantly improving system availability and continuous operation. This reduces maintenance complexity and enhances system operability, making it particularly suitable for industrial scenarios requiring 24-hour continuous operation.
[0101] The communication interface employs data collision avoidance technology, improving communication speed and bandwidth utilization. It also enables the response module 102 to be hot-swappable, enhancing system reliability and maintainability.
[0102] like Figure 9As shown, during normal interaction between the control module 101 and the response module 102, if all input / output components 1021 in the response module 102 are operating normally, and the function codes and offset addresses are normal, then the interaction information is updated normally, and the interaction information is transmitted to the next input / output component 1021. The last input / output component 1021 transmits information to the control module 101. If one input / output component 1021 in the response module 102 fails, causing a power outage and disconnection, then the failed input / output component 1021 and all subsequent input / output components 1021 will lose communication with the control module 101, while the input / output components 1021 preceding the failed input / output component 1021 can still communicate normally with the control module 101.
[0103] The faulty input / output component 1021 was removed and replaced with a new input / output component 1021. After being reconnected to the circuit, the newly connected input / output component 1021 and subsequent input / output components 1021, due to power failure and subsequent power-on restart, had their offset addresses restored to the initial values. Therefore, they could not correctly identify their corresponding first and second data areas in the interactive information.
[0104] The input / output component 1021 also has the function of identifying its own bias address. When the input / output component 1021 detects that its own offset address is abnormal, it only changes the function code in the interaction information when processing the interaction information, rewriting the function code as a fault function code, and does not operate the first data area and the second data area.
[0105] When the newly connected input / output component 1021 receives an interaction message with a fault function code, it only transmits the data. Finally, the interaction message with the fault function code will be sent back to the control module 101. After receiving the fault function code, the control module 101 will re-execute the addressing phase, configuration phase, and periodic interaction phase in sequence to realize the hot-plug communication recovery of the response module 102.
[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A programmable logic control system, characterized in that, include: The control module is configured to generate and send interactive information; The response module includes multiple input / output components connected in sequence, with the input / output component closest to the control module connected to the control module, and any one of the input / output components connected to an external device to be acquired; In the direction of transmitting the interactive information from the control module to the response module, any one of the input / output components is set as the current input / output component, the input / output component adjacent to and close to the control module is the previous input / output component, and the input / output component adjacent to and far from the control module is the next input / output component; the current input / output component is configured to: collect monitoring data from the external device to be collected; The system receives the interaction information sent by the control module or the previous input / output component, generates response information, and sends the response information to the previous input / output component; based on the interaction information, it obtains the data required for updating the current input / output component, updates its own data, and writes the current input / output component's own data and / or the monitoring data into the interaction information; it determines whether it has received the response information sent by the previous input / output component, and if so, sends the modified interaction information to the next input / output component. If not, the modified interaction information will be sent to the control module; After receiving the modified interaction information, the control module determines whether the input / output component in the response module has been replaced based on the modified interaction information. If so, it generates and sends the interaction information to the response module again and updates the data in the response module again.
2. The programmable logic control system according to claim 1, characterized in that, The interactive information includes addressing information, which includes addressing function code and module counter. The data required for updating the current input / output component includes address offset. The current input / output component is further configured to: after receiving the addressing information, calculate the address offset of the current input / output component based on the addressing information, and update its own offset address; According to the addressing function code, the component type of the current input / output component is written into the addressing information, and the number of module counters in the addressing information is incremented by one. After changing the addressing information, it is sent.
3. The programmable logic control system according to any one of claims 2, characterized in that, The interaction information includes function codes. If any of the input / output components fails and is replaced, the offset address of the replaced input / output component and the offset address of the subsequent input / output components are all in an abnormal state. The current input / output component is further configured to: when the offset address is in an abnormal state, change the function code in the interaction information to a fault function code, and send the changed interaction information to the control module; The control module is further configured to: after receiving the interaction information with the fault function code, regenerate and send the interaction information, and reconfigure the offset address in the input / output component.
4. The programmable logic control system according to claim 2, characterized in that, The interactive information includes configuration information, which includes multiple first data areas. The parameter information set in each first data area is the data required for updating the current input / output component. The current input / output component is further configured to: after receiving the configuration information, determine its corresponding first data area among multiple first data areas according to the offset address of the current input / output component, and read the parameter information therein; Based on the read parameter information, configure the parameters of the current input / output component for controlling the acquisition and monitoring of data and for maintaining safety; Write the current operating status information of the input / output component into its corresponding first data area; After changing the configuration information, send it out.
5. The programmable logic control system according to claim 4, characterized in that, The interactive information includes instruction information, and the instruction information includes multiple second data areas; The current input / output component is further configured to: collect the monitoring data from the external device to be collected according to the instruction information; Based on the offset address of the current input / output component, determine the second data area corresponding to itself among multiple second data areas, and write the monitoring data into the second data area corresponding to itself; After modifying the instruction information, issue it.
6. The programmable logic control system according to any one of claims 1-5, characterized in that, When the control module receives the modified interaction information, the control module is further configured to: determine whether the received interaction information is correct; if not, generate and issue the interaction command again, and perform data interaction with the connected response module again.
7. The programmable logic control system according to any one of claims 1-5, characterized in that, During the process of sending the modified interaction information to the control module when the current input / output component does not receive the response information, each input / output component located between the current input / output component and the control module is further configured to: receive the modified interaction information sent by the next input / output component, and send it to the previous input / output component or the control module.
8. The programmable logic control system according to claim 1, characterized in that, Each of the input / output components has two communication interfaces on its two sides. When any input / output component is connected to an adjacent input / output component, the two corresponding communication interfaces are connected to form two paths, and the two paths independently transmit the interactive information.
9. The programmable logic control system according to claim 8, characterized in that, The priority of information sent by the communication interface of the previous input / output component is higher than the priority of information sent by the communication interface of the next input / output component. The two adjacent and connected communication interfaces are further configured to: monitor the communication status of the path formed by the two communication interfaces; if the communication status of the path is idle, the communication interfaces transmit the interactive information in descending order of priority.
10. The programmable logic control system according to claim 8, characterized in that, The input / output components also include a power supply, and hot-swap protection components are respectively provided on the power supply and the communication interface.