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 il - 18.9<br />

Program File 2:<br />

Label<br />

Opcode<br />

Oper<strong>and</strong><br />

Comment<br />

START:<br />

CAL<br />

3<br />

(* Jump to program file 3 *)<br />

Program File 3:<br />

Label<br />

Opcode<br />

Oper<strong>and</strong><br />

Comment<br />

TEST:<br />

ON:<br />

LD<br />

BCD_TO_INT<br />

ST<br />

GT<br />

JMPC<br />

CAL<br />

LD<br />

ST<br />

CAL<br />

LD<br />

ST<br />

RET<br />

%I:000<br />

%N7:0<br />

100<br />

ON<br />

RES(C5:0)<br />

2<br />

%C5:0.PR<br />

TON(C5:0)<br />

%C5:0.DN<br />

%O:001/00<br />

(* Load the word from input card 000 *)<br />

(* Convert the BCD value to an integer *)<br />

(* Store the value in N7:0 *)<br />

(* Check for the stored value (N7:0) > 100 *)<br />

(* If true jump to ON *)<br />

(* Reset the timer *)<br />

(* Load a value of 2 - for the preset *)<br />

(* Store 2 in the preset value *)<br />

(* Update the timer *)<br />

(* Get the timer done condition bit *)<br />

(* Set the output bit *)<br />

(* Return from the subroutine *)<br />

Figure 18.7<br />

An Example of an IL Program<br />

18.4 SUMMARY<br />

• Ladder logic can be converted to IL programs, but IL programs cannot always be<br />

converted to ladder logic.<br />

• IL programs use a stack to delay operations indicated by parentheses.<br />

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

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

Saved successfully!

Ooh no, something went wrong!