Owning Palette: Timer Function Blocks
Requires: RT Module
Counts down from the number you specify using the preset value input. The counter value output decrements on each rising edge of the count down input. When counter value reaches zero, done returns TRUE.
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
| Parameter | Description |
|---|---|
| Inputs | Contains the following configuration options:
|
| Outputs | Contains the following configuration options:
|
| Parameter | Description |
|---|---|
| error in (no error) | Describes error conditions that occur before this node runs. |
| preset value | Specifies the number to count up to or down from. |
| load | Sets counter value to preset value. |
| count down | Specifies whether to decrement counter value. Each rising edge of this input triggers counter value to decrease by one. |
| Parameter | Description |
|---|---|
| error out | Contains error information. This output provides standard error out functionality. |
| counter value | Returns the current value of the counter. |
| done | Indicates when the function block finishes counting down. |
The timing of this function block depends on the rate of the Timed Loop or While Loop in which you place the function block. For example, if you need the function block to update with millisecond resolution, you can place the function block in a Timed Loop configured to execute every millisecond.
The following timing diagram illustrates the behavior of this function block.