You are on page 1of 31

PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 1 / 31

INDEX
7 PRACTICES MANUAL . .......................................................................................................... 2
7.1 EQUIPMENT DESCRIPTION...................................................................................................... 2
7.1.1 Introduction. ....................................................................................................................................................2
7.1.2 Description . .....................................................................................................................................................3
7.2 PRACTICES ................................................................................................................................... 7
7.2.1 Practice 1: Getting started with FPWIN.........................................................................................................7
7.2.2 Practice 2 : Temporization.............................................................................................................................15
7.2.3 Practice 3 : Counting . ....................................................................................................................................18
7.2.4 Practice 4 : Sequential Control. .....................................................................................................................22
7.3 REAL APPLICATION . ............................................................................................................... 30
7.3.1 Introduction....................................................................................................................................................30
7.3.2 Necessary elements........................................................................................................................................30
7.3.3 Application carrying-out. ..............................................................................................................................30
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 2 / 31

7 PRACTICES MANUAL

7.1 EQUIPMENT DESCRIPTION

7.1.1 Introduction

Many applications are nowadays controlled by programmable logic


controllers (PLCs). The PLC may be considered as a special purpose computer. The
reliance on these PLCs is due to their high reliability and efficiency. The PLC has
many advantages over other control systems. It is well known for its flexibility, lower
cost, operational speed, reliability and easy of programming.

The PLCE is the PLC training module designed by EDIBON. The PLCE is a
modularized PLC that depending on the requirements it can include digital and
analog inputs and outputs, switches, push buttons, potentiometers, etc. The PLCE can
also be used to work with some training modules together. These modules have been
specially developed to study the PLCE working in real applications.

The PLCE – CONV is a conveyor system control training module. It is


designed to demonstrate the PLCE. This module allows sequential control. The user
can develop some different programs using the PLCE software to request the events
generated by the training module.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 3 / 31

7.1.2 Description

The PLCE – CONV is a training module to work with PLCE. The system is
provided with switches, push buttons and leds to simulate the commonly elements
in conveyor control system. These elements simulate conditions such as motor left,
motor right, conveyors, etc. These conditions are evaluated by the PLCE in order to
perform the required action.

Figure 1. PLCE-C ONV

The PLCE – CONV is a model of a conveyor control system. It includes the


most common elements in this system such as a positioning sensor, presence sensor,
etc. These elements are simulated using switches, push buttons and leds and they are
connected to the inputs and outputs of the PLC.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 4 / 31

INPUT ELEMENT
X0 START
X1 STOP
X2 CRYSTAL_SENSOR
X3 PLASTIC_SENSOR
X4 METALIC_SENSOR
X5 PRESENCE_SENSOR1
X6 PRESENCE_SENSOR2
X7 PRESENCE_SENSOR3
X8 PRESENCE_SENSOR4
X9 DOWN_SENSOR
XA UP_SENSOR
XB
XC
XD
XE
XF

Table 1. Inputs PLCE-CONV

In the following lines there is a detailed description of each input.

- START: input to start the process of classification of pieces.

- STOP: input to stop the process.

- CRYSTAL_SENSOR: input to detect pieces of crystal.

- PLASTIC_SENSOR: input to detect pieces of plastic (PVC).

- METALIC_SENSOR: input to detect pieces of metal.

- PRESENCE_SENSOR1: input to detect the number of pieces that goes to the


tank.

- PRESENCE_SENSOR2: input to detect the number of pieces that pass the


metal shelf.

- PRESENCE_SENSOR3: : input to detect the number of pieces that pass the


crystal shelf.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 5 / 31

- PRESENCE_SENSOR4: input to detect the number of pieces that enter in the


process.

- DOWN_SENSOR: input to indicate that the position of the conveyor is


DOWN.

- UP_SENSOR: input to indicate that the position of the conveyor is UP.

The training module also contains other elements such as leds, motors and
other more elements that are controlled by the PLCE to perform the required
functionality of the parking of vehicles. These elements are directly connected to the
PLCE outputs.

