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

page 254

Door Open

Seat Belt

Key

Ignition

20.5.3 Motor Forward/Reverse

• Design a motor controller that has a forward and a reverse button. The motor forward and reverse outputs will only be on when one of the buttons is pushed. When both buttons are pushed the motor will not work.

20.6 PRACTICE PROBLEMS

1. Draw a ladder diagram that will cause output D to go true when switch A and switch B are closed or when switch C is closed. The devices are wired to the following locations.

Input A is 001

Input B is 002

Input C is 003

Output D is 201

page 255

ANS.

001

 

 

 

002

 

 

 

201

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

003

2. Draw a ladder diagram that will cause output D to be on when push button A is on, or either B or C are on.

Input A is 001

Input B is 002

Input C is 003

Output D is 201

ANS.

002

003

201

002 003

001

4. Make a simple ladder logic program that will turn on the outputs with the binary patterns when the corresponding buttons are pushed. Assume that the outputs are from 200 to 207 and that 200 is the LSB)

11011011 (input 101)

10101010 (input 102)

10010010 (input 103)

101

102

103

101

102

101

103

ETC....

7. Given the truth table below

page 256

207

206

205

204

page 257

A

B

C

D

Z

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

1

0

0

0

0

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

0

0

0

0

1

0

0

1

1

1

0

1

0

0

1

0

1

1

0

1

1

0

0

0

1

1

0

1

1

1

1

1

0

1

1

1

1

1

1

a)find a Boolean algebra expression using a Karnaugh map.

b)draw a ladder diagram using the truth table (not the Boolean expression).

page 258

ANS.

AB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AB

 

 

AB

 

AB

 

 

 

 

 

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

0

 

0

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Z=B*(C+D)+ABCD

 

 

 

 

 

 

 

1

 

0

 

0

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

0

 

0

 

 

0

 

 

 

 

 

 

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

1

 

0

 

 

1

 

 

 

 

 

 

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

Z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

B

 

 

 

 

C

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8. Simplify the Boolean expression below.

( ( A B) + ( B + A) ) C + ( B C + B C)

ans. =C

9. Given the Boolean expression a) draw a digital circuit and b) a ladder diagram (do not sim-

page 259

plify).

X = A B C + ( C + B)

ans.

X =

B

( A C +

C

)

10. a) Construct a truth table for the following problem.

i)there are three buttons A, B, C.

ii)the output is on if any two buttons are pushed.

iii)if C is pressed the output will always turn on. b) Develop a Boolean expression.

c) Develop a Boolean expression using a Karnaugh map.

ans.

A

B

C

out

 

 

 

 

C + A B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AB

AB

AB

 

AB

 

0

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

0

0

 

C

1

1

 

 

1

 

1

 

1

0

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

0

1

 

 

 

1

0

 

 

0

 

0

 

 

C

 

 

 

 

1

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11. a) Given the following truth table, show the Boolean combinations that would give a result of 1.

page 260

A

B

C

D

Result

 

 

 

 

 

0

0

0

0

1

0

0

0

1

0

0

0

1

0

0

0

0

1

1

1

0

1

0

0

0

0

1

0

1

1

0

1

1

0

0

0

1

1

1

1

1

0

0

0

1

1

0

0

1

0

1

0

1

0

0

1

0

1

1

1

1

1

0

0

0

1

1

0

1

0

1

1

1

0

1

1

1

1

1

1

b)Write the results in a) in a Boolean equation.

c)Simplify the Boolean equation in b)

ANS.

ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

A ( BCD + BCD + BCD + BCD) + A ( BCD + BCD + BCD + BCD)

A ( BCD) + A ( BCD) + BCD + BCD + BCD

B ( ACD + ACD) + BCD + CD ( B + B)

B ( ACD + ACD) + BCD + CD

12. Develop the simplest Boolean expression for the Karnaugh map below,

a)graphically.

b)by Boolean Algebra

page 261

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AB

 

AB

AB

 

AB

 

 

 

 

 

 

 

 

 

 

 

 

CD

 

1

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

1

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

1

 

CD

 

 

 

ANS.

DA + ACD

ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

ACD + ACD + ACD

AD + ACD

13. Setup the Karnaugh map for the truth table below.

A

B

C

D

Result

 

 

 

 

 

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

1

1

0

1

0

0

1

0

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

0

0

0

0

1

0

0

1

0

1

0

1

0

1

1

0

1

1

1

1

1

0

0

0

1

1

0

1

0

1

1

1

0

1

1

1

1

1

1

page 262

ANS.

 

 

 

AB

 

 

 

 

 

 

 

 

 

 

 

 

AB

 

 

AB

 

AB

 

CD

 

 

 

 

 

 

 

 

 

 

 

1

1

 

1

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

 

0

 

1

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

 

0

 

1

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

 

0

 

1

 

CD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14. a) Develop the Boolean expression for the circuit below.

b)Simplify the Boolean expression.

c)Draw a simpler circuit for the equation in b).

A

B

C

X B

A

C

ANS.

CAB

 

 

 

 

 

C

 

 

 

 

 

X

 

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B

 

 

 

 

 

 

 

 

 

 

 

 

A

 

B

C

 

 

X

15. Is the ladder logic below for, a) AND

page 263

b)OR

c)both a) and b)

d)none of the above

(ans. a)

16.Simplify the following Boolean equations,

a)( A + B) ( A + B)

ans.

 

( A +

 

) = (

 

 

 

 

 

 

 

B

AB) ( AB) = 0

( A + B)

b)ABCD + ABCD + ABCD + ABCD

 

ans.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ABCD +

 

ABCD + ABCD

 

= BCD + ABD

 

= B( CD + AD)

 

 

 

+ ABCD

17.

Simplify the following boolean equations

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A( B + AB)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A(

 

 

 

)

 

 

a)

 

 

 

 

 

 

 

 

 

 

 

 

 

b)

B + AB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

( B + AB)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(

 

 

)

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

c)

 

 

 

 

 

 

 

 

 

 

 

 

 

d)

 

B + AB

18.

Convert the following ladder logic to a karnaugh map.

 

 

 

 

A

 

 

 

 

 

C

 

 

 

 

 

 

 

 

 

A

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B

 

 

 

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

page 264

ans. A

B

C

D

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CD

CD

CD

CD

 

 

 

 

 

 

 

0

0

0

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AB

0

1

 

 

0

 

 

0

0

0

1

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

1

1

 

0

 

 

 

 

 

 

0

1

 

 

0

 

 

0

 

 

AB

 

 

 

 

0

1

0

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

0

1

 

0

 

 

 

 

 

 

0

0

 

 

0

 

 

0

 

 

AB

 

 

 

 

0

1

1

0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

1

1

 

1

 

 

 

 

 

 

1

1

 

 

0

 

 

0

 

 

AB

1

0

0

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

0

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

1

0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

1

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

0

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

0

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

1

0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

1

1

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

19. Simplify the following and implement the original and simplified equations with gates and ladder logic.

 

A + (

B

+

C

+

 

D

) ( B +

C

) + A B (

C

+

D

)

 

 

 

 

 

 

 

ans.

A + (

 

 

 

+

 

 

+

 

 

 

) ( B +

 

 

) + A B (

 

+

 

)

 

 

 

 

 

 

 

B

C

D

C

C

D

 

A ( 1 + B (

 

 

+

 

 

) ) + (

 

+

 

+

 

) B + (

 

+

 

+

 

)

 

 

 

C

D

B

C

D

B

C

D

C

 

A + (

 

 

 

+

 

) B +

 

 

 

 

 

C

D

C

 

A +

 

 

B +

 

 

B +

 

 

 

C

D

C

 

A +

 

B +

 

 

 

D

C

page 265

ans.

A + D B + C

A

B

C

D

B

C

C

D

A

B

D

B

A

C

page 266

 

A

 

B

 

B

C

 

C

 

 

D

 

 

C

A

B

D

 

 

 

A

 

 

D

 

 

B

 

 

C

 

27. Short answer

a) Write the simplest Boolean equation for the karnaugh map below,

 

 

 

 

 

CD

CD

CD

CD

 

 

 

 

 

AB

1

0

0

1

 

 

 

 

 

 

 

 

 

AB

0

0

0

0

 

 

 

 

 

 

 

 

 

AB

0

0

0

0

 

 

 

 

 

 

 

 

 

AB

0

1

1

0

28. Given a system that is described with the following equation,

page 267

X= A + ( B ( A + C) + C) + A B ( D + E)

a)Simplify the equation using Boolean Algebra.

b)Implement the original and then the simplified equation with a digital circuit.

c)Implement the original and then the simplified equation in ladder logic.

d)Implement the simplified equation in a Basic Stamp program. Assume the inputs and outputs are on pins A=1, B=2, C=3, D=4, E=5, X=6)

ans.

a)

X = A + ( B ( A + C) + C) + A B ( D + E)

 

 

X = A + ( B A + B C + C) + A B D + A B E

 

 

X = A ( 1 + B D + B E) + B A + C ( B + 1)

 

 

X = A + B A + C

ans.

b)

ABCD E

 

 

X

 

 

X

page 268

X

ans. c)

A

BA

C

C

A

 

 

 

B

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

E

A

X

 

B

A

C

 

ans.

d)

input 1 ‘input A

 

 

input 2 ‘input B

 

 

input 3 ‘input C

 

 

input 4 ‘input D

 

 

input 5 ‘input E

 

 

output 6 ‘output X

 

 

loop:

 

 

low 6

 

 

if (in1=1) or (in2=1 or in1=0) or (in3=1) then on

 

 

goto loop

 

 

on:

 

 

high 6

 

 

goto loop

29. Given the truth table below find the most efficient ladder logic to implement it. Use a structured technique such as Boolean algebra or Karnaugh maps.

page 269

A

B

C

D

X

Y

 

 

 

 

 

 

0

0

0

0

0

0

0

0

0

1

0

1

0

0

1

0

0

0

0

0

1

1

0

0

0

1

0

0

0

0

0

1

0

1

0

0

0

1

1

0

0

1

0

1

1

1

0

1

1

0

0

0

1

0

1

0

0

1

1

1

1

0

1

0

0

0

1

0

1

1

0

0

1

1

0

0

1

0

1

1

0

1

1

0

1

1

1

0

0

1

1

1

1

1

0

1

 

 

 

 

 

 

ans. FOR X

 

 

 

 

FOR Y

 

 

 

 

 

 

 

CD

 

 

 

 

 

CD

 

 

 

 

00

01

11

10

 

 

00

01

11

10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

00

0

0

0

0

00

0

1

0

0

AB 01

0

0

0

0

AB 01

0

0

1

1

11

1

1

0

0

11

0

0

1

1

10

1

1

0

0

10

0

1

0

0

X = A

C

 

 

 

 

 

Y =

B

 

C

 

D + B C

A

C

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B

C

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Y

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B C

page 270

30. For the following Boolean equation,

X= A + B( A + CB + DAC) + ABCD

a)Write out the logic for the unsimplified equation.

b)Simplify the equation.

c)Write out the ladder logic for the simplified equation.

31. Use a karnaugh map to simplify the following truth table, and implement it in ladder logic.

A

B

C

D

X

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

1

1

0

0

1

0

0

0

0

1

0

1

0

0

1

1

0

1

0

1

1

1

1

1

0

0

0

0

1

0

0

1

0

1

0

1

0

0

1

0

1

1

0

1

1

0

0

0

1

1

0

1

0

1

1

1

0

1

1

1

1

1

1

32. Convert the following Boolean equation to the simplest possible ladder logic.

X = A ( A + A B)

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