12.05.2014 Views

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

Automating Manufacturing Systems - Process Control and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

plc advanced functions - 16.15<br />

program file 2<br />

program file 3<br />

S2:1/15 - first scan<br />

A<br />

B<br />

EQU<br />

SourceA S2:12<br />

SourceB 21<br />

MOV<br />

Source 3<br />

Dest S2:29<br />

CPT<br />

Dest N7:1<br />

Expression<br />

N7:[N7:0] + 10<br />

MOV<br />

Source -10<br />

Dest N7:0<br />

MOV<br />

Source 0<br />

Dest N7:0<br />

CLR<br />

Dest. S2:11<br />

Figure 16.15<br />

A Fault Recovery Program<br />

A timed interrupt will run a program at regular intervals. To set a timed interrupt<br />

the program in file number should be put in S2:31. The program will be run every S2:30<br />

times 1 milliseconds. In Figure 16.16 program 2 will set up an interrupt that will run program<br />

3 every 5 seconds. Program 3 will add the value of I:000 to N7:10. This type of<br />

timed interrupt is very useful when controlling processes where a constant time interval is<br />

important. The timed interrupts are enabled by setting bit S2:2/1 in PLC-5s.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!