Using a logical formula, it is possible to automatically calculate characteristics based on measured values that have already been recorded.
This function is mainly used in procella and qs-STAT. In procella, a calculated characteristic can be visualised in the Summary/Input window and alerted accordingly. For the evaluation within qs-STAT, the calculated characteristics can be used in the usual way for the corresponding evaluation. However, the differences in automatic calculation of characteristics with a logical operation formula must be taken into account. The calculation of characteristics offers a variety of different functions and different ways of creating and calculating characteristics.
Table of Contents
- 1 Functional description
- 2 Overview of the functions
- 3 Entering the logical operation formula
- 4 Linked characteristics in procella
- 5 Linked characteristics in the CMM Reporting module (O-QIS)
- 6 Linked characteristics in Q-DM (upload)
- 7 Manual calculation of linked characteristics
- 8 Transfer of additional data for characteristics with logical operation formula (AD function)
- 9 DBREQ - Calculation of characteristics across parts
- 10 K-field lengths in the data database
1 Functional description
With a logical operation formula, it is possible to automatically calculate characteristics on the basis of measured values that have already been recorded. This function is mainly used in procella and qs-STAT. Within procella, a calculated characteristic can be visualised and alerted accordingly within the Summary/input window. For the evaluation within qs-STAT, calculated characteristics can be used as usual for the corresponding evaluation. However, the differences regarding the automatic calculation of characteristics with a logical operation formula must be taken into account. The calculation of characteristics offers a variety of different functions (see overview) and different ways of creating and calculating them. The logical operation formulas can be used in local *.DFQ files and also in data sets in a data database. As always, Q-DAS recommends the use of the data database for data storage.
2 Overview of the functions
The following functions are available within version 13.0.3.1 (as of 04.05.2021):
|
Sequential internal number |
Function |
Description |
|
1 |
exp |
Exponential function ( y = exp(x) equals e^x ) |
|
2 |
ln |
Natural logarithm |
|
3 |
log |
Logarithm to base 10 |
|
4 |
sqrt |
Square root |
|
5 |
sin |
Sinus (all trigonometric functions in radians) |
|
6 |
cos |
Cosinus |
|
7 |
tan |
Tangens |
|
8 |
asin |
Arkussinus |
|
9 |
acos |
Arkuscosinus |
|
10 |
atan |
Arkustangens |
|
11 |
sinh |
hyperbolic Sinus |
|
12 |
cosh |
hyperbolic Cosinus |
|
13 |
tanh |
hyperbolic Tangens |
|
14 |
rnd |
Random number in the interval [0;x]. |
|
15 |
abs |
Amount function |
|
16 |
sgn |
Signum-Function |
|
17 |
int |
Integer-Function |
|
18 |
hea |
Heaviside-Function |
|
19 |
cot |
Cotangens |
|
20 |
acot |
Arkuscotangens |
|
21 |
coth |
hyperbolic Cotangens |
|
22 |
round |
Rounding function |
|
23 |
rad |
Conversion degrees -> radians |
|
24 |
grad |
Conversion radians -> degrees |
|
25 |
min |
Minimum MIN(m1,m2,m3) |
|
26 |
max |
Maximum MAX(m1,m2,m3) |
|
27 |
am |
Averages AM(m1,m2,m3) |
|
28 |
and |
AND AND(m1;m2;m3;m4) |
|
29 |
or |
OR OR(m1;m2;m3;m4) |
|
30 |
xor |
Exclusiv-OR |
|
31 |
not |
Logical negation |
|
32 |
bool |
Umwandlung in 0 oder 1 |
|
33 |
if |
Case distinction IF(m1<10;11;12) if m1 < 10 then 11 otherwise 12 |
|
34 |
sum |
Sum |
|
35 |
mod |
Modulo (Rest) |
|
36 |
attri |
Attribute of a variable |
|
37 |
sattr |
Set attribute |
|
38 |
nm |
Nominal value of a characteristic |
|
39 |
ugw |
Lower limit value |
|
40 |
ogw |
Upper Limit value |
|
41 |
charge |
Set Batch number |
|
42 |
Date |
Set time/date |
|
43 |
ad |
Transfer additional data for characteristics |
|
44 |
eq_ad |
Additional data for characteristics equal > 0 otherwise > 1 |
|
45 |
tol |
Assessment in Spez limit > 0 otherwise > 1 |
|
46 |
dt |
Get date/time from additional data record |
|
47 |
dbreq |
Measured value from DB |
|
48 |
nv |
Nominal value of a characteristic |
|
49 |
llv |
Lower limit value |
|
50 |
ulv |
Upper Limit value |
|
51 |
range |
Ranges |
|
52 |
stddev |
Standard deviation |
3 Entering the logical operation formula
To store a logical operation formula, first the parts/characteristics list must be opened. The logical operation formula can now be enterd by right-clicking on the characteristic to be allocated.
3.1 Selecting a function
Here, one of the available functions can now be selected and added via double-click or via OK.
3.2 Characteristics selection
Now the characteristics used for the calculation must be added via drag and drop. Finally, the whole thing must be confirmed with OK.
The characteristics to be offset are now displayed directly via "Preview" using the characteristic description (K2002).
3.3 Display of the stored logical operation formula
The logical operation formula stored for a characteristic is written to the corresponding characteristic in the K-field 2021 after saving. (Here, for example, within the characteristics tablegraphic).
3.3.1 Creating a logical operation formula without a characteristicsGUID
This example (without characteristic GUID) shows how to store a logical operation formula to obtain the automatically calculated average of characteristics as a result.
The data set used here contains a total of four characteristics. The fourth characteristic is to be calculated automatically using a stored logical operation formula.
|
The logical operation formula is as follows / Characteristic 4 is automatically calculated using characteristics 1-3. View within the values mask / Characteristic 4 was automatically calculated using the logical operation formula. |
|
|
It is essential to ensure that the sequence of the loaded characteristics (consecutive characteristic number) always corresponds to the initial default. The calculation of characteristic 4 (characteristic 1+characteristic 2+characteristic 3) is generally always based on the current characteristic number. Shifting the characteristics results in a wrong/incorrect calculation. |
3.4 Logical operation formula with characteristics GUID
By means of a characteristic GUID, each characteristic receives a unique assignment. This ensures that it does not matter in which order the characteristics of the data set are loaded. The characteristics can be shifted around. The result of the calculated characteristic is not affected by this. A prerequisite for using the characteristic GUID is that the corresponding option in the database options under File|Configurations|Databases|Options|Additional data must be activated.
After activating this option, each characteristic automatically receives a unique identification number. The corresponding entry is written into the K-field 2997.
3.4.1 Creating a logical operation formula with characteristics GUID
This example of a logical operation formula with characteristics GUID shows how to create a logical operation formula with a unique characteristics GUID. When creating the formula, an @ must be added in front of the corresponding characteristic.
|
Here, for example, characteristic 4 is calculated using characteristic 2 + characteristic 3. |
|
An @ sign must now be added in front of the characteristics that are used for the calculation. Finally, the whole thing must be confirmed with OK. If the stored logical operation formula is displayed again, it is shown as follows: Within the characteristics table, the whole thing is shown even more clearly if you display the K-fields 2021 (logical operation formula) and K2997 (characteristics GUID). |
|
|
It is not necessary to pay attention to the order in which the loaded characteristics (consecutive characteristic number) are present. This is completely irrelevant. The calculation of characteristic 4 (characteristic 1+characteristic 2+characteristic 3) is generally always carried out using the unique characteristic GUID. Moving the characteristics has no effect on the calculated result.
|
|
|
It should be noted that in order to use the characteristics GUID, additional storage space must be available in the Q-DAS data database used. |
|
|
It is generally not possible to use a logical operation formula with GUID if it contains a range specification. For example, the sum of characteristics 1 - to characteristic 4 (sum(m1.. m4)).
|
4 Linked characteristics in procella
During measurement value recording in procella, the calculation of linked characteristics takes place automatically in the background. A subsequent manual calculation does not have to take place here. If the characteristic with a logical operation formula corresponds to an alarm condition (depending on the evaluation strategy used), a corresponding alarm is also displayed.
|
In this example, the measured value of characteristic 3 is automatically calculated from the two measured values of characteristic 1 and characteristic 2. By default, only the two characteristics to be recorded are displayed within the "Test plan" graphic: Characteristics 1 and 2 have measured values that do not violate the tolerance limits. Characteristic 3, which contains the logical operation formula, has a tolerance limit violation and is alerted accordingly. |
5 Linked characteristics in the CMM Reporting module (O-QIS)
In the CMM (O-QIS) module, characteristics can be calculated automatically with a logical operation formula. Generally, two options are available for this, which, however, differ fundamentally in the requirements. It is not possible to use both options together.
5.1 Refresh linked characteristics
The corresponding option must first be set via Settings | Configuration CMM Reporting | Configurations 2 | Refresh linked characteristics .
This means that the characteristics are calculated and displayed with a stored logical operation formula directly when the corresponding file is read in.
|
|
This option can only be used if the stored logical operation formula was created in K2021 with characteristics GUID. The logical operation formula in the new characteristic must be created in the database. The DFQ file to be uploaded does not contain the characteristic. |
Here, for example, the writing system only wrote a measured value for characteristic no. 1 and characteristic no. 2. After the corresponding DFQ file has been read into CMM Reporting, the calculated characteristic no. 3 is displayed accordingly.
Underlying GUID per characteristic:
The logical operation formula for characteristic No. 3 (characteristic 1 + characteristic 2) is as follows:
View after the corresponding DFQ file has been read in:
5.2 Calculating linked characteristics via CMM upload
Via Settings | Configuration CMM Reporting | Configure Upload,the option " Calculate logical operations for characteristics" must first be activated for the correspondingly used CMM upload.
This means that when the corresponding file is read in, the characteristic is calculated and displayed with a stored logical operation formula.
|
|
This option can only be used if the stored logical operation formula in K2021 does not contain a characteristic GUID (see Chapter 3.4). The characteristic to be calculated must not contain a measured value. |
Here, for example, the writing system only wrote a measured value for characteristic no. 1 and characteristic no. 2. After the corresponding DFQ file has been read in CMM Reporting, the calculated characteristic no. 3 is displayed accordingly.
The logical operation formula stored in K2021 is as follows:
View after the corresponding file has been read in CMM Reporting:
5.3 Alaming characteristics with logical operation formula
If the characteristic with a logical operation formula, for example, causes a tolerance limit violation, a corresponding alarm is generated directly after the measurement is acknowledged. This is based on the alarm specifications in the evaluation strategy used. This applies to both options described in the CMM Reporting module.
6 Linked characteristics in Q-DM (upload)
If files with a logical operation formula are uploaded to a central data database without detours (e.g., the CMM Reporting module) by means of Q-DM (upload) directly after creation by a writing system, the option "calculate logical operations for characteristics" must first be activated here. This ensures that the user only has to finally load the data set from the database to view the measured values. The characteristics with a logical operation formula have already been calculated and are already available.
|
If the file was uploaded to a data database with the above option in Q-DM (Upload), the characteristics no. 5+6 have been calculated automatically and are already available. Manual calculation of the characteristics with a logical operation formula is not necessary here. |
|
|
This option can only be used if the stored logical operation formula in K2021 does not contain a characteristic GUID (see chapter 3.4) and the characteristic to be calculated must not contain a measured value. |
7 Manual calculation of linked characteristics
If characteristics with a stored logical operation formula have not yet been calculated initially, this must be done manually once using the "Calculate" option via the values mask. If a characteristic with a logical operation formula has already been calculated, it is saved/retained accordingly after calculation and does not have to be calculated again.
|
|
The manual calculation of characteristics with a logical operation formula cannot be carried out automatically. This must be done explicitly manually via the " Calculate" option within the values mask. |
|
In this data set, characteristic 7 and characteristic 8 have a logical operation formula. After uploading via Q-DM (Upload), without the corresponding option for offsetting, the whole thing looks as follows in the values mask: The characteristics to be offset are calculated manually as follows: |
|
The corresponding query must be confirmed with Yes. Then the calculated values for characteristics 7 and 8 are added and displayed. |
8 Transfer of additional data for characteristics with logical operation formula (AD function)
Using this function extension, the additional data of any characteristic can be transferred for the characteristic with a stored logical operation formula. In general, the additional data entry of the respective measured value is transferred. An optional selection of the additional data to be transferred is generally not possible. To transfer the additional data of a characteristic, [+AD(mX)] must be at the end of the logical operation formula.
|
This example shows you how the additional data of the 1st characteristic can be taken over for the allocated characteristic no. 3. The logical operation formula is as follows: The logical operation formula is composed as follows:
|
||||||
|
The following additional data information is available for characteristic 1: As soon as characteristic 3 has been calculated, the additional data of characteristic 1 are automatically taken over. |
|
|
The transfer of additional data also works on the basis of the characteristic GUID (see chapter 3.4). If a characteristic GUID is used in this case, the logical operation formula for characteristic 3 must look as follows @m1+@m2+AD(@m1) |
8.1 Consider additional data when using filters
If data sets with additional data (e.g., K0010) are always loaded completely, the scenario described here will never occur and can be ignored. However, if a data set with a calculated characteristic and a filter criterion is available, the characteristics resulting from the filtering are always additionally appended with a logical operation formula after loading the complete data set.
|
If the complete data set is loaded, the characteristic with a logical operation formula contains the same number of measured values as the characteristics used for calculation. If the data set is now loaded using a filter (K0010=machine 2) and the calculation of the linked characteristics is executed, the whole thing looks like this: After removing the filter and reloading the complete data set, the two previously calculated measured values in characteristic 6 are additionally appended and there is a discrepancy in the number of measured values. |
|
|
The measured values calculated accordingly are always appended additionally. Manual deletion is not possible. |
8.1.1 Correct procedure for filtering by additional data
So that the measured values with a filter criterion are not additionally appended to the complete/unfiltered data set, the addition AD must be used within the logical operation formula. The additional AD entry must contain a characteristic that serves as the basis for the calculation.
|
If the data set is now loaded using a filter (K0010=machine 2) and the calculation of the linked characteristics is executed, the whole thing looks like this: After removing the filter and reloading the complete data set, the two previously calculated measured values in characteristic 6 are no longer additionally appended and there is no discrepancy in the number of measured values. |
9 DBREQ - Calculation of characteristics across parts
This function is used to calculate the characteristic of a loaded part with a stored logical operation formula, which in turn contains a characteristic of another part. Based on a unique characteristic GUID and an additional data field which is used for the unique serial number. (e.g., K0014/part ID number). The advantage is that only the part with a logical operation formula needs to be loaded for a calculation to take place. The part containing the linked characteristic does not have to be loaded.
9.1 Prerequisites for use
The requirements for the correct use of the DBREQ function are:
|
1 |
The corresponding data sets must be available in the database. |
|
2 |
GUID (K0097 + K1997 + K2997) must be activated. |
|
3 |
The additional data field used in the DBREQ logical operation formula must be activated in the data database used. |
|
4 |
The additional data field used in the DBREQ logical operation formula must be activated as Full Index. |
|
5 |
The DBREQ functionality is only available when using an SQL data database. |
9.2 Example
This example shows how the logical operation formula is composed for two different parts of the database and what the concrete procedure looks like. This example shows how the linking formula is composed for two different parts from the database and what the concrete process looks like.
9.2.1 Parts initially loaded together
First, the corresponding parts/characteristics must be available in the data database and initially loaded together.
9.2.2 Create logical operation formula
For the loaded part "TEST_DBREQ_2", characteristic 2 receives the logical operation formula with the DBREQ entry.
The stored logical operation formula should now calculate the following:
Value from characteristic 1 of the second part (1/char_1_2) + value from characteristic 1 of the first part (1/char_1_1)
|
Please note that the two characteristics are only offset if the corresponding entries in the specified additional data field (e.g., K0014) are identical. |
The logical operation formula for characteristic 2 (2/char_2_2) of the second part is composed in detail as follows:
|
m1+DBREQ(#1.1;14) >> Characteristic 1 of part 2 (2/char_2_2) m1+DBREQ(#1.1;14) >> Part 1 of the loaded two parts m1+DBREQ(#1.1;14) >> Characteristic 1 of part 1 m1+DBREQ(#1.1;14) >> Additional data field (K0014 / part ID number) which must be identical in order for the logical operation formula to be calculated. As soon as you click on the "Preview" button, the characteristics GUID is automatically created from the selected entry: |
|
The unique characteristic GUID of the 1st characteristic of part 1 is used for this purpose. Changes must be saved. |
9.2.3 Input measured values
First, the first part is loaded from the database, the associated measured values including the additional data entry are recorded and saved.
|
|
Now the second part is loaded from the database, the corresponding measured values including the additional data entry are recorded. The measured values of characteristic 2 of part are now automatically calculated using the additional data in K0014.
|
|
10 K-field lengths in the data database
If data sets with a logical operation formula are saved in a data database, it is imperative to ensure that the K-fields required for this purpose have the corresponding number of characters available.
|
K-field designation / K-field no. |
Table / Column / Data type / Length |
|
K1997 / Part GUID |
PART / TEGUID / UNIQUEIDENTIFIER / - |
|
K2021 / logical operation formula |
CHARACTER / MEFORMEL / nvarchar / 255 ( |
|
K2997 / Characteristics GUID |
CHARACTERISTIC / MEGUID / UNIQUEIDENTIFIER / - |
|
|
The information given here refers exclusively to SQL / Oracle databases. |
|
Logical Operation Formula - Calculated Characteristics
|
English:PDF |
German:PDF |


