Seimens Automation 3
Seimens Automation 3
Lab Manual # 04
Roll #: Name:
Objective:
1. Practice few Ladder Diagrams on RsLogix 500 software
2. Understand and use Timers in Ladder Diagrams
3. Understand and use Counters in Ladder Diagrams
Apparatus
• CM-184 PLC Trainer
Timers
Timers are essential components of PLCs that are used to measure and control time-based events.
They allow PLCs to perform actions after a specified period has elapsed or to maintain a specific
state for a predetermined duration.
Types of Timers in PLCs
1. On-Delay Timer:
o Functionality: An on-delay timer starts counting when its input is energized. The
output remains de-energized until the preset time has elapsed.
o Example: Used to delay the start of a motor after a safety interlock is activated.
2. Off-Delay Timer:
o Functionality: An off-delay timer starts counting when its input is de-energized. The
output remains energized until the preset time has elapsed.
o Example: Used to provide a coasting period for a motor before it comes to a
complete stop.
3. Retentive Timer:
o Functionality: A retentive timer maintains its accumulator value and output state
even if its input is removed. It can only be reset using a RESET instruction.
o Example: Used to track the total time a machine has been running, even if there are
temporary power interruptions.
4. One-Shot Timer:
o Functionality: A one-shot timer generates a pulse of a specified duration when its
input is energized. The output returns to its original state after the pulse.
o Example: Used to trigger a short-duration event, such as opening a valve for a
specific time.
5. Cyclic Timer:
o Functionality: A cyclic timer continuously cycles between on and off states, with a
specified ON time and OFF time.
o Example: Used to create a blinking light or a periodic signal.
Timer Parameters
Timers typically have the following parameters:
• Time Base: The resolution of timing.
• Preset Time: The desired time interval for the timer to count. It is specified as multiple of
Time Base value. For example, if Time Base is 0.01 and Preset is 100, then total timing
duration would be 0.01 x 100 = 1 second.
• Accumulated Time: The current time that has elapsed since the timer started counting.
• Enable Bit: A flag that indicates whether the Timer is enabled or not.
• Done Bit: A flag that indicates whether the timer has reached its preset time.
• Timer Timing Bit: A flag that indicates whether the timer is timing or not.
Timers are 3-word elements, that is occupy 3-words in the memory and it is arranged as shown in
the following figure.
Example 1: Draw the following Ladder Diagram and check it’s working.
Example 2: Change Timer to Off-Delay Timer (TOF) without changing anything else and observe and
understand the working.
Example 3: Change Timer to Retentive On-Delay Timer (RTO) without changing anything else and
observe and understand the working. How will you reset the Timer now?
Counters
Counters are essential components of PLCs that are used to count the number of times an input
signal changes state (from 0 to 1 or 1 to 0). They are particularly useful for tasks that involve
counting discrete events, such as counting the number of products passing along a conveyor belt or
the number of revolutions of a motor.
1. Up Counter:
o Functionality: An up counter increments its count each time its input changes from
0 to 1.
o Example: Used to count the number of times a sensor detects an object passing by.
2. Down Counter:
o Functionality: A down counter decrements its count each time its input changes
from 0 to 1.
3. Up/Down Counter:
o Functionality: An up/down counter can both increment and decrement its count,
depending on the state of its input.
o Example: Used to track the net change in a value, such as the total number of
products produced minus the number of rejects.
Counter Parameters
• Preset Value: The desired count value that the counter should reach.
• Done Bit: A flag that indicates whether the counter has reached its preset value.
• CU/CD Bit: These flags indicate whether the corresponding Up-Counter or Down-Counter
are energized for not.
• Overflow (OV) Bit: This flag indicates if the counter’s accumulator overflows the maximum
allowed accumulator value. Maximum allowed accumulator value for SLC 500 controllers is
+32676.
• Underflow (UN) Bit: This flag indicates if the counter’s accumulator has underflowed the
minimum allowed accumulator value. Minimum allowed accumulator value for SLC 500
controllers is -32678.
All types of counters must be reset using a RESET instruction to reset the contents of the
accumulator.
Counters are 3-word elements, that is occupy 3-words in the memory and it is arranged as shown in
the following figure.
• Safety Interlocks: Ensuring that a specific number of conditions are met before a process
can start.
Example 4: Draw the following Ladder Diagram and check it’s working.
Example 5: Change the counter to Counter-Down and Preset to ‘-5’ and run the program again to
observe the difference.
Question 1: Write a program to turn ON a light after 6 events and turn it OFF after 10 seconds.
The input device is a normally OPEN switch.
Question 2: For a certain conveyor, if a normally OPEN push button (START/STOP button) is
pressed once, the siren should sound for 10 seconds, after which the conveyor should start.
Moreover, a normally CLOSED emergency push button should be there to stop the conveyor
immediately. If the normally OPEN push button (START/STOP button) is pressed while the
conveyor is running, the conveyor should stop after 5 seconds, and the siren should keep
sounding within those 5 seconds. Design a Ladder Diagram for implementing this control.
Question 3: Design a ladder logic diagram that will use the counter elements as one
UP/DOWN counter to keep track of the cars in a certain parking plaza. If the number of cars
exceed a certain value (say 15), CAR LOT FULL light should light up. Suppose that both entry
and exit points have a proximity sensor that gives a HIGH output whenever it detects a car.