Bitmap operations library

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > FBD language > Script objects of FBD language  >

Bitmap operations library

Previous pageReturn to chapter overviewNext page

bitmapoplib

Inverse - this script object used to inverse input integer value (Output = ~ Input).

Bitmap AND - this script object used to logical operation AND for input integer values (Output = Input & Input2).

Bitmap OR - this script object used to logical operation OR for input integer values (Output = Input || Input2).

Bitmap XOR - this script object used to logical operation XOR for input integer values (Output = Input XOR Input2).

Left Shift - this script object used to left shift bits of input value (Output = Input << № of bits).

Right Shift - this script object used to right shift bits of input value (Output = Input >> № of bits).

Bytes to Short - this script object used to pack 2 bytes in the short (Output = Input<<8+Input2).

Short to Bytes - this script object used to unpack short value in 2 bytes (Output = Input[Input2]).

Shorts to Int - this script object used to pack 2 shorts in the int (Output = Input<<16+Input2).

Int to Shorts - this script object used to unpack int value in 2 shorts (Output = Input[Input2]).

Read bit - this script object used to read bit of the input value (Output = Input[Input2]).

Set bit - this script object used to set bit of the input value (Output = Input | 1<<Input2).

Reset bit - this script object used to reset bit of the input value (Output = Input & ~(1<<Input2)).

 

Example:

bitmapex

This operation set 0 bit of Tag's value and place result in Tag2's value.

Tag

 

Tag2

8

0

9