Duplicating an existing module, Recursive duplicate modules – Rockwell Automation GMLC Reference Manual User Manual
Page 200
Publication GMLC-5.2 - November 1999
Creating a Module
163
3. Select Encapsulate. The selected blocks are encapsulated into a mod-
ule and given the default name New Module.
4. Change the default name to a name meaningful to you.
Duplicating an Existing Module
Once you have created a module that performs a function, you can
duplicate the module. This is not a copy of the original, but another
occurrence of the original. The duplicate has the same name and links as
the original. Therefore, if you change the contents of any occurrence of
the duplicated module, all of the duplicated are changed.
The primary use of a duplicate is to perform the same function more than
once within the same diagram.
To duplicate an existing module:
1. Drag the module to the workspace.
2. From the menu bar, select Edit. The Edit menu appears.
3. Select Duplicate Module. A new module, with an identical name and
the same contents, appears in the active diagram next to the original.
4. Position and connect the new module.
Recursive Duplicate Modules
Modules are said to be “Recursive” when a module contains a duplicate
of itself. Using recursive duplicate modules can lead to an endlessly
executing loop, unless the programmer includes carefully designed logic
that provides an escape from the loop.