# HowTo: Use UNION and STRUCT for Modbus Server mapping

**URL:** <https://www.wago.community/t/howto-use-union-and-struct-for-modbus-server-mapping/2876>\
**Category:** CODESYS\
**Tags:** how-to, codesys\
**Created:** [September 16, 2026, 1:42pm UTC](https://www.wago.community/t/howto-use-union-and-struct-for-modbus-server-mapping/2876 "2026-09-16T13:42:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamReeve](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/adamreeve/32/59_2.png) [@AdamReeve](https://www.wago.community/u/AdamReeve)\
**Post date:** [September 16, 2026, 1:42pm UTC](https://www.wago.community/t/howto-use-union-and-struct-for-modbus-server-mapping/2876/1 "2026-09-16T13:42:45Z")

</div>

One of my most commonly recreated examples for customers recently has been a walkthrough of using UNION and STRUCT DUTs to map Modbus Servers with mixed datatypes (i.e. DINT and REAL values as well as WORD values). Rather than constantly recreate it, I decided to make a generic walkthrough of my process that I can share. Comments are welcome!

[HowTo Use UNION and STRUCT for Modbus Server.docx](https://www.wago.community/uploads/short-url/mOXdfpGiU08PicefJZC8dPP0nxH.docx) (221.5 KB)
