Union
Data type allowing same memory location to be accessed as different types.
Key Takeaways
- Data type allowing same memory location to be accessed as different types.
- Advanced-level topic in Data Types & Variables
- Related to: Structure, Bit Field, BOOL
Detailed Definition
Data type allowing same memory location to be accessed as different types. This term is essential for understanding data types in industrial automation and PLC programming.
Union is part of the type system defined by IEC 61131-3, the international standard for PLC programming languages. Data type allowing same memory location to be accessed as different types.
Type selection has knock-on effects throughout the project: HMI tag bindings, data-block organisation, communication-record sizes, and historian storage are all influenced by the underlying type. Get the type right early — fixing it later is a cross-cutting refactor.
On the wire and in HMI systems, Union maps to specific representations that PLC, drives, and SCADA software all need to agree on. Mismatches at the integration boundary produce data that looks plausible but is silently wrong — a class of bug that surfaces in production rather than on the test bench.
Common Questions
What is Union?
Data type allowing same memory location to be accessed as different types.
What prerequisites are needed to understand Union?
As an advanced-level concept, Union requires a solid foundation in PLC fundamentals and intermediate programming concepts. It's recommended to have hands-on experience with Data Types & Variables before diving deep into this topic.
What are related concepts I should learn?
To fully understand Union, you should also familiarize yourself with Structure, Bit Field, and BOOL. These concepts work together in industrial automation systems.
Continue Learning
Ready to deepen your understanding of Union? Here are some recommended resources:
Was this helpful?
Let us know if this glossary term helped you understand Union better.
Your feedback helps us improve our glossary and create better content for the PLC programming community.
Quick Info
- Category
- Data Types & Variables
- Difficulty
- Advanced
- Tier
- Advanced
About Data Types & Variables
Data structures, variable types, and memory organization