|
The following describes the call process for a decision table. The process also refers to procedure calls. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It is also possible
to link decision tables and procedures by calling a decision table from
within a decision table.
When the execution of the called decision table is complete, the process control continues the execution the called decision table (sub program technology). If the decision table call is executed as a condition, this is considered to be True if a matching rule is found in the called decision table; otherwise, the condition is False.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{DT_NAME}() or {DT_NAME}({PAR_LIST})
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example 1: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For a decision table the transfer parameters: DT_STR (String) and DT_INT (Integer) are set
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example 2: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In this example the
decision table "Fore-bore" is called from within a decision table
and the three values "D+7", "ALU" and "D_FORE-BORE"
are forwarded. In order to prevent a query the variable "D_FORE-BORE"
is pre-assigned the value 0.
DT-Variables of the calling decision table:
Calling decision table:
DT-Variables of the called decision table "Fore-bore": The allocation of the forwarded values is performed by the value in column Parameter-No. (PN).
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
As long as the values of the transfer parameters are not available in the calling decision table/procedure, these values are determined prior to the call (by means of a query if necessary). This is to ensure that the called decision table is always forwarded the values by the parameters list. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Called decision table "Fore-bore":
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Upon successful execution
of "Fore-bore", the third parameter of the calling decision
table is assigned accordingly:
D_FORE-BORE Value of 'DIA' * 0.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Although the value of the first parameter has been changed in the called "Fore-bore" decision table, this change is not returned to the calling decision table because this position of the parameters list does not contain a variable but an expression (D+7). |