Time Delay block
In this block the inputs are delayed by a variable duration. The amount of delay depends on another field's value. The value is interpreted as a number of seconds.
Time Delay block
Description
The block can delay the input fields by a variable amount. The delay is controlled by the value of the field selected from the Time delay port. The value is interpreted as a number of seconds to delay the output. The block keeps a history of the inputs up to a maximum time. If the delay exceeds this time the output quality will be bad.
Warning: The Time delay block keeps a history of the input fields based on the input field timestamp. The timestamp of the input field does not necessarily change on every execute.
diagram of the time delay block
Block Type
Time based block
Input/Output ports
There are 2 input ports:
-
Inputs - Delayed versions of these fields are propagated to the output
-
Time delay - The field that specifies the amount of delay is selected from this port. The delay is in seconds.
Functions performed on tags
-
On the values - The output value is the value of the input field at the delay time.
-
On the timestamp - The time stamp is always set to the current execution time.
-
On the quality - The quality is set to the quality of the input field at the delay time. If the delay time is more than the history size, or if the quality on the time delay field is bad, the output quality is set to bad.
Example
We will assume that we have the set of timestamped input data (at one second intervals) shown in the first column in the table below. The time delay for that time step is listed in the second column, while the third column contains the output from the time delay block. We will also assume that the Maximum time delay is 5 seconds.
Process variable |
Time delay field |
Time delay block output |
Time delay block output quality |
50 |
2 |
0 |
0 |
12 |
1 |
50 |
1 |
5 |
2 |
50 |
1 |
8 |
4 |
0 |
0 |
49 |
1 |
8 |
1 |
88 |
3 |
5 |
1 |
63 |
2 |
49 |
1 |
47 |
5 |
5 |
1 |
24 |
1 |
47 |
1 |
13 |
8 |
0 |
0 |
The block maintains a fixed history of data (the time span, say x seconds, is specified on the time delay block property page). The block is able to supply the value of the variable from up to x seconds ago. Since the above hypothetical case had a Maximum time delay of 5 seconds, the quality of the output of the time delay block becomes BAD when the time delay field is equal to 8 (see last entry).
Related topics: