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

page 437

itive rising edge the oneshot will turn on the run for a single scan. Bit ‘B3:0’ is used here to track to rung status.

A B3:0

 

ONS

 

B

 

 

 

 

 

 

A

B

24.2.8.2 - Immediate I/O Instructions

• The normal operation of the PLC is

fast [input scan]

Input values read

slow [ladder logic is checked]

outputs are updated in memory only as ladder logic scanned

fast [outputs updated]

Output values are changed to match values in memory

This approach avoids problems caused by logic setting and resetting outputs before done.

If we have a problem we may want to update an output immediately, and not wait for the PLC to complete its scan of the ladder logic. To do this we use immediate inputs and outputs.

page 438

e.g. Check for nuclear reactor overheat

I:001/03 overheat sensor

O:010/01 reactor shutdown

I:001

IIN

I:001/03

O:010/01

O:010

IOT

These added statements can allow the ladder logic to examine a critical input, and adjust a critical output many times during the execution of ladder logic that might take too long for safety.

24.2.8.3 - Fault Detection and Interrupts

The PLC can be set up to run programs automatically. This is normally done for a few reasons,

-to deal with errors that occur (eg. divide by zero)

-to run a program at a regular timed interval (eg. SPC calculations)

-to respond when a long instruction is complete (eg. analog input)

-when a certain input changed (eg. panic button)

Two types of errors will occur - terminal (critical) and warnings (non-critical). A critical failure will normally stop the PLC.

In some applications faults and failures must be dealt with in logic if possible, if not the system must be shut down.

There are some memory locations that store indications of warning and fatal errors that have occurred. The routine in program file [S:29] needs to be able to detect and clear the fault.

S:29 - program file number to run when a fault occurs

To set a timed interrupt we will set values in the status memory as indicated below. The program in file [S:31] will be run every [S:30]ms.

S:30 - timed delay between program execution - an integer number of ms S:31 - the program number to be run

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