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 advanced functions - 16.27<br />

Program 2<br />

Program 3<br />

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

A<br />

FOR<br />

label number 0<br />

index N7:0<br />

initial value 1<br />

terminal value 10<br />

step size 2<br />

JSR<br />

Program File 3<br />

Input par N7:0<br />

Return par N7:0<br />

NXT<br />

label number 0<br />

SBR<br />

Input par N9:0<br />

ADD<br />

SourceA N9:0<br />

SourceB 1<br />

Dest N9:0<br />

RET<br />

Return par N9:0<br />

Figure 16.28<br />

C Program Implementation<br />

16.6.2 Traffic Light<br />

Problem: Design <strong>and</strong> write ladder logic for a simple traffic light controller that has<br />

a single fixed sequence of 16 seconds for both green lights <strong>and</strong> 4 second for both yellow<br />

lights. Use either stacks or sequencers.<br />

Solution: The sequencer is the best solution to this problem.

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

Saved successfully!

Ooh no, something went wrong!