Upload
aamya
View
222
Download
3
Embed Size (px)
DESCRIPTION
plc timers
Citation preview
Timers and Counters
Types of timers instructionTypes of counters instruction
Introduction Timer/counter are most commonly used
used device. Most common tasks include time interval
for welding, painting and heat treatment PLC timer/counter function is more
versatile than the mechanical and digital electronic timers.
PLC timer/counter provides accuracy and repeatability
Instruction Parameters Accumulated Value(ACC)
For Timer, This is the number of time base intervals the instruction has counted.For Counter, This is the number of false-to-true transitions that have occurred.
Preset ValueThe preset value is the set point that you enter in the timer or counter instruction.When accumulated value becomes equal to or greater than the preset value, the done bit is set, the bit can be used to control output device.
The preset and accumulated values for timers range from 0 to +32,767
Preset and accumulated values for counters range from –32,768 to +32,767
Time base The time base determines the duration of each
time base interval. In many Plcs it is selectable 0.01s, 0.1s,1.0s
Timer data file elementsWord 0 EN TT DN Internal use
Word 1 Preset Value
Word 2 Accumulated Value
Assigning Addresses Format: Tf:e.s/b
T Timer
f File number. Number 4 is the default file. File no. 10-255 can be used for additional storage
: Element delimiter
e Element number
Range 0-255
. Word Element
s Sub element
/ Subelement
b Bit
Examples:
T4:0/15 or T4:0/EN Enable Bit
T4:0/14 or T4:0/TT Timer Timing bit
T4:0/13 or T4:0/DN Done bit
T4:0.1 or T4:0.PRE preset value of the timer
T4:0.2 or T4:0.ACC accumulated value of the timer
T4:0.1/0 bit 0 of the preset value
T4:0.2/0 bit 0 of the preset value
Timer on-Delay (TON) Used to turn on or off an output after the timer
is on for Preset Interval As soon as rung condition become true Timer
starts counting As long as the condition is true timer
increments accumulated value till it reaches preset value.
If rung condition become false, timer reset . The three timer bits EN,TT,DN can be used as
rung conditions
Timer On-Delay (TON)
TIMER ON DELAYTimer T4:0Time base 0.01Preset 120Accum 0
EN
DN
Cont.-
Status bits
•Timer Done bit DN(bit 13) is set when the ACC value is equal to PRE. It is reset when rung condition become false
•Timer Enable bit EN (bit 14) is set when rung conditions are true.
•Timer Timing Bit TT (bit 15) is set when rung condition is true and ACC value is less than PRE value.
Timer Off-Delay (TOF) Used to turn on or off after its rung has
been off for a preset time interval. TOF begins to count time base intervals
when rung makes true to false It keeps on accumulating till the
condition is false or till it reaches to preset value
As soon as rung condition becomes true accumulated value is reset regardless of whether timer has timed out
TIMER OFF DELAYTimer T4:0Time base 0.01Preset 120Accum 0
EN
DN
Timer Off-Delay
Retentive Timer (RTO) The RTO is used to turn output on or off after
its timer has been ON for preset time interval. RTO begins to count time base intervals when
rung conditions become true. The accumulated value is retained when the
rung condition become false and when rung conditions go true, timing continues from the retained accumulated value.
Status bits Done bit DN (bit 13) is when the
accumulated value is greater than or equal to the preset value. It is not reset when rung condition become false; it is reset only when the appropriate RES instruction is enabled
Timer Timing TT (bit 14) set when rung conditions are true and accumulated value is less than Preset value.
Timer Enable EN (bit 15) is set when rung conditions are true; it is reset when rung conditions false.
RETENTIVE TIMER ONTimer T4:0Time base 0.01Preset 120Accum 0
EN
DN
COUNTERS Similar to Timer instructions have
3 – word data file elements.
Word 0
CU CD DN OV UN UA
Word 1
Preset value
Word 2
Accumulated value
CU = Counter up enable bit
CD = Counter down enable bit
DN = Done bit
OV = overflow bit
UN = underflow bit
UA = Update accumulated (HSC only)
Counter address Format Cf:e.s/b
C Counter
f File number. Number 5 is default fil.e
: Element dilimiter
e Element number
Rang 0- 255
. Word element
s sub element
/ Delimiter
b Bit
Types of counters Count up Counter
When rung is true a count up counter have false-to-true transition, the accumulated value increments by oneCounter DN bit is Set when Accumulated count is equal to Preset. The Cu (count up) bit is set when rung conditions are true and is reset when either rung conditions go false or an appropriate RES having the same address as the CTU is enabled.
Count Down Counter:
Functions similar to Count up counter.
The counter accumulated value is decremented one count for each false to true transition. When Accumulated value is less than preset value the counter DN bit is set.