# Slot 3 Menu 3 − Timer

Mode: Open‑Loop

Parameter | 3.03.001 Timer Unit Control Word
--- | ---
Short description | Configures the Timer Unit
Minimum | 0 (Display: 0000000000) | Maximum | 892 (Display: 1101111100)
Default | 0 (Display: 0000000000) | Units |
Type | 16 Bit User Save | Update Rate | Immediate
Display Format | Binary | Decimal Places | 0
Coding | RW, BU

This parameter is used to configure and control the Timer Unit.

The Timer Unit control word is a bit-mapped parameter, as shown in the table below:

Bit | Description
0 to 2 | Event Task Schedule: Selects the event task that will be scheduled when the Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is set: 0 = No Event task scheduled 1 = Schedule Event0 task 2 = Schedule Event1 task 3 = Schedule Event2 task 4 = Schedule Event3 task
3 | Enable Timer: 0 = Timer is disabled 1 = Timer is enabled
4 | Clock Source: 0 = Internal clock 1 = External clock provided on digital input (DigIn1 or DigIn2, b9 depending)
5 to 6 | Internal Clock Rate: 0 = 50MHz 1 = 12.5MHz 2 = 3.125MHz 3 = 0.78125MHz
7 to 8 | Timer Mode: 0 = Free Running Mode The selected clock drives the counter. The Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is set on wraparound. 1 = Capture Mode 1 The selected clock drives the counter. A rising edge transition on Digital Input 3 causes the current counter value to be latched into the Timer Capture Cache (Timer Unit Capture Cache (3.03.005)) parameter and the Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is set. The counter then continues incrementing (the Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is not set on wrap-around). 2 = Capture Mode 2 The selected clock drives the counter. A falling edge transition on Digital Input 3 causes the current counter value to be latched into the Timer Capture Cache (Timer Unit Capture Cache (3.03.005)) parameter and the Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is set. The counter then continues incrementing (the Timer Event Flag (Timer Unit Status Word (3.03.002) b0) is not set on wrap-around). Note: Every time the Timer Event Flag is set an event task will be scheduled if is configured (Bit 0-2). In Free Running Mode (Mode 0) this will only occurs when timer counter wraps around. In capture modes (Mode 1 and 2) this will only occurs when a rising or falling edge, respectively, is detected.
9 | External Source Clock selection: 0 = External clock provided on digital input 1 (Digital Input 1 State) 1 = External clock provided on digital input 2 (Digital Input 2 State)

Parameter | 3.03.002 Timer Unit Status Word
--- | ---
Short description | Displays the Timer Unit status word
Minimum | 0 (Display: 000) | Maximum | 7 (Display: 111)
Default |  | Units |
Type | 8 Bit Volatile | Update Rate | Immediate
Display Format | Binary | Decimal Places | 0
Coding | RO, ND, NC, BU

This parameter displays the status of the module's Timer Unit. The following table details the status word bits.

Bit | Description
0 | Timer Event Flag: 0 = No event has occurred 1 = An event has occurred (see description for Timer Mode ((Timer Unit Control Word (3.03.001) bit 7 - bit 8). This flag will not be set if Event Task Schedule (Timer Unit Control Word (3.03.001) bit 0 - bit 2) is set to zero Note: This bit is automatically cleared when the parameter is read.
1 | Wrap-around flag: 0=Wrap-around has not occurred 1=Counter wrap-around has occurred Note: This bit is automatically cleared when the parameter is read.
2 | Timer Enabled: 0 = Timer is disabled 1 = Timer is enabled Note: In case Register is configured the timer can not be enabled.

Parameter | 3.03.003 Timer Unit Timer Counter
--- | ---
Short description | Sets and displays Timer Unit counter value
Minimum | 0 | Maximum | 65535
Default |  | Units |
Type | 16 Bit Volatile | Update Rate | Immediate
Display Format | Standard | Decimal Places | 0
Coding | RW, ND, BU

This parameter sets or displays the current Timer Unit value.

Parameter | 3.03.004 Timer Unit Wrap Around Limit
--- | ---
Short description | Sets and displays the wrap around value for the Timer Unit
Minimum | 0 | Maximum | 65535
Default | 0 | Units |
Type | 16 Bit User Save | Update Rate | Immediate
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter sets the wrap-around limit for the Timer Unit. When the Timer Counter (Timer Unit Timer Counter (3.03.003)) reaches this value bit 0 of Timer Unit Status Word (3.03.002) will be set if the Timer Unit is configured to be in free running mode (see Timer Unit Control Word (3.03.001)).

Parameter | 3.03.005 Timer Unit Capture Cache
--- | ---
Short description | Displays the captured timer unit value
Minimum | 0 | Maximum | 65535
Default |  | Units |
Type | 16 Bit Volatile | Update Rate | Immediate
Display Format | Standard | Decimal Places | 0
Coding | RO, ND, BU

This parameter stores the Timer Unit value (Timer Unit Timer Counter (3.03.003)) on a rising or falling edge transition on the module's digital input 3 if the Timer Mode (as set in Timer Unit Control Word (3.03.001)) is configured in either capture mode 1 or capture mode 2.