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

page 232

19. PLC OPERATION

19.1 PLC ORGANIZATION

• Remember: The PLC is a computer. Computers have basic components, as shown below.

Keyboard

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SVGA Screen

 

 

Input

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pentium

 

 

 

 

 

Output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Serial

 

 

 

 

 

 

 

 

 

 

 

 

 

CPU

 

 

 

 

 

 

 

 

Mouse

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

200/333 MHz

 

Input

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Light output

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

32MB Memory

 

 

 

 

 

2 GB Disk

 

 

 

 

 

 

 

 

 

 

Storage

 

 

 

 

 

Storage

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• In fact the computer above looks more like the one below,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

output memory

 

 

 

 

 

inputs

 

input memory

 

computer

 

 

 

 

outputs

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Keyboard

 

 

 

Input Chip

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

monitor

 

 

 

 

 

 

 

 

 

 

CPU Pentium

 

 

 

Screen memory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

chips

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mouse

 

 

 

Serial Input Chip

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

digital output chip

 

 

 

LED display

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Disk Controller

Memory Chips Disk

storage

page 233

The thing to notice is that in this computer outputs aren’t connected to the CPU directly.

A PLC will scan a copy of all inputs from the various inputs, into memory. After this the ladder

logic program is run, and it creates a working table of all outputs in memory also. This table is written to the outputs only after the ladder logic program is done. This continues indefinitely while the PLC is on.

**The important point is that the inputs and outputs are “snap-shots” before and after the program runs.

• PLC operation can be shown with a time-line.

 

Self

input

logic

output

 

Self

input

logic

output

Self

input

logic

 

 

test

scan

solve

scan

 

test

scan

solve

scan

test

scan

solve

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

PLC turns on

 

 

ranges from 1 to 100 ms typically

 

 

time

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-SELF TEST - Checks to see if all cards error free, reset watch-dog timer, etc. (A watchdog timer will cause an error, and shut down the PLC if not reset within a short period of time - this would indicate that the ladder logic is not being scanned normally).

-INPUT SCAN - Reads input values from the chips in the input cards, and copies their values to memory. This makes the PLC operation faster, and avoids cases where an input changes from the start to the end of the program (e.g., an emergency stop). There are special PLC functions that read the inputs directly, and avoid the input tables.

-LOGIC SOLVE/SCAN - Based on the input table in memory, the program is executed 1 step at a time, and outputs are updated. This is the focus of the later sections.

-OUTPUT SCAN - The output table is copied from memory to the output chips. These chips then drive the output devices.

19.2 PLC STATUS

The PLC keeps track of its status, for internal use, as well as allowing use by the ladder logic.

Some of the status flags available in PLC’s are,

-Communication errors

-PLC power on, first scan

-Data retention -- PLC restarts with same outputs stopped with

-Battery low

-Scan time too long error

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