05 Timer and counter
Timer output instruction
OUT T/Timer output
When the calculation result before the OUT instruction is ON, the coil of the timer/retentive timer specified in (d) will be ON and measurement will be performed until the set value is reached. If the time limit expires, the normally open contact will conduct and the normally closed contact will become non-conductive.
-[OUT (d) (value)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(d) | Timer device number | - | Counter | ANY |
(value) | Timer setting value | 0 to 32767 | Unsigned BIN 16 bit | ANY16 |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | ||||||||||
KnX | KnY | KnM | KnS | T | C | D | R | SD | K | H | [D] | XXP | ||
OUT T | Parameter 1 | ● | ||||||||||||
Parameter 2 | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
Features
When the operation result before the OUT instruction is ON, the coil of the timer specified in (d) will be ON and measurement will be performed until the set value is reached. If the count reaches (current value ≥ set value), the normally open contact will be conductive, and the normally closed contact will become non-conductive.
When the operation result before the OUT instruction changes from ON to OFF, the situation is as follows.
Timer type | Timer coil | The current value of the timer | Before the time limit | After the time limit | ||
Normally open contact | Normally closed contact | Normally open contact | Normally closed contact | |||
Timer | OFF | 0 | Non-conductive | Conduction | Non-conductive | Conduction |
Cumulative timer | OFF | Keep current value | Non-conductive | Conduction | Conduction | Non-conductive |
• After the time limit expires, clear the current value of the accumulative timer and turn off the contact with the RST instruction.
• When the setting value is 0, the time limit will expire when the OUT instruction is executed.
• While the OUT T instruction is ON, if the OUT T instruction is skipped by the CJ instruction, etc., the current value update and contact ON/OFF will not be performed.
• If the same OUT T instruction is executed more than twice in the same scan, the current value will be updated according to the number of executions.
• Description of each timer:
Device number | Timer specifications | Device number | Timer specifications |
T0 to T191 | 100ms timer | T246 to T249 | 1ms accumulative timer |
T192 to T199 | 100ms subroutine timer (used in the subroutine, even if the subroutine is not called, it will still be updated) | T250 to T255 | 10ms cumulative timer |
T256 to T383 | 1ms timer | ||
T200 to T245 | 10ms timer | T384 to T511 | 0.1ms timer |
Error code
Error code | Content |
4084H | The parameter setting in (value) is out of range |
Example
Using timing, D0 increases by 1 after every 1S:
Counter output instructions
OUT C/Counter output
16-bit counter instruction: When the operation result before the OUT instruction changes from OFF to ON, the current value of the counter specified in (d) will be +1. If the count reaches, the normally open contact will be turned on and the normally closed contact will become Non-conductive.
-[OUT (d) (value)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(d) | Counter device number | - | Counter | ANY |
(value) | Counter setting value | 0 to 32767 | Unsigned BIN 16 bit | ANY_INT |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | |||||||||||
KnX | KnY | KnM | KnS | T | C | D | R | SD | K | H | E | [D] | XXP | ||
OUT C | Parameter 1 | ● | |||||||||||||
Parameter 2 | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
Features
• When the calculation result before the OUT instruction changes from OFF to ON, the current value (count value) of the counter specified in (d) will be +1. If the count reaches (current value ≥ set value), the normally open contact will be turned on , The normally closed contact becomes non-conductive.
• If the calculation result is ON, no counting is performed. (Counting input does not need to be pulsed.)
• After the count is reached, the count value and the state of the contact do not change before the RST instruction is executed.
• When the setting value is 0, the processing is the same as when it is 1.
Error code
Error code | Content |
4084H | The parameter setting in (value) is out of range |
4085H | The (value) parameter exceeds the device range |
Example
Every time M0 changes from OFF→ON, C0 will increase by 1. When the value of C0 is added to K10, the normally open contact of C0 is closed and Y0 is output. At this time, M0 continues from OFF→ON, and the value of C0 will not change anymore.
The contact of C0 can only be turned OFF by RST/ZRST instruction and communication.
OUT LC instruction/Long counter output
32-bit counter instruction: When the operation result before the OUT instruction changes from OFF to ON, the current value of the long counter specified in (d) will be +1. If counted, the normally open contact will be turned on and the normally closed contact will change It is non-conductive.
-[OUT (d) (value)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(d) | Long counter device number | - | Counter | ANY |
(value) | Long counter setting value | 0 to 4294967295 | Unsigned BIN 32 bit | ANY_INT |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | |||||||||||
KnX | KnY | KnM | KnS | T | D | R | SD | LC | K | H | E | [D] | XXP | ||
OUT LC | Parameter 1 | ● | |||||||||||||
Parameter 2 | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● | ● |
Features
• When the calculation result before the OUT instruction changes from OFF to ON, the current value (count value) of the long counter specified in (d) will be +1. If the count reaches (current value ≥ set value), the normally open contact will turn on On, the normally closed contact becomes non-conductive.
• If the calculation result is ON, no counting is performed. (Counting input does not need to be pulsed.)
• After the count is reached, the count value and contact status will not change before the RST instruction or ZRST instruction is executed.
• When the setting value is 0, the processing is the same as when it is 1.
Error code
Error code | Content |
4085H | The (value) parameter exceeds the device range |
Example
Each time M0 changes from OFF to ON, LC0 will increase by 1. When the value of LC0 is added to K10, the normally open contact of LC0 is closed and Y0 is output. At this time, M0 continues from OFF→ON, and the value of LC0 will not change anymore.
The contact of LC0 can only be turned OFF by RST/ZRST instruction and communication.