|
|
1. Open the CTRL Debugger for the manager UI_1 (if your UI has the number 1). 2. Click on the ScriptID or the thread number of the trend panel 3. Click on Break to pause the script/thread. The Info window displays the line number at which the script was interrupted. Execution of the script is stopped. The trend continues as a straight line. |
4. Click on Continue to resume execution. The trend once again receives random values and produces a corresponding trace. |
5. Click on Break again and then Step to run through the script instruction by instruction. The line number is again displayed in the Info window. The scripts contain a while loop, which is now being executed step by step: first step line 28, next step line 29, line 30 and so on. |
How set/remove a breakpoint |
You can set breakpoints in order to interrupt execution of a script at specific points:
1. Click on the required line in the left-hand column of the Source window to set a breakpoint at this position. |
2. The breakpoint is indicated by a red star. |
3. Execution of the script is halted BEFORE execution of the first instruction of the selected line. |
4. To remove a breakpoint, simply click on the breakpoint again in the Source window. |
Setting breakpoints does not work in functions with return values.
Select "Other Info/Breakpoints" to see all the breakpoints that have been set. |
|
|
|
Information |
Meaning |
ThreadId |
shows the current thread number |
next work |
indicates when the CTRL Interpreter is to handle this thread again (the date above means immediately) |
local variables |
a list of the local variables is given underneath with the data type and value |
int n = 0 |
integer variable |
string userbit = "" |
string variable, variable contents of type "string" are always enclosed in inverted commas. |
dyn_string names = <..> 3 items |
For dyn_ data types only the number of elements is displayed. To display the contents of these you can double-click on the line containing the dyn_variable. For example the information displayed in the Info window for this dyn_string might be: 1:
"Start" |
How to set variables During debugging it is possible to set different variable values in order to modify or test execution in step mode.
Caution These variables are actually set in the manager that is running. Therefore, if the user does not take steps to prevent it, a value will also be sent to the actual process. |
1. Enter a command with the following syntax in the command line:
set <variable_name> <value> |
2. For instance entering "set n 5" sets the variable "n" to the value 5.
Note Elements with a field or array data type (dyn/dyn_dyn) cannot be set manually in the Debugger. |
How to obtain further information |
Click on the Other Info button and select one of the options. |
You will be given a list of possible information. The response to each query appears in the Info window. Some of these options can also be chosen using the buttons (see CTRL Debugger panel). |
Information |
Meaning |
Libs |
Displays all CTRL libraries that are loaded |
Globals |
Displays all global variables for that manager |
Breakpoints |
Displays all the breakpoints that have been set |
Script Modules |
Displays information on active script modules such as timedFunc(), operatingHours() etc. Script modules run in the background as CTRL modules rather like a "compiled thread". These are functions that are started from the CTRL manager. |
Connections |
Displays information on dpConnect(), alertConnect() or queryConnect() for the current script. |
V 3.11 SP1
Copyright ETM professional control GmbH 2013 All Rights Reserved