Template Placeholders - 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

Template placeholders address cases where most of a module's configuration should be used multiple times but some settings need to be customized (e.g. the name of a module).

Template placeholders allow defining parameters/variables that are valid within the template. Values for these placeholders need to be provided when the template is used:

  • Placeholders can be defined in the template's Placeholders section.
  • For each placeholder, a name needs to be specified. The name must follow the common naming rules (see Element Names).
  • In a template's content, a reference to a placeholder can be used instead of an inline value. A reference to a placeholder is a string with the format ${NAME}, where NAME is the name of the placeholder defined in the template's Placeholders section.

The following example extends the example from above with the use of placeholders:

  • Instead of specifying a fixed module name and output address in the template, two placeholders named ModuleName and OutputAddress are defined.
  • In the template's content, these placeholders are used for the module's Name and OutputAddress settings.
{
  "Templates": {
    "Modules": [
      {

        "Name": "DQ_Template",

        "Placeholders": [
          { "Name": "ModuleName" },
          { "Name": "OutputAddress" }
        ],

        "Content": {
          "Name": "${ModuleName}",
          "TypeIdentifier": {
            "OrderNumber": "6ES7 522-1BL01-0AB0",
            "Version": "V1.1"
          },
          "IoConfiguration": {
            "OutputAddress": "${OutputAddress}"
          }
        }

      }
    ]
  }
}