{}

Vores varemærker

Impact-Company-Logo-English Black-01-177x54

Velkommen til Schneider Electrics website

Velkommen til vores website
Hvordan kan vi hjælpe dig i dag?
What is the difference between PackedBool and MaskedBool?

The Device Importer in ION Enterprise/SPM7 has a selection for both "MaskedBool" and "PackedBool"
The ION Enterprise User Guide and SPM7 User Guide describe MaskedBool and PackedBool as the same thing in the glossary section of both guides. Here is a quote from the guides:

MaskedBool or PackedBool:

A 16-bit value that is interpreted according to the bit pattern described by the Mask attribute. Bits exposed by the
mask can be read or written without affecting the value of other bits. Unmasked bits are interpreted as 0 on a
read and are unaffected on a write. Undeclared bits of a mask are interpreted as unmasked (i.e., mask="0x7F"
is interpreted as 0x007F). The value that is read or written is determined by using enumeration ordinals,
described below. If used for read-only Boolean data, enumerations are not required. If no mask is specified, all
bits are relevant.

This is a good 'general' description, but there is a subtle difference:

- PackedBool is reading ALL bits of the register at once.

- MaskedBool is only reading a single bit of the register. So in order to read the entire register, all 16 bits would need to be read.

In the end, they will both accomplish the same goal, which is why the guide groups them together. So in any case where there is an option to select PackedBool OR MaskedBool, either selection should be acceptable.

Schneider Electric Danmark

Se mere
Område:
Artikler som kan være nyttige
Se mere
Område: