Example - References - SIMATIC AX - AX Hardware Engineering documentation - Hardware Engineering,

Hardware Engineering reference

Portfolio
SIMATIC AX
Product
SIMATIC AX
Software version
2.0.0-alpha1.56
Edition
08/2025
Language
English (original)
Package Name
@ax/hw-docs

The following example illustrates how the IO address assignment works.

A simple hardware declaration file Example.hwl.json may look like the one below:

  • DI_1 is an input module which contains an IoConfiguration with the input address 9.0 in the hardware declaration file.
  • DQ_1 is an output module for which no address is defined in the hardware declaration file.
{
  "Devices": [
    {
      "Name": "Device1",
      "Modules": [
        {
          "Name": "PLC_1",
          "TypeIdentifier": {
            "OrderNumber": "6ES7 516-3AN01-0AB0",
            "Version": "V2.9"
          },
          "AccessProtection": {
            "AccessLevel": "NoAccess"
          }
        },
        {
          "Name": "DI_1",
          "TypeIdentifier": {
            "OrderNumber": "6ES7 521-1BL00-0AB0",
            "Version": "V2.2"
          },
          "IoConfiguration": {
            "InputAddress": "9.0"
          }
        },
        {
          "Name": "DQ_1",
          "TypeIdentifier": {
            "OrderNumber": "6ES7 522-1BL01-0AB0",
            "Version": "V1.1"
          }
        }
      ]
    }
  ]
}

To generate the IO address file, run

apax hwc compile --input "Example.hwl.json" --output "output/"

A lock file named PLC_1.IoAddresses.json will be generated. It contains a list of all IO modules and their addresses:

  • Device1/DI_1 has an input address of 9.0 as specified in the hardware declaration file (indicated by the Source value of UserDefined)
  • The address of Device1/DQ_1 was automatically set to 0.0. Thus, the Source property is AutoAssigned.
{
  "Version": 1,
  "IoAddresses": [
    {
      "Ref": "Device1/DI_1",
      "IoConfiguration": {
        "InputAddress": [
          {
            "StartAddress": "9.0",
            "EndAddress": "12.7",
            "Length": 32,
            "Source": "UserDefined"
          }
        ]
      }
    },
    {
      "Ref": "Device1/DQ_1",
      "IoConfiguration": {
        "OutputAddress": [
          {
            "StartAddress": "0.0",
            "EndAddress": "3.7",
            "Length": 32,
            "Source": "AutoAssigned"
          }
        ]
      }
    }
  ]
}

Each module is identified by its logical path in the hardware declaration which is saved in the Ref property. It uses the same syntax as Ref options in the hardware declaration file (e.g., for assigning a module to a device).