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 timers - 9.16<br />

cnt_up<br />

cnt_down<br />

reset<br />

CTU<br />

CTD<br />

RES<br />

example<br />

preset 3<br />

example<br />

preset 3<br />

example<br />

example.DN<br />

output_thingy<br />

cnt_up<br />

cnt_down<br />

reset<br />

example.DN<br />

output_thingy<br />

Figure 9.16<br />

A Counter Example<br />

The timing diagram in Figure 9.16 illustrates the operation of the counter. If we<br />

assume that the value in the accumulator starts at 0, then the positive edges on the cnt_up<br />

input will cause it to count up to 3 where it turns the counter example done bit on. It is then<br />

reset by input reset <strong>and</strong> the accumulator value goes to zero. Input cnt_up then pulses again<br />

<strong>and</strong> causes the accumulator value to increase again, until it reaches a maximum of 5. Input<br />

cnt_down then causes the accumulator value to decrease down below 3, <strong>and</strong> the counter<br />

turns off again. Input cnt_up then causes it to increase, but input reset resets the accumulator<br />

back to zero again, <strong>and</strong> the pulses continue until 3 is reached near the end.<br />

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

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

Saved successfully!

Ooh no, something went wrong!