Test Sequences
The Workbench Studio includes an integrated tool for designing and running automated test scenarios. Test scenarios are so called "Test Sequences" and are documents of the workspace. To include a new test sequence in your workspace, right click on a folder an run the command "Insert New Item". Then, in category "Watch" select "Test Sequence" and enter a name for the sequence.
Syntax
The following syntaxes are allowed in a text sequence:
Comments
Empty and comment lines are allowed. Comments may have the following syntaxes:
// comment up to the end of line
(* delimited comment *)
Evaluation of an expression
You can evaluate a complex expression using ST operators. Function calls are not allowed within an expression. Examples:
Var1
Bool1 & (Var2 > 1000)
If an expression is entered alone on a line of a sequence, its value is simply displayed in the report when run.
Forcing a variable
A line may contain a statement to force a variable, using the syntax:
variable_name := expression ;
Examples:
Var1 := 1000;
Var1 := Var1 + 1;
Waiting for an expression to be TRUE
Use the following syntax to wait for an expression to be TRUE:
wait expression ;
A timeout may be specified in between brackets after the "wait" keyword:
wait [timeout] expression ;
Examples:
wait Bool1;
wait [t#5] Bool1 OR Bool2;
If not specified, the default timeout is 10 seconds.
Waiting for a delay
A line may contain a delay statement, using the syntax:
wait_time time_value;
Examples:
wait_time t#2s;
Use
Use the editor toolbar to check and run your sequence:
Commands:
1 |
Use this button to activate or deactivate the sequence. The sequence must be deactivated for editing. When activated, the sequence can be run and tested. |
2 |
Check the syntax of the sequence. |
3 |
Abort the sequence when running. |
4 |
Pause the sequence when running. |
5 |
Start the execution of the sequence. |
6 |
Single step: execute the selected line |
7 |
Set/remove a breakpoint on the current line. |
8 |
Remove all breakpoints. |
Use the commands of the popup menu to save the sequence and its report to a CSV file.
Test Sequences |
IEC 61131-3 Automation platform > IEC 61131-3 Programming Environment > Running the application > Test Sequences |
Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation