Quality Encoder block
For good quality input, this block copies the input value to the output value; for bad quality input, the block sets the output value to a value you have configured. Optionally, the block can set all output field qualities to Good.
Quality Encoder block
Description
For good quality input, this block copies the input value to the output value; for bad quality input, the block sets the output value to a value you have configured. Optionally, the block can set all output field qualities to Good.
Quality encoder block
Block Type
Data quality block
Input/Output ports
- The input port can accept any number of fields of any type.
- There is an output field for every input field.
Functions performed on tags
- On the values - When the input quality is good, the output value is the same as the input value. When the input quality is bad, the output value is set to a value you have configured.
- On the timestamp - The timestamp of the output field is set to the timestamp of the corresponding input field.
- On the quality - If the Set all Qualities to Good option is selected in the block configuration, the output quality is always good. Otherwise the quality of the corresponding input field is used.
Example
In the example below, the value assigned to output fields corresponding to bad quality input fields is 1000 (the configured value). The Set all Qualities to Good option is not selected, so the qualities of the output fields are the same as the qualities of the corresponding input fields.
Input fields | Output fields | ||||
Timestamp | Quality | Value | Timestamp | Quality | Value |
0:01 | Good | 9 | 0:01 | Good | 9 |
0:02 | Bad | 10 | 0:02 | Bad | 1000 |
0:03 | Good | 1 | 0:03 | Good | 1 |
0:04 | Bad | 2 | 0:04 | Bad | 1000 |
0:05 | Good | 8 | 0:05 | Good | 8 |
0:06 | Good | 3 | 0:06 | Good | 3 |
0:07 | Bad | 10 | 0:07 | Bad | 1000 |
0:08 | Bad | 5 | 0:08 | Bad | 1000 |
0:09 | Good | 6 | 0:09 | Good | 6 |
In the example below, the value assigned to output fields corresponding to bad quality input fields is 1000 (the configured value). The Set all Qualities to Good option is selected, so the qualities of the output fields are all Good.
Input fields | Output fields | ||||
Timestamp | Quality | Value | Timestamp | Quality | Value |
0:01 | Good | 9 | 0:01 | Good | 9 |
0:02 | Bad | 10 | 0:02 | Good | 1000 |
0:03 | Good | 1 | 0:03 | Good | 1 |
0:04 | Bad | 2 | 0:04 | Good | 1000 |
0:05 | Good | 8 | 0:05 | Good | 8 |
0:06 | Good | 3 | 0:06 | Good | 3 |
0:07 | Bad | 10 | 0:07 | Good | 1000 |
0:08 | Bad | 5 | 0:08 | Good | 1000 |
0:09 | Good | 6 | 0:09 | Good | 6 |
Related topics: