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.26<br />

16.6 DESIGN CASES<br />

16.6.1 If-Then<br />

Problem: Convert the following C/Java program to ladder logic.<br />

void main(){<br />

int A;<br />

for(A=1;A= 5) then A = add(A);<br />

}<br />

}<br />

int add(int x){<br />

x=x+1;<br />

return x;<br />

}<br />

Solution:

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

Saved successfully!

Ooh no, something went wrong!