Professional Documents
Culture Documents
This lesson will enable you to partially complete assessment F of the EAL Unit 10. There is one main
programming exercise that you will need to complete to pass assessment F. The next lesson will show you how
to test and fully document the program.
CCW = DN
CW = UP
C
CCW = DN
CLOSE
B CW = UP
Gripper
D
OPEN
CCW CW
CCW CW
1
The diagram of figure 2 shows how axis A is controlled by a PLC. The rotary actuator has two pistons, one
makes the actuator move clockwise (CW) and the other makes it move counter clockwise (CCW). These are
controlled by two digital outputs (DQ). The angle of the actuator is sensed by a potentiometer connected to an
analogue PLC input (AI). The pump is controlled by a relay from a digital output (DQ) and the flow of oil, which
determines the speed is controlled by a proportional valve connected to an analogue output (AQ).
DQ
CW solenoid valve
H
L L CW piston
Potentiometer
Rotary
L DQ actuator A AI
L L CCW piston
AQ
CCW solenoid valve
DQ DI
Proportional Valve
M
Motor relay and auxiliary contact
Accumulator Pump
The letter L is used to denote the lines are hydraulic, the dashed lines are electrical signals. The motor relay
sends a signal back to the PLC, from its auxiliary contact (DI), to tell it that the relay is closed; this is a safety
feature in case the relay fails.
The second drawing (figure 4) is of the expansion module SM1222 DC which has 16 digital outputs working at
24VDC. This where the solenoid valves are connected to operate the hydraulic actuators.
The third drawing (figure 5) shows the expansion module for the analogue values from the four angle sensors.
This is the SM1231 AI which has 4 configurable analogue inputs set up for 0 to 10VDC. The 10VDC supply is
provided by the voltage regulator fed from the 24VDC supply.
2
Figure 3: Electrical Drawings of the Hydraulic Robot – Base unit of the PLC
24VDC
Auto Mode
Start Pump
Stop Pump
A axis request
B axis request
Auxiliary contact
C axis request
D axis request
0VDC
Motor
EARTH
CCW
CW
DN
CW
DN
UP
CCW
UP
%I0.0
%I0.1
%I0.2
%I0.3
%I0.4
%I0.5
%I0.6
%I0.7
%I1.0
%I1.1
%I1.2
%I1.3
X11
L+ M E L+ M 1M 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 .0 .1 .2 .3 .4 .5 2M 0 1
X10
24VDC 24VDC DI a DI b AI
IN OUT 24VDC DIGITAL INPUTS ANALOGUE INPUTS
0M 0 E NC NC NC 3L 3M .0 .1 .2 .3 .4 .5 .6 .7 .0 .1
%Q0.0
%Q0.4
%QW80
MOTOR RELAY
GRIPPER CLOSE
24VDC
0VDC 3
Figure 4: Electrical Drawings of the Hydraulic Robot – Additional module SM1222 DC – 16 channel digital output module
0VDC
24VDC
%Q8.0
%Q8.1
%Q8.2
%Q8.3
%Q8.4
%Q8.5
%Q8.6
%Q8.7
X10
X11
L+ M NC .0 .1 .2 .3 E NC NC .4 .5 .6 .7
24VDC DQ a
IN 24VDC DIGITAL OUTPUTS
X13
NC NC NC .0 .1 .2 .3 NC NC NC .4 .5 .6 .7
%Q9.0
%Q9.2
%Q9.4
%Q9.6
%Q9.1
%Q9.3
%Q9.5
%Q9.7
A AXIS CW SOLENOID
B AXIS UP SOLENOID
B AXIS DN SOLENOID
C AXIS UP SOLENOID
C AXIS DN SOLENOID
D AXIS CW SOLENOID
24VDC
0VDC
A - AXIS
ANGLE SENSOR
%IW96
%IW98
X10
L+ M E 0+ 0- 1+ 1- 3 2 1
VOLTAGE REGULATOR
10V
Siemens SM1231 AI - 4 channel
Analogue Input Module
0 – 10VDC ANALAOGUE INPUTS
C - AXIS
AI ANGLE SENSOR
X11
NC NC NC 2+ 2- 3+ 3-
%IW100
%IW102
D - AXIS
ANGLE SENSOR
5
4. Technical Data
Usually, this information is available in manuals, datasheets, websites or within the TIA Portal program.
a. Potentiometer
This information is needed to know the angle of rotation of each axis and therefore the relationship
between voltage and degrees of rotation. Typically, the potentiometers used have a maximum
rotation angle of 270O. The relationship is therefore 10/270 = 37.03 mV per degree.
Digital Inputs
6
Digital Outputs
Analogue Inputs
Analogue Outputs
%QW80
7
6. Specification
In this section, the program requirements will be given in detail. These must be translated into a working
program using a suitable programming language or languages with the aid of a software package such as TIA
Portal.
a. Modes of operation
This system must work in two modes: manual and auto.
b. Manual mode
The manual switches must be used to move the robot in any direction within the safe limits of
movement provided the pump is running.
c. Automatic mode
Having scaled the raw axis values into degrees (PV = Process Variable), there must be 4 setpoint values
stored in memory (SP = Set Point). The difference between each of the SP and PV must be calculated
to find the ERROR. If this is positive, the axis must move in the CW direction but if negative, in the CCW
direction between the limits of movement as for manual mode. This applies to axes A and D. For axes
B and C, this would be UP and DOWN for positive and negative errors respectively.
Minimum
Maximum angle reached? YES YES angle
reached?
NO NO
Switch ON CW solenoid Switch OFF CW solenoid Switch OFF CCW solenoidSwitch ON CCW solenoid
8
d. Pump Control
The pump must be run when the start button is pressed and held on only if the auxiliary contact has
closed. The pump must stop running when the stop button is pressed.
e. Proportional Valve
This valve must be fully open to 100% once the pump is running and closed when the pump is
switched off.
f. HMI Controls
A simple screen must be created to store the SP and PV for each axis together with the state of each
output.
9
7. Programming Advice
The following suggestions will help you write the program.
a. Use the CONVERT instruction to change each raw analogue input from the integer addresses %IW96,
%IW98, %IW100 and %IW102 into real value addresses %MD1000, %MD1004, %MD1008 and
%MD1016. Notice that each address is 4 bytes apart. Create tags for these addresses with the word
“real” at the end.
b. Scale these real values into angles at addresses %MD1020, %MD1024, %MD1028 and %MD1032 by
multiplying by a suitable scaling factor. Create suitable tag names for each, such as “A-axis PV”, etc..
c. Store the position setpoints for each axis in 4 more reals, with suitable tags names such as “A-axis SP”,
etc..
d. Store 8 more reals for the maximum and minimum values of the axes positions. These could be named
as ”A-axis PV max”, “A-axis PV min”, etc..
e. Add 3 displays on the HMI for each axis and tag them to the above tags.
f. Add indictors to the HMI screen to show the state of each output
g. For the CW solenoid of axis A, put the AUTO mode button as a normally closed contact (which means
manual mode selected) in series with the CW request switch (N/O contact), in series with a
comparison instruction that ensures the PV is less than the PV maximum. This is how the A-axis CW
solenoid coil is to be operated manually. For the automatic mode, use the AUTO mode button as a
normally open contact in series with a comparison instruction that check if the A-axis ERROR is
positive (>0), these two can be placed in parallel with the manual controls.
h. For the CCW solenoid of axis A, put the AUTO mode button as a normally closed contact (which means
manual mode selected) in series with the CCW request switch (N/O contact), in series with a
comparison instruction that ensures the PV is greater than the PV minimum. This is how the A-axis
CCW solenoid coil is to be operated manually. For the automatic mode, use the AUTO mode button as
a normally open contact in series with a comparison instruction that check if the A-axis ERROR is
negative (<0), these two can be placed in parallel with the manual controls.
i. The above can be repeated for the other 3 axes.
j. For the pump control, use the SET instruction to latch on the motor relay coil when the start button is
pressed (use N/O contact). If the stop button is pressed or the relay auxiliary is not made, the motor
relay coil should be reset. To do this, use a N/C contact for the stop button in parallel with a N/C
contact for the auxiliary contact to control the RESET coil instruction.
10
8. Memory Element Tag List
Use the following table for your memory tag list. There should be 20 double words (each occupying 4 bytes).
%MD1000
11
9. Writing the Program
Use the following pages to create the program. The instructions have been created below. You will need to
copy and paste them into the program sheets. Each instruction can be edited so as to insert addresses. (DO
NOT USE CTRL-click-drag as this will cause problems and ruin your drawing. This is a bug within MS Word).
BASIC INSTRUCTIONS
%I0.0 %I1.3
MOTOR AUXILIARY CONTACT STOP PUMP
S R
IN Q IN Q IN Q
t#2s PT ET t#2s PT ET R ET
t#2s PT
CU Q CD Q CU QU
R CV LD CV CU
QD
10 PV 10 PV R
LD CV
10 PV
12
ADVANCED INSTRUCTIONS CONV
Int to Real
EN ENO
ADD
Auto (Real)
EN ENO
MUL
%MD1000 IN1 OUT %MD1000 Auto (Real)
Tag Name Tag Name
EN ENO
%MD1000 IN2
Tag Name
MOVE
EN ENO
VALUE IN
OUT 1 %QW80
Tag Name
13
CONV %I0.0
Int to Real MOTOR AUXILIARY CONTACT
EN ENO
%IW96 IN OUT %MD1000
Tag Name Tag Name
%MD1000
Tag Name
<
Real
%MD1000
Tag Name
14
15
16
17
18
19