Main Content

Propagate Block Descriptions to Code Comments

You can propagate block descriptions from the model to comments in your generated code.

For specific IDEs, you can propagate the block descriptions into specific XML tags in the generated code. The IDEs use the tags to create a readable description of the function blocks in the IDE.

  • For Rockwell Automation® RSLogix™ 5000 AOI/routine target IDEs, the coder propagates block descriptions from the model into the L5X AdditionalHelpText XML tag. The IDE can then import the tag as part of AOI and routine definition in the generated code.

  • For CODESYS 3.5 IDE, the coder propagates block descriptions from the model into the documentation XML tag. When you import the generated code into the CODESYS 3.5 IDE, the IDE parses the content of this tag and provides readable descriptions of the function blocks in your code.

To propagate block descriptions to comments:

  1. Enter a description for the block.

    1. Right-click the block for which you want to write a description and select Properties.

    2. On the General tab, enter a block description.

  2. Before code generation, specify that block descriptions must propagate to code comments.

    1. Right-click the subsystem for which you are generating code and select PLC Code > Options.

    2. Select the option Include block description.

Your block description appears as comments in the generated code.