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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

plc basic functions - 15.23<br />

Solution:<br />

SW1<br />

CTU<br />

Counter cnt<br />

Preset 0<br />

MUL<br />

SourceA cnt.ACC<br />

SourceB 2<br />

Dest. dbl<br />

SW2<br />

MVM<br />

Source dbl<br />

Mask 00FFh<br />

Dest. output_word<br />

RES<br />

cnt<br />

Figure 15.24<br />

A Simple Calculation Example<br />

15.4.2 For-Next<br />

Problem: Design a for-next loop that is similar to ones found in traditional programming<br />

languages. When A is true the ladder logic should be active for 10 scans, <strong>and</strong><br />

the scan number from 1 to 10 should be stored in n0.<br />

Solution:<br />

A<br />

GRT<br />

SourceA n0<br />

SourceB 10<br />

MOV<br />

Source 0<br />

Dest n0<br />

LEQ<br />

SourceA n0<br />

SourceB 10<br />

ADD<br />

SourceA n0<br />

SourceB 1<br />

Dest. n0<br />

Figure 15.25<br />

A Simple Comparison Example<br />

www.PA<strong>Control</strong>.com

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

Saved successfully!

Ooh no, something went wrong!