Hvordan kan vi hjælpe dig i dag?

What is the difference between PackedBool and MaskedBool?

Issue:

The Device Importer in ION Enterprise / SPM 7 provides options for both PackedBool and MaskedBool, which appear identical in documentation and can cause confusion when selecting the appropriate data type.

Product Line:

Power Monitoring Expert 9.0

Power Monitoring Expert 2020

Power Monitoring Expert 2021

Power Monitoring Expert 2022

Power Monitoring Expert 2023

Power Monitoring Expert 2024

Environment:

Modbus Device Importer (Starting with PME 9.0 MDI was renamed to Device Type Editor)
Boolean register mapping

Cause:

The ION Enterprise User Guide and SPM 7 User Guide define MaskedBool and PackedBool using the same glossary description, grouping them together as equivalent data types. While this description is generally accurate, it does not explain the subtle implementation difference between the two.

Glossary definition (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 (for example, mask="0x7F" is interpreted as

0x007F). The value that is read or written is determined by using enumeration ordinals. If used for read‑only Boolean data, enumerations are not required. If no mask is specified, all bits are relevant.

Resolution:
Although the glossary groups them together, there is a subtle difference in how they are read:
  • PackedBool

    • Reads all bits of the register at once
    • Treats the register as a bit field
  • MaskedBool

    • Reads only the bit(s) defined by the mask
    • To read the entire register, all 16 bits would need to be read individually

In practice, both data types ultimately achieve the same goal, which is why the guides describe them together. When presented with a choice between PackedBool and MaskedBool, either selection is generally acceptable.

Recommendation:

If you are using an older version of PME, consider upgrading to the latest version for improved protocol support and security. For assistance with integration or upgrades, contact Schneider Electric Technical Support at: pmo-psup@se.com

support image

Schneider Electric Danmark

Se mere
Område:
Se mere
Område:
  • Produktdokumentation
  • Download af software
  • Produktvælger
  • Udskiftning og erstatning af produkter
  • Hjælp og kontaktcenter
  • Find forhandler
  • Projektrådgivning
  • Find vores kontorer
  • Schneider Electric Community
  • Karriere
  • Virksomhedsprofil
  • Rapportér en forseelse
  • Tilgængelighed
  • Presserum
  • Investorer
  • EcoStruxure
  • Jobsøgning
  • Blog
  • Privatlivspolitik
  • Cookiemeddelelse
  • Vilkår for anvendelse
  • Rediger dine cookieindstillinger