Use sequence tables to formulate setpoint profiles.

In the sequence table, you can set the following parameters for each column.

Table 32. Sequence Table Parameters
Column Definition Notes
Heading Displayed column header Mandatory field, must be unique
Destination variable Variable to which the value of this column is written Mandatory field, must be unique
changeable Is the destination variable changeable when filling in the table? Optional
Pointer N/A Optional
Auxiliary variable Used instead of the destination variable if specified Optional
Initialization value Constant or variable Optional
Selection list Specification of the allowed entries, simple or extended Optional
Column type Specifies the following:
  • Whether the column can be used for free entries
  • Whether the entries are reduced to the values of a select list
  • Whether the column acts as a next step condition that is evaluated
Mandatory field, usually a constant or a name

Sequence tables are always two-dimensional. The number of columns is freely selectable.

Column Type

For Constant or Name and Selection list, if you only define a destination variable, the value of the sequence table cell is written to the destination variable. This occurs when the following are true:
  • An auxiliary variable is not defined
  • The row is not empty

There is a call of the kind: SET <destination variable>, <value_or_name_from_column>

If a pointer is defined as destination variable for the column, a call of the following type occurs: SETPOI <destination variable.POI>, <name_from_column>

The column has both a destination variable and an auxiliary variable defined.

In this case, a total of two SET/SETPOI entries are generated. One entry is for the destination. One entry is for the auxiliary variable. The generated commands depend on the data type of the variable and the cell value.

  • The variable is a pointer, the cell value is constant: SET <variable.POI>, <value_from_column>
  • The variable is a pointer, the cell value a name: SETPOI <variable.POI>, <name_from_column>
  • The variable is a name: SET <variable>, <value_or_name_from_column>

The generated SET commands are always written to the PAbasic program generated for the sequence table for the Constant or name and Selection list column types.

Condition

Using the entry in the Condition column, the PAbasic code is built according to the following scheme:

IF <Condition from column> THEN
SET <Name of target or aux variable>, <Value>
ELSE
SET <Name of target or aux variable>, <0>
ENDIF

If you define at least one sequence table in the test, an additional program with a dynamically created name generates. The additional program generates during test generation for each sequence table with Condition columns. You can call the program cyclically from an operation table. For example, call the program cyclically if the predefined action Execute sequence table conditions are defined in the operation table.

Note The PAbasic code depends on the following factors:
  • Is an auxiliary variable defined?
  • Is the variable a pointer?
  • Is the cell value of the group a variable or a constant?

The program contains PAbasic code according to the following rules:

  • If an auxiliary variable is defined, the auxiliary variable is always used for the next-step condition. Otherwise, the target variable is used.
  • If the auxiliary or target variable is a pointer, SETPOI is used instead of SET SETPOI <target or aux variable.POI>, <Name_from_cell>.
  • If SETPOI is used, the PAbasic code is written into the PAbasic program of the sequence table.
  • If SET is used, the code is written to the PAbasic program containing the next-step condition.
  • If the cell value is a formula with a variable parameter or a constant value parameter, a simple SET command is generated: SET <Name of target or aux variable>, <Name_from_formula_or_value>
  • In all other cases, the cell content is interpreted as a boolean condition:
    IF <Condition from column> THEN
    SET <Name of target or aux variable>, 1
    ELSE
    SET <Name of target or aux variable>, 0
    ENDIF

If you specify an auxiliary variable, the value of the auxiliary variable is set to 0 or 1. The value is set in the PAbasic program with the next-step condition. Otherwise, the value of the target variable is set. In this case, the target variable and auxiliary variable are no longer set in the normal sequence table program. Enter a pointer to set the pointer to the target variable.

SETPOI <Pointer>, <Target variable>

Examples of the entries in the formula editor in the Condition column:

The target variable is always TV:

  1. Boolean expression. For example, x=2 or x=2 AND y=3). The resulting PAbasic code in the first case is:
    IF x=2 THEN
    SET TV, 1
    ELSE
    SET TV, 0
    FI
  2. Entry variable or value. For example, x or 3. The resulting PAbasic code in the first case is:
     SET TV, x
    
    For the second case:
    SET TV, 3
Note When updating older databases in which the program ABT_Condition.P is still used:
  • The program ABT_Condition.P is no longer called.
  • Instead, each sequence table receives its own condition program with a generic name.
  • The execution of these programs is done using the Execute sequence table conditions operation.
  • All operations Execute programs in which the ABT_Condition.P program is called are replaced by the Execute sequence table conditions operation.
  • If the program ABT_Condition.P is called in another PAbasic program or in a sequence table, a generation error occurs.
  • For new tests with sequence tables and next-step conditions, manually create the Execute sequence table conditions operation.
  • If the name ABT_Condition.P is no longer used, it is deleted.

Auxiliary Variable

If you specify an auxiliary variable, the current value of the group is always written to the auxiliary variable. If necessary, the current value of the group is also written to the destination variable, depending on the column type.

A possible use case is when the destination variable already has a valid value and the next cell of the sequence table is empty. In this case, the SET command is executed at the line break. If you have defined a destination variable, it remains at the last valid value. However, you can preset an auxiliary variable with a self-defined initialization value before entering the next line of the sequence table. After the SET commands are executed for the new row, you can examine whether the auxiliary variable still has the initialization value. In this case, the cell is empty. Alternatively, the auxiliary variable has a different value than the initialization value. In this case, the cell is filled. This allows you to decide to set the destination variable to a specific value even for empty cells.

Pointer

A pointer is a data element that refers to another PAtools element. The pointer is used as an alias for this element. The pointer addresses the element using its name.

Pointers give you the choice of executing any sequence table or step table at the test run time.

A pointer has two different properties:

  • Reference: Which element does the pointer point to? Integer.POI.Referenz = LED_Blue.AKT
  • Value: Current value of the element to which the pointer is pointing to. Integer.POI.Value = LED_Blue.AKT.Value (for example, 0)

Abide by the following pointer rules:

  • A pointer must always refer to an element that has the same type as the pointer.
    • Integer pointer points to an integer. For example, Integer.POI points to LED_Blue.AKT
    • Value table pointer points to a value tables
  • Pointers can refer to different elements (one after another) during the same test. For example:
    • Integer.POI points to LED_Blue.AKT
    • Integer.POI points to LED_Red.AKT
    • Integer.POI points to Schalter1.STS
    • Integer.POI points to Schalter2.STS
  • The value displayed in the test is the value of the element referenced by the pointer. For example:
    • Integer.POI points to Schalter1.STS => Integer.POI.Value = Schalter1.STS.Value
    • Integer.POI points to LED_Blau.AKT => Integer.POI.Value = LED_Blau.AKT.Value
  • If you change the pointer value during the test, the value of the element referenced by the pointer changes. For example, if Integer.POI currently points to LED_Blau.AKT, then:
    • Integer.POI.Value = 1 => LED_Blau.AKT.Value => 1 blue LED turns on
    • Integer.POI.Value = 0 => LED_Blau.AKT.Value => 0 blue LED turns off
  • Include any number of pointers in a test.
Important A test aborts if the pointer is assigned an element with the wrong data type at run time.

Pointer procedure:

  1. Define names for the pointer and the elements referenced by the pointer.
  2. Define the pointer in a pointer group. During this process, an initialization is performed.
  3. Define the pointer in a program such in a PAbasic or PAgraph++.
  4. Move the pointer in a program. Change the element pointed to by the pointer at test run time via PAbasic or PAgraph++ program code.