Movatterモバイル変換


[0]ホーム

URL:


CN109144859A - A kind of program debugging method, device, system and equipment, storage medium - Google Patents

A kind of program debugging method, device, system and equipment, storage medium
Download PDF

Info

Publication number
CN109144859A
CN109144859ACN201810877803.3ACN201810877803ACN109144859ACN 109144859 ACN109144859 ACN 109144859ACN 201810877803 ACN201810877803 ACN 201810877803ACN 109144859 ACN109144859 ACN 109144859A
Authority
CN
China
Prior art keywords
equipment
control
parameter
program
instruction
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
CN201810877803.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.)
Shanghai Whale Robot Technology Co Ltd
Original Assignee
Shanghai Whale Robot 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 Shanghai Whale Robot Technology Co LtdfiledCriticalShanghai Whale Robot Technology Co Ltd
Priority to CN201810877803.3ApriorityCriticalpatent/CN109144859A/en
Publication of CN109144859ApublicationCriticalpatent/CN109144859A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The present invention provides a kind of program debugging method, device, system and equipment, storage medium, program debugging method is applied to program debugging equipment, this method comprises: the control parameter to be adjusted according to the code segment being debugged in program and applied to the code segment determines control command;The control instruction is sent to execution equipment, so that the execution equipment, which executes according to the instruction of the control instruction and will execute resulting state parameter, feeds back to this equipment;The control parameter is adjusted from the state parameter for executing equipment according to received.The problem for preventing to find to execute mistake after program comes into operation.

Description

A kind of program debugging method, device, system and equipment, storage medium
Technical field
The present invention relates to debugging technique field more particularly to a kind of program debugging method, device, system and equipment, storageMedium.
Background technique
In some fields, needs to control the execution for executing equipment by program, e.g. robot field, needProgram is stored in robot, robot executes the movement such as walking, detection by running the program.To ensure to execute equipmentThe accuracy of execution needs to debug program, with the mistake in revision program.
Existing debud mode is to be debugged using program debugging equipment to program, is not carried out in debugging processThe participation of equipment.By program after program debugging equipment debugging is good, then program is write into and is executed in equipment, to control execution equipmentExecution.
In above-mentioned debud mode, logic error, the syntax error of program can only be debugged out, but can not debug out and may leadCause the mistake of the relevant parameter of execution mistake, the problem for causing to find to execute mistake after the program comes into operation.
Summary of the invention
In view of this, the present invention provides a kind of program debugging method, device, system and equipment, storage medium, prevent journeySequence could find to execute the problem of mistake after coming into operation.
First aspect present invention provides a kind of program debugging method, is applied to program debugging equipment, comprising:
Control parameter to be adjusted according to the code segment being debugged in program and applied to the code segment determines controlOrder;
The control instruction is sent to execution equipment, so that the execution equipment is held according to the instruction of the control instructionIt goes and resulting state parameter will be executed and feed back to this equipment;
The control parameter is adjusted from the state parameter for executing equipment according to received.
According to one embodiment of present invention, described according to the code segment being debugged in program and applied to the code segmentControl parameter to be adjusted determine control command, comprising:
Determining according to the code segment corresponding can be identified by the execution equipment and be used to indicate the execution equipment and holdCapable instruction;
The control parameter that described instruction is recorded to the instruction field of the control command, and the code segment will be applied toIt records to the parameter field of the control command.
According to one embodiment of present invention, according to the code segment determine it is corresponding can by the execution equipment identify andIt is used to indicate the instruction that the execution equipment executes, comprising:
Appointment codes in the code segment are converted into can be identified by the execution equipment the from first language formatTwo language formats;
Appointment codes after conversion are determined as described instruction.
According to one embodiment of present invention, described according to the code segment being debugged in program and applied to the code segmentControl parameter to be adjusted determine control command after, this method further include:
The control instruction is encoded using the specified code book shared with the execution equipment obtained;
It is described that the control instruction is sent to execution equipment, comprising:
The control instruction after coding is sent to execution equipment so that the execution equipment utilization obtained it is describedSpecified code book the control instruction is decoded, is executed according to the instruction of the decoded control instruction and will execute gainedState parameter feed back to this equipment.
According to one embodiment of present invention, described to adjust institute from the state parameter for executing equipment according to receivedState control parameter, comprising:
Compare the state parameter and the control parameter;
The target value of the control parameter is determined according to comparison result;
The control parameter is revised as the target value.
According to one embodiment of present invention, the data type of the control parameter is numerical value;
The target value that the control parameter is determined according to comparison result, comprising:
If the state parameter is greater than the control parameter, the value after the control parameter to be subtracted to designated value is determined asThe target value;
If the state parameter is less than the control parameter, the value after the control parameter to be increased to designated value is determined asThe target value.
According to one embodiment of present invention, the data type of the control parameter is direction;
The target value that the control parameter is determined according to comparison result, comprising:
If the state parameter and the control parameter are reversed each other, the reverse link parameter of the control parameter is determined asThe target value.
Second aspect of the present invention provides a kind of program debugging device, is applied to program debugging equipment, comprising:
Order determining module, for according to the code segment being debugged in program and applied to the to be adjusted of the code segmentControl parameter determines control command;
Instruction sending module, for the control instruction to be sent to execution equipment, so that the execution equipment is according to instituteThe instruction for stating control instruction, which executes and will execute resulting state parameter, feeds back to this equipment;
Parameter adjustment module, for adjusting the control ginseng from the state parameter for executing equipment according to receivedNumber.
Third aspect present invention provides a kind of program debugging system, comprising: program debugging equipment and execution equipment;
Described program commissioning device is used for according to the code segment being debugged in program and applied to the code segment wait adjustWhole control parameter determines control command, the control instruction is sent to execution equipment, and hold from described according to receivedThe state parameter of row equipment adjusts the control parameter.
The execution equipment is used to receive the control command from described program commissioning device, and according to the control instructionInstruction execute and resulting state parameter will be executed feed back to this equipment.
Fourth aspect present invention provides a kind of program debugging equipment, including processor and memory;The memory storageThere is the program that can be called by processor;Wherein, it when the processor executes described program, realizes as described in the first aspect of the inventionProgram debugging method.
Fifth aspect present invention provides a kind of machine readable storage medium, which is characterized in that is stored thereon with program, the journeyWhen sequence is executed by processor, program debugging method as described in the first aspect of the invention is realized.
Compared with the prior art, the embodiment of the present invention has the advantages that
It in embodiments of the present invention, can be during program debugging, according to the code segment and code being debugged in programThe control parameter to be adjusted that Duan Zhongxu is used determines control instruction, and control instruction is sent to execution equipment, executes equipmentCorresponding movement can be executed according to control instruction in debugging process, performed type of action and action situation can be by being adjustedThe code segment and control parameter of examination determine, thus the resulting state parameter of execution equipment execution can reflect the control parameter, foundationWhether the state parameter can determine control parameter inaccurate, to adjust control parameter in debugging process, prevent from throwing programIt could find to execute the problem of mistake after entering use, the program after reducing adjustment control parameter is executed when coming into operationThe possibility of mistake.
Detailed description of the invention
Fig. 1 is the flow diagram of the program debugging method of one embodiment of the invention;
Fig. 2 is the structural block diagram of the program debugging device of one embodiment of the invention;
Fig. 3 is the flow diagram of the program debugging system interaction of one embodiment of the invention;
Fig. 4 is the structural block diagram of the program debugging equipment of one embodiment of the invention.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related toWhen attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appendedThe example of device and method being described in detail in claims, some aspects of the invention are consistent.
It is only to be not intended to limit the invention merely for for the purpose of describing particular embodiments in terminology used in the present invention.It is also intended in the present invention and the "an" of singular used in the attached claims, " described " and "the" including majorityForm, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wrapsIt may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the present inventionA little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing fromIn the case where the scope of the invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to asOne information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determination ".
Program debugging method in the embodiment of the present invention can be applied to program debugging equipment, and program debugging equipment for example may be usedIt is specific unlimited to be PC equipment etc., as long as the equipment for being that by program debugging.Can have in program debugging equipmentHave debugging needed for software and hardware, hardware for example may include for running the processor of program, the memory for storing programAnd the interface etc. being connect with execution equipment, software for example may include compiler etc., certainly can also include other desired softHardware.
In relevant program debugging method, in program debugging equipment debugging program, what disengaging was applied in the programEquipment is executed, i.e., will not control execution equipment in program debugging and accordingly execute, is executed then also can not just obtain and execute equipmentStatus information afterwards.Above procedure debud mode carries out being that can not obtain to execute the shape after equipment executes in debugging process in programState information, then just can not also determine whether parameter based on the execution of execution equipment is accurate in program.
But usually, program is handled due to equipment (including program debugging equipment, execute equipment) (includingProcessing needed for transfer program, operation of program etc.) when itself can generate machine error, and this machine error is can not to predict, thus even if being provided with the control parameter needed in a program, execute the state after equipment is executed according to the control parameterIt is not necessarily preferably, to also mean that the control parameter is inaccurate.However, being adjusted in above-mentioned relevant program debugging modeIt is that can not determine that control parameter causes to execute the undesirable situation of the state after equipment executes because of machine error when examination, it can onlyUntil debugging completion, program is written to and executes equipment and is likely to find the problem after being performed equipment operation.
For example, control parameter is 6 steps, and due to machine error, when executing equipment according to control parameter execution, only walkInto 5 steps, that is, the state parameter after executing is 5 steps, it is clear that there are deviations for state parameter and control parameter, then control ginsengNumber is inaccurate, and above-mentioned relevant program debugging mode is can not to debug out the situation of control parameter inaccuracy,It is even more impossible to be adjusted in debugging process to control parameter.
Based on above-mentioned discovery, and the embodiment of the invention provides a kind of program debugging methods, in debugging process, it may be determined thatThe above-mentioned situation for leading to control parameter inaccuracy because of machine error, and control parameter can be adjusted.
The program debugging method of the embodiment of the present invention is more particularly described below, but should not be as limit.
In one embodiment, referring to Fig. 1, program debugging method is applied to program debugging equipment, and this method may includeFollowing steps:
S100: the control parameter to be adjusted according to the code segment being debugged in program and applied to the code segment determinesControl command;
S200: being sent to execution equipment for the control instruction, so that the execution equipment is according to the control instructionInstruction, which executes and will execute resulting state parameter, feeds back to this equipment;
S300: the control parameter is adjusted from the state parameter for executing equipment according to received.
In the embodiment of the present invention, executing equipment may include executing controller and executing agency.Executing agency for example can be withRobot is specifically not limited to this certainly correspondingly, executing controller can be robot controller.Program is completed in debuggingAfterwards, it can be written into executing in controller, so as to execute the execution that controller runs the program and controls executing agency.
Specifically, the executing subject of program debugging method can be program debugging equipment, further can be program tuneTry the processor of equipment, wherein the processor can be one or more, the processor can for general processor orApplication specific processor.
In the step s 100, the control to be adjusted according to the code segment being debugged in program and applied to the code segmentParameter determines control command.
The division mode of code segment may include: 1) by the way that breakpoint is arranged in a program, using breakpoint as code in programThe separation of section, debugs each code segment;2) setting condition judges sentence in a program, and each condition judges sentence conductThe separation of code segment jumps to next code segment when meeting conditions present and is debugged.Certainly, code segment in programDivision mode is also not necessarily limited to this.
Each code segment can correspond to instruction and execute the instruction or more than two instructions that equipment executes, specifically notLimit.For the control parameter for being applied to each code segment, one or several control parameters can correspond to an instruction, every time can be withOne of those or several control parameters are determined as control parameter to be adjusted.It preferably, will when each code segment is debuggedWhole control parameters used in code segment are used as control parameter to be adjusted, and due to the difference of instruction, these control parameters areIt can be distinguished.Definition has the variable of corresponding control parameter in code segment, and control parameter is as the variable at runtimeValue, control parameter can be pre-configured in code segment or be input from the outside in the process of running into code segment, specificallyIt is unlimited.
During program debugging, the code segment in program can successively be run according to the sequence that jumps of code segment, i.e.,It is successively debugged, when debugging is to a code segment, determines control according to the code segment and corresponding control parameter to be adjustedSystem order, specific method of determination is unlimited, as long as the control instruction can finally be performed equipment and run and realize corresponding control functionEnergy.
In step s 200, the control instruction determined in step S100 is sent to execution equipment, is pressed so as to execute equipmentInstruction according to control instruction executes and will execute resulting state parameter and feed back to this equipment.The state parameter of feedback equally can be withIt sends in the form of a command.
Control parameter may include indicate stepping step number parameter or indicate moving direction parameter etc., it is specific and unlimitedSystem executes the action situation that equipment executes as long as being used to indicate.For example, control parameter can also include: instruction voice inspectionThe parameter of survey, the parameter for indicating infrared acquisition, the parameter for indicating temperature detection, the parameter of instruction brightness detection or instruction magnetic forceThe parameter etc. of detection.
Connection can be pre-established between this equipment and execution equipment, this equipment is passed control command by the connection establishedIt is defeated by execution equipment.This equipment and the connection executed between equipment can be wired connection, such as USB connection etc.;It or can be wirelessConnection, such as bluetooth connection etc..Certainly, above-mentioned specific connection type is merely exemplary, and is not intended as limiting, be can also be itHis connection type.
After execution equipment receives the control command, the control command will be run, and hold according to the instruction of the control commandThe corresponding movement of row, can get the state parameter generated because executing the movement after the completion of acting and executing, by this state parameterFeed back to this equipment.Control command may include instruction and control parameter, and instruction can indicate the movement class executed needed for executing equipmentType, and control parameter can indicate the action situation executed.
For example, parsing the result of the control command after execution equipment receives control command and being walked for instruction instruction execution equipmentIt is 50 steps (step distance is unlimited, such as can be 1mm) into, control parameter instruction step number, is accordingly carried out correspondingly, executing equipmentThe step number of last stepping is fed back to this equipment as state parameter by stepping.Certainly, due to machine error etc., feedbackState parameter may be different from the control parameter in this equipment.
In step S300, control parameter is adjusted from the state parameter for executing equipment according to received.
State parameter is to execute equipment to execute according to control command resulting, and whether can reflect control parameter accurate, becauseAnd this equipment can be adjusted control parameter according to the state parameter for executing equipment feedback.
It is appreciated that control parameter adjusted can be determined as to parameter to be debugged for each code segment, recycleStep S100~S300 is executed, sentence is judged by condition to determine whether control parameter is adjusted to desired value, in control parameterIt is adjusted to desired value and jumps to next code segment operation debugging again.Certainly, the adjustment of control parameter is also possible to disposably adjustIt is whole, the degree of inaccuracy is reduced, it is specific unlimited.
For example, if the state parameter of feedback is 60 steps, with 50 steps of control parameter difference, illustrate that machine wherein has occurredDevice error needs to be adjusted control parameter, such as control parameter can be reduced 10 steps.
It in embodiments of the present invention, can be during program debugging, according to the code segment and code being debugged in programThe control parameter to be adjusted that Duan Zhongxu is used determines control instruction, and control instruction is sent to execution equipment, executes equipmentCorresponding movement can be executed according to control instruction in debugging process, performed type of action and action situation can be by being adjustedThe code segment and control parameter of examination determine, thus the resulting state parameter of execution equipment execution can reflect the control parameter, foundationWhether the state parameter can determine control parameter inaccurate, to adjust control parameter in debugging process, prevent from throwing programIt could find to execute the problem of mistake after entering use, the program after reducing adjustment control parameter is executed when coming into operationThe possibility of mistake.
Certainly, the program debugging method of the embodiment of the present invention may further determine that the case where artificially setting wrong required control parameter,Such as expecting to be arranged control parameter is 50 steps, but has accidentally been set as 100 steps, then the state parameter fed back have certainly compared withBig error can determine and artificially set wrong situation.This situation can determine in the following manner: judge state parameter and control ginsengWhether several differences meets specified requirements, when meeting specified requirements (being greater than preset threshold), it is determined that has occurred artificialError, capable of emitting warning message is to be reminded.
In one embodiment, above method process can be executed by program debugging device 10, as shown in Fig. 2, image procossingDevice 10 mainly includes 3 modules: order determining module 100, instruction sending module 200 and parameter adjustment module 300.Order is trueCover half block 100 adjusts mould for executing above-mentioned steps S200, parameter for executing above-mentioned steps S100, instruction sending module 200Block 300 is for executing above-mentioned steps S300.
Fig. 3 shows program debugging equipment and executes the interaction scenario of equipment.Since the code segment in program may includeMultiple, for example including n, n is greater than 2, and during program debugging, each code segment has corresponding control command.In Fig. 3In, when debugging first code section, control command A1 is sent to execution equipment by program debugging equipment, executes equipment according to controlFeedback states parameter B1 gives program debugging equipment after system order A1 is executed, and program debugging equipment is according to state parameter B1 adjustment firstAfter control parameter, control command A1 can be regenerated and execute corresponding step, until according to the state ginseng for executing equipment feedbackWhen number B1 determines that the first control parameter is not required to be adjusted, jumps to second code section and run and debug;In debugging second codeControl command A2 is sent to execution equipment by Duan Shi, program debugging equipment, and it is anti-after executing according to control command A2 to execute equipmentAfter feedback state parameter B2 gives program debugging equipment, program debugging equipment to adjust the second control parameter according to state parameter B2, it can weighNewly-generated control command A2 simultaneously executes corresponding step, until determining the second control according to the state parameter B2 for executing equipment feedbackWhen parameter is not required to be adjusted, jumps to third code segment and run and debug;And so on, when debugging the n-th code segment, programControl command An is sent to execution equipment by commissioning device, executes equipment feedback states parameter after executing according to control command AnAfter Bn gives program debugging equipment, program debugging equipment to adjust the n-th control parameter according to state parameter Bn, control life can be regeneratedEnable An and execute corresponding step, until according to execute equipment feedback state parameter Bn determine the n-th control parameter do not need byWhen adjustment, the debugging of program is completed.
In one embodiment, described according to the code segment being debugged in program and applied to the generation in step S100The control parameter to be adjusted of code section determines control command, may comprise steps of:
S101: according to the code segment determine it is corresponding can by the execution equipment identify and be used to indicate it is described execution setThe standby instruction executed;
S102: described instruction is recorded to the instruction field of the control command, and the control that will be applied to the code segmentReference record processed to the control command parameter field.
Since code segment is usually to use high level language, if code segment is directly sent to execution equipment, execution is setIt is standby to identify code segment, it needs by certain processing (such as processing is binary file), which preferably putsIn this equipment, it can also be placed on and execute in equipment.
In step S101, corresponding instruction will be determined according to debugged code segment, which can be performed equipment identificationAnd it is used to indicate and executes equipment execution.
According to debugged code segment determine corresponding instruction mode may include: 1) extract in code segment with controlIt executes equipment and executes relevant appointment codes, appointment codes are carried out to the conversion of language format, so that the appointment codes after conversionEquipment identification can be performed;2) according to the corresponding instruction prestored in this equipment of code segment call, in the instruction and the code segment withControl executes the relevant appointment codes of equipment execution and corresponds to, and can be performed equipment identification and be used to indicate the code of equipment execution.
In step S102, by the instruction field of instruction record to control command, and will be applied to the control parameter of code segmentIt records to the parameter field of control command, so that it is determined that control command.It can also will be controlled before control parameter is written to control commandParameter processed formats, such as it is converted to binary system from the decimal system, specific unlimited.
It, can be corresponding according to being prestored in the calling execution equipment of the instruction in control command after execution equipment receives control commandPower function, and the control parameter in control command is passed in the power function, thereby executing corresponding movement.
It is appreciated that the format of control command can be this equipment and execute what equipment consulted in advance, specific format is notLimit.Control command may include that instruction field, parameter field, data length field etc. are unlimited, and data length can be with indicatorThe length of data in field.Control command can also include start field, and/or reserved field etc., which can makeFor the head of control command, determine the order received for control by the content identified in the start field so that executing equipmentOrder.
Preferably, in step S101, according to the code segment determine it is corresponding can by the execution equipment identify and be used forIt indicates the instruction that the execution equipment executes, may comprise steps of:
Appointment codes in the code segment are converted into can be identified by the execution equipment the from first language formatTwo language formats;
Appointment codes after conversion are determined as described instruction.
First language format can be high-level language, e.g. C language, C++, Java etc., specific unlimited.Second language latticeFormula is, for example, binary format, in this way, instruction can be in executing equipment directly by machine recognition.
Appointment codes are codes relevant to control execution equipment execution, such as can be instruction execution equipment and execute one kindThe power function of movement.The format transformation rule of appointment codes is also possible to this equipment and executes what equipment consulted in advance, holdsRow equipment can determine after identifying instruction and call the appointment codes corresponding in the executing equipment power function that saves.
Further, the control to be adjusted according to the code segment being debugged in program and applied to the code segmentAfter parameter determines control command, the program debugging method is further comprising the steps of:
S110: the control instruction is encoded using the specified code book shared with the execution equipment obtained.
Correspondingly, in the step 200, it is described that the control instruction is sent to execution equipment, specifically include following stepIt is rapid:
The control instruction after coding is sent to execution equipment so that the execution equipment utilization obtained it is describedSpecified code book the control instruction is decoded, is executed according to the instruction of the decoded control instruction and will execute gainedState parameter feed back to this equipment.
In step S110, control instruction is encoded using specified code book, so that only possessing the equipment of specified code bookThe control instruction after coding can be just decoded, the specified code book is specifically unlimited.Designated code is also prestored on executing equipmentThis, so that control instruction of the execution equipment after receiving coding can be decoded using specified code book in step S200.
In one embodiment, described according to the received state parameter tune from the execution equipment in step S300The whole control parameter, comprising the following steps:
S301: the state parameter and the control parameter;
S302: the target value of the control parameter is determined according to comparison result;
S303: the control parameter is revised as the target value.
In step S301, it is poor that the mode compared e.g. makees control parameter and state parameter, according to shape in step S302The difference of state parameter and control parameter determines that control parameter is revised as by the target value of control parameter then in step S303Target value.It, can be using modified control parameter as to be adjusted in order to determine whether modified control parameter meets the requirementsSimultaneously return step S100 is continued to execute control parameter, until meeting the requirements.
Certainly, the adjustment mode of specific control parameter needs depending on the type of control parameter, is specifically not intended to limit.
Preferably, the data type of the control parameter is numerical value;
In the step S302, the target value that the control parameter is determined according to comparison result, comprising:
If the state parameter is greater than the control parameter, the value after the control parameter to be subtracted to designated value is determined asThe target value;
If the state parameter is less than the control parameter, the value after the control parameter to be increased to designated value is determined asThe target value.
For example, control parameter indicates step number, thus data type is numerical value, and specially 50 steps are corresponding, the state of feedbackThe data type of parameter is also numerical value, such as specially 60 steps, then state parameter is greater than control parameter, then subtracts 50 specifiedValue, designated value is, for example, the difference 10 of state parameter and control parameter, thus control parameter adjusted is 40.
Preferably, the data type of the control parameter is direction;
In the step S302, the target value that the control parameter is determined according to comparison result, comprising:
If the state parameter and the control parameter are reversed each other, the reverse link parameter of the control parameter is determined asThe target value.
For example, control parameter indicates direction, thus data type is direction, specially to the left, corresponding, the state of feedbackThe data type of parameter is also direction, such as is specially to the right, then state parameter and control parameter are reversed each other, then joins controlNumber carries out reversely, i.e., control parameter is revised as to the right.
Certainly, the mode of the target value of the data type of above-mentioned control parameter and corresponding determining control parameter is only excellentChoosing, is not intended as limiting, and the data type of control parameter can also be other types, correspondingly, determining the target of control parameterThe mode of value can also be adjusted correspondingly.
Referring to Fig. 2, in one embodiment, program debugging device is applied to program debugging equipment, which can wrapIt includes:
Order determining module 100, for code segment debugged in foundation program and applied to the code segment wait adjustWhole control parameter determines control command;
Instruction sending module 200, for the control instruction to be sent to execution equipment so that the execution equipment according toThe instruction of the control instruction, which executes and will execute resulting state parameter, feeds back to this equipment;
Parameter adjustment module 300, for adjusting the control from the state parameter for executing equipment according to receivedParameter.
In one embodiment, order determining module 100 includes:
Instruction-determining unit corresponding can be identified and for referring to for determining according to the code segment by the execution equipmentShow the instruction that the execution equipment executes;
Command determination unit for recording described instruction to the instruction field of the control command, and will be applied to instituteThe control parameter for stating code segment is recorded to the parameter field of the control command.
In one embodiment, command determination unit includes:
Conversion subunit, for the appointment codes in the code segment to be converted to and can be held by described from first language formatThe second language format of row equipment identification;
Subelement is determined, for the appointment codes after conversion to be determined as described instruction.
In one embodiment, after the order determining module 100, the device further include:
Coding module, for using obtained the specified code book shared with the execution equipment by the control instruction intoRow coding;
Described instruction sending module 200 is specifically used for:
The control instruction after coding is sent to execution equipment so that the execution equipment utilization obtained it is describedSpecified code book the control instruction is decoded, is executed according to the instruction of the decoded control instruction and will execute gainedState parameter feed back to this equipment.
In one embodiment, the parameter adjustment module 300 includes:
Comparing unit is used for the state parameter and the control parameter;
Target value determination unit, for determining the target value of the control parameter according to comparison result;
Parameter modifying unit, for the control parameter to be revised as the target value.
In one embodiment, the type of the control parameter is numerical value;
The target value determination unit is specifically used for:
If the state parameter is greater than the control parameter, the value after the control parameter to be subtracted to designated value is determined asThe target value;
If the state parameter is less than the control parameter, the value after the control parameter to be increased to designated value is determined asThe target value.
In one embodiment, the type of the control parameter is direction;
The target value determination unit is specifically used for:
If the state parameter and the control parameter are reversed each other, the reverse link parameter of the control parameter is determined asThe target value.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatusRealization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method realityApply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unitThe unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be withIt is not physical unit.
The embodiment of the present invention, which also provides a kind of program debugging system, may include: program debugging equipment and executes equipment.
Described program commissioning device is used for according to the code segment being debugged in program and applied to the code segment wait adjustWhole control parameter determines control command, the control instruction is sent to execution equipment, and hold from described according to receivedThe state parameter of row equipment adjusts the control parameter.
The execution equipment is used to receive the control command from described program commissioning device, and according to the control instructionInstruction execute and resulting state parameter will be executed feed back to this equipment.
The content specifically executed about program debugging equipment may refer to the description previously with regard to program debugging method partContent, details are not described herein.
The embodiment of the present invention also provides a kind of program debugging equipment, including processor and memory;The memory storageThere is the program that can be called by processor;Wherein, it when the processor executes described program, realizes as any one in previous embodimentProgram debugging method described in.
The embodiment of present procedure debugging apparatus can be applied in program debugging equipment.Taking software implementation as an example, makeFor the device on a logical meaning, being will be corresponding in nonvolatile memory by the processor of program debugging equipment where itComputer program instructions be read into memory operation formed.For hardware view, Fig. 4 is that the present invention is exemplary according to oneA kind of hardware structure diagram for implementing the 10 place program debugging equipment of program debugging device exemplified, in addition to processing shown in Fig. 4Program debugging except device 510, memory 530, interface 520 and nonvolatile memory 540, in embodiment where device 10Equipment can also include other hardware, repeat no more to this generally according to the actual functional capability of the electronic equipment.
The embodiment of the present invention also provides a kind of machine readable storage medium, is stored thereon with program, and the program is by processorWhen execution, the program debugging method as described in any one of previous embodiment is realized.
It wherein includes storage medium (the including but not limited to disk of program code that the present invention, which can be used in one or more,Memory, CD-ROM, optical memory etc.) on the form of computer program product implemented.Machine readable storage medium includesPermanent and non-permanent, removable and non-removable media can be accomplished by any method or technique information storage.InformationIt can be computer readable instructions, data structure, the module of program or other data.The example of machine readable storage medium includesBut be not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), itsThe random access memory (RAM) of his type, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM),Flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), digital versatile disc (DVD) or otherOptical storage, magnetic cassette, tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium, can useIt can be accessed by a computing device information in storage.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the inventionWithin mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (11)

CN201810877803.3A2018-08-032018-08-03A kind of program debugging method, device, system and equipment, storage mediumPendingCN109144859A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810877803.3ACN109144859A (en)2018-08-032018-08-03A kind of program debugging method, device, system and equipment, storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810877803.3ACN109144859A (en)2018-08-032018-08-03A kind of program debugging method, device, system and equipment, storage medium

Publications (1)

Publication NumberPublication Date
CN109144859Atrue CN109144859A (en)2019-01-04

Family

ID=64791707

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810877803.3APendingCN109144859A (en)2018-08-032018-08-03A kind of program debugging method, device, system and equipment, storage medium

Country Status (1)

CountryLink
CN (1)CN109144859A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111045949A (en)*2019-12-142020-04-21中车大连电力牵引研发中心有限公司Program debugging method based on GPRS

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100268358A1 (en)*2009-04-202010-10-21Cantarelli MatteoMethod and device for programming an industrial controller
CN105404295A (en)*2015-10-222016-03-16上海未来伙伴机器人有限公司Robot motion performing algorithm
CN105666526A (en)*2016-03-222016-06-15北京百度网讯科技有限公司Robot debugging system based on artificial intelligence
US20160259717A1 (en)*2015-03-032016-09-08Software Robotics Corporation LimitedSoftware robots for programmatically controlling computer programs to perform tasks
US20160311116A1 (en)*2015-04-272016-10-27David M. HillMixed environment display of robotic actions
CN106182005A (en)*2016-08-082016-12-07江阴市雷奥机器人技术有限公司A kind of robot remote adjustment method
CN107257946A (en)*2014-11-252017-10-17Abb瑞士股份有限公司System for Virtual Debugging
CN107378951A (en)*2017-07-282017-11-24北京隆庆智能激光装备有限公司The visual programming method and operating system of a kind of truss manipulator

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100268358A1 (en)*2009-04-202010-10-21Cantarelli MatteoMethod and device for programming an industrial controller
CN107257946A (en)*2014-11-252017-10-17Abb瑞士股份有限公司System for Virtual Debugging
US20160259717A1 (en)*2015-03-032016-09-08Software Robotics Corporation LimitedSoftware robots for programmatically controlling computer programs to perform tasks
US20160311116A1 (en)*2015-04-272016-10-27David M. HillMixed environment display of robotic actions
CN105404295A (en)*2015-10-222016-03-16上海未来伙伴机器人有限公司Robot motion performing algorithm
CN105666526A (en)*2016-03-222016-06-15北京百度网讯科技有限公司Robot debugging system based on artificial intelligence
CN106182005A (en)*2016-08-082016-12-07江阴市雷奥机器人技术有限公司A kind of robot remote adjustment method
CN107378951A (en)*2017-07-282017-11-24北京隆庆智能激光装备有限公司The visual programming method and operating system of a kind of truss manipulator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111045949A (en)*2019-12-142020-04-21中车大连电力牵引研发中心有限公司Program debugging method based on GPRS

