Owning Palette: Timer Function Blocks
Requires: RT Module
Counts up to or down from a number you specify using the preset value input.
| 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. |
| load | Sets counter value to preset value. |
| reset | Sets counter value to zero. |
| preset value | Specifies the number to count up to or down from. |
| count down | Specifies whether to decrement counter value. Each rising edge of this input triggers counter value to decrease by one. |
| count up | Specifies whether to increment counter value. Each rising edge of this input triggers counter value to increase 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.