beautypg.com

Rockwell Automation 9301 Series RSView32 Users Guide User Manual

Page 504

background image

Configuring trends

13–33

You cannot use binary numbers to set a value—you must use
decimals. The following table shows the decimal value for each pen:

Example: Showing or hiding a pen

The following example describes how to use pen masking to show or
hide a pen.

To hide Pen 10 (without affecting other pens), use the bitwise AND
operator and the complement of the pen’s decimal value:

PenMask = PenMask & ~ 512

Pen Number

Binary Mask Value

Decimal Value

1

0000 0000 0000 0001

1

2

0000 0000 0000 0010

2

3

0000 0000 0000 0100

4

4

0000 0000 0000 1000

8

5

0000 0000 0001 0000

16

6

0000 0000 0010 0000

32

7

0000 0000 0100 0000

64

8

0000 0000 1000 0000

128

9

0000 0001 0000 0000

256

10

0000 0010 0000 0000

512

11

0000 0100 0000 0000

1024

12

0000 1000 0000 0000

2048

13

0001 0000 0000 0000

4096

14

0010 0000 0000 0000

8192

15

0100 0000 0000 0000

16384

16

1000 0000 0000 0000

32768