CN106484545A - The method and device of call subroutine - Google Patents

The method and device of call subroutine Download PDF

Info

Publication number
CN106484545A
CN106484545A CN201610861894.2A CN201610861894A CN106484545A CN 106484545 A CN106484545 A CN 106484545A CN 201610861894 A CN201610861894 A CN 201610861894A CN 106484545 A CN106484545 A CN 106484545A
Authority
CN
China
Prior art keywords
program
subprogram
main program
call
subroutine
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
CN201610861894.2A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Gree Intelligent Equipment 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Gree Intelligent Equipment Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201610861894.2A priority Critical patent/CN106484545A/en
Publication of CN106484545A publication Critical patent/CN106484545A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

The invention discloses a kind of method and device of call subroutine.Wherein, the method includes:Including:During robot operation main program, judge whether to need call subroutine;If so, then carry out call subroutine using default subroutine call function.The present invention is solved when running robot program in correlation technique, dispatches the inconvenient technical problem of other programs.

Description

The method and device of call subroutine
Technical field
The present invention relates to robot field, in particular to a kind of method and device of call subroutine.
Background technology
At present, in robot field, increasing people is in the how efficient smooth control robot of research, many institute's weeks Know, when robot is controlled, the control program of robot is extremely important, is often related to machine task efficiency, however, mesh Before, in the invoked procedure of robot program, the subprogram of robot or other program scheduler abilities are very limited, call sub- journey Sequence is inconvenient.
For above-mentioned problem, effective solution is not yet proposed at present.
Content of the invention
A kind of method and device of call subroutine is embodiments provided, at least to solve to run in correlation technique During robot program, the inconvenient technical problem of other programs is dispatched.
A kind of one side according to embodiments of the present invention, there is provided method of call subroutine, including:Transport in robot During row main program, judge whether to need call subroutine;If so, then using default subroutine call function come on calling State subprogram.
Further, after above-mentioned subprogram is called using default subroutine call function, said method also includes: Open above-mentioned subprogram;Load and parse the data file of above-mentioned subprogram;Start to execute above-mentioned subprogram.
Further, said method also includes:After above-mentioned subprogram is finished, above-mentioned main program is come back to; Continue executing with the residual program row of above-mentioned main program.
Further, after loading and parsing the data file of above-mentioned subprogram, said method also includes:Periodically return The program name of the above-mentioned main program for passing is to teaching machine;Preserve the program name path of above-mentioned main program;Keep program line periodically more Newly.
Further, while using default subroutine call function to call above-mentioned subprogram, said method is also wrapped Include:Interrupt above-mentioned main program;Preserve the interruption position of above-mentioned main program;Or the interruption position of above-mentioned main program is first added 1 preserves the position after plus 1 again.
According to a further aspect in the invention, there is provided a kind of device of call subroutine, including:Judging unit, for During robot operation main program, judge whether to need call subroutine;Call unit, for where it has, make Above-mentioned subprogram is called with default subroutine call function.
Further, said apparatus also include:Opening unit, for using default subprogram to adjust in above-mentioned call unit After calling above-mentioned subprogram with function, for opening above-mentioned subprogram;Loading unit, for loading and parsing above-mentioned sub- journey The data file of sequence;First performance element, for starting to execute above-mentioned subprogram.
Further, said apparatus also include:Jump-transfer unit, after being finished in above-mentioned subprogram, is returned again To above-mentioned main program;Second performance element, for continuing executing with the residual program row of above-mentioned main program.
Further, said apparatus also include:Back propagation unit, in the data file for loading and parsing above-mentioned subprogram Afterwards, the program name of the periodically above-mentioned main program of passback is to teaching machine;First storage unit, for preserving above-mentioned main program Program name path;Updating block, for keeping program line to periodically update.
Further, said apparatus also include:Interrupt location, for being called using default subroutine call function While stating subprogram, interrupt above-mentioned main program;Second storage unit, for preserving the interruption position of above-mentioned main program, Or, the interruption position of above-mentioned main program is first added 1 and preserves the position after plus 1 again.
In embodiments of the present invention, using a kind of method of call subroutine, the method includes:Main journey is run in robot During sequence, judge whether to need call subroutine;If so, then carry out call subroutine using default subroutine call function, When operation robot program has been reached, the purpose of other programs is easily dispatched, it is achieved thereby that maintaining robot normal work Technique effect, and then solve when running robot program in correlation technique, dispatch the inconvenient technical problem of other programs.
Description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the method flow diagram of a kind of optional call subroutine according to embodiments of the present invention;
Fig. 2 is the schematic diagram of the optional call subroutine of another kind according to embodiments of the present invention;
Fig. 3 is the schematic diagram of the device of a kind of optional call subroutine according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only The embodiment of a present invention part, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment obtained under the premise of creative work is not made by member, should all belong to the model of present invention protection Enclose.
It should be noted that description and claims of this specification and the term " first " in above-mentioned accompanying drawing, " Two " be etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except here diagram or Order beyond those of description is implemented.Additionally, term " comprising " and " having " and their any deformation, it is intended that cover Lid is non-exclusive to be included, and for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to Those steps that clearly lists or unit, but may include clearly not list or for these processes, method, product Or intrinsic other steps of equipment or unit.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of embodiment of the method for call subroutine, it should be noted that in accompanying drawing Flow process can execute in the such as computer system of one group of computer executable instructions the step of illustrate, and, although Show logical order in flow charts, but in some cases, can with the order that is different from herein execute shown or The step of description.
Fig. 1 is the method flow diagram of a kind of optional call subroutine according to embodiments of the present invention, as shown in figure 1, should Method comprises the steps:
Step S102, during robot operation main program, judges whether to need call subroutine;
Step S104, if so, then carrys out call subroutine using default subroutine call function.
That is, during control robot, need to run the main program of robot, in the main program of robot, Include subprogram, first determine whether whether the running of robot needs call subroutine, judging to need call subroutine In the case of, the operation program of robot can be braked using default subroutine call function, the process of complete call subprogram.
By above-mentioned embodiment, using a kind of method of call subroutine, the method includes:Main journey is run in robot During sequence, judge whether to need call subroutine;If so, then carry out call subroutine using default subroutine call function, When operation robot program has been reached, the purpose of other programs is easily dispatched, it is achieved thereby that maintaining robot normal work Technique effect, and then solve when running robot program in correlation technique, dispatch the inconvenient technical problem of other programs.
Alternatively, after call subroutine is carried out using default subroutine call function, said method also includes:Open son Program;Load and parse the data file of subprogram;Start execution subroutine.
That is, in order to normal call subroutine, using default subroutine call function come call subroutine it Afterwards, need the data file in just subprogram to be loaded and parsed, by loading and data file being parsed, son can be obtained The order executed required for program, and then complete different operational motions.
Alternatively, said method also includes:After subprogram is finished, main program is come back to;Continue executing with master The residual program row of program.That is, after subprogram has been executed, in order to maintain robot to run according to program set in advance, Need to come back in main program, complete remaining program line in main program.
Alternatively, after loading and parsing the data file of subprogram, said method also includes:The master for periodically returning The program name of program is to teaching machine;Preserve the program name path of main program;Program line is kept to periodically update.That is, in order to clear Chu ground obtains operation program length of run in some program concrete, can pass back to the program name of main program in teaching machine, when So, can be returned according to cycle regular hour, specifically can be determined according to actual conditions.In addition, in order to avoid when appearance Emergency case, i.e., when operation program breaks down, Program path is lost, and can preserve the program name path of main program, It is possible to further program line is periodically updated.
Alternatively, while call subroutine is carried out using default subroutine call function, said method also includes:Interrupt Operation main program;Preserve the interruption position of main program;Or the interruption position of main program is first added 1 preserve the position after plus 1 again. Specifically, Fig. 2 is the schematic diagram of the optional call subroutine of another kind according to embodiments of the present invention, as shown in Figure 2.In order to anti- Only during runtime subroutine, system gets muddled, and can interrupt the main program for running before, to ensure program just Often run.It is, of course, preferable to the interruption position of main program can also be preserved or first add 1 by the interruption position of main program and protect again by ground Deposit the position after plus 1.And then accelerate operation next time main program.It should be noted that Call A:Call subroutine A; SubPrgOp.CurPrgName:Present procedure name;SubPrgOp.SaveCurrentPrgDone=1:Preserve present procedure name Complete;PrgControlStep=30 (stop):Program stopped;SubPrgOp.LoadSubPrgDone=1:Open current son Program is completed;PrgControlStep=20:Subprogram starts to execute;SubPrgOp.ExeDone=1:Subprogram activation is complete Become;PrgControlStep=30 (stop):Subprogram stops;SubPrgOp.LoadMainPrgDone=1:Recover main program Complete.
Embodiment 2
According to a further aspect in the invention, there is provided a kind of device of call subroutine, Fig. 3 is according to embodiments of the present invention A kind of optional call subroutine device schematic diagram, as shown in figure 3, the device includes:Judging unit 20, in machine During device people operation main program, judge whether to need call subroutine;Call unit 40, for where it has, make With default subroutine call function come call subroutine.
By above-mentioned embodiment, the purpose of other programs when operation robot program has been reached, is easily dispatched, so as to The technique effect for maintaining robot normal work is achieved, and then when solving operation robot program in correlation technique, scheduling The inconvenient technical problem of other programs.
Alternatively, said apparatus also include:Opening unit, for using default subroutine call function in call unit After carrying out call subroutine, for opening subprogram;Loading unit, for loading and parsing the data file of subprogram;First Performance element, for starting execution subroutine.
Alternatively, said apparatus also include:Jump-transfer unit, after being finished in subprogram, comes back to main journey Sequence;Second performance element, for continuing executing with the residual program row of main program.
Alternatively, said apparatus also include:Back propagation unit, for after loading and parsing the data file of subprogram, The program name of the main program for periodically returning is to teaching machine;First storage unit, for preserving the program name path of main program;More New unit, for keeping program line to periodically update.
Alternatively, said apparatus also include:Interrupt location, for calling sub- journey using default subroutine call function While sequence, interrupt operation main program;Second storage unit, for preserving the interruption position of main program, or, by main program Interruption position first adds 1 and preserves the position after plus 1 again.
It should be noted that in embodiment 2 in each embodiment of device part and embodiment 1 method part each enforcement Mode is corresponding, will not be described here.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, can pass through other Mode is realized.Wherein, device embodiment described above is only the schematically division of for example described unit, Ke Yiwei A kind of division of logic function, can have when actually realizing other dividing mode, for example multiple units or component can in conjunction with or Person is desirably integrated into another system, or some features can be ignored, or does not execute.Another, shown or discussed is mutual Between coupling direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of unit or module by some interfaces Connect, can be electrical or other forms.
The unit that illustrates as separating component can be or may not be physically separate, aobvious as unit The part for showing can be or may not be physical location, you can be located at a place, or can also be distributed to multiple On unit.Some or all of unit therein can be selected according to the actual needs to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized and as independent production marketing or use using in the form of SFU software functional unit When, can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part in other words prior art being contributed or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, use so that a computer including some instructions Equipment (can be personal computer, server or network equipment etc.) execute each embodiment methods described of the present invention whole or Part steps.And aforesaid storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. are various can be with store program codes Medium.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (10)

1. a kind of method of call subroutine, it is characterised in that include:
During robot operation main program, judge whether to need call subroutine;
If so, then the subprogram is called using default subroutine call function.
2. method according to claim 1, it is characterised in that calling the son using default subroutine call function After program, methods described also includes:
Open the subprogram;
Load and parse the data file of the subprogram;
Start to execute the subprogram.
3. method according to claim 2, it is characterised in that methods described also includes:
After the subprogram is finished, the main program is come back to;
Continue executing with the residual program row of the main program.
4. method according to claim 2, it is characterised in that load and parse the subprogram data file it Afterwards, methods described also includes:
The program name of the main program for periodically returning is to teaching machine;
Preserve the program name path of the main program;
Program line is kept to periodically update.
5. method according to claim 1, it is characterised in that calling the son using default subroutine call function While program, methods described also includes:
Interrupt the main program;
Preserve the interruption position of the main program;Or
The interruption position of the main program is first added 1 and preserves the position after plus 1 again.
6. a kind of device of call subroutine, it is characterised in that include:
Judging unit, for, during robot operation main program, judging whether to need call subroutine;
Call unit, for where it has, call the subprogram using default subroutine call function.
7. device according to claim 6, it is characterised in that described device also includes:
Opening unit, in the call unit after the subprogram is called using default subroutine call function, For opening the subprogram;
Loading unit, for loading and parsing the data file of the subprogram;
First performance element, for starting to execute the subprogram.
8. device according to claim 7, it is characterised in that described device also includes:
Jump-transfer unit, after being finished in the subprogram, comes back to the main program;
Second performance element, for continuing executing with the residual program row of the main program.
9. device according to claim 7, it is characterised in that described device also includes:
Back propagation unit, for after loading and parsing the data file of the subprogram, the main program of periodically passback Program name to teaching machine;
First storage unit, for preserving the program name path of the main program;
Updating block, for keeping program line to periodically update.
10. device according to claim 6, it is characterised in that described device also includes:
Interrupt location, described for, while using default subroutine call function to call the subprogram, interrupting Main program;
Second storage unit, for preserving the interruption position of the main program, or, the interruption position of the main program is first added 1 preserves the position after plus 1 again.
CN201610861894.2A 2016-09-27 2016-09-27 The method and device of call subroutine Pending CN106484545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610861894.2A CN106484545A (en) 2016-09-27 2016-09-27 The method and device of call subroutine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610861894.2A CN106484545A (en) 2016-09-27 2016-09-27 The method and device of call subroutine

Publications (1)

Publication Number Publication Date
CN106484545A true CN106484545A (en) 2017-03-08

Family

ID=58267771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610861894.2A Pending CN106484545A (en) 2016-09-27 2016-09-27 The method and device of call subroutine

Country Status (1)

Country Link
CN (1) CN106484545A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427003A (en) * 2019-07-29 2019-11-08 珠海格力智能装备有限公司 The control method and device of robot, robot
CN111027194A (en) * 2019-12-02 2020-04-17 珠海格力智能装备有限公司 Debugging method and device for machine tool
CN111240816A (en) * 2020-01-03 2020-06-05 上海瀚之友信息技术服务有限公司 Program interruptible operation system and method
CN115167325A (en) * 2022-08-23 2022-10-11 郑州华泰联合工业自动化有限公司 Intelligent processing control method, system, equipment and storage medium for cable

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077064A (en) * 2012-12-31 2013-05-01 北京配天大富精密机械有限公司 Method and interpretation device for analyzing and executing program language
CN105446301A (en) * 2015-12-23 2016-03-30 南京熊猫电子股份有限公司 Control device and control method for controlling assembly line robots

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077064A (en) * 2012-12-31 2013-05-01 北京配天大富精密机械有限公司 Method and interpretation device for analyzing and executing program language
CN105446301A (en) * 2015-12-23 2016-03-30 南京熊猫电子股份有限公司 Control device and control method for controlling assembly line robots

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘丹非等: "《多媒体CAI课件制作方法与实例》", 28 February 2002 *
王成旺: "《电气控制PLC》", 31 August 2013, 云南科技出版社 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427003A (en) * 2019-07-29 2019-11-08 珠海格力智能装备有限公司 The control method and device of robot, robot
CN111027194A (en) * 2019-12-02 2020-04-17 珠海格力智能装备有限公司 Debugging method and device for machine tool
CN111240816A (en) * 2020-01-03 2020-06-05 上海瀚之友信息技术服务有限公司 Program interruptible operation system and method
CN115167325A (en) * 2022-08-23 2022-10-11 郑州华泰联合工业自动化有限公司 Intelligent processing control method, system, equipment and storage medium for cable
CN115167325B (en) * 2022-08-23 2023-12-19 郑州华泰联合工业自动化有限公司 Intelligent processing control method, system, equipment and storage medium for cable

