Using Templates - 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

A template can be used to declare a module using the Apply keyword.

Templates can be used everywhere a module can be used: Both in a device's module list and the document-level module list.

  • To use a template, at least the template's name needs to be specified.
  • If the template uses placeholders, values for these placeholders need to be specified using the Arguments property:
    • Specifying arguments is optional if the template does not use placeholders or specified default values for all placeholders.
    • If the template specifies allowed values for a placeholder, only one of the specified values may be used in the arguments.

The following example shows the structure of a template usage:

{
  "Devices": [
    {
      "Name": "Device1",
      "Modules": [
        {
          // The structure of the module where the template with the variables is applied 
        },
        {
          "Apply": {
            "TemplateName": "DQ_Template",
            "Arguments": {
              "ModuleName": "DQ",
              "OutputAddress": "64"
            }
           }
        }
      ]
    }
  ]
}
  • TemplateName specified the name of the template to apply.
  • Arguments specifies the template arguments as a list of key-value pairs.
    • The key is the name of the placeholder.
    • The value is the value to use for the placeholder.