Method for simultaneously and repeatedly initializing motion control card resources

By setting up the control card initial resource module, PCI driver module, upper computer and motion control card message processing program module in the motion control card, multiple initializations between the upper computer and the control card are realized, solving the problem that the initial resource of motion control card can only be allocated once in the prior art, and improving the development efficiency and the real-time and efficient system.

CN119621159APending Publication Date: 2025-03-14SHENZHEN RTELLIGENT MECHANICAL ELECTRICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411665325.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The initialization resources of existing motion control cards can only be allocated once and cannot be initialized independently again, which leads to the inability of users to use debugging software to monitor the status of the control card or the functions of the debugging card when developing applications, increasing the learning cost of developers and project development cycle.

Method used

By setting up the control card initial resource module, PCI driver module, upper computer and motion control card message processing program module, the master-slave interaction between the upper computer and the control card is realized, allowing the upper computer to map the control card resources multiple times and realize multiple initializations.

Benefits of technology

By initializing the control card resources multiple times, the debugging difficulty of control card software development is reduced, the development efficiency is increased, the needs of multi-task concurrent processing is adapted, the real-time and efficientness of the motion control card is improved, and the adaptive ability of control card software development is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621159A_ABST
    Figure CN119621159A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial control, in particular to a method for simultaneously and repeatedly initializing motion control card resources. The system comprises a control card initial resource module; the PCI driving program module is used for realizing data interaction with the control card initial resource module; the upper computer comprises an upper computer 0, an upper computer 1 and an upper computer 2, and the upper computer 0, the upper computer 1 and the upper computer 2 are respectively and independently mapped with the initial resource module of the control card. The control card resources are initialized for multiple times, so that the debugging difficulty of control card software development is greatly reduced, the development efficiency is improved, the requirement of multi-task concurrent processing can be met, the real-time performance and the high efficiency of the motion control card are improved, the self-adaptive capacity of control card software development is improved, and the application prospect is wide. According to the method, the development of a more intelligent motion control system is facilitated, multiple times of initialization of resources can be flexibly carried out, the development difficulty of control card software is reduced, and the debugging time of a control card program is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of industrial control, in particular to a method for simultaneously and multiple times initializing resources of a motion control card. Background Art

[0002] Motion control cards are devices used to control motors and other motion systems, and are widely used in automation, robotics, CNC machine tools, and other fields. Modern motion control cards are usually equipped with easy-to-use programming tools and debugging software, and provide open programming interfaces and software development tools to support compatibility with a variety of control software and hardware. However, the initialization resources of most existing motion control cards only support allocation once and cannot be initialized independently again. In this way, when users develop applications, they cannot use debugging software to monitor the status of the control card or debug the functions of the control card at the same time. With the development of industrial automation, the requirements for the ease of use of control cards and the simplicity of secondary development are constantly increasing. The traditional initialization method will bring inconvenience to customers' debugging and development, resulting in a long project development cycle, increased learning costs for developers, and difficulty for small and medium-sized enterprises to quickly develop applications. Summary of the invention

[0003] The purpose of the present invention is to provide a method for simultaneously initializing multiple motion control card resources to solve the problems raised in the above background technology.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] The present invention provides a method for simultaneously initializing multiple motion control card resources, including a control card initial resource module;

[0006] PCI driver module: the PCI driver module implements data interaction with the control card initial resource module;

[0007] Host computer: The host computer includes host computer 0, host computer 1 and host computer 2, and the host computer 0, host computer 1 and host computer 2 are independently mapped with the initial resource module of the control card;

[0008] Motion control card message processing program module: The motion control card message processing program module is connected to the PCI driver module, and the driver module is connected to the control card initial resource module, so that the interaction between the host computer and the internal program of the control card is realized in a master-slave manner. The control card acts as a slave device to keep listening to the messages of the host computer. When the host computer is initialized multiple times, the control card initial resource module, PCI driver module and motion control card message processing program module inside the control card will process these connections, and lock the received message, and only receive one complete message request each time; when the host computer acts as the master device, the host computer establishes a communication link with the control card through the control card initial resource module, and when the control card resources are initialized multiple times, the host computer can realize multiple host computers controlling the same control card resources by mapping the control card multiple times. When multiple host computers communicate at the same time, the PCI driver module will send the messages in sequence according to the instruction time. When the slave device receives the message, it will process the request and return it to the master device, thus completing the whole process of communication between the host computer and the control card.

