Driving equipment, extension module thereof and driving equipment control method
By providing an expansion module that integrates bus expansion and PLC control for drive devices, the problems of scalability and control process simplification for drive devices with limited hardware resources are solved, achieving simultaneous integration and optimization of functions.
Patent Information
- Application Number
- CN202411046057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-02-03
AI Technical Summary
After installing a bus expansion module, it becomes difficult to add a PLC control module to the drive device, making it difficult to balance scalability and control process simplification with limited hardware resources.
An expansion module is provided, which integrates a bus expansion system and a PLC control system. It connects to the drive device through an interface, and establishes bus and PLC control connections respectively after receiving information from the host computer to realize functional expansion.
With limited hardware resources, the drive device can integrate both a bus expansion module and a PLC control module, improving scalability and simplifying the control process.
Smart Images

Figure CN121455872A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial communication technology, and in particular to a drive device and its extension module, and a drive device control method. Background Technology
[0002] Drive devices (such as frequency converters and servo drives) are typically highly integrated and intelligent. To achieve efficient control and data exchange of drive devices, bus (master / slave) expansion modules are usually provided to connect the drive devices to automation systems using various communication protocols.
[0003] However, due to the limitations of the hardware resources of the drive device, once the bus expansion module is installed, it becomes very difficult to add a PLC control module with PLC (Programmable Logic Controller) control function.
[0004] Therefore, how to simultaneously improve the scalability of driver devices and simplify the control process under limited hardware resources is an urgent problem to be solved. Summary of the Invention
[0005] The main objective of this application is to provide a drive device and its expansion module, as well as a drive device control method, which aims to enable the drive device to integrate the functions of a bus expansion module and a PLC control module under limited hardware resources, so as to improve the scalability of the drive device and simplify the control process of the drive device.
[0006] To achieve the above objectives, this application provides an expansion module for a drive device. The expansion module includes a first interface, a second interface, a bus expansion system, and a PLC control system. The expansion module is connected to the drive device through the first interface, and the bus expansion system is connected to the second interface. The second interface is used to connect to a host computer.
[0007] The bus expansion system is used to establish a communication connection between the expansion module and the bus system upon receiving the protocol configuration information output by the host computer.
[0008] The PLC control system is used to control the operation of the drive device upon receiving the drive device control program output by the host computer.
[0009] In one embodiment, the bus expansion system includes a configuration information storage area, a multiplexing unit, and a protocol network area connected in sequence.
[0010] The configuration information storage area is used to download and store the protocol configuration information output by the host computer;
[0011] The multiplexing unit is used to find the target communication protocol corresponding to the protocol configuration information from the protocol network area based on the protocol configuration information stored in the configuration information storage area, and to establish a communication connection between the extension module and the bus system based on the target communication protocol and the protocol extension type contained in the protocol configuration information.
[0012] The protocol network area is used to record various communication protocols.
[0013] In one embodiment, the bus expansion system further includes a protocol conversion unit connected to the protocol network area;
[0014] The protocol conversion unit is used to convert the target communication protocol into a protocol compatible with the driver device, and to establish a communication connection between the driver device and the bus system based on the converted protocol.
[0015] In one embodiment, the PLC control system includes a PLC task area and a task processor connected in sequence;
[0016] The PLC task area is used to download and store the drive device control program output by the host computer;
[0017] The task processor is used to control the operation of the drive device based on the drive device control program stored in the PLC task area.
[0018] In one embodiment, the expansion module further includes an I / O interface;
[0019] The I / O interface is used to implement data input and data output of the drive device.
[0020] In one embodiment, the expansion module further includes a fault diagnosis module;
[0021] The fault diagnosis module is used to perform fault diagnosis on the expansion module, drive device and / or bus system.
[0022] In one embodiment, the first interface is a UART interface or an SPI interface, and the second interface is an Ethernet interface.
[0023] In addition, to achieve the above objectives, this application also provides a driving device, which includes an expansion module of the driving device as described above; the expansion module is connected to the driving device through a first interface, and the expansion module is used to connect to a host computer through a second interface.
[0024] Furthermore, to achieve the above objectives, this application also provides a drive device control method, the method comprising:
[0025] Upon receiving the protocol configuration information, a communication connection is established between the expansion module of the driver device and the bus system based on the received protocol configuration information.
[0026] Upon receiving the drive device control program, the system controls the drive device to operate based on the received program.
[0027] In one embodiment, the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information includes:
[0028] Based on the received protocol configuration information, determine the target communication protocol corresponding to the protocol configuration information;
[0029] Based on the target communication protocol and the protocol extension type contained in the protocol configuration information, a communication connection is established between the extension module of the driver device and the bus system.
[0030] In one embodiment, the bus system includes a bus master unit and a bus slave unit; the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the target communication protocol and the protocol extension type included in the protocol configuration information includes:
[0031] If the protocol extension type included in the protocol configuration information is a slave protocol extension, a communication connection is established between the extension module of the drive device and the bus master unit based on the target communication protocol.
[0032] If the protocol extension type included in the protocol configuration information is the master station protocol extension, a communication connection is established between the extension module of the driver device and the bus slave unit based on the target communication protocol.
[0033] In one embodiment, after establishing a communication connection between the expansion module of the driving device and the bus system, the method further includes:
[0034] The target communication protocol is converted into a protocol compatible with the driver device, and a communication connection between the driver device and the bus system is established based on the converted protocol.
[0035] In one embodiment, after establishing a communication connection between the expansion module of the driving device and the bus system, the method further includes:
[0036] If new protocol configuration information and / or a new driver control program are received, the driver control expansion module will disconnect from the bus system.
[0037] After the expansion module of the drive device disconnects from the bus system, the communication connection between the expansion module of the drive device and the bus system is re-established according to the new protocol configuration information, and / or the drive device is re-controlled to operate based on the new drive device control program.
[0038] In one embodiment, before the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information, the method further includes:
[0039] After receiving the protocol configuration information, the received protocol configuration information is downloaded and stored in the configuration information storage area of the bus expansion system of the expansion module, so as to execute the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information through the bus expansion system.
[0040] In one embodiment, prior to the step of controlling the operation of the drive device based on the received drive device control program, the method further includes:
[0041] After receiving the drive device control program, the received drive device control program is downloaded and stored in the PLC task area of the PLC control system of the expansion module, so that the PLC control system can execute the step of controlling the operation of the drive device based on the received drive device control program.
[0042] In addition, to achieve the above objectives, this application also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the drive device control method described above.
[0043] In addition, to achieve the above objectives, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the drive device control method described above.
[0044] This application provides an expansion module for a drive device. The expansion module includes a first interface, a second interface, a bus expansion system, and a PLC control system. The expansion module is connected to the drive device through the first interface, and the bus expansion system is connected to the second interface. The second interface is used to connect to a host computer. The bus expansion system is used to establish a communication connection between the expansion module and the bus system upon receiving protocol configuration information output from the host computer. The PLC control system is used to control the operation of the drive device upon receiving the drive device control program output from the host computer.
[0045] This application establishes an expansion module that integrates the functions of both a bus expansion module and a PLC control module, and connects it to the drive device via a first interface. Thus, when the drive device needs to implement the functions of the bus expansion module—that is, when the expansion module receives protocol configuration information output from the host computer—it can achieve the functions of the bus expansion module through the bus expansion system. Similarly, when the drive device needs to implement the functions of the PLC control module—that is, when the expansion module receives the drive device control program output from the host computer—it can achieve the functions of the PLC control module through the PLC control system.
[0046] Therefore, this application provides an expansion module that integrates both a bus expansion module and a PLC control module for the drive device. This enables the drive device to integrate the functions of both a bus expansion module and a PLC control module within limited hardware resources, thereby improving the expandability of the drive device while simplifying its control process. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a schematic diagram of the module structure of the expansion module provided in the first embodiment of this application;
[0050] Figure 2 This is a schematic diagram illustrating the implementation process of the expansion module provided in the first embodiment of this application;
[0051] Figure 3 A schematic diagram of a module structure of the bus expansion system provided in the second embodiment of this application;
[0052] Figure 4 This is a schematic diagram of another module structure of the bus expansion system provided in the second embodiment of this application;
[0053] Figure 5 A schematic diagram of the module structure of the PLC control system provided in the third embodiment of this application;
[0054] Figure 6 This is a schematic diagram of the module structure of the expansion module provided in the fourth embodiment of this application;
[0055] Figure 7 This is a schematic diagram of the module structure of the expansion module provided in the fifth embodiment of this application;
[0056] Figure 8 A flowchart illustrating the specific implementation of the extended module provided in the embodiments of this application;
[0057] Figure 9 This is a flowchart illustrating the drive device control method according to an embodiment of this application.
[0058] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings.
[0059] Explanation of icon numbers:
[0060] 10. First interface; 20. Second interface; 30. Bus expansion system; 31. Configuration information storage area; 32. Multiplexing unit; 33. Protocol network area; 34. Protocol conversion unit; 40. PLC control system; 41. PLC task area; 42. Task processor; 50. I / O interface; 60. Fault diagnosis module; 100. Drive device; 200. Host computer; 300. Bus system. Detailed Implementation
[0061] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0062] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0063] Drive devices (such as frequency converters and servo drives) are typically highly integrated and intelligent. To achieve efficient control and data exchange of drive devices, bus (master / slave) expansion modules are usually provided to connect the drive devices to automation systems using various communication protocols.
[0064] However, due to the limitations of the hardware resources of the drive device, once the bus expansion module is installed, it becomes very difficult to add a PLC control module with PLC control functions.
[0065] A PLC (Programmable Logic Controller) is a highly integrated electronic system whose core function is digital computation. PLCs use flexibly programmable memory to store specific program instructions, which cover logic operations, sequential control, timing operations, counting operations, and basic arithmetic calculations. PLCs can control various types of machinery or production processes through digital or analog inputs / outputs.
[0066] Expanding the PLC control module of the drive equipment enables the drive equipment to execute more complex control logic, such as motion control and sequential control, which is beneficial to improving the automation level and production efficiency of the drive equipment.
[0067] Therefore, how to simultaneously improve the scalability of driver devices and simplify the control process under limited hardware resources is an urgent problem to be solved.
[0068] Based on this, this application provides an expansion module for a drive device. The expansion module includes a first interface, a second interface, a bus expansion system, and a PLC control system. The expansion module is connected to the drive device through the first interface, and the bus expansion system is connected to the second interface. The second interface is used to connect to a host computer. The bus expansion system is used to establish a communication connection between the expansion module and the bus system upon receiving protocol configuration information output from the host computer. The PLC control system is used to control the operation of the drive device upon receiving the drive device control program output from the host computer.
[0069] This application establishes an expansion module that integrates the functions of both a bus expansion module and a PLC control module, and connects it to the drive device via a first interface. Thus, when the drive device needs to implement the functions of the bus expansion module—that is, when the expansion module receives protocol configuration information output from the host computer—it can achieve the functions of the bus expansion module through the bus expansion system. Similarly, when the drive device needs to implement the functions of the PLC control module—that is, when the expansion module receives the drive device control program output from the host computer—it can achieve the functions of the PLC control module through the PLC control system.
[0070] Therefore, this application provides an expansion module that integrates both a bus expansion module and a PLC control module for the drive device. This enables the drive device to integrate the functions of both a bus expansion module and a PLC control module within limited hardware resources, thereby improving the expandability of the drive device while simplifying its control process.
[0071] This application presents an expansion module for a drive device according to a first embodiment. Please refer to [link / reference]. Figure 1The expansion module includes a first interface 10, a second interface 20, a bus expansion system 30, and a PLC control system 40. The expansion module is connected to the drive device 100 through the first interface 10, and the bus expansion system 30 is connected to the second interface 20. The second interface 20 is used to connect to the host computer 200. The bus expansion system 30 is used to establish a connection between the expansion module and the bus system 300 when it receives protocol configuration information output by the host computer 200. The PLC control system 40 is used to control the operation of the drive device 100 when it receives the drive device control program output by the host computer 200.
[0072] It should be noted that the first interface 10 can be a UART (Universal Asynchronous Receiver / Transmitter) interface or an SPI (Serial Peripheral Interface) interface, etc. The second interface 20 can be an Ethernet interface. In actual use, the first interface 10 is essentially connected to the driver device 100 by being plugged into the main circuit board of the driver device 100; the second interface 20 is essentially connected to the host computer 200 through a relevant communication protocol (such as TCP / IP (Transmission Control Protocol / Internet Protocol)).
[0073] The expansion module can be powered by the main circuit board of the drive device 100 to which it is inserted, and the expansion module starts working after the main circuit board is powered on.
[0074] In one feasible implementation, to reduce the complexity of implementing the related functions of the expansion module, the expansion module can be designed based on a multi-core processor. For example, the expansion module can be designed based on a multi-core processor of the TI AM243X chip, wherein the processor has a Cortex-R5F core and a PRU_ICSSG module; the bus expansion system 30 can run on the PRU_ICSSG module, and the PLC control system 40 can run on the Cortex-R5F core.
[0075] The expansion module can receive protocol configuration information and driver control program output by the host computer 200 at the same time; or it can receive protocol configuration information and driver control program output by the host computer 200 at different times.
[0076] Even if the expansion module receives the protocol configuration information and drive device control program output by the host computer 200 simultaneously, the bus expansion system 30 and the PLC control system 40 will not start operating at the same time. Instead, one of them will start operating first, and after one has completed its relevant operations, the other will start operating. In one feasible implementation, the bus expansion system 30 can be started first to establish a connection between the expansion module and the bus system 300, and then the PLC control system 40 can be started to control the operation of the drive device 100. See [reference needed] for details. Figure 2 Specifically: After power-on, the expansion module first checks whether it has received protocol configuration information output from the host computer 200. If so, it starts the bus expansion system 30 to run the corresponding bus protocol line. If not, or if the bus expansion system 30 completes the corresponding operation, it checks whether it has received the drive device control program output from the host computer 200. If so, it starts the PLC control system 40 to run the drive device control program. Furthermore, it can continue to monitor whether the expansion module receives a new drive device control program. If so, it stops bus communication (i.e., disconnects the communication connection between the expansion module and the bus system 300) and restarts the PLC control system 40.
[0077] Additionally, it should be noted that the PLC control system 40 includes the functions of conventional PLC runtime software, such as task scheduling, program execution, input / output processing, debugging, and diagnostics. The PLC control system 40 can consist of one or more processors, memories, and other components that work together to achieve functions consistent with those of the PLC controller. In one feasible implementation, the PLC control system 40 can be PLC runtime software.
[0078] Understandably, after the expansion module is connected to the host computer 200 via the second interface 20, the drive device control program and the configured protocol configuration information written by the user in the relevant software (such as PLC programming software and bus configuration software) of the host computer 200 can be downloaded and stored in the PLC task area of the PLC control system 40 and the configuration information storage area of the bus expansion system 30, respectively. Thus, the bus expansion system 30 can determine the target communication protocol used when communicating with the bus system 300 based on the protocol configuration information, and establish a communication connection accordingly to realize the bus protocol expansion function. Correspondingly, the PLC control system 40 can control the drive device 100 to operate based on the drive device control program, thereby realizing the PLC control function.
[0079] In one feasible implementation, the second interface 20 of the expansion module can also be directly connected to the relevant software (such as PLC programming software, bus configuration software, and drive device debugging software) on the host computer 200.
[0080] This embodiment integrates both a bus expansion module and a PLC control module into an expansion module, which is connected to the drive device 100 via the first interface 10. Thus, when the drive device 100 needs to implement the bus expansion module's function (i.e., when the expansion module receives protocol configuration information output from the host computer 2000), it can achieve the bus expansion module's function through the bus expansion system 30. Similarly, when the drive device needs to implement the PLC control module's function (i.e., when the expansion module receives the drive device control program output from the host computer 200), it can achieve the PLC control module's function through the PLC control system 40.
[0081] Therefore, this embodiment provides the drive device 100 with an expansion module that integrates the functions of both a bus expansion module and a PLC control module. This enables the drive device 100 to integrate the functions of both the bus expansion module and the PLC control module within limited hardware resources, thereby improving the expandability of the drive device 100 while simplifying its control process.
[0082] Based on the first embodiment described above, a second embodiment of the extended module of this application is proposed. For the second embodiment, please refer to... Figure 3 The bus expansion system 30 may include a configuration information storage area 31, a multiplexing unit 32, and a protocol network area 33. The configuration information storage area 31 is used to download and store the protocol configuration information output by the host computer 200, and the protocol network area 33 is used to record various communication protocols. The multiplexing unit 32 is used to: find the target communication protocol corresponding to the protocol configuration information in the protocol network area 33 based on the protocol configuration information stored in the configuration information storage area 31, and establish a communication connection between the expansion module and the bus system 300 based on the target communication protocol and the protocol extension type contained in the protocol configuration information.
[0083] It should be noted that the protocol configuration information may include, but is not limited to, protocol register address, protocol register value, and protocol extension type. Protocol extension type may include slave protocol extension and master protocol extension. Slave protocol extension indicates that the extension is a slave protocol, and master protocol extension indicates that the extension is a master protocol. The target communication protocol is the communication protocol used when the extension module communicates with the bus system 300. The various communication protocols recorded in the protocol network area 33 may include, but are not limited to, EtherCAT, PROFINET, and EthernetIP protocols.
[0084] In one feasible implementation, the bus system 300 may include a bus master unit and a bus slave unit. The process of establishing a communication connection between the expansion module and the bus system 300 based on the target communication protocol and the protocol extension type contained in the protocol configuration information may include: if the protocol extension type contained in the protocol configuration information is a slave protocol extension, establishing a communication connection between the expansion module of the driving device and the bus master unit based on the target communication protocol; if the protocol extension type contained in the protocol configuration information is a master protocol extension, establishing a communication connection between the expansion module of the driving device and the bus slave unit based on the target communication protocol.
[0085] The bus master unit can be a bus network, while the bus slave unit can be other drive devices, PLC control modules, etc.
[0086] It is understandable that, since the expansion module is essentially an expansion module installed on the drive device 100, the communication connection between the drive device 100 and the bus system 300 can be realized by establishing a communication connection between the expansion module and the bus system 300.
[0087] In one feasible implementation, to ensure that the target communication protocol is compatible with the driver device 100, please refer to... Figure 4 The bus expansion system 30 may also include a protocol conversion unit 34 connected to the protocol network area 33; the protocol conversion unit 34 is used to convert the target communication protocol into a protocol adapted to the driver device 100, such as the MODBUS protocol, and establish a communication connection between the driver device 100 and the bus system 300 based on the converted protocol.
[0088] Based on the first and / or second embodiments described above, a third embodiment of the extended module of this application is proposed. In the third embodiment, please refer to... Figure 5 The PLC control system 40 may include a PLC task area 41 and a task processor 42; the PLC task area 41 is used to download and store the drive device control program output by the host computer 200; the task processor 42 is used to control the drive device 100 to run based on the drive device control program stored in the PLC task area 41.
[0089] Based on the first, second, and / or third embodiments described above, a fourth embodiment of the extended module of this application is proposed. Please refer to [link / reference needed]. Figure 6 In the fourth embodiment, the expansion module may further include an I / O interface 50 for implementing data input and data output of the driving device 100.
[0090] It should be noted that the expansion module's I / O interface can realize input and output of different data types, such as analog input, analog output, digital input, and digital output.
[0091] It is understandable that the number of I / O interfaces that a driver device 100 typically comes with is limited, making it difficult to meet actual usage needs. Therefore, this embodiment includes an expansion module with I / O interfaces. After the expansion module is connected to the driver device 100 through the first interface 10, the I / O interfaces of the expansion module will serve as the expanded I / O interfaces of the driver device 100, enabling data input and output of the driver device 100, thereby expanding the input / output capabilities of the driver device 100.
[0092] For example, the I / O interface of the expansion module and the I / O interface of the drive device 100 can be connected to the motor and automation application device.
[0093] Based on the first, second, third, and / or fourth embodiments described above, a fifth embodiment of the extended module of this application is proposed. Please refer to [link / reference needed]. Figure 7 In the fifth embodiment, the expansion module may further include a fault diagnosis module 60; the fault diagnosis module 60 is used to perform fault diagnosis on the expansion module, the drive device 100 and / or the bus system 300.
[0094] It should be noted that the fault diagnosis module 60 can detect potential faults by monitoring the status of the expansion module, drive device 100, and / or bus system 300 in real time. If a fault is detected, alarm information can be sent to the host computer 200 or the monitoring system through the second interface 20.
[0095] In addition, to facilitate subsequent fault analysis and handling, fault logs can be recorded in the corresponding area of the expansion module.
[0096] In addition to using the fault diagnosis module 60 to diagnose faults in the expansion module, drive device 100, and / or bus system 300, other embodiments may also include modules capable of performing various functions to allow for diverse operations on the expansion module, drive device 100, and / or bus system 300. For example, a module capable of performing maintenance operations on itself, drive device 100, and / or bus system 300 may be provided.
[0097] Based on the first, second, third, fourth and / or fifth embodiments described above, a sixth embodiment of the extended module of this application is proposed. In the sixth embodiment, the PLC control system 40 may further include a drive device algorithm area, which is used to store the algorithms that have been turned off in the drive device 100.
[0098] Understandably, to improve the data processing and response speed of the drive device, some algorithms of the drive device (for example, algorithms that do not have high real-time requirements but have a large amount of computation and complex logic processing) can be turned off. Then, these turned-off algorithms are stored in the drive device algorithm area of the PLC control system 40, so that the PLC control system 40 can subsequently implement the functions of these turned-off algorithms of the drive device 100.
[0099] In practical use, users can write programs with the algorithm turned off on the PLC programming software of the host computer 200, and after compiling the written programs, download them to the drive device algorithm area of the PLC control system 40.
[0100] For example, to help understand the implementation process of the extended module obtained by combining the above embodiments, please refer to... Figure 8 , specifically:
[0101] After the host computer 100 outputs the protocol configuration information and the drive device control program to the expansion module, the configuration information storage area 31 of the bus expansion system 30 will download and store the protocol configuration information, and the PLC task area 41 of the PLC control system 40 will download and store the drive device control program.
[0102] After the configuration information storage area 31 downloads and stores the protocol configuration information, the multiplexing unit 32 extracts the protocol configuration information from the configuration information storage area 31, then finds the target communication protocol corresponding to the protocol configuration information from the protocol network area 33, and establishes a communication connection between the expansion module and the bus system 300 based on the target communication protocol and the protocol extension type contained in the protocol configuration information; then, the target communication protocol is converted into the MODBUS protocol by the protocol conversion unit 34 to complete the communication connection between the drive device 100 and the bus system 300.
[0103] After the PLC task area 41 of the PLC control system 40 downloads and stores the drive device control program, the task processor 42 of the PLC control system 40 will control the drive device 100 to run by running the drive device control program.
[0104] It should be noted that the above examples are only for the purpose of assisting in understanding this application and do not constitute a limitation on the extended module of the driving device of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0105] This application embodiment also provides a driving device 100, which includes an expansion module: the expansion module is connected to the driving device 100 through a first interface 10, and the expansion module is used to connect to a host computer 200 through a second interface 20. The structure of the expansion module can be referred to the above embodiments, and will not be repeated here. Naturally, since the driving device of this embodiment includes all the technical solutions of all the above-described expansion module embodiments, and the achieved technical effects are exactly the same, it will not be repeated here.
[0106] This application also provides a method for controlling a drive device. Please refer to... Figure 9 The drive device control method includes steps S10 to S20:
[0107] Step S10: Upon receiving the protocol configuration information, establish a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information.
[0108] Step S20: Upon receiving the drive device control program, control the drive device to operate based on the received drive device control program.
[0109] In one possible implementation, step S10 may include:
[0110] Step S11: Based on the received protocol configuration information, determine the target communication protocol corresponding to the protocol configuration information;
[0111] It should be noted that, as mentioned above, the protocol network area of the bus expansion system of the expansion module records various different communication protocols. Therefore, step S11 may include: based on the received protocol configuration information, searching for the target communication protocol corresponding to the protocol configuration information in the protocol network area.
[0112] Step S12: Based on the target communication protocol and the protocol extension type contained in the protocol configuration information, establish a communication connection between the expansion module of the driver device and the bus system.
[0113] In one feasible implementation, the bus system includes a bus master unit and a bus slave unit, and step S12 may include:
[0114] Step S121: If the protocol extension type included in the protocol configuration information is slave protocol extension, establish a communication connection between the extension module of the driver device and the bus master unit based on the target communication protocol.
[0115] Step S122: If the protocol extension type included in the protocol configuration information is the master station protocol extension, establish a communication connection between the extension module of the driver device and the bus slave unit based on the target communication protocol.
[0116] It should be noted that if the protocol extension type included in the protocol configuration information is a slave protocol extension, a communication connection can be established between the drive device's expansion module and the bus master unit based on the target communication protocol. This allows the drive device to be controlled by a higher-level controller. If the protocol extension type included in the protocol configuration information is a master protocol extension, a communication connection can be established between the drive device's expansion module and the bus slave unit based on the target communication protocol. This enables PLC control of the bus slave unit.
[0117] In one feasible implementation, after step S20, the drive device control method may further include step S30:
[0118] Step S30: Convert the target communication protocol into a protocol compatible with the driver device, and establish a communication connection between the driver device and the bus system based on the converted protocol.
[0119] In one feasible implementation, after step S20, the drive device control method may further include steps S40 to S50:
[0120] Step S40: If new protocol configuration information and / or a new driver control program are received, the expansion module of the driver control device is disconnected from the communication connection with the bus system.
[0121] Step S50: After the expansion module of the drive device disconnects from the bus system, the communication connection between the expansion module of the drive device and the bus system is re-established according to the new protocol configuration information, and / or the drive device is re-controlled to run based on the new drive device control program.
[0122] Understandably, receiving new protocol configuration information and / or a new driver control program indicates a need to adjust the communication protocol used to establish a communication connection between the driver and the bus system, and / or adjust the control of the driver. In this case, to implement the corresponding adjustments, it is necessary to first disconnect the communication connection between the driver's expansion module and the bus system, i.e., disable the bus protocol extension function of the expansion module; then, based on the new protocol configuration information, re-establish the communication connection between the driver's expansion module and the bus system, and / or, based on the new driver control program, re-control the driver's operation. This improves the maintainability and upgradeability of the driver.
[0123] In one feasible implementation, prior to step S10, the drive device control method may further include step S101:
[0124] Step S101: After receiving the protocol configuration information, the received protocol configuration information is downloaded and stored in the configuration information storage area of the bus expansion system of the expansion module, so as to perform the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information through the bus expansion system.
[0125] In one feasible implementation, prior to step S20, the drive device control method may further include step S201:
[0126] Step S201: After receiving the drive device control program, download and store the received drive device control program to the PLC task area of the PLC control system of the expansion module, so that the PLC control system can execute the steps of controlling the operation of the drive device based on the received drive device control program.
[0127] The drive device control method provided in this application, applied to the expansion module of the drive device in the above embodiments, enables the drive device to simultaneously integrate the functions of a bus expansion module and a PLC control module with limited hardware resources, thereby improving the scalability of the drive device while simplifying the control process. Compared with the prior art, the beneficial effects of the drive device control method provided in this application are the same as those of the expansion module provided in the above embodiments, and will not be repeated here.
[0128] This application also provides a computer-readable storage medium storing a program for a smart home system that can run on a processor. The computer-readable program instructions are used to execute the drive device control method in the above embodiments.
[0129] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0130] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0131] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, cause the electronic device to: upon receiving protocol configuration information, establish a communication connection between the expansion module of the drive device and the bus system based on the received protocol configuration information; and upon receiving a drive device control program, control the operation of the drive device based on the received drive device control program.
[0132] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0134] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0135] The computer-readable storage medium provided in this application embodiment stores computer-readable program instructions for executing the above-described drive device control method. This enables the drive device to simultaneously integrate the functions of a bus expansion module and a PLC control module within limited hardware resources, thereby improving the scalability of the drive device while simplifying its control flow. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application embodiment are the same as those of the drive device control method provided in the above embodiments, and will not be repeated here.
[0136] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the drive device control method described above.
[0137] The computer program product provided in this application embodiment enables a drive device to simultaneously integrate the functions of a bus expansion module and a PLC control module with limited hardware resources, thereby improving the scalability of the drive device while simplifying its control process. Compared with the prior art, the beneficial effects of the computer program product provided in this application embodiment are the same as those of the drive device control method provided in the above embodiments, and will not be repeated here.
[0138] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. An expansion module for a drive device, characterized in that, The expansion module includes a first interface, a second interface, a bus expansion system, and a PLC control system; the expansion module is connected to the drive device through the first interface, and the bus expansion system is connected to the second interface; The second interface is used to connect to the host computer; The bus expansion system is used to establish a communication connection between the expansion module and the bus system upon receiving the protocol configuration information output by the host computer. The PLC control system is used to control the operation of the drive device upon receiving the drive device control program output by the host computer.
2. The expansion module of the drive device as described in claim 1, characterized in that, The bus expansion system includes a configuration information storage area, a multiplexing unit, and a protocol network area connected in sequence. The configuration information storage area is used to download and store the protocol configuration information output by the host computer; The multiplexing unit is used to find the target communication protocol corresponding to the protocol configuration information from the protocol network area based on the protocol configuration information stored in the configuration information storage area, and to establish a communication connection between the extension module and the bus system based on the target communication protocol and the protocol extension type contained in the protocol configuration information. The protocol network area is used to record various communication protocols.
3. The expansion module of the drive device as described in claim 2, characterized in that, The bus expansion system also includes a protocol conversion unit connected to the protocol network area; The protocol conversion unit is used to convert the target communication protocol into a protocol compatible with the driver device, and to establish a communication connection between the driver device and the bus system based on the converted protocol.
4. The expansion module of the drive device as described in claim 1, characterized in that, The PLC control system includes a PLC task area and a task processor connected in sequence. The PLC task area is used to download and store the drive device control program output by the host computer; The task processor is used to control the operation of the drive device based on the drive device control program stored in the PLC task area.
5. The expansion module of the drive device as described in any one of claims 1 to 4, characterized in that, The expansion module also includes an I / O interface; The I / O interface is used to implement data input and data output of the drive device.
6. The expansion module of the drive device as described in any one of claims 1 to 4, characterized in that, The expansion module also includes a fault diagnosis module; The fault diagnosis module is used to perform fault diagnosis on the expansion module, drive device and / or bus system.
7. The expansion module of the drive device as described in any one of claims 1 to 4, characterized in that, The first interface is a UART interface or an SPI interface, and the second interface is an Ethernet interface.
8. A driving device, characterized in that, The driving device includes an expansion module of the driving device as described in any one of claims 1 to 7; the expansion module is connected to the driving device through a first interface, and the expansion module is used to connect to a host computer through a second interface.
9. A method for controlling a drive device, characterized in that, The method includes: Upon receiving the protocol configuration information, a communication connection is established between the expansion module of the driver device and the bus system based on the received protocol configuration information. Upon receiving the drive device control program, the system controls the drive device to operate based on the received program.
10. The method as described in claim 9, characterized in that, The step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information includes: Based on the received protocol configuration information, determine the target communication protocol corresponding to the protocol configuration information; Based on the target communication protocol and the protocol extension type contained in the protocol configuration information, a communication connection is established between the extension module of the driver device and the bus system.
11. The method as described in claim 10, characterized in that, The bus system includes a bus master unit and a bus slave unit; the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the target communication protocol and the protocol extension type contained in the protocol configuration information includes: If the protocol extension type included in the protocol configuration information is a slave protocol extension, a communication connection is established between the extension module of the drive device and the bus master unit based on the target communication protocol. If the protocol extension type included in the protocol configuration information is the master station protocol extension, a communication connection is established between the extension module of the driver device and the bus slave unit based on the target communication protocol.
12. The method as described in claim 10, characterized in that, After establishing the communication connection between the expansion module of the drive device and the bus system, the method further includes: The target communication protocol is converted into a protocol compatible with the driver device, and a communication connection between the driver device and the bus system is established based on the converted protocol.
13. The method according to any one of claims 9 to 12, characterized in that, After establishing the communication connection between the expansion module of the drive device and the bus system, the method further includes: If new protocol configuration information and / or a new driver control program are received, the driver control expansion module will disconnect from the bus system. After the expansion module of the drive device disconnects from the bus system, the communication connection between the expansion module of the drive device and the bus system is re-established according to the new protocol configuration information, and / or the drive device is re-controlled to operate based on the new drive device control program.
14. The method according to any one of claims 9 to 12, characterized in that, Before the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information, the method further includes: After receiving the protocol configuration information, the received protocol configuration information is downloaded and stored in the configuration information storage area of the bus expansion system of the expansion module, so as to execute the step of establishing a communication connection between the expansion module of the driver device and the bus system based on the received protocol configuration information through the bus expansion system.
15. The method according to any one of claims 9 to 12, characterized in that, Before the step of controlling the operation of the drive device based on the received drive device control program, the method further includes: After receiving the drive device control program, the received drive device control program is downloaded and stored in the PLC task area of the PLC control system of the expansion module, so that the PLC control system can execute the step of controlling the operation of the drive device based on the received drive device control program.