IEC 61131-3 Data Type Size Calculator

Estimate PLC scalar, string, and array type sizes in bits and bytes for IEC 61131-3 workflows.

Type Inputs

Use `Array Elements` to estimate simple repeated storage and `String Length` for `STRING(n)` or `WSTRING(n)` planning. This tool estimates payload size before vendor alignment or structure padding.

Estimated Size

Type Size
0.00 bytes
Base IEC payload size for the selected type.
Bit Size
0 bits
Base bit width for the selected type.
Total Array Size
0.00 bytes
Base type bytes multiplied by array element count.
Memory Planning Note
Choose a type to see a practical memory planning note.

Frequently Asked Questions

Does this calculator include vendor-specific alignment?

No. This tool estimates base payload size for common IEC types, strings, and arrays. Exact offsets and padding can still vary by PLC vendor and runtime.

How is STRING size estimated?

A practical planning assumption is one byte per character plus an additional byte for a terminator, so STRING(n) is estimated as n + 1 bytes. WSTRING uses a two-byte character model here.

What This Calculator Is For

IEC 61131-3 projects often require quick answers about how much memory a variable, string, or array will consume. That question comes up when planning PLC memory layouts, HMI mappings, protocol payloads, retained data, and structured variable design.

Typical practical questions include:

This calculator is designed for those practical engineering checks.

What It Calculates

The tool estimates:

It focuses on type payload size first. It does not apply vendor-specific alignment or structure padding rules automatically.

Included IEC Type Coverage

This calculator includes common IEC 61131-3 types used in PLC programming workflows, including:

Core Relationships

These formulas are intentionally practical. Vendor implementations can differ for metadata, alignment, or reserved overhead.

Important Limitations

This tool is intended for first-pass IEC memory planning, not vendor-certified final memory accounting. Actual implementation size can differ because of:

If exact PLC memory layout matters, confirm with the target runtime, compiler, or vendor documentation.

FAQ

Does IEC 61131-3 define exact memory layout for every vendor?

No. The standard defines language behavior and data-model concepts, but actual memory layout, padding, and alignment can differ between PLC platforms and runtimes.

Why is STRING(n) often treated as n + 1 bytes?

A common practical assumption is one byte per character plus a null terminator. Some platforms may store additional metadata or use different conventions.

Can I use this instead of a vendor memory mapper?

Use it as a fast type-size estimator. For exact offsets in a real PLC memory block, pair it with vendor-specific mapping rules or a dedicated memory layout tool.