Ladder Diagram Timers and Counters for Siemens PLCs 300

This class explains how ladder diagram programming is used to program timers and counters. It examines the basic rules for each type of timer and counter used in LAD programming for S7-1200 PLCs.

Class Details

Class Name:
Ladder Diagram Timers and Counters for Siemens PLCs 300
Version:
1.0
Difficulty:
Advanced
Number of Lessons:
14
Additional Language:
Spanish

Class Outline

  • Objectives
  • Siemens PLC Timers and Counters
  • SIMATIC and IEC Timers and Counters
  • IEC Timers
  • TP Timer Box and TP Timer Coil Instructions
  • TON Timer Box and TON Timer Coil Instructions
  • TOF Timer Box and TOF Timer Coil Instructions
  • TONR Timer Box Instruction
  • TONR Timer Coil, PT Timer Coil, and RT Timer Coil Instructions
  • IEC Counters
  • CTU Counter Instruction
  • CTD Counter Instruction
  • CTUD Counter Instruction
  • Summary

Objectives

  • Describe timer and counter PLC instructions.
  • Describe the timer instructions used by S7-1200 PLCs for LAD programs.
  • Explain how TP timer instructions function.
  • Explain how TON timer instructions function.
  • Explain how TOF timer instructions function.
  • Explain how TONR timer instructions function.
  • Explain how PT and RT timer instructions function.
  • Describe the counter instructions used by S7-1200 PLCs for LAD programs.
  • Explain how CTU counter instructions function.
  • Explain how CTD counter instructions function.
  • Explain how CTUD counter instructions function.

Job Roles

Certifications

Glossary

Vocabulary Term Definition
counters Instructions that allow PLCs to keep track of actions or events, such as the number of items placed in a container or the number of times a motor or machine has turned on. A PLC can then respond when a specific count is reached.
CTD counter Count down counter. An IEC counter instruction that counts down by 1 when the count down parameter (CD) transitions from 0 to 1.
CTU counter Count up counter. An IEC counter instruction that counts up by 1 when the count up parameter (CU) transitions from 0 to 1.
CTUD counter Count up and down counter. An IEC counter instruction that counts up by one on a 0 to 1 transition of CU and counts down by 1 on a 0 to 1 transition of CD.
data block DB. A memory structure used in Siemens PLC user programs to store data for a code block. All of the program blocks in the user program can access the data in a global DB, but an instance DB stores data for a specific function block (FB).
data type A definition that specifies both the bit size of a data element and how the bit string is to be interpreted.
DB Data block. A memory structure used in Siemens PLC user programs to store data for a code block. All of the program blocks in the user program can access the data in a global DB, but an instance DB stores data for a specific function block (FB).
decrements Counts down or decreases.
FBD Function block diagram. A graphical programming language defined in part 3 of the IEC 61131 standard.
function block diagram FBD. A graphical programming language defined in part 3 of the IEC 61131 standard.
IEC 61131 A standard of the International Electrotechnical Commission that defines programmable logic controller capabilities. Part 3 of this standard (IEC 61131-3) defines PLC programming languages.
IEC counters PLC counter instructions that conform to the descriptions provided in IEC 61131.
IEC timers PLC timer instructions that conform to the descriptions provided in IEC 61131.
LAD Ladder diagram. A graphical programming language defined in part 3 of the IEC 61131 standard.
ladder diagram LAD. A graphical programming language defined in part 3 of the IEC 61131-3 standard.
LTime data type A 64-bit data type available for use in SIMATIC S7-1500 PLCs. This data type is used with IEC timers for preset time (PT) and elapsed time (ET) values when these values exceed the range of the Time data type.
OB Organization block. A program structure that links the user program to the PLC operating system. A variety of OBs are used in Siemens PLC programs. Some OBs have predefined behaviors and start events, but you can also create OBs with custom start events.
organization block OB. A program structure that links the user program to the PLC operating system. A variety of OBs are used in Siemens PLC programs. Some OBs have predefined behaviors and start events, but you can also create OBs with custom start events.
PT coil Preset timer coil instruction. An IEC timer instruction that loads a preset time value to the specified timer.
RT coil Reset timer coil instruction. An IEC timer instruction that resets the specified timer.
signed double integer Dint. A 32-bit (1 double word) data type that can represent an equivalent decimal range from -2,147, 483, 648 to +2,147, 483, 647.
SIMATIC counter A PLC counter instruction developed for use in Siemens SIMATIC PLCs prior to the development of the IEC 61131 standard. These instructions are still widely used.
SIMATIC timer A PLC timer instruction developed for use in Siemens SIMATIC PLCs prior to the development of the IEC 61131 standard. These instructions are still widely used.
Time data type A 32-bit data type used by IEC timers for preset time (PT) and elapsed time (ET) values. Time data is stored as a signed double integer interpreted as milliseconds.
timers Instructions that allow PLCs to control and monitor time-dependent aspects of machines and processes.
TOF timer Off-delay timer. An IEC timer instruction that sets the output parameter (Q) to on and then resets the output to off after a preset time delay. The TOF timer is available for use in S7-1200 PLC ladder diagram programs as either a box or coil instruction.
TON timer On-delay timer. An IEC timer instruction that sets the output parameter (Q) to on after a preset time delay. The TON timer is available for use in S7-1200 PLC ladder diagram programs as either a box or coil instruction.
TONR timer On-delay retentive timer. An IEC timer instruction that sets the output parameter (Q) to on after a preset time delay. The elapsed time can be accumulated over multiple timing periods. The reset parameter (R) is used to reset the elapsed time. The TONR timer is available for use in S7-1200 PLC ladder diagram programs as either a box or coil instruction.
TP timer Pulse timer. An IEC timer instruction that generates a pulse with a preset time width. The timer is available for use in S7-1200 PLC ladder diagram programs as either a box or coil instruction.
UInt Unsigned integer. A 16-bit (1 word) data type that can represent an equivalent decimal range from 0 to 65,535.
unsigned integer UInt. A 16-bit (1 word) data type that can represent an equivalent decimal range from 0 to 65,535.