Skip to main content

Tab: Tabular Editor

The tab contains a table with test cases, each of which are composed of test steps.

Test steps

A test step contains the actual testing of a state. In the test step, the inputs and variables of the function block to be tested are set and the behavior of its outputs is tested. For a successful test, the defined condition has to be fulfilled for the full duration of the test step.

Name

Test step name

Created automatically when added

Example: („Step1„, „Step2„, …)

Duration

. Duration of the test step
  • Single: The test step is executed for exactly one cycle. This is the default setting when a duration is not specified explicitly.

  • Cycles: Number of cycles in which the test step is executed

    The minimum is one cycle, which corresponds to the Single option.

  • Time: The test step is executed over the specified time span. In the first cycle, a time stamp is applied and compared with the specified time span in each subsequent cycle. If the time is detected to be exceeded during this test, then the system switches to the next test step. The time value is specified as a constant TIME constant (for example, T#5s).

  • _cds_icon_three_dots.png: Opens the Custom conditions for duration dialog

Call

standard icon: The test step is called one time. This is necessary if a value for an input variable is defined in the conditions of the test step.

_cds_icon_option_deactivated.png: The test step is not called. This may be necessary if the call influences the test result.

A use case for deactivation results when there is a custom condition for the duration. For example, if you want to check a function block developed according to the CAA Behaviour Model. A possible test would be whether or not the output xBusy becomes FALSE and xDone becomes TRUE. This case can be implemented in two test steps:

Step 1: Check for xBusy = TRUE with a custom duration

This duration is the condition xDone = TRUE.

Step 2: Check for xBusy = FALSE without a call

Note: If called again, then xBusy would immediately become TRUE.

<variable 1>

You can create any number of columns for variables to be written and read in a test step in one row. These variables are typically the inputs and outputs of the testee, but can also be other variables (for example, system states). An input can be recognized in the column by the IEC assignment operator :=, an output at an IEC comparison operator (for example, =, <, or >).

The table columns for the individual function block variables can already have been created when the Test Table object was inserted. The columns can be supplemented, reduced, and edited at any time using the Edit columns dialog.

  • Input variables of the function block to be tested are inserted as the Assignment column type. In the case of Boolean inputs, predefined assignments are then available in the column of the tabular editor.

  • Output variables of the function block to be tested are inserted as the Condition column type. For these kinds of columns, the comparison operators are then provided in the tabular editor in order to formulate the test condition. For possible operators, see below.

  • Conditions (as the IEC expression column type)

Depending on the column type (input or output variable), a corresponding list of choices is provided in the column of the tabular editor for setting the condition for the variable. For output variables, you can also define a separate failure mode (error handling) for each test case.

Note: The check condition consists of the sum of all tests of the output variables. The configured test condition has to be fulfilled for the entire duration of the test step.

Assignments and comparison operators

Tip

The possible comparison operators differ depending on the data type of the value to be compared.

Compare operator

Description

Shortcut

Skip: No evaluation

Space or -

=

Equal to: A constant value (in IEC syntax) is specified here, and the value has to be equal to the default value.

e, q

Not equal to

n, e

>

Greater than

g

Greater than or equal to

g, e

<

Less than

l

Less than or equal to

l, e

Constant1: The variable retains its value in each cycle. The reference value is the value from the cycle before this test.

Note: When defining a tolerance, a defined deviation is permitted. It is calculated as follows:

Maximum value (all previous values including current value) - minimum value (all previous values incl. current value) <= 2 * tolerance value

c

Monotonic falling1: The value in each cycle is less than or equal to that in the previous cycle.

Note: When defining a tolerance, a positive increase within defined limits is also permitted. The test is then as follows:

Current value <= minimum value (of all previous values) + 2 * tolerance value

f

↘↘

Strict monotonic falling1: The value in each cycle is less than that in the previous cycle.

Note: When defining a tolerance, a positive increase within defined limits is also permitted. The test is then as follows:

Current value < minimum value (of all previous values) + 2 * tolerance value

f, f

Monotonic rising1: The value in each cycle is greater than or equal to that in the previous cycle.

Note: When defining a tolerance, a negative increase within defined limits is also permitted. The test is then as follows:

Current value >= maximum value (of all previous values) - 2 * tolerance value

i

↗↗

Strict monotonic rising1: The value in each cycle is greater than that in the previous cycle.

Note: When defining a tolerance, a negative increase within defined limits is also permitted. The test is then as follows:

Current value > maximum value (of all previous values) - 2 * tolerance value

i, i

Edge1: The value has to be identical in this cycle, but has to have had a different value in the previous cycle.

e, d

[;]

Range: Specified by a lower and an upper limit

If the lower limit is less than or equal to the upper limit, then the value to be tested has to be within this range (limits included).

If the lower and upper limits are identical, then the value has to be equal to the two limits.

If the lower limit is greater than the upper limit, then the value has to be outside the specified range (less than the upper limit or greater than the lower limit).

r

± tolerance

Value comparisons can be specified with a tolerance so that the tested value can be within a defined range.

1: This comparison procedure requires a comparison value from the previous cycle to perform the comparison. Because this comparison value is not available for the first step of the test case, the comparison procedure must not be used for the first test step.

Comparison Operator (BOOL)

Description

Shortcut

No evaluation

Space or -

TRUE

t

FALSE

f,

Rising edge1

r, e

Falling edge1

f, e

↠↑

Constant or rising edge1

c, r

↠↓

Constant or falling edge1

c, f

↑↓

Toggled1: Rising or falling edge

g

1: This comparison procedure requires a comparison value from the previous cycle to perform the comparison. Because this comparison value is not available for the first step of the test case, the comparison procedure must not be used for the first test step.

Assignments (BOOL)

Description

Shortcut

No evaluation

Space or -

TRUE

t

FALSE

f

↑↓

Toggled: Rising or falling edge

t, o

Failure mode

Failure mode

Shortcut

-

The inherited mode is used. If no mode is defined, then the test case execution is aborted (default behavior).

Space

!

AbortTestCase: The execution of the test case is aborted immediately. This is also the default setting when no failure mode is defined.

c

!G

AbortTestCaseGroup: The execution of the test case is aborted immediately, and the additional test cases of the test case group are skipped.

g

!!

AbortUnitTesting: The execution of the IEC unit test is aborted immediately.

t

!!!

AbortTestRun: The test script is aborted immediately.

r