Similar Documents

PublicationPublication DateTitle
US10579513B2 (en)Test run control method and apparatus
CN111026080A (en)Hardware-in-loop test method and device for controller
EP3528470A1 (en)Control device, control system, control method, and control program
CN107179982B (en)Cross-process debugging method and device
CN105630661A (en)Automatic cross-system program debugging method and device
CN109144859A (en)A kind of program debugging method, device, system and equipment, storage medium
US7353500B2 (en)Suppressing execution of monitoring measurement program pointed to by inserted branch after threshold number of coverage to reduce instruction testing overhead
CN116155965B (en)Multi-stage control method of omnidirectional AMR
US20240028501A1 (en)Vulnerability detection method and device
CN117252559A (en)Business process processing method, device, computer equipment and storage medium
CN114218912B (en)Method and system for generating process file, storage medium and electronic device
CN108614704B (en)Code compiling method and device
CN116362681A (en)Job batch execution method and device, storage medium and electronic equipment
US20220365864A1 (en)Program development device, and program for providing program development device
EP3734491A1 (en)Method, apparatus, device, and medium for implementing simulator
CN113031574B (en)Equipment operation process reproduction method and system
CN114756217B (en)Plug-in based script generation system
CN114385271B (en)Command execution system based on plug-in
CN1963747A (en)System and method to generate measuring program
CN118860552B (en) An operation training method and system for industrial production
CN112860224B (en)Function execution environment construction method and device, electronic equipment and storage medium
CN112162533B (en)Instruction control method and device based on distributed control system
CN120085589A (en) A method, system, electronic device and medium for testing an optimal module
US20250199807A1 (en)Semiconductor device, debugging system, control method for semiconductor device, and debugging method
US11188324B2 (en)Methods, systems, and articles of manufacture to perform heterogeneous data structure selection via programmer annotations

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20190104

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp