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

A<br />

MOV<br />

source 130<br />

dest N7:0<br />

MOV<br />

source N7:1<br />

dest N7:2<br />

MVM<br />

source N7:3<br />

mask N7:4<br />

dest N7:5<br />

MVM<br />

source N7:3<br />

mask N7:4<br />

dest N7:6<br />

binary<br />

before<br />

decimal<br />

binary<br />

after<br />

decimal<br />

N7:0<br />

N7:1<br />

N7:2<br />

N7:3<br />

N7:4<br />

N7:5<br />

N7:6<br />

0000000000000000<br />

1101101101010111<br />

1000000000000000<br />

0101100010111011<br />

0010101010101010<br />

0000000000000001<br />

1101110111111111<br />

0<br />

-9385<br />

-32768<br />

22715<br />

10922<br />

1<br />

becomes<br />

0000000010000010<br />

1101101101010111<br />

1101101101010111<br />

1101100010111011<br />

0010101010101010<br />

0000100010101011<br />

1101110111111111<br />

130<br />

-9385<br />

-9385<br />

-10053<br />

10922<br />

2219<br />

NOTE: the concept of a mask is very useful, <strong>and</strong> it will be used in other functions.<br />

Masks allow instructions to change a couple of bits in a binary number without having<br />

to change the entire number. You might want to do this when you are using bits in<br />

a number to represent states, modes, status, etc.<br />

Figure 15.3<br />

Example of the MOV <strong>and</strong> MVM Statement with Binary Values<br />

15.2.2 Mathematical Functions<br />

Mathematical functions will retrieve one or more values, perform an operation <strong>and</strong>

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

Saved successfully!

Ooh no, something went wrong!