OUTPUT ELEMENT
Y0 MOTOR1
Y1 MOTOR2
Y2 MOTOR3
Y3 MOTOR4_LEFT
Y4 MOTOR4_RIGHT
Y5 MOTOR5_ LEFT
Y6 MOTOR5_ RIGHT
Y7 MOTOR6
Y8 FULL
Y9
YA
YB
YC
YD
YE
YF

Table 2. Outputs PLCE-CONV

- MOTOR1: output to activate the motor 1 in order to take the metal piece to the
shelf.

- MOTOR2: output to activate the motor 2 in order to take pieces into the
process.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 6 / 31

- MOTOR3: output to activate the motor 3 in order to move up or down the


main o distribution conveyor.

- MOTOR4_LEFT: output to move the motor 4 in the left direction.

- MOTOR4_RIGHT: output to move the motor 4 in the right direction.

- MOTOR5_LEFT: output to move the motor in order to open the shelf to allow
the pieces to fall down into the tank.

- MOTOR5_RIGHT: output to move the motor in order to close the shelf

- MOTOR6: output to activate the motor 1 in order to take the crystal piece to
the shelf.

- FULL: output to indicate that the tank is full.


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 7 / 31

7.2 PRACTICES

We really recommend to you to read the practices included in the PLCE


manual in order to get familiar with some basics concepts needed for the
developing of the next practices.

7.2.1 Practice 1: Getting started with FPWIN

In this first practice we will see step by step how to create an application for
the PLCE. We also learn how to assign physical inputs or outputs to global variables.

7.2.1.1 Necessary elements

• PLCE

7.2.1.2 Practice carrying-out

1. Run FPWIN Pro5 under Windows

Figure 2. FPWIN Pro


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 8 / 31

2. Create a new project.

Figure 3. New Project window

3. Select a configuration for the new project.

Figure 4. Configuration window


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 9 / 31

4. Identify the different pieces constituting the project.

Figure 5. Parts of the project window

5. We may enter the first elements for our new program.

Figure 6. Ladder Program window

6. Interconnect the components with the Draw Line tool and assign the X0 and Y0
addresses on the display, shown after clicking on the question mark of each
component (X and Y should be written in capitals).
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 10 / 31

Figure 7. Ladder Program window

7. Configure RS232 Serial Port for FPWIN PRO. Select Communication Parameters
inside of Online menu.

Figure 8. Communications window


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 11 / 31

And then, in Communication Setting window, set parameters like show the picture
bellow. (C-NET(RS232); COM1 (if it is available); 19200 bps; 8bits data; 1 bit stop;
odd parity). And press OK

8. In System Registers/Tool Com Port set the COM port 1 baud rate register a 19200
baudios.

Figure 9. System Registers window


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 12 / 31

9. Next, we will check the program created.

Figure 10. Program check

10. We may load the program next. When commuting to the online mode in step 2, a
pop-up window with a warning message such as “the project is not logic” may be
displayed. Click on No button of the pop-up. If there is a communication error, go
to the online menu in Communication Parameters of the tool bar, the default
configuration will be 19.200bps, 8 bits for data size, 1 bit for the stop bit, and odd
parity.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 13 / 31

11. We monitor the execution.

Figure 12. Program monitoring

12. Assign identifiers to the input and output of the global variables.

Figure 13. Identifiers assignment


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 14 / 31

13. Rename the input and output. The program should look like the following picture.

Figure 14. Renaming inputs and outputs of the LD program

14. Finally, check and download the program modified.

IMPORTANT NOTE : BEFORE TRANSFERRING ANY APPLICATION TO


THE PLCE THE USER SHOULD CHECK THE COMMUNICATION
CONFIGURATION. FOR MORE DETAIL, PLEASE REFER TO THE
ANNEX SETTING COMMUNICATION PARAMETERS INCLUDED IN THE
PLCE MANUAL.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 15 / 31

7.2.2 Practice 2 : Temporization

7.2.2.1 Objective

The objective of this practice is to get familiar with timers. A timer is a very
useful element featured in industrial PLCs. To do this, a PLC program will be
developed to control the time during a simple process.

In this practice we will control the opening and closing of the plastic shelf. The
objective to open the shelf when the sensor detects a plastic piece in order to leave it
to fall down into tank.

7.2.2.2 Necessary elements

• PLCE

• PLCE-CONV

• PLCE connection cable

7.2.2.3 Practice carrying-out

1. Create a project as we did in practice 1.

2. Declare global variables as we did in practice 1. Note that there are variables
(VAR1, VAR2, etc. ) that are not connected externally to any input or output.
There are used for internal control.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 16 / 31

Figure 15. Global variables window

Figure 16. Program variables window

3. Add the TM_1s_FB timers and the others necessary elements to connect the
inputs and outputs as it is shown in the following picture.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 17 / 31

Figure 17. Function Blocks window

Figure 18. Final aspect LD program

4. Finally, check and download the program modified.


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 18 / 31

7.2.3 Practice 3 : Counting

7.2.3.1 Objective

The objective of this practice is to get familiar with counters. To do this, a PLC
program will be developed.

The program should control the number of plastic pieces falling into the tank.
The full indicator will advise the system if there are 6 plastic pieces in the tank.

7.2.3.2 Necessary elements

• PLCE

• PLCE-CONV

• PLCE connection cable

7.2.3.3 Practice carrying-out

1. Create a project as we did in practice 1.

2. Declare global variables as we did in practice 1. Note that there are variables
(VAR1, VAR2, etc. ) that are not connected externally to any input or output.
There are used for internal control.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 19 / 31

Figure 19. Global variables window

Figure 20. Program variables window

3. Add the CTU_FB counters. Add the FB timers and the others necessary elements
to connect the inputs and outputs as it is shown in the following picture.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 20 / 31

Figure 21. Function Blocks window

Figure 22. Final aspect LD program

4. Select the Hold On/Off System Register. Change the value for the Counter start
address to 0 and 500 for the Timer/Counter hold area start address.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 21 / 31

Figure 23. Assign values

5. Finally, check and download the program modified.


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 22 / 31

7.2.4 Practice 4 : Sequential Control

7.2.4.1 Objective

The objective of this practice is to get familiar with sequential control.


Sequential control is ideal for processes that the operation mode is based on steps.
The steps will be executed in a simple order that may change as the result of some
simple decisions To do this, a PLC program will be developed that executes a
sequence of operations to manage a call request.

In this practice we will control a simple sequence of events. This sequence


is described in the following lines. Note the hardware signals to be considered on
each step.

1. The system starts the process when the start button is pressed.

2. A piece is detected for the presence sensor 4. (PRESENCE_SENSOR4).

3. The motor 2 and motor 4 start and the piece will be detected like metal, plastic or
crystal sensor. When one sensor is activated, the motors will stop.
(METALLIC_SENSOR, PLASTIC_SENSOR, CRYSTAL_SENSOR, MOTOR2, MOTOR4_LEFT).

4. If the material is crystal:

• The motor 3 rotates until the down position sensor is activated (MOTOR3,
DOWN_SENSOR).

• Finally, the motor 6 and the motor 4 will rotate at the same time until the
presence sensor 3 is activated. Then, the motor 4 and the motor 6 will stop.
(MOTOR4_RIGHT, MOTOR_6, PRESENCE_SENSOR3).
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 23 / 31

5. If the material is metallic:

• The motor 3 rotates until the up position sensor is activated (MOTOR3,


UP_SENSOR).

• Finally, the motor 1 and the motor 4 will rotate at the same time until the
presence sensor 2 is activated. Then, the motor 4 and the motor 1 will stop.
(MOTOR4_RIGHT, MOTOR_1, PRESENCE_SENSOR2).

6. If the material is Plastic:

