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 basic functions - 15.24<br />

As designed the program differs from traditional loops because it will only complete<br />

one ’loop’ each time the logic is scanned.<br />

15.4.3 Series Calculation<br />

Problem: Create a ladder logic program that will start when input A is turned on<br />

<strong>and</strong> calculate the series below. The value of n will start at 1 <strong>and</strong> with each scan of the ladder<br />

logic n will increase until n=100. While the sequence is being incremented, any<br />

change in A will be ignored.<br />

x = 2( n – 1)<br />

Solution:<br />

go<br />

A<br />

A<br />

go<br />

LEQ<br />

Source A n<br />

Source B 100<br />

MOV<br />

Source A 1<br />

Dest. n<br />

go<br />

go<br />

CPT<br />

Dest. x<br />

Expression<br />

2 * (n - 1)<br />

go<br />

ADD<br />

Source A 1<br />

Source B n<br />

Dest. n<br />

Figure 15.26<br />

A Series Calculation 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!