Similar Documents

Publication Publication Date Title
CN106484545A (en) The method and device of call subroutine
CN106802826B (en) Service processing method and device based on thread pool
CN102890643B (en) Resource scheduling system based on immediate feedback of application effect under display card virtualization
CN104516794B (en) Backup method, the apparatus and system of database file
CN106874094A (en) timed task processing method, device and computing device
CN107450971A (en) Task processing method and device
CN106598801A (en) Coroutine monitoring method and apparatus
CN105808346B (en) A kind of method for scheduling task and device
CN104793996A (en) Task scheduling method and device of parallel computing equipment
CN109062681A (en) A kind of execution method, system, device and the storage medium of periodic cycle task
CN109754072A (en) Processing method, artificial intelligence process device and the Related product of internet off-line model
CN110347427A (en) The optimization method and device of web page code
CN108717380A (en) Message treatment method and device
CN106383747A (en) Method and device for scheduling computing resources
CN107864187A (en) The online task executing method of terminal device and server
CN110362394A (en) Task processing method and device, storage medium, electronic device
CN105843675A (en) Thread exiting method and device
CN106844467A (en) Method for exhibiting data and device
CN105653347A (en) Server, resource management method and virtual machine manager
CN106844093A (en) The method and device of Backup Data
CN101976206B (en) A kind of interruption processing method and device
CN109542617A (en) The processing method and processing device of system resource
CN109353736A (en) Stereo storehouse warehouse-in method and device, stereo garage
CN114723264A (en) Method, device and system for scheduling task of three-dimensional library
CN108363597A (en) A kind of method for page jump and system

Legal Events

Date Code Title Description
C06 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: 20170308