RES (Reset) Ladder Logic Instruction

Definition

The Reset instruction is used to reset Timers, Counters, and Control structures used in the ladder logic. Timer On and Timer Off instructions are normally reset when the preceding rung logic transitions from either true to false or false to true, however they can also be reset with the Reset instruction.

The only reset for the RTO timer is the Reset instruction.

The Count Up and Count Down instructions are reset with either the Reset instruction or by moving a 0 into the respective Accumulators.

Control structures are reset with the reset instruction.

List of possible arguments

  • COUNTER STRUCTURE             PRE DEFINED STRUCTURE
  • TIMER STRUCTURE                    PRE DEFINED STRUCTURE
  • CONTROL STRUCTURE             PRE DEFINED STRUCTURE

 

Note: When referencing a structure the tag name is sufficient. Do not reference an element of the structure. Example:  Correct- MY_TIMER    Incorrect- MY_TIMER.DN

RTO (Retentive Timer) Ladder Logic Instruction

Definition

The Retentive Timer instruction is a retentive timer that is enabled when the preceding logic is true. The timer is paused when the preceding logic is false. The RTO timer can be compared to a stop watch that can be paused. A value is entered into the preset and an accumulator keeps track of the time. When the accumulator reaches the preset, the timer-done bit is set. The timer-timing bit is set while the accumulator is active. The timer is reset with a separate Reset (RES) instruction referencing the timers tag. When reset the accumulator is set to 0 and the EN, TT, and DN bits are cleared.

List of arguments

TIMER STRUCTURE          PRE DEFINED STRUCTURE

Tag Structure

  • BOOL     Timer.EN             Enable Bit, set when instruction is enabled.
  • BOOL     Timer.TT              Timer Timing Bit, set when instruction is enabled and accumulating time.
  • BOOL     Timer.DN             Timer Done BIT, Set when the accumulator reaches the preset.
  • DINT      Timer.PRE           Timer Preset , target value in milliseconds.
  • DINT      Timer.ACC           Timer accumulator, running value of timer in milliseconds.

Note: Timer must be scanned at a minimum of once every 69 minutes. A major fault will occur if the preset or accumulator fall below 0 (are negative). The RTO instruction is reset in the ladder logic with the RESET instruction referencing the RTO tag.

TOF (Timer Off) Ladder Logic Instruction

Description

The Timer Off instruction is a non-retentive timer that is enabled when the preceding logic is false. The timer is reset when the preceding logic is true. The timer can be compared to a stop watch. A value is entered into the preset and an accumulator keeps track of the time. When the accumulator reaches the preset, the timer-done bit is cleared. The timer-timing bit is set while the accumulator is active. When the preceding logic is true the accumulator is set to 0 and the EN and DN bit are set and the TT bit is cleared.

List of arguments

TIMER STRUCTURE          PRE DEFINED STRUCTURE

Tag Structure

  • BOOL     Timer.EN             Enable Bit, set when instruction is enabled (The TOF is not timing)
  • BOOL     Timer.TT              Timer Timing Bit, set when instruction is accumulating time.
  • BOOL     Timer.DN             Timer Done BIT, cleared when the accumulator reaches the preset.
  • DINT      Timer.PRE           Timer Preset , target value in milliseconds.
  • DINT      Timer.ACC           Timer accumulator, running value of timer in milliseconds.

Note: Timer must be scanned at a minimum of once every 69 minutes. A major fault will occur if the preset or accumulator fall below 0 (are negative). Slightly confusing instruction.

TON (Timer On) Ladder Logic Instruction

Description

The Timer On instruction is a non-retentive timer that is enabled when the preceding logic is true. The timer is reset when the preceding logic is false. The timer can be compared to a stop watch. A value is entered into the preset and an accumulator keeps track of the time. When the accumulator reaches the preset, the timer-done bit is set. The timer-timing bit is set while the accumulator is active. When reset the accumulator is set to 0 and the EN, TT, and DN bits are cleared.

List of arguments

TIMER STRUCTURE          PRE DEFINED STRUCTURE

Tag Structure

  • BOOL     Timer.EN             Enable Bit, set when instruction is enabled.
  • BOOL     Timer.TT              Timer Timing Bit, set when instruction is enabled and accumulating time.
  • BOOL     Timer.DN             Timer Done BIT, Set when the accumulator reaches the preset.
  • DINT      Timer.PRE           Timer Preset , target value in milliseconds.
  • DINT      Timer.ACC           Timer accumulator, running value of timer in milliseconds.

Note: Timer must be scanned at a minimum of once every 69 minutes. A major fault will occur if the preset or accumulator fall below 0 (are negative).