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 memory - 14.6<br />

1st<br />

00<br />

bit - individual bits in accessed - this is like addressing a single output as a data bit.<br />

I:000/02 - the third input bit from input card I:000<br />

C5:4/DN - the DN bit of a counter<br />

B3/4 - the fourth bit in bit memory<br />

NOTE: Some bit addresses, especially inputs <strong>and</strong> outputs are addressed using octal.<br />

This often leads to careless errors <strong>and</strong> mistakes. For example if you want the 11th<br />

output bit, or bit 10, you would need to use 12 in octal to address it properly.<br />

2nd<br />

01<br />

3rd<br />

02<br />

4th<br />

03<br />

5th<br />

04<br />

6th<br />

05<br />

7th<br />

06<br />

8th<br />

07<br />

9th<br />

10<br />

10th<br />

11<br />

11th<br />

12<br />

12th<br />

13<br />

13th<br />

14<br />

14th<br />

15<br />

15th<br />

16<br />

16th<br />

17<br />

Figure 14.5<br />

Bit Level Addressing<br />

Entire words can be addressed as shown in Figure 14.6. These values will normally<br />

be assumed to be 2s compliment, but some functions may assume otherwise. The<br />

first example shows a simple integer memory value. The next example gets up to inputs<br />

(from card 0 in rack zero) as a single word. The last two examples are more complex <strong>and</strong><br />

they access the accumulator <strong>and</strong> preset values for a timer. Here a ’.’ is used as the ’/’ was<br />

used for bit memory to indicate it is an integer. The first two examples don’t need the ’.’<br />

because they are both integer value types. Other types of word addressing are possible,<br />

including floating point numbers.<br />

integer word - 16 bits can be manipulated as an integer.<br />

N7:8 - the 9th value from integer memory<br />

I:000 - an integer with all input values from an input card<br />

T4:7.ACC - the accumulator value for a timer<br />

T4:7.PRE - the preset value for a timer<br />

Figure 14.6<br />

Integer Word Addressing<br />

Data values do not always need to be stored in memory, they can be define literally.<br />

Figure 14.7 shows an example of two different data values. The first is an integer, the<br />

second is a real number. Hexadecimal numbers can be indicated by following the number<br />

with H, a leading zero is also needed when the first digit is A, B, C, D, E or F. A binary<br />

number is indicated by adding a B to the end of the number.

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

Saved successfully!

Ooh no, something went wrong!