Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Mechatronics.pdf
Скачиваний:
81
Добавлен:
23.08.2013
Размер:
5.07 Mб
Скачать

page 471

24.6 PRACTICE PROBLEMS

1.A switch will turn a counter on when engaged. This counter can be reset by a second switch. The value in the counter should be multiplied by 5, and then displayed as a binary output using (201-208)

2.Develop Ladder Logic for a car door/seat belt safety system. When the car door is open, or the seatbelt is not done up, the ignition power must not be applied. In addition the key must be able to switch ignition power.

1.List of Inputs

2.Draw Ladder

3.TRUE / FALSE -- PLC outputs can be set with Bytes instead of bits.

(ans. true)

4. Create a ladder logic program that will start when input ‘A’ is turned on and calculate the series below. The value of ‘n’ will start at 1 and with each scan of the ladder logic ‘n’ will increase until n=100. While the sequence is being incremented, any change in ‘A’ will be ignored.

x = 2( n – 1)

A = I:000/00

 

n = N7:0

 

x = N7:1

page 472

ans.

 

 

A

B3:0

 

 

 

 

 

 

 

 

 

 

MOV

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source A 1

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

Dest. N7:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B3:0

 

 

 

 

 

LEQ

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source A N7:0

 

 

B3:0

 

 

 

 

 

 

 

 

Source B 100

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B3:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dest. N7:1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Expression

 

 

 

 

 

 

 

 

 

 

 

2 * (N7:0 - 1)

 

 

B3:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source A 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source B N7:0

 

 

 

 

 

 

 

 

 

 

 

Dest. N7:0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.A thumbwheel input card acquires a four digit BCD count. A sensor detects parts dropping down a chute. When the count matches the BCD value the chute is closed, and a light is turned on until a reset button is pushed. A start button must be pushed to start the part feeding. Develop the ladder logic for this controller. Use a structured design technique such as a state diagram.

INPUT

OUTPUT

I:000 - BCD input card

O:002/00 - chute open

I:001/00 - part detect

O:002/01 - light

I:001/01 - start button

 

I:001/02 - reset button

 

page 473

first scan

ans.

S1

waiting

reset

start S2

parts counting (chute open)

 

count

S3

exceeded

bin full

(light on)

page 474

first scan

L S1

U S2

U S3

S2

chute

S3

light

S1

MCR

start

L S2

U S1

FRD

Source A I:000

Dest. C5:0/ACC

MCR

page 475

S2

MCR

part detect

CTD counter C5:0 preset 0

C5:0/DN

L S3

U S2

MCR

S3

MCR

reset

L S1

U S3

MCR

6. Design and write ladder logic for a simple traffic light controller that has a single fixed sequence of 16 seconds for both green lights and 4 second for both yellow lights. Use either stacks or sequencers.

page 476

ans. (the sequencer is best suited to this problem)

T4:0/DN

TON T4:0

preset 4.0 sec

T4:0/DN

SQO

File #N7:0 mask 003F Dest. O:000 Control R6:0 Length 10

OUTPUTS

O:000/00 NSG - north south green O:000/01 NSY - north south yellow O:000/02 NSR - north south red O:000/03 EWG - east west green O:000/04 EWY - east west yellow O:000/05 EWR - east west red

Addr.

Contents (in binary)

N7:0 0000000000100001 N7:1 0000000000100001 N7:2 0000000000100001 N7:3 0000000000100001 N7:4 0000000000100010 N7:5 0000000000001100 N7:6 0000000000001100 N7:7 0000000000001100 N7:8 0000000000001100 N7:9 0000000000010100

7.A PLC is to be used to control a carillon (a bell tower). Each bell corresponds to a musical note and each has a pneumatic actuator that will ring it. The table below defines the tune to be programmed. Write a program that will run the tune once each time a start button is pushed. A stop button will stop the song.

 

 

 

time sequence in seconds

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

O:000/00

 

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

O:000/00

 

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

1

 

O:000/01

 

1

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

 

O:000/02

 

1

0

0

1

0

0

0

0

0

1

1

0

0

0

1

0

0

 

O:000/03

 

0

0

0

0

1

0

0

0

0

0

1

0

1

0

0

1

0

 

O:000/04

 

0

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

 

O:000/05

 

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

 

O:000/06

 

0

0

0

0

0

1

1

0

0

0

0

0

1

0

0

0

0

 

O:000/07

 

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

 

8. The following program uses indirect addressing. Indicate what the new values in memory will be when button A is pushed after the first and second instructions.

page 477

 

 

 

A

 

 

 

 

 

ADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source A 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source B N7:0

 

 

 

 

 

 

 

 

 

Dest. N7:[N7:1]

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source A N7:[N7:0]

 

 

 

 

 

 

 

 

 

 

addr

 

before

 

after 1st

 

after 2nd

Source B N7:[N7:1]

 

 

 

 

 

 

 

 

Dest. N7:[N7:0]

 

 

 

 

 

 

 

 

 

 

N7:0

1

 

 

 

 

 

 

 

N7:1

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N7:2

3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9.

Соседние файлы в предмете Электротехника