CN113655754A - System and method for translating AI natural language description into Python code - Google Patents

System and method for translating AI natural language description into Python code Download PDF

Info

Publication number
CN113655754A
CN113655754A CN202110739169.9A CN202110739169A CN113655754A CN 113655754 A CN113655754 A CN 113655754A CN 202110739169 A CN202110739169 A CN 202110739169A CN 113655754 A CN113655754 A CN 113655754A
Authority
CN
China
Prior art keywords
module
synchronous control
control module
axis synchronous
pulse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110739169.9A
Other languages
Chinese (zh)
Inventor
薛智夫
吴振寰
刘桐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110739169.9A priority Critical patent/CN113655754A/en
Publication of CN113655754A publication Critical patent/CN113655754A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1167Pulse wave output

Abstract

The invention discloses a system and a method for translating an AI natural language description to a Python code, which comprises a multi-axis synchronous control module, a PLC (programmable logic controller), a pulse acquisition module and a servo motor driving module, wherein the input end of the pulse acquisition module is connected with the output end of an external master motor encoder, the first end of each multi-axis synchronous control module is connected with the output end of the pulse acquisition module, and the third end of each multi-axis synchronous control module is connected with a plurality of servo motor driving modules. The system and the method for translating the AI natural language description to the Python code realize the functions of pulse counting, generating slave motor control pulses, parallelly controlling the slave motor pulses and integrating an industrial Ethernet interface through a multi-axis synchronous control module, realize high-precision synchronous control among all slave motors through a networking structure, and realize communication among the synchronous control system, an external PLC (programmable logic controller), an upper computer and a human-computer interface through an industrial Ethernet bus.

Description

