Bus type numerical control system and control method thereof
By using a bus conversion card to generate encoder pulses with an FPGA chip, closed-loop control of the bus servo motor is achieved. This solves the development cost and anti-interference problems when adapting CNC numerical control system software to bus servo motors, reduces the amount of servo motor wiring work, and improves data transmission stability.
Patent Information
- Application Number
- CN202110995442.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2041-08-27
AI Technical Summary
Existing CNC numerical control system software requires a redesign of the software architecture when adapting to bus-type servo motors, which increases development costs, and analog signal transmission has poor anti-interference capabilities.
By using a bus conversion card and an FPGA chip, compatibility with bus servo motors is achieved. Encoder pulses are generated and transmitted to the CNC numerical control system software to realize closed-loop control and avoid the need to redevelop the CNC numerical control system software.
This approach achieves compatibility with bus servo motors without altering the existing CNC numerical control system software, reducing development costs, improving data transmission stability and anti-interference capabilities, and minimizing servo motor wiring workload.
Smart Images

Figure CN115729173B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of numerical control system, more particularly, to a bus type numerical control system and a control method thereof. BACKGROUND
[0002] In the field of numerical control system, compared with traditional analog servo motor, bus type servo motor has the advantages of simple wiring, convenient debugging, flexible topology structure, high transmission precision and strong anti-interference ability. However, in order to realize complex motion control calculation such as speed planning, speed loop and position loop closed loop, the CNC numerical control system software corresponding to the analog quantity servo analog numerical control system needs to be adapted to the bus type servo to complete a large amount of work or even needs to be redesigned, which greatly increases the development cost. SUMMARY
[0003] The purpose of the present application is to provide a bus type numerical control system and a control method thereof, which can realize compatibility with bus servo motor without changing the original CNC numerical control system software, without the need to redevelop CNC numerical control system software, and greatly reduce the product cost.
[0004] In order to solve the above problems, the embodiments of the present application provide the technical solutions as follows:
[0005] A bus type numerical control system, comprising a CNC numerical control system software, a bus master station and a bus servo motor slave station.
[0006] The bus master station comprises a bus conversion card, which is used to simulate the feedback position transmitted by the bus servo motor slave station, generate an encoder pulse and transmit the encoder pulse to the CNC numerical control system software, so as to realize the closed loop control of the CNC numerical control system software on the bus servo motor slave station.
[0007] Further, the bus conversion card comprises an FPGA chip, a PCI interface, a mainboard serial interface and an Ethernet interface, the FPGA chip communicates with the CNC numerical control system software through the PCI interface, the FPGA chip communicates with the host computer serial port software through the mainboard serial interface, and the FPGA chip communicates with the bus servo motor slave station through the Ethernet interface.
[0008] Further, the FPGA chip comprises a CPU, a serial communication module and a protocol stack IP, the CPU is connected with the serial communication module and the protocol stack IP, the serial communication module is connected with the mainboard serial interface, and the protocol stack IP is connected with the Ethernet interface.
[0009] Further, the FPGA chip further comprises a PCI-axis control module, a digital IO interaction module, a control voltage acquisition module and an encoder pulse generator, the PCI-axis control module is connected with the PCI interface, the digital IO interaction module, the control voltage acquisition module and the encoder pulse generator respectively, and the digital IO interaction module, the control voltage acquisition module and the encoder pulse generator are connected with the CPU respectively.
[0010] Further, the bus master station is a MECHATROLINK-III bus master station, an EtherCAT bus master station or a SERCOS-III bus master station.
[0011] Further, the protocol stack IP is a MECHATROLINK-III protocol stack IP, and the CPU is used for MECHATROLINK-III bus network communication processing, the MECHATROLINK-III bus network communication processing comprising servo motor slave station parameter configuration, user instruction processing of a serial port host computer, acquisition of control data of the servo motor slave station and conversion into a MECHATROLINK-III bus standard servo architecture command and sending to the servo motor slave station, and analog encoder pulse feedback according to feedback position of the servo motor.
[0012] Further, the control voltage acquisition module extracts a control voltage value from a digital-analog conversion device control interface of the PCI-axis control module and stores the control voltage value in a register, and an application program of the CPU reads the voltage value in the register according to a MECHATROLINK-III bus communication period, converts the voltage value into a speed control instruction of a MECHATROLINK-III bus standard servo architecture and sends the speed control instruction to the servo motor, so as to realize motion control of the servo motor.
[0013] Further, the application program of the CPU acquires feedback position of the servo motor from the MECHATROLINK-II protocol stack IP, calculates A, B and C phase pulse quantities of the current period and phase relationship of A and B phase pulses, and the encoder pulse generator generates A, B and C phase pulses according to the A, B and C phase pulse quantities of the current period and the phase relationship of the A and B phase pulses.
[0014] Further, the FPGA chip is an Xilinx Spartan-6LX series chip or a ZYNQ-7000 series SOC chip.
[0015] In order to solve the above technical problems, the embodiment of the application further provides a control method of a bus type numerical control system, which adopts the technical scheme as follows:
[0016] A control method of a bus type numerical control system, based on the bus type numerical control system as described above, comprises the following steps:
[0017] The feedback position of the bus servo motor slave station is simulated to generate an encoder pulse and transmit the encoder pulse to the CNC numerical control system software.
[0018] The CNC numerical control system software processes the encoder pulse to generate a control instruction for the bus servo motor slave station.
[0019] Compared with the prior art, the embodiment of the application has the following beneficial effects:
[0020] A bus type numerical control system and a control method thereof, according to the motor feedback position of a bus servo motor slave station periodically acquired in a bus master station, a bus conversion card simulates the feedback position to generate an encoder pulse and transmits the encoder pulse to CNC numerical control system software, the CNC numerical control system software calculates the position of the servo motor, thereby realizing closed-loop control of the bus servo motor slave station. The compatibility of the bus servo motor is realized through the bus conversion card without changing the original CNC numerical control system software, thereby greatly reducing the product cost without redeveloping the CNC numerical control system software. Compared with the existing analog quantity type numerical control system, the workload and cost of servo motor wiring are greatly reduced, which is particularly prominent when a large number of servo motors need to be controlled in the numerical control system. At the same time, the data transmission mode is changed from an analog signal to a digital signal, improving the stability and anti-interference of data transmission, and further reducing the design cost of data transmission in terms of anti-interference. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the scheme of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0022] Figure 1 It is a structure block diagram of the analog quantity type numerical control system in the prior art.
[0023] Figure 2 It is a structure block diagram of the bus type numerical control system in the embodiment of the application.
[0024] Figure 3 It is a structure block diagram of the bus conversion card in the embodiment of the application.
[0025] Explanation of reference signs:
[0026] 1, CNC system software; 2, bus conversion card; 3, FPGA chip; 31, CPU; 32, serial communication module; 33, protocol stack IP; 34, PCI-axis control module; 35, encoder pulse generator; 36, digital IO interaction module; 37, control voltage acquisition module; 4, PCI interface; 5, mainboard serial interface; 6, PHY chip; 7, RJ45 interface; 8, DDR memory. DETAILED DESCRIPTION
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application. The present specification and claims for this application and the aforementioned description of drawings use the terms "comprising", "having" and "including" and their variations thereof to mean "open-ended" including but not limited to. The terms "first", "second", and the like, as used in the description herein, are used for distinguishing between similar objects talking about the application. The terms "first", "second", and the like are not necessarily used herein to describe a particular sequential order, unless explicitly stated.
[0028] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily referring to the same embodiment nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly understood that the embodiments described herein can be combined with each other, even though not explicitly stated.
[0029] In order for those skilled in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the relevant drawings.
[0030] EMBODIMENT
[0031] In order to solve the above-mentioned technical problems, the embodiment of the present application provides a bus type numerical control system, which adopts the technical solutions as follows:
[0032] As shown in Figure 2 and Figure 3 , a bus type numerical control system comprises CNC system software 1, a bus master station and a bus servo motor slave station; the bus master station comprises a bus conversion card 2, the bus conversion card 2 is used to simulate the feedback position transmitted by the bus servo motor slave station, generate an encoder pulse and transmit the encoder pulse to the CNC system software 1, so as to realize the closed-loop control of the CNC system software 1 on the bus servo motor slave station.
[0033] The bus-based CNC system provided in this invention uses a bus converter card 2 to simulate encoder pulses based on the periodically acquired motor feedback positions of the bus servo motor slaves from the bus master station. These encoder pulses are then transmitted to the CNC system software 1, which calculates the servo motor position, thus achieving closed-loop control of the bus servo motor slaves. This system achieves compatibility with the bus servo motors through the bus converter card 2 without altering the existing CNC system software 1, eliminating the need for redevelopment and significantly reducing product costs. Compared to existing analog CNC systems, this system drastically reduces the workload and cost of servo motor wiring, especially beneficial when controlling a large number of servo motors. Furthermore, the data transmission method is changed from analog to digital signals, improving data transmission stability and anti-interference capabilities, while also reducing design costs related to anti-interference measures.
[0034] The bus master station is a MECHATROLINK-III bus master station, an EtherCAT bus master station, or a SERCOS-III bus master station. In this embodiment of the invention, the bus master station is a MECHATROLINK-III bus master station, and correspondingly, the bus servo motor slave station is a MECHATROLINK-III bus servo motor slave station. It is understood that this embodiment of the invention uses the MECHATROLINK-III bus as an example for illustration and is not intended to be limiting.
[0035] Existing analog numerical control systems such as Figure 1 As shown, the CNC numerical control system software controls the servo motor through the PCI-axis control card. The PCI-axis control card outputs voltage through the control voltage wiring to achieve speed control of the servo motor; it achieves control of the servo motor such as enabling, brake control, and alarm feedback through the digital I / O wiring; at the same time, it obtains the analog encoder position feedback of the servo motor through the encoder feedback wiring and uploads it to the CNC numerical control system software.
[0036] The bus-type CNC system of the present invention, such as Figure 2As shown, the bus protocol physical layer adopts a standard Ethernet physical layer, and the bus master station and the bus servo motor slave station are connected by a CAT5 network cable, and the servo motor control signal is transmitted through the MECHATROLINK-III bus standard servo architecture command. Since the CNC numerical control system software 1 calculates the servo motor position according to the pulse count of the encoder feedback, the technical problem to be solved by the present application is to simulate the generation of the encoder pulse according to the periodic acquisition of the motor feedback position in the MECHATROLINK-III master station, so that the CNC numerical control system software 1 calculates the position of the servo motor, thereby realizing the original closed-loop control. At the same time, the control voltage of the PCI-axis control card needs to be converted into a speed value in the speed instruction unit system, and then the speed value is transmitted to the MECHATROLINK-III bus master station through the bus conversion card 2.
[0037] The servo speed control command of the MECHATROLINK-III is issued to the servo motor to directly control the speed, and in addition, the digital IO signal also needs to be converted into the standard servo command of the MECHATROLINK-III. The present application converts the analog quantity control servo mode into the MECHATROLINK-III bus mode to control the servo motor, and the analog quantity numerical control system can realize the control of the MECHATROLINK-III bus servo motor through the bus conversion card 2, without the need to redevelop the CNC numerical control system software 1, thereby greatly reducing the product cost, and for the machine tool equipment manufacturers, the structure and wiring cost can also be reduced.
[0038] The bus conversion card 2 comprises an FPGA chip 3, a PCI interface 4, a mainboard serial interface 5 and an Ethernet interface, the FPGA chip 3 communicates with the CNC numerical control system software 1 through the PCI interface 4, the FPGA chip 3 communicates with the host computer serial port software through the mainboard serial interface 5, and the FPGA chip 3 communicates with the bus servo motor slave station through the Ethernet interface. Among the external interfaces of the FPGA chip 3, the PCI interface 4 is a standard PCI interface 4, the mainboard serial interface 5 is a standard serial port, and the Ethernet interface is a standard Ethernet interface RJ45.
[0039] The FPGA chip 3 is an Xilinx Spartan-6LX series chip or a ZYNQ-7000 series SOC chip. In the embodiment of the present application, the FPGA chip 3 is an Xilinx Spartan-6LX series chip. It can be understood that the FPGA chip 3 is an Xilinx Spartan-6LX series chip as an example in the embodiment of the present application, which is not limited.
[0040] The FPGA chip 3 comprises a CPU 31, a serial communication module 32 and a protocol stack IP 33, the CPU 31 is connected with the serial communication module 32 and the protocol stack IP 33, the serial communication module 32 is connected with the mainboard serial interface 5, and the protocol stack IP 33 is connected with the Ethernet interface.
[0041] In the embodiment of the application, the CPU 31 is a MicroBlaze CPU, a soft microprocessor IP core of Xilinx Company, and is equipped with an external DDR memory 8. The CPU 31 is used for MECHATROLINK-III bus network communication processing, and the MECHATROLINK-III bus network communication processing comprises servo motor slave station parameter configuration, user instruction processing of a serial port host computer, acquisition of control data of the servo motor slave station and conversion into MECHATROLINK-III bus standard servo architecture command and sending to the servo motor slave station, and analog encoder pulse feedback according to feedback position of the servo motor.
[0042] The main functions of the MECHATROLINK-III bus conversion card 2 are realized by the code module and the IP core of the FPGA, so that the circuit design of the conversion card is simplified, and the working stability and reliability are improved.
[0043] The serial communication module 32 adopts a soft serial port IP and is connected to the MicroBlaze CPU through a bus protocol bus. The mainboard serial interface 5 is connected with the mainboard serial port through a wire harness and receives user instructions of the serial port host computer and reports alarm information of the bus conversion card 2. A baud rate of 9600 bps is adopted, the communication adopts a response mode, the data receiving side can correctly receive data, and 16-bit CRC check data is set. The serial communication function is used to provide monitoring and maintenance of the MECHATROLINK-III bus conversion card 2 for the user, and a simple method for the user to configure servo motor parameters is realized.
[0044] The protocol stack IP 33 is a MECHATROLINK-III protocol stack IP, adopts a TIP-MLMST-S6-PROJ protocol stack IP core of Tokyo Electron Co., Ltd., and is developed based on an FPGA platform of an Xilinx Spartan-6 LX series. It should be noted that, when the FPGA chip 3 of the application adopts an Xilinx Spartan-6 LX series chip, the MECHATROLINK-III protocol stack IP is
[0045] When the FPGA chip 3 of the application adopts the ZYNQ-7000 series SOC chip, the MECHATROLINK-III protocol stack IP is replaced by a TIP-MLMST-Z7-PROJ protocol stack IP core.
[0046] The MECHATROLINK-III protocol stack IP is connected with the MECHATROLINK-III bus slave station through a standard Ethernet physical layer, that is, the MECHATROLINK-III protocol stack IP is connected with the MECHATROLINK-III bus slave station through the PHY chip 6 and the RJ45 interface 7, and is responsible for realizing data exchange between the master station and the slave station, but does not process the data. The data processing is realized by the application program of the MicroBlaze CPU, the application program is connected with the MECHATROLINK-III protocol stack IP through the master station access driver program interface provided by the MECHATROLINK-III protocol stack IP to realize data interaction, and the application program is responsible for the initialization data configuration of the master station and the periodic user data processing of the cyclic communication.
[0047] The FPGA chip 3 further comprises a PCI-axis control module 34, a digital IO interaction module 36, a control voltage acquisition module 37 and an encoder pulse generator 35, the PCI-axis control module 34 is connected with the PCI interface 4, the digital IO interaction module 36, the control voltage acquisition module 37 and the encoder pulse generator 35 respectively, and the digital IO interaction module 36, the control voltage acquisition module 37 and the encoder pulse generator 35 are connected with the CPU 31 respectively.
[0048] In the embodiment of the application, the PCI-axis control module 34 is an FPGA code module in the PCI-axis control card, and realizes data communication with the CNC numerical control system software 1 through the standard PCI interface 4. The servo motor control data stream of the PCI-axis control module 34 is no longer interacted with the servo motor through the peripheral driving circuit, but is directly interacted with the MicroBlaze CPU on the FPGA chip 3, and then is converted into a MECHATROLINK-III bus standard servo architecture command and transmitted to the servo motor slave station through the MECHATROLINK-III bus network, so that the function of the original PCI-axis control card is realized.
[0049] The digital IO interaction module 36 adopts the axi_gpio IP module provided by the FPGA development environment, is connected to the MicroBlaze CPU through a bus protocol bus, and the signals interacted by the digital IO interaction module 36 include an enable signal, a brake signal and an alarm signal of the servo motor.
[0050] The application program of the MicroBlaze CPU sends an enable command or a brake command of the MECHATROLINK-III bus standard servo architecture to the servo motor after receiving the enable signal or the brake signal, and the application program of the MicroBlaze CPU sends an alarm signal to the PCI-axis control module 34 after receiving the alarm information fed back by the servo motor from the MECHATROLINK-III protocol stack IP, and finally the alarm signal is fed back to the CNC numerical control system software 1 by the PCI-axis control module 34.
[0051] The control voltage acquisition module 37 extracts the control voltage value from the digital-analog conversion device control interface of the PCI-axis control module 34 and stores the control voltage value in a register, the application program of the MicroBlaze CPU reads the voltage value in the register according to the MECHATROLINK-III bus communication cycle, then converts the voltage value into a speed control instruction of the MECHATROLINK-III bus standard servo architecture and sends the speed control instruction to the servo motor, so as to realize the motion control of the servo motor.
[0052] The encoder pulse generator 35 is used for simulating the A, B and C phase pulses fed back by the servo motor encoder to the CNC numerical control system software 1, the CNC numerical control system software 1 calculates the position of the machine tool according to the feedback pulses, calculates the control voltage of the servo motor in the next time through interpolation, and then sends the control voltage to the servo motor through the MECHATROLINK-II bus network after conversion, so as to realize the original speed closed-loop control of the servo motor by the CNC numerical control system software 1.
[0053] In order to solve the above technical problems, the embodiment of the application further provides a control method of a bus type numerical control system, which adopts the technical scheme as follows:
[0054] The control method of the bus type numerical control system is based on the bus type numerical control system as described above, and comprises the following steps:
[0055] The feedback position of the bus servo motor slave station is simulated to generate an encoder pulse and transmit the encoder pulse to the CNC system software;
[0056] The CNC system software processes the encoder pulse to generate a control instruction for the bus servo motor slave station.
[0057] The control method of the bus type CNC system provided by the embodiment of the application comprises the following steps: according to the motor feedback position of the bus servo motor slave station periodically acquired in the bus master station, the feedback position is simulated by a bus conversion card 2 to generate an encoder pulse, and the encoder pulse is transmitted to a CNC system software 1; the CNC system software 1 calculates the position of the servo motor, so that the closed-loop control of the bus servo motor slave station is realized. The compatibility of the bus servo motor is realized through the bus conversion card 2 without changing the original CNC system software 1, so that the CNC system software 1 does not need to be redeveloped, and the product cost is greatly reduced. Compared with the existing analog quantity type CNC system, the workload and cost of servo motor wiring are greatly reduced, which is particularly prominent when a large number of servo motors need to be controlled in the CNC system. At the same time, the data transmission mode is changed from an analog signal to a digital signal, the stability and anti-interference performance of data transmission are improved, and the design cost of data transmission in the anti-interference aspect is reduced.
[0058] Obviously, the above-described embodiments are only some of the embodiments of the present application, but not all the embodiments. The preferred embodiments of the present application are given in the drawings, but do not limit the patent scope of the present application. The present application can be implemented in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some technical features. Any equivalent structure made by using the content of the present application specification and drawings, directly or indirectly applied to other related technical fields, is also within the patent protection scope of the present application.
Claims
1. A bus type CNC system, characterized in that, comprising CNC system software, bus master station and bus servo motor slave station; the bus master station comprises a bus conversion card, the bus conversion card comprises an FPGA chip, the FPGA chip comprises an encoder pulse generator, a PCI-axis control module, a control voltage acquisition module, a CPU, a protocol stack IP, the encoder pulse generator is used for simulating the A, B, C phase pulses of the servo motor encoder feedback to the CNC system software, wherein the application program of the CPU obtains the feedback position of the servo motor from the MECHATROLINK-III protocol stack IP, calculates the A, B, C phase pulse quantity of the current cycle and the phase relationship of the A, B phase pulses, the encoder pulse generator generates A, B, C phase pulses according to the A, B, C phase pulse quantity of the current cycle and the phase relationship of the A, B phase pulses, the CNC system software calculates the machine tool position according to the feedback pulse, interpolates to calculate the control voltage of the next servo motor, and sends the converted control voltage of the next servo motor to the bus servo motor slave station through the MECHATROLINK-III bus network, wherein the control voltage acquisition module extracts the control voltage from the digital-analog conversion device control interface of the PCI-axis control module and stores it in the register, and the application program of the CPU reads the voltage value in the register according to the MECHATROLINK-III bus communication cycle, converts it into the speed control instruction of the MECHATROLINK-III bus standard servo architecture, and sends it to the bus servo motor slave station, so as to realize the closed-loop control of the CNC system software on the bus servo motor slave station. 2.The bus type CNC system according to claim 1, characterized in that, the bus conversion card further comprises a PCI interface, a mainboard serial interface and an Ethernet interface, the FPGA chip communicates with the CNC system software through the PCI interface, the FPGA chip communicates with the host computer serial port software through the mainboard serial interface, and the FPGA chip communicates with the bus servo motor slave station through the Ethernet interface. 3.The bus type CNC system according to claim 2, characterized in that, the FPGA chip further comprises a serial communication module, the CPU is connected with the serial communication module and the protocol stack IP, the serial communication module is connected with the mainboard serial interface, and the protocol stack IP is connected with the Ethernet interface. 4.The bus type CNC system according to claim 3, characterized in that, the FPGA chip further comprises a digital IO interaction module, the PCI-axis control module is connected with the PCI interface, the digital IO interaction module, the control voltage acquisition module and the encoder pulse generator respectively, and the digital IO interaction module, the control voltage acquisition module and the encoder pulse generator are connected with the CPU respectively. 5.The bus type CNC system according to claim 1, characterized in that, The bus master is a MECHATROLINK-III bus master, an EtherCAT bus master or a SERCOS-III bus master.
6. The bus numerical control system according to claim 4, wherein the bus numerical control system is a bus numerical control system for a servo motor. The protocol stack IP is a MECHATROLINK-III protocol stack IP, and the CPU is used for MECHATROLINK-III bus network communication processing, which includes servo motor slave station parameter configuration, user instruction processing of a serial port host computer, obtaining control data of the servo motor slave station and converting the control data into a MECHATROLINK-III bus standard servo architecture command to send to the servo motor slave station, and analog encoder pulse feedback according to feedback position of the servo motor.
7. The bus numerical control system according to claim 2, wherein the bus numerical control system is a bus numerical control system for a servo motor. The FPGA chip is an Xilinx Spartan-6 LX series chip or a ZYNQ-7000 series SOC chip.
8. A control method of a bus-type NC system based on the bus-type NC system according to any one of claims 1 to 7, characterized by, The method comprises the following steps: The feedback position of the bus servo motor slave station is simulated to generate an encoder pulse, and the encoder pulse is transmitted to the CNC numerical control system software. The CNC numerical control system software processes the encoder pulse to generate a control instruction for the bus servo motor slave station.
Citation Information
Patent Citations
Numerical control communications facilities
CN207457812U