The last editing step was just a tiny modification of the program. Often, after
editing many lines in your program with perhaps many changes to the variables,
you want to reset your program to its initial state and run it again to see the
changes.
Click Execute → Reset Program Execution to reset the program.
Now, you can select Execute → Run to run the complete program,
or click Execute → Step Over repeatedly to execute the program
line by line.
The processing time of the operator or procedure call is indicated in the status bar at the bottom (unless disabled).
其他信息
Note the following when executing a program via Execute → Run:
- The program line marked by the PC is the first line that is executed.
All following program lines are going to be performed until the end of the current program.
After the execution is finished, the main procedure becomes the current procedure.
- A breakpoint, stop instruction, or runtime error may interrupt the execution of your program; see below.
- If the HDevelop program waits for the user to draw something in the graphics window, a notification message is printed in the status bar.
The program halts until the user finishes the draw operation and confirms this with a right click.
Further, the following characteristics apply during the execution of operator or procedure calls:
- You can initiate limited activities.
For example, if you double-click variables in the variable window they will be visualized.
You can modify parameters for the graphics windows as described in the menu Visualization.
You can even modify the current procedure body.
- All user interaction except Stop is disabled during program execution if the latter was not started in the main procedure.
HDevelop may respond slowly to your actions while the program is running.
This is caused by the fact that HALCON reacts to user input only between calls to operators.
- A variable window update during runtime will only be performed if it has not been suppressed (see section “Runtime Settings ▹ Runtime Settings”).
In any case, the values of all variables are shown in the variable window after the termination of the execution.
- While the program is running, the menu items Run, Step Over, Step Into, and Step Out
(and the corresponding tool bar buttons) cannot be executed.
- Suggestions in the menu Suggestions are determined for the recently executed operator.
- After executing a program (regardless whether via Run or stepwise via Step Over), HDevelop is available for further transactions.
Any user input that has been made during execution is handled then.
A running HDevelop program stops if one of the following conditions is met:
- You click Execute → Stop (or the corresponding tool bar button).
- The last operator or procedure call in the current program (the main procedure body) is called.
This is the usual way a program terminates. The PC is positioned behind this operator.
- A breakpoint is reached (see section “Program Window”).
In this case, the last operator or procedure call that will be executed is the one before the breakpoint.
In case of a breakpoint on a variable, the program stops after the program line that modified the corresponding variable (see also section “Breakpoints on Variables”).
- A runtime error occurs. An input variable without a value or values outside a valid range are typical reasons.
In this case, the PC remains in the line of the erroneous operator or procedure call.
- A stop instruction is executed. The PC remains on the line containing the stop instruction.
Note that stop instructions inside locked procedures (see section “Protected Procedures”) are obeyed.
However, the code of the locked procedure will only be visible if the correct password is entered in the program window.
- The program waits via the operator wait_seconds.
In this case, clicking Run, Step Over, or Step Forward continues the program immediately.
- HDevelop is closed.
The procedure and procedure call in which the execution of a program was stopped automatically become the current procedure and procedure call.