• The motor 4 will rotate in left direction until the presence sensor 1 is activated.
Then, the motor 4 will stop. (MOTOR4_LEFT, PRESENCE_SENSOR1) .

7.2.4.2 Necessary elements

• PLCE

• PLCE-CONV

• PLCE connection cable


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 24 / 31

7.2.4.3 Practice carrying-out

1. Create a project and select Sequential Function Chart (SFC) as the language of
the program.

Figure 24. New project window

The basic flow charts appears on the screen. There is only one step called
Initial and one transition which has the value of TRUE.

2. Declare a list of global variables as follows.


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 25 / 31

Figure 25. Global variables window

Figure 26. Program variables window

3. Modify the chart to get the following flow chart by adding more steps. To do that,
press the step and transition button to add a step. Modify the names of each step
and transition.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 26 / 31

Figure 27. SFC Flow Chart program

4. Create actions for each step to active the outputs to perform the required
functionality for the program. Select Ladder Diagram(LD) as the language for the
action. To do that, create the action as follows.
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 27 / 31

Figure 28. New Action window

5. Modify each action to perform the required functionality for each step. The
programs for the Action1, Action2, Action3, Action4 and Action5 should look
like the following pictures.

Note: Since we would like the outputs of each step to be only activated when the
step is activated, we need to use the step variable (name_step.X). This step
variable is activated during the time that the step is on .
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 28 / 31

Figure 29. LD program for Action1

Figure 30. LD program for Action2

Figure 31. LD program for Action3

Figure 32. LD program for Action4


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 29 / 31

Figure 33. LD program for Action5

6. Finally, check and download the program modified.


PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 30 / 31

7.3 REAL APPLICATION

7.3.1 Introduction

With the practices carried out before the students have learnt the basics about
PLC programming. This chapter is designed for advanced users who have the
necessary knowledge to develop very complex programs. The development of this
application is beyond the scope of this manual. We really recommend to advanced
users to try to develop a program that controls a real application.

7.3.2 Necessary elements

• PLCE

• PLCE-CONV

• PLCE connection

7.3.3 Application carrying-out

The program should consider the following considerations. Check the


hardware signals to be considered on each requirement.

1. The system starts to work when the start button is pressed.

2. A piece is detected for the presence sensor 4. (PRESENCE_SENSOR4).

3. The motor 2 and motor 4 start and the piece will be detected like metal, plastic or
crystal sensor. When one sensor is activated, the motors will stop.
(METALLIC_SENSOR, PLASTIC_SENSOR, CRYSTAL_SENSOR, MOTOR2, MOTOR4_LEFT).
PRACTICAL EXERCISES MANUAL

Unit ref.: PLCE-CONV Date: January 2012 Pg.: 31 / 31

4. If the material is crystal:

• The motor 3 rotates until the down position sensor is activated (MOTOR3,
DOWN_SENSOR).

• Finally, the motor 6 and the motor 4 will rotate at the same time until the
presence sensor 3 is activated. Then, the motor 4 and the motor 6 will stop.
(MOTOR4_RIGHT, MOTOR_6, PRESENCE_SENSOR3).

5. If the material is metallic:

• The motor 3 rotates until the up position sensor is activated (MOTOR3,


UP_SENSOR).

• Finally, the motor 1 and the motor 4 will rotate at the same time until the
presence sensor 2 is activated. Then, the motor 4 and the motor 1 will stop.
(MOTOR4_RIGHT, MOTOR_1, PRESENCE_SENSOR2).

6. If the material is Plastic:

• The motor 4 will rotate in left direction until the presence sensor 1 is activated.
Then, the motor 4 will stop. (MOTOR4_LEFT, PRESENCE_SENSOR1) .

• The system has to count the number of pieces that there are in the tank.

• When the tank is full, the system should activate the full output and move the
motor 5 in right and left direction during some time for emptying the tank.
(MOTOR5_RIGHT, MOTOR5_LEFT, FULL).

7. The stop button can stop the system. (STOP).

You might also like