Bit array, Character array – Rockwell Automation 2711-ND3 PanelBuilder v2.60 Software User Manual User Manual

Page 53

Advertising
background image

3–11

Planning an Application

Publication 2711-6.0

Bit Array

A bit array is an unsigned integer format that is assigned to part of a
word. You can assign the rest of the word to other bits or bit arrays.

The length of the array is from 1 to 16 bits. The maximum value
stored in a bit array varies from 1 (1-bit array) to 65,535 (16-bit
array). This format allows you to specify the actual number of bits
to be assigned to an object. Unused bits can then be assigned to
other object(s).

Array Size

Range

Array Size

Range

1

0 or 1

9

0 to 511

2

0 to 3

10

0 to 1023

3

0 to 7

11

0 to 2047

4

0 to 15

12

0 to 4095

5

0 to 31

13

0 to 8191

6

0 to 63

14

0 to 16383

7

0 to 127

15

0 to 32767

8

0 to 255

16

0 to 65535

For example, a value that will never be greater than 277 is assigned a
bit array with length = 9. Other bits or bit arrays could then be
assigned to locations starting at N7:2/9.

0

0

0

0

0

0

0

1

0

0

0

1

0

1

0

Address

N7:2/0

277

1

2

4

8

16

32

64

128

256

1

256 + 16 + 4 + 1

1

2

4

8

16

32

64

Important:

A bit array can occupy only one word. The length of a
bit array starting at N7:2/9 must be 7 or less.

Character Array

Data in a character array are assigned to ASCII variables. The
length of the character array is protocol dependent.

Advertising