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

CMP<br />

expression<br />

N7:03 = N7:02<br />

CMP<br />

expression<br />

N7:03 N7:02<br />

CMP<br />

expression<br />

N7:03 < N7:02<br />

CMP<br />

expression<br />

N7:03 N7:02<br />

CMP<br />

expression<br />

N7:03 >= N7:02<br />

O:012<br />

00<br />

O:012<br />

01<br />

O:012<br />

02<br />

O:012<br />

03<br />

O:012<br />

04<br />

O:012<br />

05<br />

Figure 15.17<br />

Equivalent Statements Using CMP Statements<br />

Expressions can also be used to do more complex comparisons, as shown in Figure<br />

15.18. The expression will determine if F8:1 is between F8:0 <strong>and</strong> F8:2.<br />

CMP<br />

expression<br />

(F8:1 > F8:0) & (F8:1 < F8:2)<br />

O:012<br />

04<br />

Figure 15.18<br />

A More Complex Comparison Expression<br />

The LIM <strong>and</strong> MEQ functions are shown in Figure 15.19. The first three functions<br />

will compare a test value to high <strong>and</strong> low limits. If the high limit is above the low limit <strong>and</strong><br />

the test value is between or equal to one limit, then it will be true. If the low limit is above

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

Saved successfully!

Ooh no, something went wrong!