Limit on number of fields in DDE Containers

Is there still a limit on the number of fields in DDE Containers? field0 - field999??

Does this limit exist also for backend-only containers??

Thanks in Advance for your answer

hi,
all containers are actually limited to max. 1000 fields.

there is also a payload limit which depends on the container type:

  • #config0…9 - typ. 4kByte (some devices may support 10kByte)
  • #configA…C - 100kByte
  • #histdata0…9 - 1kByte

Anyway, the compiler results panel will show appropriate messages when you exceed the limits.

  • configA…C are explicitly reserved for backend-only containers.
  • nevertheless you may use the more versatile containers #config0-9 with direction “backend-only” (instead of “up”, “down”,…) to gather a similar effect - but for the sake of efficient resource occupation it’s not recommended to do so

how to work around this limitation?

At least for backend-only containers, which are effectively soley accessed via REST API, you may apply a simple workaround. Declare just a single huge utf-8 string field in your container, and fill it with JSON formatted data.

// DDE
#configA myManyFields
allMyFields ustr.100000     // 100k Bytes of Unicode utf-8 string (ustr)

// POV, BLO
myManyFields.allMyFields= JSON.stringify( myData);       // write
myData= JSON.parse( myManyFields.allMyFields || '{}')    // read

Of course, you can use a similar workaround for the other (not backend-only) containers. But that’s not recommended due to device performance (and potential JSON incompatibilities between DLO/BLO/POV encoders).

Thank you for the detailed answer!!