Owning Palette: Timer
Installed With: 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 function block runs. If an error occurs, the function block does not execute. |
| 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. If error in (no error) indicates that an error occurred before this function block ran, error out contains the same error information. Otherwise, it describes the error status that this function block produces. Right click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. |
| 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.