Sunteți pe pagina 1din 31

# Discrete Control Logic 1.

Pneumatic circuits
- Low forces - Discrete, fixed travel distances - Rotational or reciprocating motion

doubl e -acting

spri ng-return

## ai r su pply vent to atmosp here (a ir di sch arge)

tepping away from this mat, the person has to manually switch the robot back ON

a 3/2 valve
valve actuation

a 5/2 valve

return spring

pneumatic

foot pedal

push button

START, A+, AA +

A-

A+ VA

Start

## Pure Pneumatic control design: Cascade method

Example: Punch Press Operation: (i) part is clamped in position (ii) press punches the part (iii) the clamp is released (iv) part is removed from the table

## Pure Pneumatic control design: Cascade method

(1) Write cylinder action sequence (2) Partition sequence into minimum no. of groups (no letter repeated in group) (3) Merge last group, first group (if possible)

## (4) Each cylinder is double-acting

(5) Each cylinder is controlled by 5/2 valve (both pilot lines: pneumatic) (6) Each + and position of cylinder: limit valves (7) Each group => manifold line. The manifold line connects to the limit valves associated with the cylinders. (8) The air pressure in the manifolds is controlled by 5/2 valves called group valves. no. of group valves = (no of groups 1)

START, A+, B+, B-, A-, C+, C-

## Break it down into groups:

START, A+, B+ / B-, A-, C+ GRP 1 GRP 2 Merge Group 3 with Group 1 ? / CGRP 3

/ CGRP 1

## Cascade method: draw cylinders, manifolds, valves

- Draw the cylinders - For each cylinder, draw the limit valve (3/2 way) - For each cylinder, draw the control valve - Draw manifold lines - Limit valve connections: a2, b2 and c1 get their air supply from manifold 1 a1, b1 and c2 get their air supply from manifold 2 - Group valve connections: air supply: initially to GRP 1 (manifold 1), when pilot line 1 is active. line 1: activated by c2 (transition from GRP 2 GRP 1) line 2: activated by b2 - Connect air supply of each cylinders valve, and supply + and ports of each cylinder - Connect the logic lines according to sequence: START A+ B+ B- A- C+ C-

A + a1 a2 B + b1 b2 C + c1 c2

VA

VB

VC

Start 1

1 2

## Pure Pneumatic Controls

- For more complex logic, difficult to debug - Less versatile than electronic control (e.g. no counters, poor timer control)

## History: avoiding complex/large relay boards

- Why are relay boards required?

## data communication wire

p ut

ut

s ut i np 1 ut i np

in

t3 pu

inp

t4

u inp

i np t5

6 ut

C A/ 0V 22

u inp

t0

## Box with Computer (controller) Power supply wire

PLC: example 1

Pressure_Switch is ON Warning_Light ON

PLC: example 1

STEP 1:
Write this logic into a PROGRAM STEP 2: Load program into PLC STEP 3: Connect the sensor output to External Input terminal. STEP 4: Connect the PLC External Output Terminal to Warning Light STEP 5: EXECUTE the logic program on the PLC.

PLC: example 1

PLC: example 1

IF

THEN

PLC: example 2

Outer mat ON warning light ON Inner mat ON warning light ON AND Robot OFF

## Stepping away from inner mat Manually switch robot ON

PLC: example 2
Two actuators: Warning light, Robot master switch
LOGIC for Warning light External Input 1: outer mat

PLC: example 2

## LOGIC for Robot

PROBLEM ?

PLC: example 2
LOGIC for Robot Robot must STAY OFF until manual reset to ON Solution: LATCH External Input 2: inner mat latch Internal (logical) relay

## External output: robot

PLC: example 2
LOGIC for Robot Robot must STAY OFF until manual reset to ON

## Switch (Relay) naming conventions

Lecture notes (Rockwell Automation PLC): External inputs: I:0/1, I:0/2, , I:1/1, I:1/2, I:n/m External outputs: O:0/1, O:0/2, , O:1/1, O:1/2, O:n/m Internal Relays: B0, B1, etc.
Lab (SMC PLC): External inputs: X0, X1, External outputs: Y0, Y1, , Internal Relays: R0, R1, etc.

## A xor B: (A is ON AND B is OFF) OR (A is OFF AND B is ON)

Solenoid actuated door-lock

## Solenoid ON Door unlocked

Solenoid actuated when: (i) ON signal from number-pad outside door (ii) ON signal from door-open switch inside door Solenoid ON for 5 sec, then OFF

## While O:0/1 remains ON,

Timer COUNTS DOWN from PRESET COUNT DOWN = 0 ( T4:1) set to ON

Solenoid actuated door-lock Solenoid ON Door unlocked

Solenoid actuated when: (i) ON signal from number-pad outside door (ii) ON signal from door-open switch inside door Solenoid ON for 5 sec, then OFF

## Ladder Logic: Timers -- reset

Solenoid actuated when: (i) ON signal from number pad outside door (ii) ON signal from door-open switch inside door

## During ON, if button is pressed, Timer resets to PRESET

During ON, light indicator is ON

## LEGEND: I:0/1 door-open I:O/2 card-reader

O:0/1 solenoid O:0/2 light indicator

Count the number of occurrences of an event

Pneumatic press hammer Hit the part 20 times, then wait for part to be unloaded Rice cooker alarm Beep 5 times when rice is cooked

## Car arrives limit switch ON

Limit switch ON Washer ON Washer ON: (i) Soapy water SPRAY ON (30 secs) (ii) Rinse: clean water SPRAY ON (30 secs) (iii) Automatic scrubber brushes car (15 secs) (iv) After washing 50 cars, the scrubber brush Auto-change

I:0/1

I:0/2

B1

B1 T4: 0 EN Base: Preset: Accum : B1 T4: 1 EN Base: Preset: Accum : 0.01 6000 0 T4: 2 EN Base: Preset: Accum : B1 T4:0 T4:1 0.01 7500 0 T4:2 DN T4:2 DN T4:2 DN C5: 0 EN Preset: Accum : C5: 0 DN I:0/3 50 0 O:0/3 O:0/0 0.01 3000 0

I:0/1 : System On I:0/2 : Em ergency Stop I:0/3 : Lim it Switch O:0/0 O:0/1 O:0/2 O:0/3 : : : : Soa p Water On Rinse On Scrubber On Ac tivate Scrubber Change

B1

Notice how B1 and the time r outputs are used to c ontrol the logic according to the required timing.

B1

## DN DN T4:0 T4:1 DN DN T4:0 T4:1 DN DN

O:0/1

B1

O:0/2

O:0/2 CTU

Car arrives limit switch ON Limit switch ON Washer ON Washer ON: (i) Soapy water SPRAY ON (30 secs) (ii) Rinse: clean water SPRAY ON (30 secs) (iii) Automatic scrubber brushes car (15 secs) (iv) After washing 50 cars, the scrubber brush Auto-change

T4:0 RES

I:0/3

T4:1 RES

I:0/3

## T4:2 RES C5:0 RES

O:0/3

Programming a PLC

## (1) Hand held console (direct feed of program into PLC)

(2) Computer-interface: (i) Complete the program on a computer (ii) Test the program on PC (iii) Upload the program to the PLC processor memory (persistent) (iv) Connect external Inputs and Outputs (v) Run the program on PLC

## Operation cycle of PLC

Phase 1 Phase 2 Phase 3

00 01 02 03 04 05 06 07 08

00 Program Memory

30

30 31 32 33