System and method for translating AI natural language description into Python code
Technical Field
The invention relates to the technical field of multi-motor synchronous control, in particular to a system and a method for translating AI natural language description into Python codes.
Background
In the field of motor synchronous control application, because a single-shaft system drives large-scale symmetrical loads, the driving force of the loads at two ends is often inconsistent, and thus adverse effects are generated on the quality of products and the service life of equipment, the conventional motor synchronous control is mainly composed of a core controller and a plurality of subunits connected with the core controller, each subunit is provided with an independent motor for controlling a corresponding motion shaft, the motion shafts of the subunits can run in parallel and synchronously under the control of the controller, and each shaft is driven by the independent motor, so that the load capacity of the shaft is remarkably improved, the mechanical structure of the equipment is greatly simplified, and higher precision and synchronization control are realized.
Therefore, there is a need for a system and method for translating AI natural language description to Python code to solve the above problems.
Disclosure of Invention
The invention mainly aims to provide a system and a method for translating AI natural language description into Python codes, which can effectively solve the problems in the background art.
In order to achieve the purpose, the invention adopts the technical scheme that:
AI natural language description to Python code translation system, including multiaxis synchronous control module, PLC controller, pulse acquisition module and servo motor drive module, pulse acquisition module's input links to each other with outside master motor encoder's output, every multiaxis synchronous control module's first end all links to each other with pulse acquisition module's output, every multiaxis synchronous control module's third end all links to each other with a plurality of servo motor drive modules.
Preferably, the second end of each multi-axis synchronous control module is used as an interface connected with an industrial ethernet network, and communicates with the PLC controller through the interface.
Preferably, the output end of each servo motor driving module is electrically connected with the input end of each slave motor.
Preferably, the multi-axis synchronous control module comprises a processor control program, a dual-port RAM and a processor application program, wherein the processor control program is electrically connected with the output end and the input end of the dual-port RAM, and the output end and the input end of the dual-port RAM and the processor application program are electrically connected with each other.
Preferably, an input end of the first port of the processor control program is electrically connected with an output end of the QEP module, an output end of the second port of the processor control program is electrically connected with an input end of the pulse transmitting module, and the processor application program is electrically connected with an output end and an input end of the processor industrial ethernet protocol stack.
Preferably, the output ends of the crystal oscillator, the simulation port and the power supply are electrically connected with the input end of the multi-axis synchronous control module, and the SDRAM, the FLASH, the EPCS64 and the EEPROM are electrically connected with the output end and the input end of the multi-axis synchronous control module.
Preferably, the input that multiaxis synchronous control module passes through the QEP module is connected with the output electricity of pulse collection module, the pulse collection module is including signal isolation and difference transmission, multiaxis synchronous control module is connected with servo motor drive module's input electricity through the output of pulse sending module, servo motor drive module is including signal isolation and difference transmission, multiaxis synchronous control module passes through treater industry ethernet protocol stack and the output and the input interconnect electricity of ethernet transceiver, the output and the input interconnect electricity of ethernet transceiver and industry ethernet.
Preferably, the pulse acquisition module acquires a pulse coding signal output by an external master motor encoder, and performs differential processing and magnetic coupling isolation processing on the pulse coding signal to obtain a target pulse coding signal.
Preferably, the QEP module in each multi-axis synchronous control module counts the target pulse code signal output by the pulse acquisition module, the processor in each multi-axis synchronous control module periodically samples the target pulse code signal, and position information and direction information of the slave motor controlled in a period are obtained according to the system state configuration, wherein the position information includes the number of pulses for controlling the slave motor to rotate, and the direction information includes the direction for controlling the slave motor to rotate.
Preferably, the field IO device transmits a field control command to the PLC controller, the PLC controller transmits the control command to each multi-axis synchronous control module, the multi-axis synchronous control module changes a state of the system according to the control command, and obtains new position information according to the changed state of the system.
Preferably, each multi-axis synchronous control module transmits new position information and direction information to a corresponding servo motor driving module, and each servo motor driving module performs magnetic coupling isolation processing and differential conversion on the direction information and the new position information to generate a corresponding differential direction signal and a differential pulse number signal; and the external slave motor is driven and controlled in parallel through the differential direction signal and the differential pulse signal.
A method for describing an AI natural language to a Python code translation system comprises the following steps:
s1: the pulse acquisition module acquires pulse coding signals output by an external master motor encoder, and performs differential processing and magnetic coupling isolation processing on the pulse coding signals to obtain target pulse coding signals;
s2: the QEP module in each multi-axis synchronous control module counts target pulse code signals output by the pulse acquisition module, a processor in each multi-axis synchronous control module performs periodic sampling, and position information and direction information of a controlled slave motor in a period are obtained according to system state configuration, wherein the position information comprises the number of pulses for controlling the slave motor to rotate, and the direction information comprises the direction for controlling the slave motor to rotate;
s3: the field IO equipment transmits a field control command to the PLC, the PLC transmits the control command to each multi-axis synchronous control module, the multi-axis synchronous control modules change the state of the system according to the control command, and new position information is obtained according to the changed system state;
s4: each multi-axis synchronous control module transmits new position information and direction information to a corresponding servo motor driving module, and each servo motor driving module performs magnetic coupling isolation processing and differential conversion on the direction information and the new position information to generate a corresponding differential direction signal and a differential pulse number signal; and the external slave motor is driven and controlled in parallel through the differential direction signal and the differential pulse signal.
Advantageous effects
Compared with the prior art, the invention provides a system and a method for translating AI natural language description into Python codes, which have the following beneficial effects:
1. the system and the method for translating the AI natural language description into the Python code realize the functions of pulse counting, generating slave motor control pulses, parallelly controlling the slave motor pulses and integrating industrial Ethernet interfaces through a multi-axis synchronous control module, and realize high-precision synchronous control among all slave motors through a networking structure.
2. The system and the method for translating the AI natural language description into the Python code realize the communication among the synchronous control system, the external PLC, the upper computer and the human-computer interface through an industrial Ethernet bus; the PLC controller is accessed to the Internet through the gateway, so that site information can be remotely accessed through the Internet anywhere, and relevant parameters can be monitored and debugged anytime and anywhere.
Drawings
FIG. 1 is a main system diagram of the present invention;
fig. 2 is a system diagram of a multi-axis synchronous control module of the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
The first embodiment is as follows:
as shown in fig. 1-2, the AI natural language description to Python code translation system includes a multi-axis synchronous control module, a PLC controller, a pulse acquisition module and a servo motor driving module, wherein an input end of the pulse acquisition module is connected with an output end of an external master motor encoder, a first end of each multi-axis synchronous control module is connected with an output end of the pulse acquisition module, a third end of each multi-axis synchronous control module is connected with a plurality of servo motor driving modules, a second end of each multi-axis synchronous control module is used as an interface connected with an industrial ethernet network and communicates with the PLC controller through the interface, an output end of each servo motor driving module is electrically connected with an input end of each slave motor, the multi-axis synchronous control module includes a processor control program, a dual-port RAM, and a processor application program, the processor control program is electrically connected with an output end and an input end of the dual-port RAM, the output end and the input end of a double-port RAM and a processor application program are electrically connected with each other, the input end of a first port of a processor control program is electrically connected with the output end of a QEP module, the output end of a second port of the processor control program is electrically connected with the input end of a pulse transmitting module, the output end and the input end of a processor industrial Ethernet protocol stack are electrically connected with each other, the output ends of a crystal oscillator, a simulation port and a power supply are electrically connected with the input end of a multi-shaft synchronous control module, the SDRAM, the FLASH, the EPCS64 and the EEPROM are electrically connected with the output end and the input end of the multi-shaft synchronous control module, the multi-shaft synchronous control module is electrically connected with the output end of the pulse acquisition module through the input end of the QEP module, the pulse acquisition module comprises signal isolation and differential transmission, and the multi-shaft synchronous control module is electrically connected with the input end of a servo motor driving module through the output end of the pulse transmitting module, the servo motor driving module comprises signal isolation and differential transmission, the multi-axis synchronous control module is electrically connected with the output end and the input end of the Ethernet transceiver through the processor industrial Ethernet protocol stack, and the Ethernet transceiver is electrically connected with the output end and the input end of the industrial Ethernet.
Example two:
the method for describing the AI natural language to the Python code translation system comprises the following operation steps when in use:
s1: the pulse acquisition module acquires pulse coding signals output by an external master motor encoder, and performs differential processing and magnetic coupling isolation processing on the pulse coding signals to obtain target pulse coding signals;
s2: the QEP module in each multi-axis synchronous control module counts target pulse code signals output by the pulse acquisition module, a processor in each multi-axis synchronous control module performs periodic sampling, and position information and direction information of a controlled slave motor in a period are obtained according to system state configuration, wherein the position information comprises the number of pulses for controlling the slave motor to rotate, and the direction information comprises the direction for controlling the slave motor to rotate;
s3: the field IO equipment transmits a field control command to the PLC, the PLC transmits the control command to each multi-axis synchronous control module, the multi-axis synchronous control modules change the state of the system according to the control command, and new position information is obtained according to the changed system state;
s4: each multi-axis synchronous control module transmits new position information and direction information to a corresponding servo motor driving module, and each servo motor driving module performs magnetic coupling isolation processing and differential conversion on the direction information and the new position information to generate a corresponding differential direction signal and a differential pulse number signal; and the external slave motor is driven and controlled in parallel through the differential direction signal and the differential pulse signal.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (8)

  1. AI natural language description to Python code translation system, including multiaxis synchronous control module, PLC controller, pulse acquisition module and servo motor drive module, its characterized in that: the input end of the pulse acquisition module is connected with the output end of an external master motor encoder, the first end of each multi-axis synchronous control module is connected with the output end of the pulse acquisition module, and the third end of each multi-axis synchronous control module is connected with a plurality of servo motor driving modules.
  2. 2. The AI natural language description to Python code translation system of claim 1, wherein: and the second end of each multi-axis synchronous control module is used as an interface connected with an industrial Ethernet and is communicated with the PLC through the interface.
  3. 3. The AI natural language description to Python code translation system of claim 2, wherein: and the output end of each servo motor driving module is electrically connected with the input end of each slave motor.
  4. 4. The AI natural language description to Python code translation system of claim 3, wherein: the multi-axis synchronous control module comprises a processor control program, a dual-port RAM and a processor application program, wherein the processor control program is electrically connected with the output end and the input end of the dual-port RAM, and the output end and the input end of the dual-port RAM and the processor application program are electrically connected with each other.
  5. 5. The AI natural language description to Python code translation system of claim 4, wherein: the input end of the first port of the processor control program is electrically connected with the output end of the QEP module, the output end of the second port of the processor control program is electrically connected with the input end of the pulse sending module, and the processor application program is electrically connected with the output end and the input end of the processor industrial Ethernet protocol stack.
  6. 6. The AI natural language description to Python code translation system of claim 5, wherein: the output ends of the crystal oscillator, the simulation port and the power supply are electrically connected with the input end of the multi-axis synchronous control module, and the SDRAM, the FLASH, the EPCS64 and the EEPROM are electrically connected with the output end and the input end of the multi-axis synchronous control module.
  7. 7. The AI natural language description to Python code translation system of claim 6, wherein: the multi-axis synchronous control module is electrically connected with the output end of the pulse acquisition module through the input end of the QEP module, the pulse acquisition module comprises signal isolation and differential transmission, the output end of the multi-axis synchronous control module is electrically connected with the input end of the servo motor driving module through the pulse transmission module, the servo motor driving module comprises signal isolation and differential transmission, the multi-axis synchronous control module is electrically connected with the output end and the input end of the Ethernet transceiver through the industrial Ethernet protocol stack of the processor, and the Ethernet transceiver is electrically connected with the output end and the input end of the industrial Ethernet.
  8. 8. The AI natural language description to Python code translation system of any one of claims 1-7 wherein: the method comprises the following steps:
    s1: the pulse acquisition module acquires pulse coding signals output by an external master motor encoder, and performs differential processing and magnetic coupling isolation processing on the pulse coding signals to obtain target pulse coding signals;
    s2: the QEP module in each multi-axis synchronous control module counts target pulse code signals output by the pulse acquisition module, a processor in each multi-axis synchronous control module performs periodic sampling, and position information and direction information of a controlled slave motor in a period are obtained according to system state configuration, wherein the position information comprises the number of pulses for controlling the slave motor to rotate, and the direction information comprises the direction for controlling the slave motor to rotate;
    s3: the field IO equipment transmits a field control command to the PLC, the PLC transmits the control command to each multi-axis synchronous control module, the multi-axis synchronous control modules change the state of the system according to the control command, and new position information is obtained according to the changed system state;
    s4: each multi-axis synchronous control module transmits new position information and direction information to a corresponding servo motor driving module, and each servo motor driving module performs magnetic coupling isolation processing and differential conversion on the direction information and the new position information to generate a corresponding differential direction signal and a differential pulse number signal; and the external slave motor is driven and controlled in parallel through the differential direction signal and the differential pulse signal.
CN202110739169.9A 2021-06-30 2021-06-30 System and method for translating AI natural language description into Python code Pending CN113655754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110739169.9A CN113655754A (en) 2021-06-30 2021-06-30 System and method for translating AI natural language description into Python code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110739169.9A CN113655754A (en) 2021-06-30 2021-06-30 System and method for translating AI natural language description into Python code

Publications (1)

Publication Number Publication Date
CN113655754A true CN113655754A (en) 2021-11-16

Family

ID=78477788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110739169.9A Pending CN113655754A (en) 2021-06-30 2021-06-30 System and method for translating AI natural language description into Python code

Country Status (1)

Country Link
CN (1) CN113655754A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130002185A1 (en) * 2011-06-28 2013-01-03 Omron Corporation Synchronous control apparatus, synchronous control method, synchronous control program, and computer-readable recording medium recording synchronous control program
CN106411184A (en) * 2016-11-04 2017-02-15 华中科技大学 Networked multi-axis motor synchronization control device and method
CN107425757A (en) * 2017-07-03 2017-12-01 华中科技大学 A kind of networking synchronous control system for multiple motors and method
CN108809192A (en) * 2018-06-07 2018-11-13 江苏江荣智能科技有限公司 A kind of parameter self-tuning control system for permanent-magnet synchronous motor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130002185A1 (en) * 2011-06-28 2013-01-03 Omron Corporation Synchronous control apparatus, synchronous control method, synchronous control program, and computer-readable recording medium recording synchronous control program
CN106411184A (en) * 2016-11-04 2017-02-15 华中科技大学 Networked multi-axis motor synchronization control device and method
CN107425757A (en) * 2017-07-03 2017-12-01 华中科技大学 A kind of networking synchronous control system for multiple motors and method
CN108809192A (en) * 2018-06-07 2018-11-13 江苏江荣智能科技有限公司 A kind of parameter self-tuning control system for permanent-magnet synchronous motor

