📦 PLC & Ethernet ⏱ 10 min read • Updated 2026-10-26

GX Works3 Project Structure, Structured Data Types (DUT) & Label Extraction Guide

Technical deep dive into Mitsubishi GX Works3 (.gx3) project archives, Structured Data Types (DUT), multi-dimensional arrays, and exporting global/local label tables for automated HMI commissioning.
Interactive Workstation Available: Test the protocols and algorithms covered in this guide live in your browser using Melsec Monitor & PLC Studio.
Launch Melsec Monitor & PLC Studio ➔

In large-scale factory automation projects built with Mitsubishi GX Works3, control logic is organized around Structured Data Types (DUTs), Function Blocks (FBs), and thousands of global and program-local labels. Manually re-typing thousands of PLC addresses and comments into an HMI, SCADA server, or diagnostic monitor is error-prone and time-consuming. Understanding how GX Works3 stores label definitions—and how structured and array labels expand into addressable SLMP leaves—streamlines commissioning workflows.

1. Anatomy of GX Works3 Label Hierarchy

GX Works3 separates symbolic variables into three distinct scopes:

  • Global Labels (`GlobalLabel`): Project-wide variables accessible by all program blocks and (when external access is enabled) external SLMP clients. Global labels can be purely symbolic (auto-assigned by the compiler) or bound to explicit physical devices (Device-Assigned Global Labels).
  • Structured Data Types (`DUT` / Structure Definitions): Reusable user-defined templates grouping related primitives—for example, a servo axis structure ST_SERVO_AXIS containing bServoOn (BOOL), bInPosition (BOOL), dTargetPos (DINT), and rTorqueLimit (REAL).
  • Local Program & Function Block Labels: Scoped privately to a specific program POU (e.g., MAIN_LINE1). Local labels cannot be polled directly via symbolic 0x041C unless mapped to global interfaces or assigned physical device addresses.

2. Expanding Nested Structures and Multi-Dimensional Arrays

When an engineer instantiates an array of structures—such as g_stStation[0..3] of type ST_STATION—the PLC does not allow reading the entire composite structure as an opaque blob over SLMP 0x041C. Instead, client tools must recursively expand the type tree down to its scalar leaf nodes:

# Structure Definition: ST_VALVE
  .bSolenoidOut   : BOOL
  .bReedSwitchIn  : BOOL
  .tResponseTimer : TIMER
  .wOperationCnt  : WORD

# Global Label Declaration:
  stVacuumValve   : Array[0..1] of ST_VALVE

# Valid Addressable SLMP 0x041C Leaf Symbols:
  stVacuumValve[0].bSolenoidOut
  stVacuumValve[0].bReedSwitchIn
  stVacuumValve[0].tResponseTimer.C
  stVacuumValve[0].tResponseTimer.N
  stVacuumValve[0].wOperationCnt
  stVacuumValve[1].bSolenoidOut
  ...

3. Calculating Physical Offsets for Device-Assigned Structures

When a structured global label is assigned a starting physical device address in GX Works3 (for example, D1000), member offsets follow deterministic word-alignment rules:

Member Data Type Word Consumption Alignment & Packing Rule
Word / Integer (16-Bit) 1 Word (D+1) Aligned to the next sequential 16-bit word boundary.
Double Word / DINT / REAL (32-Bit) 2 Words (D+2) Occupies two consecutive 16-bit registers (Low Word at $D+n$, High Word at $D+n+1$).
Bit Members inside Word Structures Bit Offset (.0–.F) Consecutive BOOL members may pack into bit positions of a shared word or align to separate bit devices depending on structure assignment.
STRING[N] $\lceil (N + 1) / 2 \rceil$ Words Includes 1 byte for the null terminator (0x00), rounded up to the nearest full 16-bit word.

4. Exporting & Auditing GX Works3 Label Tables

To audit PLC projects without installing the full GX Works3 IDE on every field tablet:

  1. CSV / Tab-Delimited Export: Right-click Global Label in the GX Works3 Navigation pane and select Export to File. The exported UTF-16LE TSV/CSV file contains Class (`VAR_GLOBAL`), Label Name, Data Type, Constant Value, Device Assignment, and Comment columns.
  2. Direct Project Backup Inspection: Unpacked GX Works3 workspace folders and backup archives store label schemas, device comments, and structured type trees in internal relational tables, allowing browser-based engineering tools to reconstruct the complete symbol hierarchy offline in milliseconds.

Frequently Asked Questions (FAQ)

Q. Can SLMP 0x041C read a parent structure label directly without specifying member names?

No. SLMP 0x041C requires scalar leaf symbols (BOOL, WORD, INT, DINT, REAL, STRING, or Timer/Counter .S/.C/.N sub-elements). Parent structure names must be expanded to their leaf members.

Q. What character encoding does GX Works3 use when exporting Global Label CSV files?

GX Works3 exports CSV/TSV files in UTF-16 Little-Endian with a Byte Order Mark (BOM: 0xFF 0xFE) and tab delimiters so multilingual Korean, Japanese, and Chinese comments are preserved without corruption.

Q. How many words does a STRING(20) variable occupy in MELSEC memory?

A 20-character string requires 20 bytes plus 1 null-terminator byte (21 bytes total), which rounds up to 11 sixteen-bit words (22 bytes).

Q. Are local POU labels accessible via external SLMP symbolic communication?

Only Global Labels with the 'Access from External Device' attribute enabled are exposed to SLMP 0x041C. Local labels must be mapped to physical devices (M, D) if external polling is required.

📘 Complete Engineering Guides Directory (16 Technical Articles)