PLC Counters and Timers 251

"PLC Counters and Timers" provides an overview of the functions of counter and timer instructions in a PLC ladder logic program. Counter and timer instructions are internal features of a program that provide increased functionality and precision for a PLC application. Counter and timer instructions are a type of output instruction that are attached to an input instruction in the program.

After taking this class, users will be familiar with the different applications for counter and timer instructions and how the instructions appear in a ladder logic diagram. This class helps users to become more familiar with PLCs and PLC programming.

Class Details

Class Name:
PLC Counters and Timers 251
Version:
2.0
Difficulty:
Intermediate
Number of Lessons:
16
Related 1.0 Class:
PLC Timers and Counters 260

Class Outline

  • PLC Hardware and Software
  • PLC Programs
  • Ladder Diagrams
  • Counter and Timer Functions
  • Addresses for Counters and Timers
  • Counters and Timers Basic Review
  • Counter Instruction Element
  • Counter Instruction Programmed Values and Status Bits
  • Types of Counter Instructions
  • Counter Instructions Review
  • Timer Instruction Element
  • Timer Instruction Programmed Values and Status Bits
  • Types of Timer Instructions
  • Timer Instruction Review
  • Using Timer and Counter Instructions Together
  • Counter and Timer Instructions in a PLC Program

Objectives

  • Distinguish between PLC hardware and software.
  • Describe PLC programs.
  • Describe a ladder diagram.
  • Describe the functions of counter and timer instructions.
  • Identify parts of counter and timer addresses.
  • Describe the components of a counter instruction element.
  • Describe the programmed values and status bits in a counter instruction.
  • Distinguish between types of counter instructions.
  • Describe the components of a timer instruction element.
  • Describe the programmed values and status bits in a timer instruction.
  • Distinguish between types of timer instructions.
  • Describe how multiple timer and counter instructions are used together.

Job Roles

Certifications

Glossary

