The function block has input pins x and onTime. The output pin is y.
In the Oneshot function block, when x transitions from False to True, y is set to True for OnTime seconds.
OnTime is limited to the range 0 to 65535 seconds. An OnTime of zero keeps the output OFF no matter what changes occur at the x input.
Both the x input and y outputs have an option to be negated. From iteration to iteration, the Function Block keeps track of the last input and the on time. On power up/reset, these are cleared.
Logic Inputs
| Input Name | Input Value | Logic Value | Description |
| x | unconnected | N/A | For an invalid input make output be OFF (ON if output is negated). Clear the timer |
| VAL != 0.0 | 1 | ||
| 0 | 0 | ||
| invalid | N/A | Must go from FALSE to TRUE (or TRUE to FALSE (Negated)) |
Analog Inputs
| Range | ||||
| Input Name | Low | High | Input Value | Description |
| onTime | 0 | 65535 | unconnected | onTime =0 |
| (sec) | invalid | onTime =0 | ||
| < 0 | 0 | |||
| > 65535 | 65535 | |||
Output
| Output Name | Range | Description |
| Y | Any floating point value | When x transitions from FALSE to TRUE, y is set to TRUE (1) for onTime seconds |
Example
The Input is a square wave of 2 second amplitude. The time transition Output for different ontimes of 1 and 5 seconds is graphically obtained as square waves. When the input transitions from FALSE to TRUE for 1 second of Ontime or 5 seconds of Ontime, the output is set to TRUE.