Command line debugging
The Workbench Studio includes a powerful tool that enables you to run debug and monitoring commands during simulation or connected mode tests. Commands are entered as in a console in prompt mode. Commands are available for reading and writing any complex variable or expression.
Debugging in prompt mode is available from the Prompt tab of the output window.
Reading expressions
To read a variable or a complex ST expression, just enter it at the prompt and hit ENTER. The expression may contain any ST operator, and can be used with variable indexes in case of an array.
|
>MyVar |
The following ST operators can be used in expressions:
Operator |
Description |
& AND OR XOR |
boolean operators |
+ - / * |
arithmetics |
= <> < > <= >= |
comparisons |
[ , ] |
array index specification |
. |
structure member specification |
The ST expression can also include constant values.
Forcing variables
To force a variable, enter its name followed by the ":=" sign and any ST expression. The specification of the forced variable may include variable indexes in case of an array.
|
>MyVar := 200 |
Specifying a parent program
In order to get access to local variables, you need to specify the name of the default parent program. For that, enter "!local=" followed by the name of the program. When a parent program is specified, all variables used in commands can be either global or local to this program.
|
>!local=PROG1 |
Command line debugging |
IEC 61131-3 Automation platform > IEC 61131-3 Programming Environment > Running the application > Command line debugging |
Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily