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

page 245

20.2.1 Boolean Algebra for Circuit and Ladder Logic Design

When we have logical decisions to make, truth tables and Boolean algebra allow formal methods to be used. The use of formal methods improves the overall quality of the design.

Consider the example of a burglar alarm

1.If alarm is on, check sensors.

2.If window/door sensor is broken (turns off), sound alarm and turn on lights

3.If motion sensor goes on (detects thief) sound alarm and turn on lights.

A = Alarm and lights switch (1 = on)

W = Window/Door sensor (1 = OK)

M = Motion Sensor (0 = OK)

S = Alarm Active switch (1 = on)

System Truth Table

 

 

Inputs

 

 

Output

 

 

 

 

 

 

S

 

M

 

W

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

0

 

0

0

 

 

 

0

 

0

 

1

0

 

 

 

0

 

1

 

0

0

 

 

alarm off

0

 

1

 

1

0

 

 

 

 

 

 

 

1

 

0

 

0

1

 

alarm on/no thief

1

 

0

 

1

0

 

 

 

 

 

 

1

 

1

 

0

1

 

 

alarm on/thief detected

1

 

1

 

1

1

 

 

 

 

 

 

 

 

 

 

 

note the binary sequence

page 246

 

A = ( S M W) + ( S M W) + ( S M W)

 

A = S ( M W + M W + M W)

 

A = S ( ( M W + M W) + ( M W + M W) )

 

A = ( S W) + ( S M) = S ( W + M)

 

We can now draw an electronic circuit for one of the equations

W

W

(S*W)

 

 

(S*W)+(S*M)

S

 

 

A

M

(S*M)

We can also do this with ladder logic

M

 

 

S

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

We can also simplify both the circuit and the ladder

W

 

 

W

 

 

 

 

 

 

 

 

(M+W)

 

M

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

M

S

 

 

 

 

 

 

 

 

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S * (M+W)

= (S*W)+(S*M)

A

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