[0009] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the calling functions used by the host computer 0, the host computer 1 and the host computer 2 are all MC_Open functions.

[0010] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the PCI driver module further includes: a shared memory for enabling the control card to respond to different requests from different host computers.

[0011] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the PCI driver module also includes an interrupt program trigger module; the motion control card message processing program module also includes an interrupt signal trigger module; and the host computer also includes an interrupt signal execution module.

[0012] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the PCI driver module further includes a communication header writing module and a communication header custom module.

[0013] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the host computer further includes a communication status monitoring module.

[0014] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the MC_Open function is a PCI_Dri_Mapping_CardIndex_DriverIndex function and a memcpy function.

[0015] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the communication status monitoring module is in data communication with the control card initial resource module and the PCI driver module.

[0016] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the motion control card message processing program module and the PCI driver module realize two-way communication.

[0017] In the above-mentioned method for simultaneously initializing multiple motion control card resources, the motion control card message processing program module is connected to the communication status monitoring module.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] The present invention provides a control card initial resource module, a PCI driver module, a host computer and a motion control card message processing program module. Since the slave device processes the message request, even if the host computer has multiple resource instances, the reliability of the motion control card communication can be guaranteed. By initializing the control card resources multiple times, the debugging difficulty of the control card software development is greatly reduced, the development efficiency is increased, and the requirements of multi-task concurrent processing are met, the real-time performance and efficiency of the motion control card are improved, the self-adaptation ability of the control card software development is improved, and it is helpful to help develop a more intelligent motion control system. In a complex motion control scenario, the system can be initialized multiple times according to different working modes or tasks, and the resources can be flexibly initialized multiple times, which reduces the difficulty of the control card software development and reduces the debugging time of the control card program. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is the overall system flow chart of the present invention;

[0021] Figure 2 It is a system flow chart of the communication status monitoring module and the host computer, the control card initial resource module, the PCI driver module and the motion control card message processing program module in the present invention;

[0022] Figure 3 It is a system flow chart of the interrupt program trigger module, the interrupt signal trigger module and the interrupt signal execution module in the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] See also Figure 1-3 ,The present invention provides a method for simultaneously initializing multiple resources of a motion control card, including a control card initial resource module;

[0025] PCI driver module: the PCI driver module implements data interaction with the control card initial resource module;

[0026] Host computer: The host computer includes host computer 0, host computer 1 and host computer 2, and the host computer 0, host computer 1 and host computer 2 are independently mapped with the initial resource module of the control card;

[0027] Motion control card message processing program module: The motion control card message processing program module is connected to the PCI driver module, and the driver module is connected to the control card initial resource module, so that the interaction between the host computer and the internal program of the control card is realized in a master-slave manner. The control card acts as a slave device to keep listening to the messages of the host computer. When the host computer is initialized multiple times, the control card initial resource module, PCI driver module and motion control card message processing program module inside the control card will process these connections, and lock the received message, and only receive one complete message request each time; when the host computer acts as the master device, the host computer establishes a communication link with the control card through the control card initial resource module, and when the control card resources are initialized multiple times, the host computer can realize multiple host computers controlling the same control card resources by mapping the control card multiple times. When multiple host computers communicate at the same time, the PCI driver module will send the messages in sequence according to the instruction time. When the slave device receives the message, it will process the request and return it to the master device, thus completing the whole process of communication between the host computer and the control card.

[0028] In the above embodiment, because the message request is processed by the slave device, the reliability of communication with the motion control card can be guaranteed even if the host computer has multiple resource instances. By initializing the control card resources multiple times, the debugging difficulty of the control card software development is greatly reduced, the development efficiency is increased, and it can adapt to the needs of multi-task concurrent processing, improve the real-time and efficiency of the motion control card, and improve the adaptability of the control card software development, which helps to develop a more intelligent motion control system. In complex motion control scenarios, the system can be initialized multiple times according to different working modes or tasks, and resources can be flexibly initialized multiple times, which reduces the difficulty of control card software development and reduces the debugging time of the control card program.

[0029] The calling functions used by the host computer 0, host computer 1 and host computer 2 are all MC_Open functions.

[0030] In the above embodiment, when multiple host computers initialize the motion control card, multiple calls to the MC_Open card opening function can be successful, and the resources of the same motion control card can be mapped, so that multiple host computers can communicate and interact with the motion control card independently.

[0031] The PCI driver module also includes: a shared memory, which is used to enable the control card to respond to different requests from different host computers.

[0032] In this embodiment, the motion control card will cyclically read the flag in the shared memory of the PCI driver module to respond to different requests from different host computers.

[0033] The PCI driver module also includes an interrupt program trigger module; the motion control card message processing program module also includes an interrupt signal trigger module; and the host computer also includes an interrupt signal execution module.

[0034] In the above embodiment, the interrupt program trigger module in the PCI driver module is triggered to cause the interrupt signal trigger module to send an interrupt signal, the interrupt signal trigger module transmits the interrupt signal to the interrupt signal execution module, and the interrupt signal execution module executes the interrupt command, thereby being able to interrupt the motion control card in a timely manner, thereby preventing the motion control card from constantly running threads and occupying the load.

[0035] The PCI driver module also includes a communication header writing module and a communication header custom module.

[0036] In this embodiment, the motion control card will cyclically read the flag in the shared memory of the PCI driver module. When the PCI driver module writes the communication header defined by the communication header customization module into the shared memory through the communication header writing module, the motion control card considers that a message request has been received, and after processing the request, it returns to write to the PCI driver module, and then returns to the host computer through the control card initial resource module. The set memcpy function will mark different instances when copying the motion control card resource information to different calling instances. Here, the communication message returned by the control card initial resource module to the host computer will be returned to the corresponding instance according to the request of different instances. For example, host computer 1 is currently requesting the current position of the control card, and host computer 2 is currently requesting the current speed of the control card. The control card initial resource module will return the request result to the corresponding host computer, thereby responding to different requests from different host computers.

[0037] The host computer also includes a communication status monitoring module.

[0038] In the above embodiment, the communication status monitoring module is configured to monitor the status of the host computer, thereby facilitating the staff to monitor the status of the host computer.

[0039] The MC_Open function is a PCI_Dri_Mapping_CardIndex_DriverIndex function and a memcpy function.

[0040] In this embodiment, the set PCI_Dri_Mapping_CardIndex_DriverIndex function maps the resources of the same card number to different calling instances; and then copies the resource information of the motion control card to different calling instances through the memcpy function, so that host computer 0, host computer 1 and host computer 2 can independently control but operate the same resource, so that host computer 0, host computer 1 and host computer 2 can independently communicate and interact with the control card.

[0041] The communication status monitoring module is in data communication with the control card initial resource module and the PCI driver module.

[0042] In the above embodiment, the communication status monitoring module is connected to the control card initial resource module and the PCI driver module, so that the working status of the control card initial resource module and the PCI driver module can be monitored in real time, so that when the control card initial resource module and the PCI driver module fail to work normally, the working status of the control card initial resource module and the PCI driver module can be promptly alarmed, thereby facilitating the staff to monitor the working status of the motion control card in a timely manner.

[0043] The motion control card message processing program module and the PCI driver module realize two-end intercommunication.

[0044] In this embodiment, the motion control card message processing program module and the PCI driver module are set to communicate with each other at both ends, which can ensure that the motion control card message processing program module and the PCI driver module can realize mutual data transmission, thereby ensuring the normal communication between the motion control card message processing program module and the PCI driver module, effectively improving the smoothness of the motion control card operation.

[0045] The motion control card message processing program module is connected to the communication status monitoring module.

[0046] In the above embodiment, the communication status monitoring module is connected to the motion control card message processing program module, and the working status of the motion control card message processing program module can be monitored in real time through the communication status monitoring module. When the motion control card message processing program module fails to work normally, the communication status monitoring module can promptly issue an alarm message to display the working status of the motion control card message processing program module, thereby facilitating the staff to conveniently monitor the working status of the motion control card message processing program module.

[0047] Working principle: The interaction between the host computer and the internal program of the control card is implemented in a master-slave manner. The control card acts as a slave device to keep listening to the messages of the host computer. When the host computer is initialized multiple times, the control card initial resource module, PCI driver module and motion control card message processing program module inside the control card will process these connections, and lock the received messages, and only receive one complete message request each time; when the host computer acts as the master device, the host computer establishes a communication link with the control card through the control card initial resource module. When the control card resources are initialized multiple times, the host computer can realize multiple host computers controlling the same control card resources by mapping the control card multiple times. When multiple host computers communicate at the same time, the PCI driver module will send the messages in sequence according to the instruction time. When the slave device receives the message After that, the request will be processed and returned to the master device, thus completing the whole process of communication between the host computer and the control card. Because the slave device processes the message request, even if the host computer has multiple resource instances, it can guarantee the reliability of communication with the motion control card. By initializing the control card resources multiple times, the debugging difficulty of the control card software development is greatly reduced, the development efficiency is increased, and it can adapt to the needs of multi-task concurrent processing, improve the real-time and efficiency of the motion control card, and improve the adaptability of the control card software development, which is helpful to help develop a more intelligent motion control system. In complex motion control scenarios, the system can be initialized multiple times according to different working modes or tasks, and resources can be flexibly initialized multiple times, which reduces the difficulty of control card software development and reduces the debugging time of the control card program.

[0048] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0049] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for simultaneously initializing multiple motion control card resources, characterized in that: Including control card initial resource module; PCI driver module: the PCI driver module implements data interaction with the control card initial resource module; Host computer: The host computer includes host computer 0, host computer 1 and host computer 2, and the host computer 0, host computer 1 and host computer 2 are independently mapped with the initial resource module of the control card; Motion control card message processing program module: The motion control card message processing program module is connected to the PCI driver module, and the driver module is connected to the control card initial resource module, so that the interaction between the host computer and the internal program of the control card is realized in a master-slave manner. The control card acts as a slave device to keep listening to the messages of the host computer. When the host computer is initialized multiple times, the control card initial resource module, PCI driver module and motion control card message processing program module inside the control card will process these connections, and lock the received message, and only receive one complete message request each time; when the host computer acts as the master device, the host computer establishes a communication link with the control card through the control card initial resource module, and when the control card resources are initialized multiple times, the host computer can realize multiple host computers controlling the same control card resources by mapping the control card multiple times. When multiple host computers communicate at the same time, the PCI driver module will send the messages in sequence according to the instruction time. When the slave device receives the message, it will process the request and return it to the master device, thus completing the whole process of communication between the host computer and the control card.

2. The method for simultaneously initializing multiple motion control card resources according to claim 1, characterized in that: The calling functions used by the host computer 0, host computer 1 and host computer 2 are all MC_Open functions.

3. A method for simultaneously initializing multiple motion control card resources according to claim 2, characterized in that: The PCI driver module also includes: a shared memory, which is used to enable the control card to respond to different requests from different host computers.

4. The method for simultaneously initializing multiple motion control card resources according to claim 3, characterized in that: The PCI driver module also includes an interrupt program trigger module; the motion control card message processing program module also includes an interrupt signal trigger module; and the host computer also includes an interrupt signal execution module.

5. A method for simultaneously initializing multiple motion control card resources according to claim 4, characterized in that: The PCI driver module also includes a communication header writing module and a communication header custom module.

6. A method for simultaneously initializing multiple motion control card resources according to claim 5, characterized in that: The host computer also includes a communication status monitoring module.

7. A method for simultaneously initializing multiple motion control card resources according to claim 6, characterized in that: The MC_Open function is a PCI_Dri_Mapping_CardIndex_DriverIndex function and a memcpy function.

8. A method for simultaneously initializing multiple motion control card resources according to claim 7, characterized in that: The communication status monitoring module is in data communication with the control card initial resource module and the PCI driver module.

9. A method for simultaneously initializing multiple motion control card resources according to claim 8, characterized in that: The motion control card message processing program module and the PCI driver program module realize two-end intercommunication.

10. The method for simultaneously initializing multiple motion control card resources according to claim 9, characterized in that: The motion control card message processing program module is connected to the communication status monitoring module.