Similar Documents

Publication Publication Date Title
CN108040005B (en) Digit control machine tool intelligent monitoring gateway based on thing networking
CN101907882B (en) Multi-shaft DC servo motor control system and method based on EPA (Ethernet for Plant Automation) field bus
CN102109836B (en) Expandable and cuttable multi-shaft movement control system and method
CN109324541A (en) Kinetic control system
CN106411184A (en) Networked multi-axis motor synchronization control device and method
CN103984275A (en) FPGA (Field Programmable Gate Array) based general industrial movement control system and control method based on movement control system
CN204832876U (en) Drive accuse integrated device
CN103744376A (en) Servo driver and multi-shaft control system using the same
CN102445924B (en) Integrated numerical control system and integrated numerical control machine
CN106888141A (en) A kind of efficient CAN communication means
CN109968356A (en) Mechanical arm force-feedback control system and method based on Embedded Motion
CN201689325U (en) Enlargeable and reducible multi-axis motion control system
CN206224181U (en) A kind of multiple-axis servo drive system position feedback data interface card based on FPGA
CN206710827U (en) A kind of modular motion controller
CN113655754A (en) System and method for translating AI natural language description into Python code
CN203825438U (en) Servo driver and multi-shaft control system using the same
Wang et al. The construction of soft servo networked motion control system based on EtherCAT
CN202583811U (en) Multi-shaft synchronous-motion control system based on Ether CAT bus technology
Xing et al. Motion control system using sercos over ethercat
CN201107641Y (en) Full digital numerical control system
CN204695081U (en) A kind of modular reconfigurable motion controller architecture based on SERCOS
CN115685886A (en) Linkage laser marking control card based on EtherCAT network communication
CN213987256U (en) Wide-temperature programmable controller terminal module
CN202548601U (en) Integrated numerical control system and integrated numerical control machine
CN204155117U (en) A kind of big-power transducer control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211116

RJ01 Rejection of invention patent application after publication