Add-On Instruction Definition Editor - Parameters

The table describes the settings on the
Add-On Instruction Definition Editor dialog box - Parameters
tab. Use these settings to define parameters in the Add-On Instruction.
Setting
Description
Name
The name of the parameter. Names must follow the IEC-61131 Name Standard. The IEC-61131 Name Standard, section 2.1.2 states:
An identifier is a string of letters, digits, and underline characters that begin with a letter or underline character. Underlines are significant in identifiers (for example, A_BCD is interpreted differently than AB_CD). Multiple leading or multiple (consecutive) embedded underlines are not allowed, trailing underlines are not allowed, and letter case is not considered significant.
Tip:
In
Logix Designer
, most component names are limited in length to 40 characters or less.
The parameter must not have the same name as another parameter or local tag in the same Add-On Instruction definition.
Name
is not available for members of InOut parameters.
Usage
The usage type for the parameter:
Input
,
Output
, or
InOut
.
  • Input and Output parameters must be atomic data types only. Inputs and Outputs are passed by value.
  • InOut parameters are atomic or complex (that is, structures or arrays) data types. InOut parameters are always passed by-reference.
Use
Auto Layout
to order the layout of the parameters so that Input parameters appear first, followed by Output parameters, and then by the InOut parameters. Right-click the
Usage
heading to select
Auto Layout
.
Usage
is not available for members of the InOut parameters.
Data Type
The parameter data type.
Input and Output parameters are atomic data types only. During an Add-On Instruction call, Input and Output parameters are passed by value. InOut parameters are atomic or complex data types (that is, structures or arrays). InOut parameters are always passed by reference.
Data Type
is not available for members of the InOut parameters and the alias parameters.
Alias For
The local tag or its member to be an alias of the parameter.
For the Add-On Instruction definition, only Input and Output tags can alias local tags. Local tags and InOut tags cannot alias another tag. Use only one input and one output alias per local tag.
Alias For
is not available for members of the InOut parameters.
Default
The default value that is set when an Add-On Instruction of this type is instantiated. This defines the default values that initially come from the data type.
Default
is not applicable to InOut parameters or their members because InOuts are passed by reference.
Style
If it is set to
Visible,
the style displayed on the faceplate for this parameter. Or, the style displayed in the
Tag Editor
or
Data Monitor
.
The
Style
box is read-only for members of the InOut parameters.
These settings are available:
  • Binary, Decimal, Hex, Octal, ASCII, or Exponential
  • Date/Time - Displays the tag value as date and time with millisecond precision. Using this style, the displayed tag value might look like this example:
    DT#2014-05-28-19:00:01.200_000 (UTC-05:00)
  • Date/Time (ns) - Displays the tag value as date and time with nanosecond precision. Using this style, the displayed tag value might look like this example:
    LDT#2014-05-28-19:00:01.200_000_000 (UTC-05:00)
Req
Determines whether the parameter requires an argument.
Req
is selected and read-only by default for the InOut parameters because by-reference parameters require an argument. Right-click the
Req
heading to select or deselect all the rows in the
Req
column.
Vis
Determines whether the parameter is visible on the Ladder Diagram and Function Block Diagram instructions when the Add-On Instruction is called. Right-click the
Vis
heading to select or deselect all the rows in the column.
If
Req
is selected,
Vis
is selected and read-only. The
Visible
function is not applicable for members of InOut parameters.
If the parameter is not required, the
Visible
configuration may be overridden for Add-On Instruction called in Function Block Diagrams routines. Overriding the visibility at the instruction call level does not affect the definition configuration.
Description
A description for the parameter. If a Parameter does not have a description, the description of the data type is passed through. Because only complex data types have descriptions, only InOut parameters potentially have a description passed through to the parameter. A member of an expanded parameter shows its description, if it has one, on that member in the definition itself.
If a member is of another Add-On Instruction type and has its own description defined, which is shown in black text, and passes its description to a member without a description, the description concatenation occurs during pass-through. The description is concatenated with the description from the base tag, which is shown in gray text.
External Access
Determines whether the tag has
Read/Write
,
Read Only
, or no access (
None
) from external applications such as HMIs.
Constant
Select the
Constant
check box to prevent executing logic from writing values to the associated tag or parameter. If a logic routine tries to write to a constant tag, the routine will not verify. The
Constant
check box is not available for all tag types.
Tip:
You can use the
Data Monitor
dialog box to write values to the parameter. The
Value
boxes in all other browsers and language editors are disabled when the tag is a Constant tag. Changes made to the values of constant tags are recorded in the Controller Log for future reference.
Can Be Null
Use to allow the Add-On Instruction invocation to pass in a value of 0 as an argument instead of an actual tag.
When
Can Be Null
is selected, Add-On Instruction invocation allows for 0 or an actual tag to be assigned as an argument.
When
Can Be Null
is not selected, Add-On Instruction invocation only allows for an actual tag to be assigned as an argument.
Can be Null
is enabled only for InOut parameters.
Hide and Show Columns
To hide columns in the dialog box, right-click a column header and select
Hide Column
. To display a hidden column, right-click any column header and select
Toggle Column > [column]
.
Editing Modes
An asterisk appears in the first column in the dialog box to indicate that changes have been made to a parameter that have not yet been applied.
Popup Menu
Right-click a parameter to display options of operations to perform.
Move Up
Moves the selected row or rows of parameters up. Parameters are displayed on the instruction and in the
Data Type
in the order set on the
Parameters
tab Also change the parameter order using drag and drop.
The EnableIn and EnableOut parameters are at the top of the list and you cannot change their order.
Move Down
Moves the selected row or rows of parameters down. Also, change the parameter order using drag and drop.
Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type
Copies all the default values of the parameters, local tags, or members' default values that have changed to all tag instances of this instruction type.
Logic
Opens the Logic routine.
Logic
is not visible if the Add-On Instruction is locked using source protection.
Data Type Size
Displays the size of the Add-On Instruction data type. The value includes the size of any local tags, even though local tags are not visible when an instance tag of this data type is expanded in the
Tag Editor
or
Data Monitor
. However, this value does not include logic size. The size is automatically updated when you
Apply
the instruction, not as you create the parameters and local tags.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal