CN115453967A - Scheduling execution method of PLCopen single-axis motion control function block - Google Patents

Scheduling execution method of PLCopen single-axis motion control function block Download PDF

Info

Publication number
CN115453967A
CN115453967A CN202211303638.3A CN202211303638A CN115453967A CN 115453967 A CN115453967 A CN 115453967A CN 202211303638 A CN202211303638 A CN 202211303638A CN 115453967 A CN115453967 A CN 115453967A
Authority
CN
China
Prior art keywords
motion
instruction
execution
function block
motion control
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
CN202211303638.3A
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.)
Aotuo Technology Co ltd
Original Assignee
Aotuo 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 Aotuo Technology Co ltd filed Critical Aotuo Technology Co ltd
Priority to CN202211303638.3A priority Critical patent/CN115453967A/en
Publication of CN115453967A publication Critical patent/CN115453967A/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention provides a scheduling execution method of a PLCopen single-axis motion control functional block, which comprises the following steps: establishing a data structure of a current motion instruction execution register, putting a motion control function block with execution authority into the data structure, and storing interpolation execution intermediate information and a control mark in the data structure; the motion control function block is converted into a motion instruction after being triggered for the first time; establishing a motion instruction executor, wherein the motion instruction executor executes periodically and is responsible for switching an axis state machine, judging whether a current motion instruction execution register is a command to be executed or not according to the current suitable state, and executing a motion instruction in the current motion instruction execution register; the invention introduces the operating system task scheduling preemption mechanism into the execution method of the function block, establishes a similar mechanism, can conveniently realize the speed transition of a single-axis motion instruction, and can flexibly realize the interruption of the motion instruction.

Description

