Question

In: Electrical Engineering

timer base value of timer instruction

timer base value of timer instruction

Solutions

Expert Solution

TIMERS :- All PLC’s have timer instructions. Timers are output instructions that are internal to the programmable logic controller. Timers provide timed control of the devices that they activate or de-activate.

Basic functions of timer :-

  • Timers are used to delay an action.
  • Timers are used to run an operation for a predetermined period of time.
  • Timers are also used to record the total accumulated time of continuous or intermediate events.

Timer’s instructions :-

Timers consists of following parts: timer address, preset value, timer base, and accumulated value, as shown in figure below.

fig(a)

In the above figure , term instruction name is, timer on delay ( TON ), timer base is 1.0 seconds, timer address is T4:0, accumulated value of zero(0) and a preset value of 200.
Each timer instruction has three very useful status bits. These bits are timer enable (E N), timer timing (TT), and timer done(DN).

There are 3 types of timers: -

  • On- delay timer
  • Off-delay timer
  • retentive timer.

On delay timer :-

  • Use this instruction to program a time delay after instructions become true.
  • On – delay timers are used when an action is to begin a specified time after the input becomes true. For example, a certain step in the manufacturing is to begin 45 seconds after a signal is received from a limit switch. The 45- seconds delay is the on-delay timers preset value.

Off- delay timer :-

  • Off- delay timer instructions is used to program a time delay to begin after rung input goes false.
  • As an example, when an external cooling fan on a motor is provided, the fan has to run all the time the motor is running and also for certain time (say 10min) after the motor is turned off. This is a ten minute off- delay timer. The ten-minute timing period begins as soon as the motor is turned off.

Retentive timer :-

  • Retentive timer is a timer which retains the accumulated value in case of power loss, change of processor mode or rung state going from true to false (rung state transition).
  • Retentive timer can be used to track the running time of a motor for its maintenance purpose. Each time the motor is turned off, the timer will remember the motor’s elapsed running time. The next time the motor is turned on, the time will increase from there. This timer can be reset by using a reset instruction.

Reset :-

  • This instruction is used to reset the accumulated value of counter or timer.
  • It is used to reset a retentive timer’s accumulated value to zero.

A typical timer element :-

A timer element is made up of three 16 bit words:

  • Word 0 → 3 status bits (EN, TT, DN).
  • Word 1 → Preset values.
  • Word 2 → Accumulated value.

fig(b)

Addressing a timer is as follows:-

  1. The address format in order to address the timer element is T4:3
    Where, T = T identifies this as a timer file.
    4 = represents the default timer file 4.
    Note: SLC timer can be assigned any unused file from 9 to 255.
    :3 = This is timer three in file 4. There are 256 timers available in each file. Timers 0 through 255 are available.
  2. Preset value of the timer can be addressed in the following way:T4:3.PRE
    Where, T= identifies this as a timer file.
    4= represents the default timer file 4.
    :3= timer 3 in file 4.
    . = this point is the word delimiter. It separates the timer number, called the structure, from the subelements. Here the subelement is PRE, for preset value.
  3. Accumulated value of the timer can be addressed as shown below:T4:3.ACC
    Where, T= identifies this as a timer file.
    4= represents the default timer file 4.
    :3= timer 3 in file 4.
    . = this point is the word delimiter. It separates the timer number, called the structure, from the subelements. Here the subelement is ACC, for accumulated value.

The status bits of the timer can be addressed in the following way:

  • Word zero, bit 13, is the done bit. It is identified as DN. This bit is set when the timer’s accumulated value is equal to the timer’s preset value. It can be addressed as T4:3/DN.
  • Word zero, bit 14, is the timer timing bit. It is identified as TT. TT is set when the timer is timing. It is addressed as T4:3/TT.
  • Word zero, bit 15, is the timer enable bit. It is identified as EN. EN bit is set whenever the timer is enabled. It is addressed as T4:3/EN.

