Back to tutorials
Beginner

PLC Programming Intermediate Instructions – TOF | Timer Off

By
Vladimir Romanov
|
August 11, 2018
Table of Contents

Introduction

The TOF, also known as Timer OFF, an instruction is used to keep track of time of occurrence of certain events. The conditions preceding the TOF instruction will allow the timer to start counting up to a specified value. Unline the TON Instruction, TOF will start counting when the preceding conditions are FALSE. Once this value is reached, the program will set specific internal bits notifying the programmer as well as other instructions within the PLC that the timer has finished counting. Furthermore, experienced developers can leverage the instruction to know when a certain process is being executed.

The TOF instruction is a composite instruction which means that it will contain a timer, integers as well as booleans. Depending on the application, you may not need to use all of them.

Example & Usage of TOF

Here’s a real-world scenario of a TOF instruction:

  1. A Micrologix 1100 Allen Bradley PLC is used to control a process.
  2. A “Tank Cooling RUNNING” is indicated by an internal bit B3:0/7.
  3. The bit above is tied to an XIC instruction which enables the TOF instruction.
  4. The TOF instruction specifies a Timer in the PLC: T4:1
  5. The Time Base of T4:1 is set to 0.001 which translates to the timer counting in milliseconds.
  6. The “Preset” of T4:1 is set to 10000 which translates to the timer counting up to 10 seconds.
  7. The “Accum” of T4:1 is set to 0 which translates to the timer starting to count from 0.
  8. As the timer is initialized by the B3:0/7 XIC which de-energizes; it starts to count.
  9. As the timer counts, the .EN and the .TT bits are set to HIGH.
  10. As the timer finishes counting, the .TT bit is set to LOW and the .DN bit is set to HIGH.
  11. IF the B3:0/7 bit is set to LOW while the timer is counting, the Accum is set back to 0. The .EN, .TT and .DN bits are set to LOW.

Programming example in RSLogix 500:

TOFTimerOFF RSLogix 500 Instruction

Outcome:

The TOF instruction will begin counting as soon as the B3:0/7 XIC is de-energized. The timer will begin counting at from 0 until it reaches the value specified by the “Preset” integer. In the example above, this value is set to 10000. It’s important to note that the “Time Base” of our timer is set to 0.001. This translates to a 10000 x 0.001 multiplier for our time. In other words, the timer will count to 10 seconds.

The timer will set different auxiliary bits during operation. These bits are .EN, .TT and .DN. The .EN bit will be set to HIGH if the timer is de-energized by the input instructions leading to it. The .TT bit is set to HIGH while the timer is counting; the “Accum” is less than “Preset”. The .DN bit is set to HIGH once the timer reaches the final value. In other words, when the “Accum” is equal to the “Preset”.

Data Types Allowed for TOF

The TOF leverages a specific data structure, called the Timer, present in most PLC systems.

  • Timer – The high-level instruction specification of all the inner structures.
  • .PRE – Integer specifying up to which value the timer will count.
  • .ACC – Integer specifying the current time value of the timer.
  • .BASE – Selectable value which specifies the time multiplier for the timer.
  • Note1: This is not available in RSLogix 5000; the timers are specified in milliseconds by default.
  • .EN – Boolean value which is set to HIGH when the timer is energized.
  • .TT – Boolean value which is set to HIGH when the timer is in the process of counting.
  • .DN – Boolean value which is set to HIGH when the timer is finished counting.

Important Notes

  • Note 1 – The TOF instruction uses a timer which is specified internally to the PLC. The user may choose to set the values covered above through the PLC interface instead of working with them in the instruction. Furthermore, the TOF instruction will not display the current set of all the bits discussed above; they will be set on the PLC only.
  • Note 2 – The programmer may choose to leverage any or none of the bits and /or integers described above. For example, a common practice would leverage the LIM instruction to execute something within a window of the timer based on the “Accum” value.

Video Tutorial

Back to tutorials

Got a question or comment?

Related Tutorials

Beginner

Opto 22 groov RIO Getting Started

The groov RIO module from Opto 22 has been released only a few months ago. The groov RIO is a feature packed piece of hardware that is easy to install, configure and deploy for many different field applications. The module comes pre-loaded with an array of software tools used across the industry and is ready to hit the floor running out of the box. Furthermore, the module is equipped with user configurable input and output nodes that have the capability unlike anything else on the market.

August 2, 2020
|
By
Vladimir Romanov
Beginner

Micro800 PLC Programming Getting Started

The Micro800 Control Systems by Rockwell Automation provide a cost effective solution for small to medium automation systems. The controllers within this family are typically used on stand alone machines or small process applications. The family offers five distinct controller types that are further customizable through add-on modules: Micro810, Micro820, Micro830, Micro850 and Micro870.Micro800 Programmable Logic Controllers Getting StartedUnlike the other Rockwell Automation controllers, this line of PLCs is programmed through a dedicated software: Connected Components Workbench. From within this tool, the programmer can flash the firmware, load the program and monitor the state of the controller. Furthermore, Connected Components Workbench (CCW) is often used to program other non-PLC Rockwell Automation devices such as Variable Frequency Drives (VFDs) and certain Safety Relays.

July 26, 2020
|
By
Vladimir Romanov
Beginner

An Introduction to DeviceNet Industrial Networks

In this tutorial you will learn about the DeviceNet industrial network, go over a basic offline configuration, and explore some advanced features.

July 24, 2020
|
By
Jacques Venter