kk logo

The TON (TimerONdelay) and TOF (TimerOFdelay), the switch-on delay and the switch-off delay, are one of the most important functions in PLC programming. In the software plcladdersimulator2, these two time functions are implemented very well and are easy to use.

TON und TOF in der Arduino SPS mit plcladdersimulator2

The TOF and TON have the same designations

  • EN: Input for activating and holding the function
  • Timer: Consecutive number
  • Time Base: the delay to be set in seconds
  • Preset: set time until the contacts switch
  • Accum: The time until the function is “triggered”
  • T: _. DN: Switching contact in the program, contact closed when the time has "expired"
  • T: _. TT: Switching contact in the program, contact closed as long as the time "expires"

EN input:

As soon as the input EN ON is TRUE, the time starts. Of course, only one normally open or normally closed contact can be used for the TON. Because the TON time only "runs out" as long as the input is ON. With the TOF it is of course different, that is what the function says from "switch-off delayed". The time only runs out when the contact changes from HIGH to LOW, i.e. from ON to OFF. For this reason, a rising or falling edge at EN can also be used as a contact with the TOF.

arduino as PLC SPS TON TOF EN input

TIME BASE

The TIME BASE function switches between seconds (1) and tenths of a second (0.1). If the TIME BASE function is not available as a coil in the program or if the coil function is not active, the control calculates (counts) in seconds; if the TIME BASE function is active “true”, the control calculates in tenths of a second. The function is selected as "Spool" when the FILE is T.

arduino as PLC SPS TON TOF Time Base 0 

If the TIME BASE function is not available in the PLC or is not active "false", the delay (TON and TOF) counts with seconds, i.e. 1.

arduino as PLC SPS TON TOF Time Base 1

If the TIME BASE function in the PLC is active "true", the delay (TON and TOF) counts with tenths of a second.

arduino as PLC SPS TON TOF Time Base 2

Function (output) DN and TT

The output DN and TT is inserted into a row as a contact for TOF and TON. DN and TT can be used as a simple changeover contact, the status of DN and TT is displayed in the simulation as a coil behind the block. If the respective time has "expired", the contacts switch from HIGH to LOW, i.e. from ON to OFF.

If the status before the function OFF is "false", DN and TT are also OFF "false".

arduino PLC SPS DN TT Kontakte tutorial 0

As long as the time function ON is “true”, the output TT is ON and the output DN is OFF.

arduino PLC SPS DN TT Kontakte tutorial 1

If the time of TOF or TON has expired, TT, OFF and DN, ON.

arduino PLC SPS DN TT Kontakte tutorial 2

Special feature of the TOF

If the switch-on contact (here I: 0.0) at TOF changes from HIGH to LOW (ON to OFF) while the time is running out, the time is set to 0 and only starts counting again when another edge change occurs, but output DN remains ON .

arduino PLC SPS DN TT Kontakte tutorial 3

Special feature of the TON

The switched function only remains ON “true” as long as the contact (here I: 0.0) is ON “true”.

arduino PLC SPS DN TT Kontakte tutorial 4

FILES T settings

With a click on the yellow rectangle T next to the file, the TIMER FILE settings open. The settings for all timers can be made here without opening each timer individually.

arduino as PLC SPS TON TOF

King of my heart

Let the King of my heart
Be the mountain where I run
The fountain I drink from
Oh, He is my song

Ronnie

schwäbischer tüftler und bastler, kraftsportler, ADHS power, 43 Jahre, 1 Frau, 5 Kinder und 1003 Ideen. 

ronnie berzins at mee