Counters Example I

Basic example of Counter contact with IECuino

Here, we will see another example, but this time it is going to be about Counters. It means that this is Counters Example I. 

As the previous post, we are going to explain what Counter means, in case you forgot its function. 
As the name suggests, this contact count the number of times that you indicate in the Preset Value* box.

There are different types, but we will not go into that much detail.

Their performance are similar to that of the Timers:

1. When the Ladder Logic receives the signal (usually pressing a button), it starts to pass current through the first rung.

2. The current arrives at the CTU Contact (Counter).

3. In this case, it will count 1 time up, because it is an Up Counter.

4. When it receives the signal the number of times that it is indicated on the Preset Value* box, it will energize the contacts associated with the counterLight variable.

Representation of the performance process

Just as the previous example, that was about Timers, the aim of this mini project is to turn on and off a light, or in our case a LED, with a START button.

Variables of this Counters Example I

First of all, we are going to explain the variables. In this case, there are:

· pin4: The name of this variable is pin4, which also corresponds to pin 4 of the Arduino board. In our case, it will be a START button.

· counterLight: It is a “memory” variable that connects and associates the CTU Contact (Counter), located in the first rung, with the N.O. of the second rung.

· light: its name indicate perfectly its function. It is the variable that turns on the light or the LED.

· pin3: Just as the previous variable, it is the name of pin 3 of the Arduino board. In our case, it will be a STOP button.

Steps for this Counters Example I

1. At the first rung, we found the pin4 variable, which is a Normally Open contact. This is because when the rail has current and the START button is pressed, the pin4 variable will activate.

2. As an output in the first rung, there is a CTU contact (Counter). By pressing the START button it is going to count up once. To activate the current for the other rungs, we have to press the button 3 times.

3. After pressing the button 3 times, the CTU contact will activate the counterLight variable, which will energize the first contact of the second rung, because it is a “memory” variable, which means that it is associated with the previous CTU Contact.

4. Then, the current will find the Normally Closed contact, that by default will let the current flow. (pin3 variable).

5. Afterwards, the light variable, which is and Output Coil, will activate. The first time that current arrives to this Output Coil, the LED will turn on because the Coil is associated with the light variable, which is mapped to pin 13, an output of the board. When the Coil is activated, the N.O. light variable of the third rung will also activate.

6. Finally, at the third rung, there is another light variable, which will enable the current flow to be in loop between the second and the third rung. If the STOP button is pressed, the state of the pin3 variable will change from FALSE to TRUE, opening the Normally Closed contact, stopping the current flow.

Information to consider

· The light or LED will turn on after pressing 3 times the START button, and it will turn off when the STOP button is pressed.

Requirements for the connection

  • 1 Bread-board
  • 1 Arduino board (in our case, an Arduino Leonardo board)
  • 3 resistors of 10 Ω (Ohms)
  • 2 push buttons
  • 1 LED light
  • 7 dupont wires
  • 1 USB micro

Another Examples

1 thought on “Counters Example I”

  1. Pingback: Timers Example I - Ladder Logic Examples - IECuino

Leave a Comment

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial