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

page 303

count 5 button presses and then turn on a light. After ten button pushes the light will be turned off.

22.3 PROGRAM DESIGN METHODS

• NOTE: these are structured design methods - although many of the design activities are obvious, by following the same steps, others can understand what you have done, and others will get similar results when they solve a similar problem. This is a simple start, and we will advance to significant design techniques later.

22.3.1 Process Sequence Bits

A simple process will typically go through clear steps. Each step should follow the other, and when done the process goes back to the beginning.

The general steps to this method are,

page 304

1.Understand the process

2.Write the steps of operation and give each a number

3.For each step assign a bit

4.Write the ladder logic to turn the bits on/off as the process moves through its states.

Consider the problem below.

a flag raiser that will go up when an up button is pushed, and down when a down button is pushed, both pushbuttons are momentary. There are limit switches at the top and bottom to stop the flag pole. When turned on at first the flag should be lowered until it is at the bottom of the pole.

page 305

22.3.2 Timing Diagrams

By writing a timing diagram, the sequence of steps in a program can be obvious.

The general steps to this method are,

1.Understand the process

2.Identify the outputs that are time dependant

3.For each step assign a timer

4.Write the ladder logic to turn the outputs on/off as time progresses.

Consider the problem below.

A handicap door opener has a button that will open two doors. When the button is pushed (momentatrily) the first door will start to open immediately, the second door will start to open 2 seconds later. The first door power will stay open for a total of 10 seconds, and the second door power will stay on for 14 seconds. Use a timing diagram to design the ladder logic.

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