Owning Palette: Timer Function Blocks
Requires: RT Module
Counts up from zero. The counter value output increments on each rising edge of the count up input. The done output returns TRUE when counter value is greater than or equal to preset value.
| 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. |
| reset | Asserts the reset signal. |
| 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.