Scheduling execution method of PLCopen single-axis motion control function block
Technical Field
The invention belongs to the field of Programmable Logic Controllers (PLC), and particularly relates to a scheduling execution method of a PLCopen single-axis motion control functional block.
Background
With the popularization and promotion of Programmable Logic Controllers (PLCs), the brands in the market are numerous, and great selection opportunities are provided for users. With the great improvement of the performance of the processor, the performance of the PLC is also greatly improved, and the motion control function has been popularized in the PLC. The IEC61131-3 standard specifies international standards for PLC programming languages, including five programming languages, LD, IL, ST, FBD, SFC, CFC. However, in the field of motion control, instruction functions provided by various PLC manufacturers are mostly incompatible, so that it takes a lot of effort to transplant a program for a user to replace a PLC.
In the field of motion control, to promote the compatibility of programming languages, the PLCopen association defines standard function blocks for motion control in terms of functions, interfaces, and axis running state machines. However, the PLCopen standard only defines functions of function blocks, and does not give internal implementation mechanisms and algorithms of the function blocks.
At present, for the most commonly used single-axis motion control function block, the internal implementation of the function block generally includes function block initialization, parameter configuration and input parameter acquisition, trajectory speed planning, state machine switching, interpolation operation, processing of limit, alarm, interruption and the like during operation, operation output, state output and the like, and such a manner causes the internal implementation of one function block to be too complex, the code amount multiplexing is poor, the code amount is large, and the requirement on a developer is high. Meanwhile, the method is difficult to realize the mutual interruption function of the common motion control function block in PLCopen.
Disclosure of Invention
The purpose of the invention is as follows: the technical problem to be solved by the invention is to provide a scheduling execution method of a PLCopen single-axis motion control function block aiming at the defects of the prior art, so that the internal codes of the function block are simplified, and single-axis speed planning, interpolation motion and state machine management are independent from the motion control function block, so that the code complexity and code amount of the motion control function block are greatly reduced, a user can conveniently and quickly develop the motion control function block, and an interruption function among the motion control function blocks and a speed transition function among multiple motion control function blocks can be easily realized.
The technical scheme of the invention is as follows:
establishing a data structure of a current motion instruction execution register, putting a motion control function block with an execution authority into the data structure, and storing interpolation execution intermediate information and a control mark in the data structure; the motion control function block is converted into a motion instruction after being triggered for the first time;
establishing a motion instruction executor, wherein the motion instruction executor executes periodically and is responsible for switching an axis state machine, judging whether a current motion instruction execution register has an instruction to be executed or not according to the current proper state, and executing the motion instruction in the current motion instruction execution register;
then the following steps are carried out:
step 1: newly building a PLC project in PLC programming software, building a motion control task, and compiling a motion control program by using a motion control function block;
step 2: downloading the PLC project into a Programmable Logic Controller (PLC) for execution;
and step 3: the motion control function block execution initialization part judges the initial execution state and abstracts the motion control function block into a motion instruction data structure object; each motion control function block instance corresponds to a motion instruction data structure object, and each motion control function block instance is distributed with a unique Index of the system;
and 4, step 4: the execution part of the motion control function block is periodically executed following the motion instruction; the period execution part judges an InterEndFlag flag in a data structure of a current instruction execution register every period, if the InterEndFlag is 1, the execution of the current motion instruction is finished, the motion control function block is set to finish an output pin, and the execution of the motion control function block is quitted;
and 5: and finally executing the motion instruction executor program by the motion control task.
In step 2, a motion control task is a high-priority thread in a Programmable Logic Controller (PLC), the motion control task runs periodically, external input is read firstly, information input externally is used as execution input of a motion control program, then the motion control program is called, a motion control function block enters an initialization part to be executed after being triggered by a rising edge in the motion control program, the initialization is executed only once, and the motion control function block enters a periodic execution part of the motion control function block after the initialization is successful; the motion control task calls a motion instruction executor program, a motion instruction executor manages a PLCopen shaft state machine, reads a motion instruction in a current instruction execution register, and performs interpolation operation and interpolation result output; after the motion command executor finishes executing, the operation control task carries out output processing, and the interpolation result is converted into a servo command pulse which is sent to a servo driver for executing through a pulse or a bus of the PLC; when the motion instruction execution is finished, the motion instruction executor sets the interEndFlag flag in the current instruction execution register data structure to 1.
In step 3, the motion control function block initialization executing part judges the executing mode:
if the motion control function block is in a buffer mode, the motion control function block is converted into a motion instruction data structure according to the triggered sequence and is placed into a motion instruction waiting queue, the instructions in the motion instruction waiting queue are not prioritized any more, and are sequentially taken out and executed by a motion instruction executor according to a first-in first-out strategy, if the input parameters of the motion control instructions select transition, transition processing of motion speed among the instructions is performed first, and then each motion instruction is sequentially executed;
if the interrupt mode is adopted, the priority is arbitrated, different instances of the same instruction type are identified through the instruction type and the Index, and if the interrupt condition is met, the current instruction execution register is preempted after the instruction is subjected to speed planning.
Step 3 also comprises the following steps:
step 3.1: triggering a motion control function block;
step 3.2: judging whether the execution condition is met; if yes, entering the next step, otherwise, entering a step 3.12;
step 3.3: abstracting the motion control function block into a motion instruction data structure, initializing, and distributing an Index unique to the system to the instance of the motion control function block;
step 3.4: judging whether the instruction is interrupted according to the value of the mode input variable in the motion instruction data structure, if so, carrying out the next step, and if not, carrying out the step 3.10;
step 3.5: judging whether an instruction is executed according to an interEndFlag mark in a current motion instruction execution register, if so, entering the next step, otherwise, entering step 3.7;
step 3.6: comparing the value of the fbPriority object in the motion instruction data structure with the priority of the current motion instruction execution register executing the instruction, judging whether the instruction can be preempted, if so, entering the next step, and if not, entering the step 3.12;
step 3.7: preprocessing the motion instruction according to the type of the motion curve;
step 3.9: updating the preprocessed motion instruction to a current motion instruction execution register, and then entering the step 3.11;
step 3.10: pressing into an instruction queue;
step 3.11: entering a motion control function block period execution part;
step 3.12: the motion control function block execution ends.
Step 4 comprises the following steps:
step 4.1: judging whether the interruption occurs, if so, setting a function interruption output pin, and then entering the step 4.4; otherwise, entering the next step; in step 3.10, the new instruction is updated to the current motion instruction execution register, the old instruction is flushed, in step 4.1, the motion control function block execution part compares the Index of the instruction in the current motion instruction execution register with the Index of the current motion instruction execution register in each cycle, and if the Index is different from the Index, the interrupt is determined;
and 4.2: judging whether an alarm occurs, if so, setting an alarm output pin of the motion control function block, and then entering the step 4.4; otherwise, entering the next step;
step 4.3: judging whether the execution is finished, if so, setting the motion control function block to finish an output pin, and then entering the step 4.4; otherwise, returning to the step 4.1;
step 4.4: the motion control function block cycle execution section ends.
The step 5 comprises the following steps: the motion instruction executor manages the PLCopen shaft state machine, reads a motion instruction in a current instruction execution register, performs interpolation operation and interpolation result output, finishes the execution of the motion instruction executor, outputs a control task, converts the interpolation result into a servo instruction pulse, and sends the servo instruction pulse to a servo driver for execution through a pulse or a bus of a PLC (programmable logic controller); if the motion instruction execution is finished, the motion instruction executor sets an InterEndFlag flag in the data structure of the current instruction execution register to 1.
The invention has the following beneficial effects:
according to the invention, the management, interpolation operation, interpolation output and the like of the axis state machine are separated from the motion control function block, so that the internal code amount and complexity of the motion control function block are simplified, namely, the reliability of a program is improved, and the modular development of the function block is facilitated; the invention introduces the operating system task scheduling and preemption mechanism into the execution method of the function block, establishes a similar mechanism, can conveniently realize the speed transition of a single-axis movement instruction, and can flexibly realize the interruption of the movement instruction.
Drawings
The foregoing and/or other advantages of the invention will become further apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is a motion instruction execution architecture of the present invention.
Fig. 2 is a flow chart of the triggering of the motion control function block into the initialization portion of the present invention.
Fig. 3 is a flow chart of a portion of the periodic execution of the motion control function blocks of the present invention.
Fig. 4 is a flow chart of the execution of the motion control task of the present invention.
Detailed Description
The working principle of the invention is shown in figure 1:
by taking the advantage of the task scheduling and preemption mechanism of the operating system, each motion instruction is regarded as a task to be executed, and abstract description is carried out on the task to establish a motion instruction data structure similar to a task block of the operating system. A system unique Index and priority are assigned to each instance of the motion control function block, and high priority motion instructions may preempt low priority instructions. Tasks with the same priority as the operating system can only be executed according to time slices, and according to the characteristics of motion control, the method also supports the preemption among motion instructions with the same priority.
The task queue similar to the operating system combines the characteristics of a single-axis motion control system to establish a motion instruction waiting queue with N motion instruction caching numbers, and a first-in first-out FIFO mechanism is adopted.
A data structure of a current motion instruction execution register is established, a motion control function block (instruction) obtaining the execution authority is put into the structure, and the structure stores intermediate information and a control mark of interpolation execution.
The motion command executor is responsible for switching the shaft state machine and executing the motion command in the current motion command execution register.
By using an operating system task preemption mechanism, when a high-priority movement instruction is preempted, the high-priority movement instruction crosses an instruction waiting queue, a current instruction execution register is directly obtained through preemption, and the execution of a movement instruction executor is preferentially obtained.
The specific working process is as follows:
step 1: newly building a PLC project in PLC programming software of a programmable logic controller, building a motion control task, and writing a motion control program by using a motion control function block;
step 2: downloading the PLC project into a Programmable Logic Controller (PLC) for execution;
in the following, the motion control task is a high-priority thread inside the PLC, and the execution flow thereof is shown in fig. 4; the motion control task is periodically operated, and firstly external input such as IO, speed, position and the like of motion feedback are read and stored, and the information is used as execution input of a motion control program. And then the motion control program is invoked. As shown in fig. 2, the motion control function block enters the initialization part to execute after being triggered by the rising edge in the motion control program, the initialization is executed only once, and the initialization is successfully executed and then enters the cycle execution part of the motion control function block; the motion control task then calls the "motion command executor" program. The motion instruction executor manages the PLCopen axis state machine, reads the motion instruction in the current instruction execution register, and performs interpolation operation and interpolation result output. And after the execution of the motion command executor is finished, the motion control task carries out output processing, and the interpolation result is converted into a servo command pulse which is sent to a servo driver for execution through a pulse or a bus of the PLC. When the motion instruction execution is finished, the motion instruction executor sets the intendedflag flag in the data structure of the current instruction execution register to be 1.
The motion control function block is similar to a programmed data structure definition, which is used to define an instance with a specific memory allocation to be executed, just like the STRUCT structure in the C language. For each motion control function block instance which is allocated with the memory space, allocating an Index as a unique identifier;
and step 3: the motion control function block execution initialization part judges the initial execution state and abstracts the motion control function block into a motion instruction data structure object; each motion control function block instance corresponds to a motion instruction data structure object, and each motion control function block instance is distributed with a unique Index of the system;
the motion control function block initialization executing part judges the executing mode, if the executing mode is 'buffer mode', the motion control function block is converted into a motion instruction data structure according to the triggering sequence and put into a 'motion instruction waiting queue', the instructions in the motion instruction waiting queue are not prioritized any more, and are taken out and executed by a 'motion instruction executor' in sequence according to a first-in first-out strategy, if the input parameters of the motion control instructions select transition, the transition processing of the motion speed between the instructions is performed first, and then the motion instructions are executed in sequence. If the command is in the interrupt mode, the priority is arbitrated, different instances of the same command type are identified through the command type and the Index, and if the interrupt condition is met, the current command execution register is preempted after the command is subjected to speed planning.
Specifically, the method comprises the following steps:
step 3.1: triggering a motion control function block;
step 3.2: judging whether the execution condition is met; if yes, entering the next step, otherwise, entering the step 3.12;
step 3.3: abstracting the motion control function block into a motion instruction data structure, initializing, and distributing an unique Index of a system to the instance of the motion control function block;
step 3.4: judging whether the instruction interrupts execution (judging whether the instruction interrupts execution according to the value of the mode input variable in the motion instruction data structure), if so, carrying out the next step, otherwise, carrying out the step 3.10;
step 3.5: judging whether an instruction which is currently executed exists (judging whether the instruction is currently executed according to an InterEndFlag flag in a current motion instruction execution register), if so, entering the next step, and if not, entering the step 3.7;
step 3.6: judging whether the priority can be preempted (comparing the priority of the current motion instruction execution register executing instructions according to the value of the fbPriority object in the motion instruction data structure, and judging whether the priority can be preempted), if so, entering the next step, otherwise, entering the step 3.12;
step 3.7: preprocessing the motion instruction according to the type of the motion curve;
step 3.9: updating the preprocessed motion instruction to a current motion instruction execution register, and then entering the step 3.11;
step 3.10: pressing into an instruction queue;
step 3.11: entering a motion control function block period execution part;
step 3.12: the motion control function block ends;
and 4, step 4: as shown in fig. 3, the execution section of the motion control function block is executed periodically following the motion instruction; the cycle execution part judges the InterEndFlag flag in the data structure of the current instruction execution register every cycle, if the InterEndFlag is 1, the execution of the current motion instruction is finished, the motion control function block can be set to finish the output pin, and the execution of the motion control function block is quitted.
Step 4.1: judging whether the interruption occurs, if so, setting a function interruption output pin, and then entering the step 4.4; otherwise, entering the next step; in step 3.10, the new instruction is updated into the "current motion instruction execution register" and the old instruction is flushed. In step 4.1, the motion control function block execution part compares each cycle with whether the Index of the instruction in the "current motion instruction execution register" is the same as that of itself, and if not, determines that an interrupt has occurred.
And 4.2: judging whether an alarm occurs, if so, setting an alarm output pin of the motion control function block, and then entering the step 4.4; otherwise, entering the next step;
step 4.3: judging whether the execution is finished, if so, setting the motion control function block to finish an output pin, and then entering the step 4.4; otherwise, returning to the step 4.1;
step 4.4: the motion control function block cycle execution part ends;
and 5: and finally, the motion control task executes a motion command executor program. The motion instruction executor manages the PLCopen shaft state machine, reads the motion instruction in the current instruction execution register, performs interpolation operation and outputs the interpolation result, the motion instruction executor finishes execution, the control task performs output processing, and the interpolation result is converted into servo instruction pulse which is sent to the servo driver for execution through the pulse or bus of the PLC. If the motion instruction execution is finished, the motion instruction executor sets the InterEndFlag flag in the data structure of the current instruction execution register to be 1.
In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, where the computer storage medium is capable of storing a computer program, and the computer program, when executed by the data processing unit, may execute the inventive content of the scheduling execution method for a PLCopen single-axis motion control function block provided by the present invention and some or all of the steps in each embodiment. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
It is obvious to those skilled in the art that the technical solutions in the embodiments of the present invention can be implemented by means of a computer program and its corresponding general-purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a computer program, that is, a software product, which may be stored in a storage medium and include several instructions for enabling a device (which may be a personal computer, a server, a single chip microcomputer, an MUU, or a network device, etc.) including a data processing unit to execute the method according to each embodiment or some portions of the embodiments of the present invention.
The present invention provides a scheduling execution method for a PLCopen single-axis motion control function block, and a method and a way for implementing the technical scheme are many, and the above description is only a preferred embodiment of the present invention, and it should be noted that, for a person skilled in the art, a plurality of improvements and embellishments can be made without departing from the principle of the present invention, and these improvements and embellishments should also be regarded as the protection scope of the present invention. All the components not specified in this embodiment can be implemented by the prior art.

Claims (6)

1. A scheduling execution method of a PLCopen single-axis motion control function block is characterized by comprising the following steps:
establishing a data structure of a current motion instruction execution register, putting a motion control function block with execution authority into the data structure, and storing interpolation execution intermediate information and a control mark in the data structure; the motion control function block can be converted into a motion instruction after being triggered for the first time;
establishing a motion instruction executor, wherein the motion instruction executor executes periodically and is responsible for switching an axis state machine, judging whether a current motion instruction execution register has an instruction to be executed or not according to the current proper state, and executing the motion instruction in the current motion instruction execution register;
then the following steps are carried out:
step 1: newly building a PLC project in PLC programming software of a programmable logic controller, building a motion control task, and writing a motion control program by using a motion control function block;
step 2: downloading the PLC project into a Programmable Logic Controller (PLC) for execution;
and step 3: the motion control function block execution initialization part judges the initial execution state and abstracts the motion control function block into a motion instruction data structure object; each motion control function block instance corresponds to a motion instruction data structure object, and each motion control function block instance is distributed with a unique Index of the system;
and 4, step 4: the execution part of the motion control function block is executed periodically following the motion instruction; the cycle execution part judges an InterEndFlag mark in the data structure of the current instruction execution register every cycle, if the InterEndFlag is 1, the execution of the current motion instruction is finished, the motion control function block is set to finish an output pin, and the execution of the motion control function block is quitted;
and 5: and finally executing the motion instruction executor program by the motion control task.
2. The method according to claim 1, wherein in step 2, the motion control task is a high priority thread inside the Programmable Logic Controller (PLC), the motion control task is a periodic operation, firstly, external input is read, information input from the external is used as execution input of the motion control program, then, the motion control program is called, the motion control function block enters an initialization part for execution after being triggered by a rising edge in the motion control program, the initialization is executed only once, and the motion control function block enters a periodic execution part of the motion control function block after the initialization is successful; the motion control task calls a motion instruction executor program, a motion instruction executor manages the PLCopen axis state machine, reads a motion instruction in a current instruction execution register, and performs interpolation operation and interpolation result output; after the motion command executor finishes executing, the operation control task carries out output processing, and the interpolation result is converted into a servo command pulse which is sent to a servo driver for executing through a pulse or a bus of the PLC; when the motion instruction execution is finished, the motion instruction executor sets an intendflag flag in the data structure of the current instruction execution register to 1.
3. The method according to claim 2, wherein in step 3, the motion control function block initialization executing part discriminates the execution mode:
if the motion control function block is in a buffer mode, the motion control function block is converted into a motion instruction data structure according to the triggered sequence and is placed into a motion instruction waiting queue, the instructions in the motion instruction waiting queue are not prioritized any more, and are sequentially taken out and executed by a motion instruction executor according to a first-in first-out strategy, if the input parameters of the motion control instructions select transition, transition processing of motion speed among the instructions is performed first, and then each motion instruction is sequentially executed;
if the interrupt mode is adopted, the priority is arbitrated, different instances of the same instruction type are identified through the instruction type and the Index, and if the interrupt condition is met, the current instruction execution register is preempted after the instruction is subjected to speed planning.
4. The method of claim 3, wherein step 3 further comprises the steps of:
step 3.1: triggering a motion control function block;
step 3.2: judging whether the execution condition is met; if yes, entering the next step, otherwise, entering a step 3.12;
step 3.3: abstracting the motion control function block into a motion instruction data structure, initializing, and distributing an unique Index of a system to the instance of the motion control function block;
step 3.4: judging whether the instruction is interrupted according to the value of the mode input variable in the motion instruction data structure, if so, carrying out the next step, and if not, carrying out the step 3.10;
step 3.5: judging whether an instruction is executed according to an interEndFlag mark in a current motion instruction execution register, if so, entering the next step, otherwise, entering step 3.7;
step 3.6: comparing the value of the fbPriority object in the motion instruction data structure with the priority of the current motion instruction execution register executing the instruction, judging whether the instruction can be preempted, if so, entering the next step, and if not, entering the step 3.12;
step 3.7: preprocessing the motion instruction according to the type of the motion curve;
step 3.9: updating the preprocessed motion instruction to a current motion instruction execution register, and then entering the step 3.11;
step 3.10: pressing into an instruction queue;
step 3.11: entering a motion control function block period execution part;
step 3.12: the motion control function block execution ends.
5. The method of claim 4, wherein step 4 comprises:
step 4.1: judging whether interruption occurs, if so, setting a function interruption output pin, and then entering the step 4.4; otherwise, entering the next step; in step 3.10, the new instruction is updated to the current motion instruction execution register, the old instruction is flushed, in step 4.1, the motion control function block execution part compares the Index of the instruction in the current motion instruction execution register with the Index of the current motion instruction execution register in each cycle, and if the Index is different from the Index, the interrupt is determined;
step 4.2: judging whether an alarm occurs, if so, setting an alarm output pin of the motion control function block, and then entering the step 4.4; otherwise, entering the next step;
step 4.3: judging whether the execution is finished, if so, setting the motion control function block to finish an output pin, and then entering the step 4.4; otherwise, returning to the step 4.1;
step 4.4: the motion control function block cycle execution section ends.
6. The method of claim 5, wherein step 5 comprises: the motion instruction executor manages the PLCopen axis state machine, reads the motion instruction in the current instruction execution register, performs interpolation operation and interpolation result output, and after the motion instruction executor finishes executing, the operation control task performs output processing, and converts the interpolation result into a servo instruction pulse and sends the servo instruction pulse to the servo driver for execution through a pulse or a bus of the PLC; if the motion instruction execution is finished, the motion instruction executor sets an InterEndFlag flag in the data structure of the current instruction execution register to 1.
CN202211303638.3A 2022-10-24 2022-10-24 Scheduling execution method of PLCopen single-axis motion control function block Pending CN115453967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211303638.3A CN115453967A (en) 2022-10-24 2022-10-24 Scheduling execution method of PLCopen single-axis motion control function block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211303638.3A CN115453967A (en) 2022-10-24 2022-10-24 Scheduling execution method of PLCopen single-axis motion control function block

Publications (1)

Publication Number Publication Date
CN115453967A true CN115453967A (en) 2022-12-09

Family

ID=84309830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211303638.3A Pending CN115453967A (en) 2022-10-24 2022-10-24 Scheduling execution method of PLCopen single-axis motion control function block

Country Status (1)

Country Link
CN (1) CN115453967A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987176A (en) * 2023-02-01 2023-04-18 北京东土科技股份有限公司 Method and device for carrying out zero-returning control on motor position and edge controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987176A (en) * 2023-02-01 2023-04-18 北京东土科技股份有限公司 Method and device for carrying out zero-returning control on motor position and edge controller
CN115987176B (en) * 2023-02-01 2023-09-12 北京东土科技股份有限公司 Method and device for carrying out zero return control on motor position and edge controller

Similar Documents

Publication Publication Date Title
JP5291912B2 (en) Method and dynamic modifier functional block for modifying and changing the operation of a functional block used in a process control system
US4486830A (en) Programmable control apparatus and method
US8327316B2 (en) Compilation model
US20070168082A1 (en) Task-based robot control system for multi-tasking
RU2003118641A (en) IMPLEMENTATION OF COMPUTER MULTI-TASK THROUGH VIRTUAL FLOW ORGANIZATION
US9152454B2 (en) Method for enabling sequential, non-blocking processing of statements in concurrent tasks in a control device
JP4628634B2 (en) General motion control system
EP2612235A1 (en) Method for parallelizing automatic control programs and compiler
JPH0895821A (en) Method and device for multitask program debugging
CN100382033C (en) Computer system
CN115453967A (en) Scheduling execution method of PLCopen single-axis motion control function block
EP1918796A2 (en) Numerical controller with machining resume function
EP3712767B1 (en) Control device
CN109983411A (en) The Row control of program module
CN109085798B (en) Embedded system G code asynchronous communication mechanism, protocol and programming method
US9910418B2 (en) Method and programming system for programming an automation component
US20020082734A1 (en) Industrial controller with clock-synchronous running level model
BE1009813A3 (en) Programmable logic controller.
CN101750992B (en) General sequence control algorithm used in programmable logic controller
JP3053797B2 (en) Control software execution system for control unit
CN109932997B (en) Programmable logic controller kernel system
US6978190B2 (en) Programming of cyclical machines
US6941175B2 (en) Method of operating an industrial controller
KR100258893B1 (en) Numerical controller performance method with unified controller
EP1697091B1 (en) Control system of an industrial robot

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