The on-delay timer instruction :-

Fig(c)

The above figure is used to explain the on-delay timer instruction.
Here, T4:2 represents timer file 4, timer element 2, preset value is 50, accumulated value is 0 and timer base is 1 second. Input module is in slot 1 and output module is in slot 2.

  • As long as the instruction I:1/0 is true, the on-delay timer T4:2 will increment every one second toward its preset value of 50 seconds. The accumulated value displays the current number of seconds that passed. When the accumulated value is equal to the preset value, the timer’s done bit will get energized or set. So when the timer’s done bit gets energized, the rung 003, instruction T4:3/DN becomes true and logical continuity is passed and the output O:2/2 gets energized.
  • As long as the I:1/4 is true, the timer instruction is enabled. Hence, rung 000 becomes true and logical continuity is passed and the output O:2/0 is energized.
    Note: An on-delay timer is not retentive in nature.so any loss of continuity to the timer instruction on rung 000 will cause the timer to reset itself to an accumulated value of 0.
  • When the timer is timing i.e rung 000 is true and accumulated value is less than preset value, timer timing bit(TT) is true. So the rung 002 becomes true i.e instruction T4:2/TT is true and output instruction O:2/1 is energized.
    Note: As long as the rung 000 is true i.e instruction I:1/0 is true, the timer instruction is considered enabled. The enable bit will be true when the timer timing bit is true. Timer enable bit will be set through the transition from the timer-timing bit to the timer-done bit. Timer enable bit is set as long as there is logical continuity through all input instructions to the timer instruction, no matter the relationship between the preset value and accumulated value. When the rung goes false, the enable bit is reset.

The off-delay timer instruction:-

Fig(d)

The above figure is used to explain the off-delay timer instruction. Here, T4:2 represents timer file 4, timer element 2, preset value is 200, accumulated value is 0 and timer base is 1 second. Input module is in slot 1 and output module is in slot 2.

  • As an example, consider an external cooling fan on a motor which has to run all the time when the motor is running and also for 200 seconds after the motor is turned off. For this purpose, we use 200- second off-delay timer. The 200-second timing cycle begins when the motor is turned off.
  • When the instruction I:1/0 is true, the motor is turned on i.e instruction O:2/0 becomes true. In other words, rung 000 becomes true. When the instruction I:1/0 is true, rung 001 becomes true, which will make the off-delay timer T4:2 enable. So as long as the instruction I:1/0 is true, the timer enable bit, EN, is true and hence, rung 002 become true, which inturn makes the output instruction O:2/1 true. The done bit is set as long as the rung 001 is true i.e the done bit is set when the enable bit is set. So the rung 004 is true. Hence, the external cooling fan is energized i.e instruction O:2/3 is true. So at this point, both motor and external cooling fan are energized.
  • When the motor is turned off, i.e the instruction I:1/0 becomes false, the output instruction O:2/0( motor) becomes false and motor is turned off. When rung 001 transitions from true to false, the TOF( off-delay timer) instruction begins timing. The done bit and the external cooling fan( O:2/3) will still remains on, or true, for the preset value of 200 seconds. The time period between the point when the rung becomes false and the point when the 200 seconds preset time expires for T4:2 is called delay after the input goes false, or the off-delay. The timers done bit and its associated output stay true until the off-delay of 200- seconds expires. The time expires when the accumulated value reaches the preset value. When the input instruction I:1/0 goes from true to false, the timer enable bit (EN) is reset and timer timing bit(TT) is set. The timer will start timing at this point. The timer timing bit(EN) becomes true whenever the rung transitions from true to false and the accumulated value is less than the preset value.
    Note: The timer done bit, bit 13, is set when the rung 000 becomes true. It will remain set through the true to false transition and until the accumulated value is equal to the preset value. This bit is commonly used to control the other logic when an output needs to be turned-on or turned-off after its rung has been off for the preset time interval.

The retentive timer instruction:-

Retentive timer instruction is used when we want to retain the accumulated value through power loss, processor mode change, or change in the rung state from true to false. The retentive timer instruction will measure the cumulative time period for which its rung is true. One of the example of retentive timer is that, it can be used to track the running time of a motor for maintenance purpose. The retentive timer is used to track the accumulated time the motor has run. In our example , our motor needs maintenance after 3600 seconds or, one hour of running time. Each time the motor is turned off, the timer needs to remember the motors total elapsed running time. The next time the motor is turned on, the timer will increase the accumulated running time from where it is left off. When the total accumulated motor running time has been reached, a maintenance remainder pilot light will be lit. A retentive timer is used in this application.

Fig(e)

Here, T4:2 represents timer file 4, timer element 2, preset value is 3600, accumulated value is 0 and timer base is 1 second. Input module is in slot 1 and output module is in slot 2.
The retentive timer on, RTO instruction, behaves similar to the timer-on delay instruction, with exception that when the RTO instruction goes false, it will retain its accumulated value.
The retentive timer will retain its accumulated value during the following conditions:

  • When its rung goes false.
  • When processor losses power. But, the battery for memory back up must be in good condition.
  • When the processor faults.
  • When the processor operating mode is changed from remote run or remote test to remote program mode.

Related Solutions

In PIC32-Embedded system. Give the value to be loaded in T1CON if the timer is used...
In PIC32-Embedded system. Give the value to be loaded in T1CON if the timer is used as counter with prescaler 1:64, synchronous, external clock source.
Provide the instruction type, assembly language instruction, and binary representation of the instruction described by the...
Provide the instruction type, assembly language instruction, and binary representation of the instruction described by the following LEGv8 fields: op = 0x458, Rm = 14, Rn = 16, Rd = 18, shamt = 0
What is the Opcode? What is the Operand? What is the value in Register 5 after the instruction is executed?
What is the Opcode? What is the Operand? What is the value in Register 5 after the instruction is executed?
In a computer instruction format, the instruction length is 11 bits and the size of an...
In a computer instruction format, the instruction length is 11 bits and the size of an address field is 4 bits. Is it possible to have 5 two-address instructions 45 one-address instructions 32 zero-address instructions using the specified format? Justify your answer.
In a computer instruction format, the instruction length is 12 bits and the size of an...
In a computer instruction format, the instruction length is 12 bits and the size of an address field is 5 bits. The system architect has already designed three 2-address instructions and thirty one 1-address instructions. How many 0-address instructions can still be possibly accommodated?
What is the difference between the DN and EN outputs of a timer or counter in...
What is the difference between the DN and EN outputs of a timer or counter in a PLC? Describe how each of these outputs can be used in a program.
Draw the pin configuration of timer 555 and describe the monostable operation of it.
Draw the pin configuration of timer 555 and describe the monostable operation of it.
a) What is the static instruction count and what is the dynamic instruction count? li $t1,...
a) What is the static instruction count and what is the dynamic instruction count? li $t1, 10 addi $s2, $0, 0 LOOP: slt $t2, $0, $t1 beq $t2, $0, DONE addi $t1, $t1, -1 addi $s2, $s2, 2 j LOOP DONE:
At the initial stage of each instruction cycle, the processor fetches an instruction from memory. The...
At the initial stage of each instruction cycle, the processor fetches an instruction from memory. The processor interprets the instruction and performs the required action. Provide illustration of the process with a thorough explanation on the rudimentary instruction cycles the processor follows to execute fundamental instructions. Discuss how this processor interacts with the cache memory to give output speedily.
Encode the following instruction (1) identify the instruction format that will be used (2) indicate the...
Encode the following instruction (1) identify the instruction format that will be used (2) indicate the values of each of the fields for that format in decimal (3) convert each of these decimal val- ues to binary (4) represent the entire instruction as one hexadecimal value j L2. # where L2 is at the decimal byte address 1,048,608
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT