CN115113580A - PLC-based shaft motion control method and system - Google Patents

PLC-based shaft motion control method and system Download PDF

Info

Publication number
CN115113580A
CN115113580A CN202210922089.1A CN202210922089A CN115113580A CN 115113580 A CN115113580 A CN 115113580A CN 202210922089 A CN202210922089 A CN 202210922089A CN 115113580 A CN115113580 A CN 115113580A
Authority
CN
China
Prior art keywords
upper computer
plc
axis motion
simulator
configuring
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
CN202210922089.1A
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.)
Beijing Liangchen Guangqi Digital Technology Co ltd
Original Assignee
Beijing Liangchen Guangqi Digital Technology Co ltd
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 Beijing Liangchen Guangqi Digital Technology Co ltd filed Critical Beijing Liangchen Guangqi Digital Technology Co ltd
Priority to CN202210922089.1A priority Critical patent/CN115113580A/en
Publication of CN115113580A publication Critical patent/CN115113580A/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/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program 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/1103Special, intelligent I-O processor, also plc can only access via processor

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

本申请公开了一种基于PLC的轴运动控制方法及系统,本方法首先获取轴运动场景信息数据,根据轴运动场景信息数据配置PLC仿真器;然后根据上位机及寄存器地址信息配置地址表,建立PLC仿真器与上位机的通信关系;基于PLC仿真器与上位机之间的通信关系,获取上位机输入的轴运动控制指令,最后通过通信关系所对应的寄存器进行多线程处理后进行轴运动动态展示。本发明能够在脱离实现的下位机环境下,便于上位机程序开发及调试,以及更直观的了解轴运动节目的编辑。

Figure 202210922089

The present application discloses a PLC-based axis motion control method and system. The method first acquires axis motion scene information data, configures a PLC simulator according to the axis motion scene information data; then configures an address table according to the host computer and register address information, and establishes The communication relationship between the PLC simulator and the host computer; based on the communication relationship between the PLC simulator and the host computer, the axis motion control instructions input by the host computer are obtained, and finally the axis motion dynamics are processed through the registers corresponding to the communication relationship after multi-threaded processing. exhibit. The invention can facilitate the development and debugging of the upper computer program and the editing of the shaft motion program more intuitively under the environment of the lower computer which is separated from the realization.

Figure 202210922089

Description

PLC-based shaft motion control method and system
Technical Field
The invention relates to the field of PLC control, in particular to a shaft motion control method and system based on a PLC.
Background
In the prior art, when the PLC is programmed, a PLC control program needs to be compiled through upper computer programming software, then the PLC is connected, the program is written into a program memory of the PLC, and finally the PLC is repeatedly tested and debugged through connecting an execution device.
However, in the process of developing the upper computer, because the hardware environment is limited by the geographical position and is influenced by the environment, various communication problems exist in the developing and debugging processes.
Disclosure of Invention
Based on this, the embodiment of the application provides a shaft motion control method and system based on a PLC, which can facilitate the development and debugging of programs of an upper computer and more intuitively understand the editing of shaft motion programs in a lower computer environment separated from the implementation.
In a first aspect, a PLC-based shaft motion control method is provided, which includes:
obtaining axis motion scene information data, and configuring a PLC simulator according to the axis motion scene information data; the PLC simulator is an axis motion simulator;
configuring an address table according to the address information of the upper computer and the register, and establishing a communication relation between the PLC simulator and the upper computer;
and acquiring an axis motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and dynamically displaying axis motion after multithreading processing is carried out through a register corresponding to the communication relation.
Optionally, establishing a communication relationship between the PLC simulator and the upper computer specifically includes:
and the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol.
Optionally, configuring an address table according to the address information of the upper computer and the register, further comprising:
and configuring an address table according to the variable address information.
Optionally, the control instructions include at least:
single axis debug instructions, action debug instructions, and program debug instructions.
Optionally, performing multi-thread processing through a register corresponding to the communication relationship, and then performing dynamic display of axis motion, includes:
and displaying the real-time motion effect of the shaft motion through an LCD display screen.
In a second aspect, there is provided a PLC-based shaft motion control system, the system comprising:
the acquisition module is used for acquiring the axis motion scene information data and configuring the PLC simulator according to the axis motion scene information data; the PLC simulator is an axis motion simulator;
the configuration module is used for configuring an address table according to the address information of the upper computer and the register and establishing a communication relation between the PLC simulator and the upper computer;
and the display module is used for acquiring an axis motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and performing multi-thread processing through a register corresponding to the communication relation and then performing dynamic display of axis motion.
Optionally, establishing a communication relationship between the PLC simulator and the upper computer specifically includes:
and the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol.
Optionally, configuring an address table according to the address information of the upper computer and the register, further comprising:
and configuring an address table according to the variable address information.
Optionally, the control instructions include at least:
single axis debug instructions, action debug instructions, and program debug instructions.
Optionally, the display module specifically includes:
and displaying the real-time motion effect of the shaft motion through an LCD display screen.
According to the technical scheme provided by the embodiment of the application, axis motion scene information data are obtained firstly, and a PLC simulator is configured according to the axis motion scene information data; then configuring an address table according to the address information of the upper computer and the register, and establishing a communication relation between the PLC simulator and the upper computer; and based on the communication relation between the PLC simulator and the upper computer, obtaining an axis motion control instruction input by the upper computer, and finally performing multi-thread processing through a register corresponding to the communication relation and then performing dynamic display of axis motion. It can be seen that the invention has the advantages that: under the environment of a lower computer which is separated from the realization, the development and the debugging of programs of an upper computer are facilitated, and the editing of axial motion programs can be more intuitively understood.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
Fig. 1 is a flowchart of a method for controlling a shaft motion based on a PLC according to an embodiment of the present disclosure;
fig. 2 is a functional structure diagram of a PLC simulation system provided in the embodiment of the present application;
fig. 3 is a schematic information interaction diagram of a PLC simulation system according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the description of the present invention, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements specifically listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus or additional steps or elements based on further optimization of the inventive concept.
Referring to fig. 1, a flow chart of a PLC-based axis motion control method according to an embodiment of the present application is shown, where the method may include the following steps:
step 101, obtaining axis motion scene information data, and configuring a PLC simulator according to the axis motion scene information data.
Wherein, the PLC simulator is an axis motion simulator.
And 102, configuring an address table according to the address information of the upper computer and the register, and establishing a communication relation between the PLC simulator and the upper computer.
In the embodiment of the application, the address table is configured according to the variable address information.
And 103, acquiring an axis motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and dynamically displaying axis motion after multithreading processing is performed through a register corresponding to the communication relation.
In the embodiment of the application, the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol. The control instructions at least comprise one or more of single-axis debugging instructions, action debugging instructions and program debugging instructions.
After the multithreading processing is carried out, the real-time motion effect of the shaft motion can be displayed through the LCD display screen.
The embodiment of the application provides a real-time motion effect schematic diagram of an axis motion simulator. The practical operation steps based on the method are given as follows:
1. configuring axis information of a PLC simulator;
2. configuring an address table;
3. operating a PLC simulation server;
4. detecting and playing the action, and observing the motion state of the shaft through a motion simulator;
5. detecting programs, playing the programs, and observing the theoretical effect of the mechanical programs through a motion simulator;
6. the effect of communicating the mechanical program with the director is achieved, and the real-time effect of the mechanical program displayed in the motion simulator is visually observed through the simulation environment.
In summary, the PLC simulation system of the present application is to implement the following functions, for example, as shown in fig. 2, a functional structure diagram of the PLC simulation system of the present application and an information interaction diagram of the PLC simulation system of fig. 3 are given:
the method comprises the steps that firstly, a Modbus Tcp communication protocol is supported;
secondly, variable address configuration is supported;
thirdly, supporting the input and output of the simulation motion data of the shaft;
and fourthly, PLC variable operation is supported. Debugging variable communication;
and fifthly, supporting dynamic display of the shaft motion.
The PLC simulation system is flexible in application and strong in transportability; the functions are complete, and the development and debugging of the upper computer program and the editing of mechanical programs are facilitated.
The embodiment of the application also provides a shaft motion control system based on the PLC. The system comprises:
the acquisition module is used for acquiring the axis motion scene information data and configuring the PLC simulator according to the axis motion scene information data; wherein, the PLC simulator is an axis motion simulator;
the configuration module is used for configuring an address table according to the address information of the upper computer and the register and establishing a communication relation between the PLC simulator and the upper computer;
and the display module is used for acquiring the shaft motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and performing multi-thread processing through a register corresponding to the communication relation and then performing dynamic display of shaft motion.
In an optional embodiment of the present application, establishing a communication relationship between the PLC simulator and the upper computer specifically includes: and the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol.
In an optional embodiment of the present application, configuring an address table according to address information of an upper computer and a register further includes: and configuring an address table according to the variable address information.
In an optional embodiment of the present application, the control instructions comprise at least single-axis debug instructions, action debug instructions, and program debug instructions.
In an alternative embodiment of the present application, the display module specifically includes displaying the real-time motion effect of the shaft motion through the LCD display screen.
The axis motion control system based on the PLC provided in the embodiment of the present application is used to implement the axis motion control method based on the PLC, and for specific limitations of the axis motion control system based on the PLC, reference may be made to the above limitations of the axis motion control method based on the PLC, which are not described herein again. Various portions of the PLC-based axis motion control system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the device, and can also be stored in a memory in the device in a software form, so that the processor can call and execute operations corresponding to the modules.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A PLC-based shaft motion control method, the method comprising:
obtaining axis motion scene information data, and configuring a PLC simulator according to the axis motion scene information data; the PLC simulator is an axis motion simulator;
configuring an address table according to the address information of the upper computer and the register, and establishing a communication relation between the PLC simulator and the upper computer;
and acquiring an axis motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and dynamically displaying axis motion after multithreading processing is carried out through a register corresponding to the communication relation.
2. The method according to claim 1, wherein the establishing of the communication relationship between the PLC simulator and the upper computer specifically comprises:
and the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol.
3. The method of claim 1, wherein configuring the address table according to the upper computer and the register address information further comprises:
and configuring an address table according to the variable address information.
4. The method according to claim 1, characterized in that the control instructions comprise at least:
single axis debug instructions, action debug instructions, and program debug instructions.
5. The method of claim 1, wherein performing multi-threaded processing through registers corresponding to the communication relationships and then performing axis motion dynamic display comprises:
and displaying the real-time motion effect of the shaft motion through an LCD display screen.
6. A PLC-based shaft motion control system, the system comprising:
the acquisition module is used for acquiring the axis motion scene information data and configuring the PLC simulator according to the axis motion scene information data; the PLC simulator is an axis motion simulator;
the configuration module is used for configuring an address table according to the address information of the upper computer and the register and establishing a communication relation between the PLC simulator and the upper computer;
and the display module is used for acquiring an axis motion control instruction input by the upper computer based on the communication relation between the PLC simulator and the upper computer, and performing multi-thread processing through a register corresponding to the communication relation and then performing dynamic display of axis motion.
7. The system according to claim 6, wherein the establishing of the communication relationship between the PLC simulator and the upper computer specifically includes:
and the PLC simulator is communicated with the upper computer through a Modbus Tcp communication protocol.
8. The system of claim 6, wherein the configuring of the address table according to the upper computer and the register address information further comprises:
and configuring an address table according to the variable address information.
9. The system according to claim 6, characterized in that said control instructions comprise at least:
single axis debug instructions, action debug instructions, and program debug instructions.
10. The system of claim 6, wherein the display module specifically comprises:
and displaying the real-time motion effect of the shaft motion through an LCD display screen.
CN202210922089.1A 2022-08-02 2022-08-02 PLC-based shaft motion control method and system Pending CN115113580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210922089.1A CN115113580A (en) 2022-08-02 2022-08-02 PLC-based shaft motion control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210922089.1A CN115113580A (en) 2022-08-02 2022-08-02 PLC-based shaft motion control method and system

Publications (1)

Publication Number Publication Date
CN115113580A true CN115113580A (en) 2022-09-27

Family

ID=83334049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210922089.1A Pending CN115113580A (en) 2022-08-02 2022-08-02 PLC-based shaft motion control method and system

Country Status (1)

Country Link
CN (1) CN115113580A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205665570U (en) * 2016-04-11 2016-10-26 周芒 Singlechip emulation PLC control system
CN106066809A (en) * 2016-06-20 2016-11-02 深圳市普中科技有限公司 A kind of emulation debugging method based on ARM kernel 51 emulator and system
CN106094750A (en) * 2016-06-20 2016-11-09 北京神雾环境能源科技集团股份有限公司 The simulative debugging method of dcs
CN107367956A (en) * 2017-07-31 2017-11-21 北京金恒博远科技股份有限公司 A kind of automation simulation system and method
CN109032060A (en) * 2018-07-27 2018-12-18 君泰创新(北京)科技有限公司 Apparatus debugging method, system, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205665570U (en) * 2016-04-11 2016-10-26 周芒 Singlechip emulation PLC control system
CN106066809A (en) * 2016-06-20 2016-11-02 深圳市普中科技有限公司 A kind of emulation debugging method based on ARM kernel 51 emulator and system
CN106094750A (en) * 2016-06-20 2016-11-09 北京神雾环境能源科技集团股份有限公司 The simulative debugging method of dcs
CN107367956A (en) * 2017-07-31 2017-11-21 北京金恒博远科技股份有限公司 A kind of automation simulation system and method
CN109032060A (en) * 2018-07-27 2018-12-18 君泰创新(北京)科技有限公司 Apparatus debugging method, system, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105224456B (en) A test script generation method, device and system
US20170147480A1 (en) Test script generation
US9645911B2 (en) System and method for debugging firmware/software by generating trace data
CN108563579B (en) White box testing method, device and system and storage medium
CN106021101B (en) The method and device that mobile terminal is tested
CN106445816A (en) Control execution method and apparatus
CN102231128A (en) Online debugging method and debugging host
JP2022522958A (en) Separate and distributed measurement analysis system using dynamic application builder
CN112541313B (en) Method and device for configuring trigger expression for logic analysis state
CN113874802B (en) Control system, programmable logic controller, and information processing method
CN112214404A (en) Test method, device, storage medium and electronic device for mobile application
CN102063367A (en) Offline analysis method and device for crash program
EP2634693A1 (en) Method and apparatus for interacting with runnung software
JP4600601B1 (en) Debug support device, debug support method, and debug support program
KR101235330B1 (en) The Apparatus and Method for Integrated Management of Embedded Software Development Tools
WO2020071435A1 (en) Development support program, development support device, and development support method
JP2017097516A (en) Debug support system
CN111796897B (en) Page display method, device, storage medium and electronic device
US8745587B2 (en) System and method for testing computer programs
CN113886344B (en) Monitoring method, device, equipment and medium for observation quantity
US10169216B2 (en) Simulating sensors
WO2017192258A1 (en) Debugging code controlling resource-constrained intelligent devices contemporaneously with executing object code
CN116541288A (en) Interface test method and device of SoC chip, test equipment and storage medium
CN110347409B (en) Automatic control method, client and server
CN109144507B (en) Page switching method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220927