Vocabulary Term Definition
ACC Accumulated value. A value programmed into a counter or timer instruction that lists the current item counts or units of time that have accrued during a process. The ACC value changes with each item counted or with each unit of time.
accumulated value ACC. A value programmed into a counter or timer instruction that lists the current item counts or units of time that have accrued during a process. The accumulated value changes with each item counted or with each unit of time.
actions An output instruction in a ladder logic program. An action is performed by an output device and is the result of an input condition being met.
address The unique identification of the location of data related to an input/output device, timer/counter instruction, or other data saved in a CPU's memory. Addresses are listed alongside program instructions or associated devices in a PLC ladder diagram.
alphanumeric A character that is either a letter or a number. Alphanumeric characters are used in addresses for PLC program instructions, such as counter or timer instructions.
automate Using mechanical systems that operate with limited human interaction. PLCs can be used to automate a manufacturing process.
binary system A method of mathematical notation that uses combinations of the numbers 0 and 1 to represent all numerical quantities. In the binary system, a 1 represents an on condition and a 0 represents an off condition.
bit delimiter A character in an address used to separate the main part of the address from a status bit. A bit delimiter is typically a backslash.
bits A single binary digit. A bit contains data in an instruction element word.
branch A logical and parallel path coming off a rung of a ladder diagram. Branches contain additional program instructions for a PLC.
cascade A programming configuration used with PLC ladder diagrams to connect different combinations of timer and counter instructions. Cascading timer and counter instructions allow a programmer to lengthen a time or count duration.
central processing unit CPU. The microprocessor device inside a computer that controls system activities. The central processing unit executes a PLC program and performs all logic activities for the system.
conditions An input instruction in a ladder logic program. Conditions must be met to achieve a specific output action.
count-down counter CTD. A counter instruction that decreases the current count by one each time the input logic transitions from false to true on a rung. Count-down counters start counting at the preset value and count down to the accumulated value.
count-down enable bit CD. Data in a count-down counter instruction that is set when the counter instruction rung is true. A count-down enable bit is attached to a bit in word zero in a counter instruction element.
counter A set of program instructions that allows a PLC to keep a tally of actions or events in a process. Counter instructions can be programmed to count up or down to a preset value.
count-up counter CTU. A counter instruction that increases the current count by one each time the input logic transitions from false to true on a rung. Count-up counters typically start counting from zero until the accumulated value matches the preset value.
count-up enable bit CU. Data in a count-up counter instruction that is set when the counter instruction rung is true. A count-up enable bit is attached to a bit in word zero in a counter instruction element.
CPU Central processing unit. The microprocessor device inside a computer that controls system activities. The CPU executes a PLC program and performs all logic activities for the system.
data files The area of memory in a central processing unit that contains the information and statuses of various program functions for a PLC. Data files contain folders for counter instructions, timer instructions, inputs, outputs, and other functions.
DN Done bit. Data in a counter or timer instruction that is set when the instruction meets the programmed values. A DN bit is attached to a bit in word zero in a counter or timer instruction element.
done bit DN. Data in a counter or timer instruction that is set when the instruction meets the programmed values. A done bit is attached to a bit in word zero in a counter or timer instruction element.
electrical signal Voltage, current, or frequency that communicates information between two devices. Electrical signals are either analog or discrete.
element A group of data containing status bits and programmed values for counter and timer instructions. An element consists of three 16-bit words of data.
enable bit EN. Data in a timer instruction that sets whenever a timer instruction is active. An enable bit is set until the timer instruction reaches the programmed values.
false A logical condition in a PLC program that exists when the associated physical I/O device or program instruction is off. A false condition in an input instruction can trigger a false condition in an output instruction.
file separator A character in an address used to separate the data file type from the instruction's file number. The file separator is typically a colon.
hardware The physical components that form a PLC system. Hardware components for a PLC include the power supply, input module, output module, and CPU.
high-speed counter HSC. A counter instruction that counts transitions at the input point rather than at rung transitions. A high-speed counter instruction maintains an accurate accumulated count even when there are counts coming between multiple program scans.
I/O device Input/output device. A component that connects to the input/output module on a PLC and responds to a condition or performs a task. Each I/O device, or field device, has its own electrical requirement.
input module The portion of a PLC that receives high-voltage signals from input devices. The input module reduces the incoming voltage and sends it to the CPU.
input/output devices I/O devices. A physical component that connects to the input/output module on a PLC and responds to a condition or performs a task. Each input/output device, or field device, has its own electrical requirement.
ladder diagrams A representation of a ladder logic program that uses symbols to convey the on or off status of input/output devices. Ladder diagrams also contain internal program instructions, such as counter, timer, or sequencer instructions.
ladder logic A graphical PLC programming language that uses simple symbols to indicate the status of input and output devices. Ladder logic displays program instructions in a ladder diagram.
logical continuity The flow of logic or power on a rung in a PLC ladder logic program. Logical continuity always requires reading a program from left to right.
lubrication The act of applying a substance that reduces friction and wear between mechanical components. Lubrication in an automated process can be controlled with a timer instruction.
memory The portion of a computer where data is stored. The memory portion of a CPU stores data related to the PLC program.
memory address table A data storage area that displays the binary 0s and 1s a central processing unit receives. A memory address table records the input and output statuses.
output module The portion of a PLC that carries out commands from the central processing unit. The output module sends signals to output devices.
overflow bit OV. Data in a counter instruction that is set whenever the counter exceeds the maximum value allowed by the PLC's bit capacity. An overflow bit is attached to a bit in word zero in a counter instruction element.
PLC Programmable logic controller. A processor-driven device that uses logic-based software to provide electrical control to machines and processes. PLCs replace many physical relays in a process.
power supply The PLC hardware component that provides electrical energy to the CPU and I/O modules. The power supply sends low voltage direct current to the CPU and I/O modules.
PRE Preset value. A value programmed into a counter or timer instruction that lists a target number for the instruction to reach. The PRE values for counters list the number of items to be counted, while PRE values for timers list a unit of time that must elapse.
predictive maintenance A maintenance approach that involves collecting data related to machine operation in order to service a machine before maintenance issues arise. A predictive maintenance approach involves performing maintenance on a scheduled basis and helps prevent unscheduled downtime.
preset value PRE. A value programmed into a counter or timer instruction that lists a target number for the instruction to reach. Preset values for counters list the number of items to be counted, while preset values for timers list a unit of time that must elapse.
program The instructions entered into a CPU's memory that direct the PLC to control field devices. A program contains lines of instruction.
program files The area of memory in a central processing unit that contains the PLC program instructions. Program files are a type of PLC software.
programmable logic controller PLC. A processor-driven device that uses logic-based software to provide electrical control to machines and processes. Programmable logic controllers replace many physical relays in a process.
programmed values An operating parameter for a counter or timer instruction. Programmed values consist of a preset value and an accumulated value.
programming device A peripheral device used to enter a program into a CPU's memory. Programming devices include personal computers and handheld devices.
programming language A set of symbols and rules used to present information to a processor. Programming languages are used to create programs for a PLC.
rails A vertical line in a ladder diagram that represents a power supply line in an electrical circuit. Rails are on the left and right side of rungs.
register A data file in a PLC that stores input and output data in different bit sizes. Registers are commonly available in 8, 16, and 32 bit sizes.
reset instruction An instruction saved in a data file that can be used to restart a counter or timer instruction after its accumulated value reaches the preset value. A reset instruction address must match the counter or timer address it is resetting.
reset value A value that may be programmed as an output instruction that restarts a count when the counter instruction's accumulated value matches the preset value. A reset value may start a count at zero or another number.
retentive timer RTO. A timer instruction that stores the accumulated value when the timer stops timing so that the timer starts timing from the accumulated value when the instruction resumes. Retentive timers set when the rung input logic transitions from false to true.
rung A horizontal line in a ladder diagram that contains program instructions. A rung is read from left to right.
software The programs and instructions that control a computer's hardware functions and operations. Software is written in a programming language.
status bits A two-letter abbreviation that indicates the current state or process of an instruction in a PLC program. Status bits may be used in an address for a counter or timer.
sub-elements A portion of a counter or timer instruction address that identifies data attached to the instruction. Sub-elements are separated from the main part of the address.
tag-based An addressing method for PLC data files. Tag-based addresses are generated by a programmer.
time base value The length of each time interval counted by the timer instruction for the duration of a timer instruction. The time base value is programmed with the preset value in a timer instruction.
timer A set of program instructions that allows a PLC to control and monitor time-dependent aspects of machines and processes. Timer instructions can delay an output from turning off or on for a preset amount of time.
timer off delay TOF. A timer instruction that delays turning off an output device a specific amount of time after an input device turns off. A timer off delay sets when the rung input logic transitions from true to false.
timer on delay TON. A timer instruction that delays turning on an output device a specific amount of time after receiving an input signal. A timer on delay sets when the rung input logic transitions from false to true.
timer-timing bit TT. Data in a timer instruction that sets when a timer instruction is timing and has not reached the programmed values yet. The timer-timing bit and the enable bit may be active at the same time.
TON Timer on delay. A timer instruction that delays turning on an output device a specific amount of time after receiving an input signal. A TON sets when the rung input logic transitions from false to true.
true A logical condition in a PLC program that exists when the associated physical I/O device or program instruction is on. A true condition in an input instruction can trigger a true condition in an output instruction.
TT Timer-timing bit. Data in a timer instruction that sets when a timer instruction is timing and has not reached the programmed values yet. The TT bit and the enable bit may be active at the same time.
underflow bit UN. Data in a counter instruction that is set whenever the counter falls below the minimum value allowed by the PLC's bit capacity. An underflow bit is attached to a bit in word zero in a counter instruction element.
up/down counter A bi-directional counter instruction. Up/down counters combine count-up and count-down instructions on separate rungs.
update accumulator bit UA. Data in a counter instruction that keeps an accurate accumulated count. The update accumulator bit is used in conjunction with a high-speed counter instruction.
user-defined Named or categorized by a program user. User-defined files may consist of internal relay data or functions.
word delimiter A character in an instruction address used to separate the main part of the address from the programmed values. A word delimiter is typically a period.
word one A 16-bit portion of data in a counter or timer instruction element that specifies how long the instruction will run. Word one contains the preset value.
word two A 16-bit portion of data in a counter or timer instruction element that contains the current count or elapsed time of an instruction. Word two contains the accumulated value.
word zero A 16-bit portion of data in a counter or timer instruction element. Word zero contains the status bits and bits designated for internal use.
words A group of 16 binary bits. Words are used to store data for PLCs.