Text datatype for tag

I tried searching the docs/forum but couldnt find it.

Whats the functional difference between a “text” datatype versus a string? When would you choose one over the other?

Basically none. I would use String preferentially, but they should act the same in a way that’s transparent.

is there any limit on length for either?

Both will be backed by Java’s String class in memory, which limits to 2,147,483,647 “characters”, if I remember correctly. Given that would be a ~2 gB file, it’s extremely unlikely to be an issue. You’re much more likely to run into practical limits sending extremely large strings ‘over the wire’ (to/from PLCs, to/from gateway/sessions/clients) or into databases before you run into any actual limit in Ignition’s datatypes.

1 Like

oh wow, awesome thanks!

If you’re using a memory tag then there actually is some limitation on the size.

The entire tag configuration is stored as a JSON string that is limited to 268,435,455 bytes (0x0FFFFFFFF). A very large String value could push it over that limit.

1 Like