Decoration types

Decoration is added to the library object in
Library Designer
. The decoration can then be applied to any field of any element of the library object that accepts values from the Expression Builder or Substitution Builder. These fields display the ellipsis (...) button to the right.
Each decoration type has a distinct role in configuring a library object.
Parameters
A parameter is an argument exposed for external access and controls how the library object is instantiated.
  • Parameters have simple data types: Boolean, string, integer, or real.
  • Parameters are set and modified by direct user input (immediate), calculation results, or references to other parameters. Parameters added as a decorative element are only accessible through
    Application Code Manager
    , and are not accessible once the completed project is exported to code.
Parameters created in
Library Designer
have these functions:
  • Storing information that is pertinent to the specific instance of the library object, but not functional. For example, the customer contact information for a project.
  • Differentiating each instance of a library object in a project. For example, the slot location of module object.
  • Configuring each instance of a library object in a project. For example, to set whether a specific instance of a valve object has permissives or interlocks.
  • Populating a tag through user input or a specific external reference.
Parameters allow a single instance of base controller code to have many variations and are used in a variety of different applications. Parameters are instantiated once. A parameter must be unique within a library object. A parameter can be copied to other library objects and to library objects of different scope.
Parameters can be collected together into a subobject. A subobject is a grouped set of parameters that can be instantiated multiple times. Examples include the channels of an analog input or the contact information for a project team member. Subobjects can be auto-generated during instantiation or added manually by the user when the library object is brought into an
Application Code Manager
project.
Functions
A function is an argument that is not exposed to external access. The value of a function is generated by user-defined logic created in
Library Designer
and by conditions that apply during instantiation.
A function can be either conditional or calculated:
  • A conditional function returns one of multiple possible results generated by expressions and based on IF/ELSE/ELSEIF logic. A conditional function allows for multiple branches and nesting.
  • A calculated function generates a single value, based on a single expression.
Both of the functions are created using the
Expression Builder
.
Functions are copied between library objects and between library objects of different scope, as long as the decorative elements used in the expressions are common to both library objects.
Functions are saved within
Library Object Manager
. Saved functions are available to all projects opened in
Library Designer
.
Substitutions
A substitution is a user-defined rule which, during instantiation, replaces a text string in the name, description, instantiation location, or other attribute of a library object element with a parameter value, calculation result, or referenced value.
IMPORTANT:
Substitutions are applied globally based on a simple search-and-replace logic.
When elements are created in the Logix Designer application, and text strings are selected for substitution in the
Library Object Manager
application, verify that the naming conventions and standards used are sufficient to help prevent conflicts when using substitutions.
Substitution that affects text strings in unexpected locations can make the library object function in unexpected ways or fail to validate.
Substitutions applied at one level of the library object hierarchy extend to all objects at lower levels of the hierarchy, and to all elements that are contained within the library objects. Substitutions applied at a higher level in the hierarchy take precedence over substitutions applied directly to the library object.
Substitutions that are inherited by an element from the containing library object, or from a library object higher in the library object hierarchy (base library), can be overridden at the element level using the Substitution Builder.
Substitutions can be copied and pasted from one library object to another and can be copied and pasted between library objects of different scope.
Predefined parameters
A predefined parameter is one of a set of parameters that are automatically available to all library objects created in the
Library Designer
. They are defined and scoped by the program. They are the same for all library objects in the hierarchy, as well as for all elements of all library objects, and are available to all substitutions, expressions, and functions. Users cannot create, modify, or delete predefined parameters.
IMPORTANT:
Predefined parameters appear generically at all levels of the Project hierarchy. Verify that the use is properly scoped when applying a predefined parameter.
Predefined parameters are populated during instantiation when a library object is added to an
Application Code Manager
Project.
Predefined parameters cannot be copied or pasted, since they are defined by the
Library Designer
and are identical for all library objects.
External references
An external reference makes the value of a local tag, controller tag, or tag member within a library object accessible to parameters in other library objects. Used in conjunction with parameters that have been assigned to accept values by reference, external references provide the points of contact between library objects in an
Application Code Manager
project.
In an
Application Code Manager
project, link an external reference to a reference-type parameter. The parameter references the value of the external reference when the project is in operation. Reference-type parameters are defined so that the external references that are accessible to them are limited to those that meet certain criteria (filters).
Any tag or tag member can be added as an external reference.
Expressions
An expression is a one-line statement that generates a single calculated result. Expressions return a string, numeric, or Boolean values. Expressions generate values automatically during instantiation.
An expression can be as simple as a single decorative element token, or can involve one or more operations involving one or more decorative elements and operators.
Expressions are used in any field in the
Library Designer
that accepts a calculated result. These fields display the ellipsis (...) button to the right.
Expressions can incorporate any decorative element that is available to the current library object element, and a set of logical and mathematical operators.
Expressions can be entered manually or created in the
Expression Builder
. The
Expression Builder
is a responsive environment to create, test, and save expressions.
Linked libraries
A linked library is a library object containing elements that are shared with other libraries.
Linked libraries specify the relationships between library objects. The links are applied as decoration to Logix code in place of parameters.
Linked libraries can be configured to share dependencies on Logix content. For instance an AOI or UDT definition is defined in a single library object, then linked to multiple library objects.
Linked libraries assist the
Application Code Manager
user when configuring an object for instantiation. For instance, a regulatory control valve typically needs an analog input for instantiation.
Parameters, displayed in the bottom pane, may also be shared with linked libraries.
Parameter links are used to read or write the parameter values between a library object and linked library object. Parameter links display the direction of the flow of information.
Interfaces
There are two types of interfaces, input and output. Output interfaces are connected to input interfaces.
Output interfaces allow variant tag member structures from different libraries to be ‘mapped’ to a common interface member name. Output interfaces are used with linked libraries.
Input interfaces are used within substitutions without needing to know the provider’s tag structure. Input interfaces act as ‘placeholder’ substitutions. Input interfaces are typically used with a linked library, but can be configured as unassigned.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal